mirror of
https://github.com/tormachris/cf-workers-status-page.git
synced 2025-09-21 16:35:15 +02:00
feat: optimize KV storage read/write operations
- the state is now stored in a single KV key - there is one write for cron and one read for render
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
import config from '../../config.yaml'
|
||||
|
||||
export default function MonitorStatusLabel({ kvMonitorsMap, monitor }) {
|
||||
export default function MonitorStatusLabel({ kvMonitor }) {
|
||||
let labelColor = 'grey'
|
||||
let labelText = 'No data'
|
||||
|
||||
if (typeof kvMonitorsMap[monitor.id] !== 'undefined') {
|
||||
if (kvMonitorsMap[monitor.id].operational) {
|
||||
if (typeof kvMonitor !== 'undefined') {
|
||||
if (kvMonitor.operational) {
|
||||
labelColor = 'green'
|
||||
labelText = config.settings.monitorLabelOperational
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user