add ability to set alerts for all systems

This commit is contained in:
Henry Dollman
2024-10-19 15:14:28 -04:00
parent bdcb34c989
commit 140fd93ec9
8 changed files with 463 additions and 273 deletions

View File

@@ -7,8 +7,9 @@ import { RecordModel, RecordSubscription } from 'pocketbase'
import { WritableAtom } from 'nanostores'
import { timeDay, timeHour } from 'd3-time'
import { useEffect, useState } from 'react'
import { CpuIcon, HardDriveIcon, MemoryStickIcon } from 'lucide-react'
import { CpuIcon, HardDriveIcon, MemoryStickIcon, ServerIcon } from 'lucide-react'
import { EthernetIcon, ThermometerIcon } from '@/components/ui/icons'
import { newQueue, Queue } from '@henrygd/queue'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
@@ -299,6 +300,13 @@ export const getSizeAndUnit = (n: number, isGigabytes = true) => {
export const chartMargin = { top: 12 }
export const alertInfo = {
Status: {
name: 'Status',
unit: '',
icon: ServerIcon,
desc: 'Triggers when status switches between up and down.',
single: true,
},
CPU: {
name: 'CPU usage',
unit: '%',