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:
@@ -11,10 +11,9 @@ function getStatusColor(validCert) {
|
||||
}
|
||||
|
||||
function getHeartbeatColor(status) {
|
||||
if (status === 1) return 'bg-green-600'; // UP
|
||||
if (status === 0) return 'bg-red-600'; // DOWN
|
||||
if (status === 2) return 'bg-yellow-400'; // PENDING
|
||||
if (status === 3) return 'bg-blue-500'; // MAINTENANCE
|
||||
if (status === 1) return 'bg-green-600'; // UP
|
||||
if (status === 0) return 'bg-yellow-400'; // PENDING
|
||||
if (status === 2) return 'bg-red-600'; // DOWN
|
||||
return 'bg-gray-300';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user