Repository navigation
Conversation
|
I think there are some issues with this approach. This new code replaces the status the server sends with one recomputed from the counts which loses things the server already checks for (like WARN for servers that are not reporting metrics will now show green here). It also only fixes the scan servers circle in the drop down and does not properly affect the rolled up Servers circle which still uses the old status so it will stay red with 0 scan servers. I think the only change we need is in |
| function getComponentStatus(statusData, componentType) { | ||
| const status = statusData.componentStatuses[componentType]; | ||
|
|
||
| // trying to get the component's server counts | ||
| const respondingServers = getServerCounts(status).at(0); | ||
| const totalServers = getServerCounts(status).at(1); | ||
|
|
||
| if (componentType === 'SCAN_SERVER'){ | ||
| if (respondingServers === totalServers) { | ||
| return 'OK'; | ||
| } else if (respondingServers === 0 && totalServers > 0) { | ||
| return 'ERROR'; | ||
| } else if (respondingServers > 0 && respondingServers < totalServers){ | ||
| return 'WARN' | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Created and implemented new function getServerCounts to get the current component's responding servers and total servers counts. I believe something like this is needed in order to properly set the expected status of only Scan Servers


This pr fixes a bug in the 4.0.0 Monitor where the Scan Server status icon in the Server drop-down does not display the correct status color. Added new logic to correctly determine the color of the Scan Server status icons:
Scan Server Status Icon should be:
This pr closes #6576
OK Status:
WARN Status: still updating
ERROR Status: still updating