1
0
mirror of https://github.com/tormachris/cf-workers-status-page.git synced 2025-09-21 16:35:15 +02:00

chore(perf): save only failed days to KV storage

This commit is contained in:
Adam Janis
2020-11-12 18:57:42 +01:00
parent c3af9db11a
commit 541bdace4b
6 changed files with 88 additions and 89 deletions

View File

@ -1,3 +1,5 @@
import config from '../../config.yaml'
export default function MonitorStatusLabel({ kvMonitorsMap, monitor }) {
let labelColor = 'grey'
let labelText = 'No data'
@ -5,10 +7,10 @@ export default function MonitorStatusLabel({ kvMonitorsMap, monitor }) {
if (typeof kvMonitorsMap[monitor.id] !== 'undefined') {
if (kvMonitorsMap[monitor.id].operational) {
labelColor = 'green'
labelText = 'Operational'
labelText = config.settings.monitorLabelOperational
} else {
labelColor = 'orange'
labelText = 'Not great not terrible'
labelText = config.settings.monitorLabelNotOperational
}
}