mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
[web] fix status column rendering
This commit is contained in:
parent
60b95d12f2
commit
c8b6c6150b
@ -92,19 +92,19 @@ MethodColumn.headerName = 'Method'
|
||||
export function StatusColumn({ flow }) {
|
||||
let color = 'darkred';
|
||||
|
||||
if (flow.response !== null && 100 <= flow.response.status_code && flow.response.status_code < 200) {
|
||||
if (flow.response && 100 <= flow.response.status_code && flow.response.status_code < 200) {
|
||||
color = 'green'
|
||||
}
|
||||
else if (flow.response !== null && 200 <= flow.response.status_code && flow.response.status_code < 300) {
|
||||
else if (flow.response && 200 <= flow.response.status_code && flow.response.status_code < 300) {
|
||||
color = 'darkgreen'
|
||||
}
|
||||
else if (flow.response !== null && 300 <= flow.response.status_code && flow.response.status_code < 400) {
|
||||
else if (flow.response && 300 <= flow.response.status_code && flow.response.status_code < 400) {
|
||||
color = 'lightblue'
|
||||
}
|
||||
else if (flow.response !== null && 400 <= flow.response.status_code && flow.response.status_code < 500) {
|
||||
else if (flow.response && 400 <= flow.response.status_code && flow.response.status_code < 500) {
|
||||
color = 'lightred'
|
||||
}
|
||||
else if (flow.response !== null && 500 <= flow.response.status_code && flow.response.status_code < 600) {
|
||||
else if (flow.response && 500 <= flow.response.status_code && flow.response.status_code < 600) {
|
||||
color = 'lightred'
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user