Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

feat(ui): restyle the Monitoring body to the new look

Juan Denis8f46ac836910
diff --git a/frontend/src/pages/Monitoring.jsx b/frontend/src/pages/Monitoring.jsx
index 6e5c188b..3996d796 100644
--- a/frontend/src/pages/Monitoring.jsx
+++ b/frontend/src/pages/Monitoring.jsx
@@ -4,22 +4,19 @@ import useTabParam from '../hooks/useTabParam';
import api from '../services/api';
import { useToast } from '../contexts/ToastContext';
import EmptyState from '../components/EmptyState';
-import { StatStrip, Stat } from '../components/StatCard';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
-import { Badge } from '@/components/ui/badge';
import { Switch } from '@/components/ui/switch';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
-import { PageTopbar } from '@/components/ds';
+import { PageTopbar, MetricCard, Pill, Gauge } from '@/components/ds';
import { MONITOR_TABS } from '../components/monitoring/monitorTabs';
import {
Activity,
Bell,
- CheckCircle2,
Clock,
Cpu,
- Gauge,
+ Gauge as GaugeIcon,
HardDrive,
Mail,
MemoryStick,
@@ -47,6 +44,14 @@ const CHANNEL_META = {
generic_webhook: { label: 'Webhook', icon: Webhook },
};
+// Gauge tints follow the Servers list convention (CPU accent / RAM cyan / disk green).
+const METRIC_COLORS = {
+ cpu_percent: 'var(--accent-bright)',
+ memory_percent: 'var(--cyan)',
+ disk_percent: 'var(--green)',
+ load_average: 'var(--violet)',
+};
+
function formatTimestamp(timestamp) {
if (!timestamp) return 'Never';
return new Date(timestamp).toLocaleString();
@@ -62,16 +67,24 @@ function formatMetric(value, unit = '%') {
return `${value.toFixed(unit === '' ? 2 : 1)}${unit}`;
}
-function getAlertSeverityVariant(severity) {
+function formatBytes(bytes) {
+ if (typeof bytes !== 'number' || Number.isNaN(bytes)) return '-';
+ const gib = bytes / (1024 ** 3);
+ if (gib >= 100) return `${Math.round(gib)} GB`;
+ if (gib >= 1) return `${gib.toFixed(1)} GB`;
+ return `${Math.round(bytes / (1024 ** 2))} MB`;
+}
+
+function getSeverityTone(severity) {
switch (severity) {
case 'critical':
- return 'destructive';
+ return 'red';
case 'warning':
- return 'warning';
+ return 'amber';
case 'info':
- return 'info';
+ return 'cyan';
default:
- return 'secondary';
+ return 'gray';
}
}
@@ -137,6 +150,8 @@ const Monitoring = () => {
current: metrics.cpu?.percent,
threshold: thresholdForm.cpu_percent,
persistedThreshold: thresholds.cpu_percent,
+ gaugePct: metrics.cpu?.percent ?? 0,
+ mini: [{ k: 'cores', v: metrics.cpu?.cores ?? '-' }],
},
{
key: 'memory_percent',
@@ -147,6 +162,8 @@ const Monitoring = () => {
current: metrics.memory?.percent,
threshold: thresholdForm.memory_percent,
persistedThreshold: thresholds.memory_percent,
+ gaugePct: metrics.memory?.percent ?? 0,
+ mini: [{ k: 'used', v: `${formatBytes(metrics.memory?.used)} / ${formatBytes(metrics.memory?.total)}` }],
},
{
key: 'disk_percent',
@@ -157,16 +174,25 @@ const Monitoring = () => {
current: metrics.disk?.percent,
threshold: thresholdForm.disk_percent,
persistedThreshold: thresholds.disk_percent,
+ gaugePct: metrics.disk?.percent ?? 0,
+ mini: [{ k: 'used', v: `${formatBytes(metrics.disk?.used)} / ${formatBytes(metrics.disk?.total)}` }],
},
{
key: 'load_average',
label: 'Load average',
description: 'load',
- icon: Gauge,
+ icon: GaugeIcon,
unit: '',
current: metrics.load_average?.['1min'],
threshold: thresholdForm.load_average,
persistedThreshold: thresholds.load_average,
+ gaugePct: thresholds.load_average > 0
+ ? ((metrics.load_average?.['1min'] ?? 0) / thresholds.load_average) * 100
+ : 0,
+ mini: [
+ { k: '5m', v: formatNumber(metrics.load_average?.['5min'], 2) },
+ { k: '15m', v: formatNumber(metrics.load_average?.['15min'], 2) },
+ ],
},
];
}, [status, thresholdForm, thresholds]);
@@ -324,11 +350,10 @@ const Monitoring = () => {
<TabsContent value="overview">
<div className="monitoring-overview">
<section className={`monitoring-hero ${status?.enabled ? 'is-active' : ''}`}>
- <div>
- <Badge variant={status?.enabled ? 'success' : 'secondary'}>
- {status?.enabled ? <CheckCircle2 size={14} /> : <Clock size={14} />}
+ <div className="monitoring-hero__main">
+ <Pill kind={status?.enabled ? 'green' : 'gray'}>
{status?.enabled ? 'Monitoring active' : 'Monitoring paused'}
- </Badge>
+ </Pill>
<h2>{activeAlerts.length > 0 ? `${activeAlerts.length} active alert${activeAlerts.length !== 1 ? 's' : ''}` : 'No active alerts'}</h2>
<p>
Checks run every {status?.check_interval || configForm.check_interval || 60} seconds.
@@ -342,36 +367,67 @@ const Monitoring = () => {
</div>
</section>
- <StatStrip ariaLabel="Monitoring summary">
- <Stat label="Alert rules" value={alertRuleCount} />
- <Stat label="Delivery channels" value={enabledChannelCount} />
- <Stat label="History" value={alertHistory.length} />
- </StatStrip>
+ <div className="mon-kpis">
+ <MetricCard
+ tone={activeAlerts.length > 0 ? 'red' : 'green'}
+ icon={<Siren size={16} />}
+ value={activeAlerts.length}
+ label="Active alerts"
+ />
+ <MetricCard
+ tone="accent"
+ icon={<GaugeIcon size={16} />}
+ value={alertRuleCount}
+ label="Alert rules"
+ />
+ <MetricCard
+ tone="cyan"
+ icon={<Bell size={16} />}
+ value={enabledChannelCount}
+ label="Delivery channels"
+ >
+ <div className="sk-kpi__sub"><span>{notificationChannels.length} total</span></div>
+ </MetricCard>
+ <MetricCard
+ tone="violet"
+ icon={<Clock size={16} />}
+ value={alertHistory.length}
+ label="History entries"
+ />
+ </div>
- <section className="monitoring-panel">
- <div className="monitoring-panel__header">
+ <section>
+ <div className="mon-section-head">
<h3>Current Metrics</h3>
<Button size="sm" variant="outline" onClick={() => setActiveTab('thresholds')}>
<Settings size={14} />
Rules
</Button>
</div>
- <div className="metric-rule-grid metric-rule-grid--compact">
+ <div className="mon-host-grid">
{metricRules.map((rule) => {
const Icon = rule.icon;
const isTriggered = typeof rule.current === 'number' && rule.current > rule.persistedThreshold;
return (
- <article key={rule.key} className={`metric-rule-card ${isTriggered ? 'is-triggered' : ''}`}>
- <div className="metric-rule-card__icon">
- <Icon size={18} />
+ <article key={rule.key} className={`mon-host-card ${isTriggered ? 'is-alerting' : ''}`}>
+ <div className="mon-host-card__head">
+ <span className="mon-ico mon-ico--sm">
+ <Icon size={14} />
+ </span>
+ <span className="mon-host-card__name">{rule.label}</span>
+ <Pill kind={isTriggered ? 'amber' : 'green'}>{isTriggered ? 'alerting' : 'ok'}</Pill>
</div>
- <div>
- <span>{rule.label}</span>
- <strong>{formatMetric(rule.current, rule.unit)}</strong>
+ <div className="mon-host-card__value">{formatMetric(rule.current, rule.unit)}</div>
+ <Gauge
+ value={rule.gaugePct}
+ color={isTriggered ? 'var(--amber)' : METRIC_COLORS[rule.key]}
+ />
+ <div className="mon-host-card__mini">
+ <span>limit <b>{formatMetric(rule.persistedThreshold, rule.unit)}</b></span>
+ {rule.mini.map((m) => (
+ <span key={m.k}>{m.k} <b>{m.v}</b></span>
+ ))}
</div>
- <Badge variant={isTriggered ? 'warning' : 'success'}>
- {isTriggered ? 'Alerting' : `Under ${formatMetric(rule.persistedThreshold, rule.unit)}`}
- </Badge>
</article>
);
})}
@@ -382,15 +438,17 @@ const Monitoring = () => {
<section className="monitoring-panel monitoring-panel--warning">
<div className="monitoring-panel__header">
<h3>Active Alerts</h3>
+ <span className="mon-firing-count">{activeAlerts.length} firing</span>
</div>
- <div className="alert-list">
+ <div className="mon-alert-list">
{activeAlerts.map((alert, index) => (
- <div key={`${alert.type}-${index}`} className="alert-item">
- <Badge variant={getAlertSeverityVariant(alert.severity)}>
- {alert.severity}
- </Badge>
- <span className="alert-message">{alert.message}</span>
- <span className="alert-time">{formatNumber(alert.value)} / {alert.threshold}</span>
+ <div key={`${alert.type}-${index}`} className="mon-alert-row">
+ <span className={`mon-sev mon-sev--${alert.severity}`} />
+ <div className="mon-alert-row__body">
+ <div className="mon-alert-row__title">{alert.message}</div>
+ <div className="mon-alert-row__sub">{alert.type} · {formatNumber(alert.value)} / {alert.threshold}</div>
+ </div>
+ <span className="mon-state mon-state--red">firing</span>
</div>
))}
</div>
@@ -412,14 +470,14 @@ const Monitoring = () => {
const Icon = rule.icon;
const isTriggered = typeof rule.current === 'number' && rule.current > rule.threshold;
return (
- <article key={rule.key} className={`metric-rule-editor ${isTriggered ? 'is-triggered' : ''}`}>
+ <article key={rule.key} className={`metric-rule-editor ${isTriggered ? 'is-alerting' : ''}`}>
<div className="metric-rule-editor__main">
- <div className="metric-rule-card__icon">
- <Icon size={18} />
- </div>
+ <span className="mon-ico">
+ <Icon size={15} />
+ </span>
<div>
<h4>{rule.label}</h4>
- <span>Current: {formatMetric(rule.current, rule.unit)}</span>
+ <span>current {formatMetric(rule.current, rule.unit)}</span>
</div>
</div>
<div className="metric-rule-editor__threshold">
@@ -434,9 +492,9 @@ const Monitoring = () => {
onChange={(e) => updateThreshold(rule.key, e.target.value)}
/>
</div>
- <Badge variant={isTriggered ? 'warning' : 'secondary'}>
- {isTriggered ? 'Would alert now' : 'Quiet'}
- </Badge>
+ <Pill kind={isTriggered ? 'amber' : 'gray'}>
+ {isTriggered ? 'would alert now' : 'quiet'}
+ </Pill>
</article>
);
})}
@@ -493,14 +551,14 @@ const Monitoring = () => {
const ready = channel.enabled && channel.configured;
return (
<article key={channel.key} className={`notification-channel-tile ${ready ? 'is-ready' : ''}`}>
- <Icon size={18} />
+ <span className="mon-ico">
+ <Icon size={15} />
+ </span>
<div>
<strong>{channel.label}</strong>
<span>{ready ? 'Enabled' : channel.configured ? 'Configured' : 'Not configured'}</span>
</div>
- <Badge variant={ready ? 'success' : 'secondary'}>
- {ready ? 'Ready' : 'Off'}
- </Badge>
+ <Pill kind={ready ? 'green' : 'gray'}>{ready ? 'ready' : 'off'}</Pill>
</article>
);
})}
@@ -531,19 +589,17 @@ const Monitoring = () => {
description="Alerts will appear here once a threshold is crossed."
/>
) : (
- <div className="monitoring-history-list">
+ <div className="mon-alert-list">
{alertHistory.map((alert, index) => (
- <article key={`${alert.timestamp}-${index}`} className="monitoring-history-row">
- <Badge variant={getAlertSeverityVariant(alert.severity)}>
- {alert.severity}
- </Badge>
- <div>
- <strong>{alert.type}</strong>
- <span>{alert.message}</span>
+ <article key={`${alert.timestamp}-${index}`} className="mon-alert-row">
+ <span className={`mon-sev mon-sev--${alert.severity}`} />
+ <div className="mon-alert-row__body">
+ <div className="mon-alert-row__title">{alert.message}</div>
+ <div className="mon-alert-row__sub">{alert.type} · {formatNumber(alert.value)} / {alert.threshold}</div>
</div>
- <div className="monitoring-history-row__meta">
- <span>{formatNumber(alert.value)} / {alert.threshold}</span>
- <span>{formatTimestamp(alert.timestamp)}</span>
+ <div className="mon-alert-row__end">
+ <span className={`mon-state mon-state--${getSeverityTone(alert.severity)}`}>{alert.severity}</span>
+ <span className="mon-alert-row__time">{formatTimestamp(alert.timestamp)}</span>
</div>
</article>
))}
diff --git a/frontend/src/styles/pages/_monitoring.scss b/frontend/src/styles/pages/_monitoring.scss
index db9181c8..4fd1b1cc 100644
--- a/frontend/src/styles/pages/_monitoring.scss
+++ b/frontend/src/styles/pages/_monitoring.scss
@@ -1,35 +1,74 @@
-// Monitoring Page
+// ============================================
+// MONITORING PAGE (redesign — infra console look)
+// ============================================
.monitoring-page {
+
+ // ── shared bits ─────────────────────────────────────────
+ // Mono-uppercase eyebrow section headers
+ .mon-section-head h3,
+ .monitoring-panel__header h3 {
+ margin: 0;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
+ }
+
+ // Neutral icon tile (rule editors, channel tiles, host cards)
+ .mon-ico {
+ width: 30px;
+ height: 30px;
+ border-radius: 8px;
+ display: grid;
+ place-items: center;
+ flex-shrink: 0;
+ background: var(--surface-3);
+ color: var(--text-dim);
+
+ &--sm {
+ width: 26px;
+ height: 26px;
+ border-radius: 7px;
+ }
+ }
+
.monitoring-overview,
.monitoring-delivery-layout {
display: grid;
gap: $space-5;
}
+ // ── hero strip ──────────────────────────────────────────
.monitoring-hero {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: $space-5;
- padding: $space-6;
- border: 1px solid $border-subtle;
- border-radius: $radius-lg;
- background: $bg-card;
+ padding: $space-5 $space-6;
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ background: var(--surface);
&.is-active {
- border-color: fade($success, 35%);
+ border-color: rgba(61, 220, 151, 0.25);
}
h2 {
- margin: $space-3 0 $space-2;
- font-size: $font-size-2xl;
- line-height: 1.1;
+ margin: $space-3 0 $space-1;
+ font-size: 19px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: -0.01em;
+ line-height: 1.15;
}
p {
margin: 0;
- color: $text-secondary;
+ font-family: var(--mono);
+ font-size: 11.5px;
+ color: var(--text-faint);
}
&__actions {
@@ -43,15 +82,34 @@
}
}
+ // ── KPI strip ───────────────────────────────────────────
+ .mon-kpis {
+ display: grid;
+ grid-template-columns: repeat(4, 1fr);
+ gap: $space-4;
+
+ @media (max-width: $breakpoint-lg) { grid-template-columns: repeat(2, 1fr); }
+ @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }
+ }
+
+ // ── section heads + panels ──────────────────────────────
+ .mon-section-head {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: $space-3;
+ margin-bottom: $space-3;
+ }
+
.monitoring-panel {
min-width: 0;
padding: $space-5;
- border: 1px solid $border-subtle;
- border-radius: $radius-lg;
- background: $bg-card;
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ background: var(--surface);
&--warning {
- border-color: fade($warning, 35%);
+ border-color: rgba(251, 111, 111, 0.28);
}
}
@@ -62,11 +120,6 @@
gap: $space-3;
margin-bottom: $space-4;
- h3 {
- margin: 0;
- font-size: $font-size-lg;
- }
-
> div {
display: flex;
flex-wrap: wrap;
@@ -79,94 +132,196 @@
}
}
- .metric-rule-grid {
+ .mon-firing-count {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--red);
+ }
+
+ // ── current-metrics host cards (prototype .host-card) ───
+ .mon-host-grid {
display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: $space-3;
+ grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
+ gap: 14px;
+ }
+
+ .mon-host-card {
+ min-width: 0;
+ padding: 15px 16px;
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ background: var(--surface);
+ transition: border-color $transition-fast;
- &--compact {
- grid-template-columns: repeat(4, minmax(0, 1fr));
+ &:hover {
+ border-color: var(--border-strong);
}
- @media (max-width: 1180px) {
- &,
- &--compact {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
+ &.is-alerting {
+ border-color: rgba(245, 185, 69, 0.35);
+ }
+
+ &__head {
+ display: flex;
+ align-items: center;
+ gap: 9px;
+ margin-bottom: 12px;
+
+ .sk-pill { margin-left: auto; }
}
- @media (max-width: 720px) {
- &,
- &--compact {
- grid-template-columns: 1fr;
+ &__name {
+ flex: 1;
+ min-width: 0;
+ font-size: 13px;
+ font-weight: $font-weight-semibold;
+ @include truncate();
+ }
+
+ &__value {
+ margin-bottom: 10px;
+ font-family: var(--mono);
+ font-size: 23px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: -0.02em;
+ line-height: 1;
+ }
+
+ // mono footer stats (prototype .host-mini)
+ &__mini {
+ display: flex;
+ justify-content: space-between;
+ gap: 10px;
+ margin-top: 10px;
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+
+ span { white-space: nowrap; }
+
+ b {
+ color: var(--text-dim);
+ font-weight: 600;
}
}
}
- .metric-rule-card,
- .metric-rule-editor {
- min-width: 0;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- background: $bg-elevated;
+ // ── alert rows (active alerts + history; prototype .alert-row)
+ .mon-alert-list {
+ display: flex;
+ flex-direction: column;
}
- .metric-rule-card {
- display: grid;
- grid-template-columns: auto minmax(0, 1fr);
- gap: $space-3;
+ .mon-alert-row {
+ display: flex;
align-items: center;
- padding: $space-4;
+ gap: 14px;
+ padding: 12px 0;
+ border-top: 1px solid var(--border-soft);
- > div:nth-child(2) {
+ &:first-child {
+ border-top: none;
+ padding-top: 0;
+ }
+
+ &:last-child { padding-bottom: 0; }
+
+ &__body {
+ flex: 1;
min-width: 0;
- display: grid;
- gap: 4px;
}
- span {
- color: $text-tertiary;
- font-size: $font-size-xs;
- font-weight: $font-weight-semibold;
- text-transform: uppercase;
+ &__title {
+ font-size: 13.5px;
+ font-weight: 550;
+ color: var(--text);
}
- strong {
- font-size: $font-size-xl;
- line-height: 1;
+ &__sub {
+ margin-top: 2px;
+ font-family: var(--mono);
+ font-size: 11.5px;
+ color: var(--text-faint);
}
- [data-slot="badge"] {
- grid-column: 1 / -1;
- justify-self: start;
+ &__end {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-end;
+ gap: 4px;
+ flex-shrink: 0;
}
- &.is-triggered {
- border-color: fade($warning, 40%);
+ &__time {
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
+ white-space: nowrap;
+ }
+
+ @media (max-width: 640px) {
+ align-items: flex-start;
+
+ &__end { align-items: flex-start; }
}
}
- .metric-rule-card__icon {
- width: 36px;
- height: 36px;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- border-radius: $radius-md;
- background: $accent-glow;
- color: $accent-primary;
+ // Severity dot (prototype .sev)
+ .mon-sev {
+ width: 9px;
+ height: 9px;
+ border-radius: 3px;
+ flex-shrink: 0;
+ background: var(--text-ghost);
+
+ &--critical { background: var(--red); }
+ &--warning { background: var(--amber); }
+ &--info { background: var(--cyan); }
+ }
+
+ // State chip (prototype .alert-state: st-firing / st-resolved)
+ .mon-state {
+ padding: 3px 9px;
+ border-radius: 6px;
+ font-family: var(--mono);
+ font-size: 10px;
+ font-weight: $font-weight-semibold;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ white-space: nowrap;
+ flex-shrink: 0;
+
+ &--red { color: var(--red); background: var(--red-bg); }
+ &--amber { color: var(--amber); background: var(--amber-bg); }
+ &--cyan { color: var(--cyan); background: var(--cyan-bg); }
+ &--green { color: var(--green); background: var(--green-bg); }
+ &--gray { color: var(--text-faint); background: var(--surface-3); }
+ }
+
+ // ── alert-rule editors (thresholds tab) ─────────────────
+ .metric-rule-grid {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: $space-3;
+
+ @media (max-width: 1024px) {
+ grid-template-columns: 1fr;
+ }
}
.metric-rule-editor {
+ min-width: 0;
display: grid;
- grid-template-columns: minmax(0, 1fr) 160px auto;
+ grid-template-columns: minmax(0, 1fr) 150px auto;
gap: $space-4;
align-items: center;
- padding: $space-4;
+ padding: 15px 16px;
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ background: var(--surface-2);
- &.is-triggered {
- border-color: fade($warning, 40%);
- background: $bg-elevated;
+ &.is-alerting {
+ border-color: rgba(245, 185, 69, 0.35);
}
&__main {
@@ -177,12 +332,14 @@
h4 {
margin: 0 0 3px;
- font-size: $font-size-base;
+ font-size: 13.5px;
+ font-weight: $font-weight-semibold;
}
span {
- color: $text-secondary;
- font-size: $font-size-sm;
+ font-family: var(--mono);
+ font-size: 11.5px;
+ color: var(--text-faint);
}
}
@@ -191,12 +348,28 @@
gap: $space-2;
}
+ > .sk-pill { justify-self: end; }
+
@media (max-width: 820px) {
grid-template-columns: 1fr;
align-items: start;
+
+ > .sk-pill { justify-self: start; }
}
}
+ // Eyebrow-style field labels inside the editor + delivery forms
+ .metric-rule-editor__threshold label,
+ .monitoring-delivery-layout .form-group label {
+ font-family: var(--mono);
+ font-size: 10px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
+ }
+
+ // ── delivery tab ────────────────────────────────────────
.monitoring-delivery-layout {
grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
@@ -212,25 +385,28 @@
gap: $space-4;
padding: $space-4;
margin-bottom: $space-4;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- background: $bg-elevated;
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ background: var(--surface-2);
- strong,
- span {
+ strong {
display: block;
+ font-size: 13px;
+ font-weight: $font-weight-semibold;
}
span {
+ display: block;
margin-top: 3px;
- color: $text-tertiary;
- font-size: $font-size-sm;
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
}
}
.notification-channel-grid {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
+ grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
gap: $space-3;
}
@@ -239,121 +415,43 @@
grid-template-columns: auto minmax(0, 1fr) auto;
gap: $space-3;
align-items: center;
- padding: $space-4;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- background: $bg-elevated;
+ padding: 13px 14px;
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ background: var(--surface-2);
&.is-ready {
- border-color: fade($success, 35%);
- }
-
- > svg {
- color: $accent-primary;
- }
-
- strong,
- span {
- display: block;
- }
-
- span {
- margin-top: 3px;
- color: $text-tertiary;
- font-size: $font-size-xs;
- }
- }
-
- .alert-list {
- display: flex;
- flex-direction: column;
- gap: $space-2;
- }
-
- .alert-item {
- display: flex;
- align-items: center;
- gap: $space-3;
- padding: $space-3 $space-4;
- background: $bg-elevated;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
-
- .alert-message {
- flex: 1;
- min-width: 0;
- color: $text-primary;
- font-size: $font-size-sm;
- }
-
- .alert-time {
- color: $text-tertiary;
- font-size: $font-size-xs;
- white-space: nowrap;
- }
-
- @media (max-width: 640px) {
- align-items: flex-start;
- flex-direction: column;
+ border-color: rgba(61, 220, 151, 0.3);
- .alert-time {
- white-space: normal;
+ .mon-ico {
+ background: var(--green-bg);
+ color: var(--green);
}
}
- }
- .monitoring-history-list {
- display: grid;
- gap: $space-2;
- }
-
- .monitoring-history-row {
- display: grid;
- grid-template-columns: auto minmax(0, 1fr) auto;
- gap: $space-4;
- align-items: center;
- padding: $space-4;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- background: $bg-elevated;
-
- > div {
- min-width: 0;
- display: grid;
- gap: 4px;
- }
+ > div { min-width: 0; }
strong {
- text-transform: capitalize;
+ display: block;
+ font-size: 13px;
+ font-weight: $font-weight-semibold;
+ @include truncate();
}
span {
- color: $text-secondary;
- font-size: $font-size-sm;
- }
-
- &__meta {
- justify-items: end;
-
- span {
- color: $text-tertiary;
- font-size: $font-size-xs;
- }
- }
-
- @media (max-width: 760px) {
- grid-template-columns: 1fr;
-
- &__meta {
- justify-items: start;
- }
+ display: block;
+ margin-top: 2px;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
}
}
.form-help {
display: block;
margin-top: $space-1;
- color: $text-tertiary;
- font-size: $font-size-xs;
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
}
}