1
0
mirror of https://github.com/tormachris/cf-workers-status-page.git synced 2025-09-21 16:35:15 +02:00
This commit is contained in:
Adam Janis
2020-11-08 13:56:02 +01:00
commit e85c5766a7
20 changed files with 1013 additions and 0 deletions

View File

@ -0,0 +1,16 @@
export default function MonitorStatusLabel({ kvMonitorsMap, monitor }) {
let labelColor = 'grey'
let labelText = 'No data'
if (typeof kvMonitorsMap[monitor.id] !== 'undefined') {
if (kvMonitorsMap[monitor.id].operational) {
labelColor = 'green'
labelText = 'Operational'
} else {
labelColor = 'orange'
labelText = 'Not great not terrible'
}
}
return <div className={`ui ${labelColor} horizontal label`}>{labelText}</div>
}