Refactor heartbeat color logic in UptimeStatusIsland component for improved status representation
- Adjusted the color mapping for heartbeat statuses to enhance clarity: changed DOWN to red, PENDING to yellow, and maintained UP as green. - Simplified the logic for better readability and maintainability.
This commit is contained in:
@@ -12,9 +12,8 @@ function getStatusColor(validCert) {
|
|||||||
|
|
||||||
function getHeartbeatColor(status) {
|
function getHeartbeatColor(status) {
|
||||||
if (status === 1) return 'bg-green-600'; // UP
|
if (status === 1) return 'bg-green-600'; // UP
|
||||||
if (status === 0) return 'bg-red-600'; // DOWN
|
if (status === 0) return 'bg-yellow-400'; // PENDING
|
||||||
if (status === 2) return 'bg-yellow-400'; // PENDING
|
if (status === 2) return 'bg-red-600'; // DOWN
|
||||||
if (status === 3) return 'bg-blue-500'; // MAINTENANCE
|
|
||||||
return 'bg-gray-300';
|
return 'bg-gray-300';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user