Alert history updates

This commit is contained in:
henrygd
2025-07-21 20:07:52 -04:00
parent 9d7fb8ab80
commit 18d9258907
29 changed files with 1301 additions and 643 deletions

View File

@@ -173,7 +173,7 @@ export default function SystemsTable() {
invertSorting: false,
Icon: ServerIcon,
cell: (info) => (
<span className="flex gap-0.5 items-center text-base md:pe-5">
<span className="flex gap-0.5 items-center text-base md:ps-1 md:pe-5">
<IndicatorDot system={info.row.original} />
<Button
data-nolink
@@ -233,7 +233,7 @@ export default function SystemsTable() {
header: sortableHeader,
cell(info: CellContext<SystemRecord, unknown>) {
const { info: sysInfo, status } = info.row.original
if (sysInfo.l1 == undefined) {
if (sysInfo.l1 === undefined) {
return null
}
@@ -245,13 +245,13 @@ export default function SystemsTable() {
const normalized = max / cpuThreads
if (status !== "up") return "bg-primary/30"
if (normalized < 0.7) return "bg-green-500"
if (normalized < 1.0) return "bg-yellow-500"
if (normalized < 1) return "bg-yellow-500"
return "bg-red-600"
}
return (
<div className="flex items-center gap-2 w-full tabular-nums tracking-tight">
<span className={cn("inline-block size-2 rounded-full", getDotColor())} />
<div className="flex items-center gap-[.35em] w-full tabular-nums tracking-tight">
<span className={cn("inline-block size-2 rounded-full me-0.5", getDotColor())} />
{loadAverages.map((la, i) => (
<span key={i}>{decimalString(la, la >= 10 ? 1 : 2)}</span>
))}
@@ -267,7 +267,7 @@ export default function SystemsTable() {
Icon: EthernetIcon,
header: sortableHeader,
cell(info) {
if (info.row.original.status !== "up") {
if (info.row.original.status === "paused") {
return null
}
const val = info.getValue() as number