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(frontend): restore cron CSS, SurveyTab, and runtime proving tests (plan 42 ph4)

Juan Denise2ae436d1af3
diff --git a/frontend/src/components/serverdetail/SurveyTab.jsx b/frontend/src/components/serverdetail/SurveyTab.jsx
new file mode 100644
index 00000000..1356884b
--- /dev/null
+++ b/frontend/src/components/serverdetail/SurveyTab.jsx
@@ -0,0 +1,452 @@
+import { useState, useEffect, useCallback } from 'react';
+import api from '../../services/api';
+import { useToast } from '../../contexts/ToastContext';
+import { Button } from '@/components/ui/button';
+import { Pill } from '../ds';
+import EmptyState from '../EmptyState';
+import {
+ FileSearch,
+ RefreshCw,
+ AlertTriangle,
+ ShieldCheck,
+ Boxes,
+ Globe,
+ Database,
+ Clock,
+ Radio,
+ Network,
+} from 'lucide-react';
+
+// Survey tab (plan 27/28) — the read-only "Server Map" for a paired agent.
+//
+// A survey is a strictly read-only "flight": the agent runs a declarative probe
+// catalog and returns what's running on the box; the panel normalizes it into a
+// stable Server Map and stores each flight as an immutable, diffable snapshot.
+// This tab also hosts the managed/observed adoption toggle: when another control
+// panel is detected we suggest switching to Observed (read-only) mode.
+const SurveyTab = ({ serverId, serverStatus, server }) => {
+ const toast = useToast();
+
+ const [loading, setLoading] = useState(true);
+ const [snapshots, setSnapshots] = useState([]);
+ const [map, setMap] = useState(null);
+ const [takenAt, setTakenAt] = useState(null);
+ const [diff, setDiff] = useState(null);
+
+ const [mode, setMode] = useState('managed');
+ const [observed, setObserved] = useState(null);
+
+ const [flying, setFlying] = useState(false);
+ const [switching, setSwitching] = useState(false);
+
+ const [showCatalog, setShowCatalog] = useState(false);
+ const [catalog, setCatalog] = useState(null);
+
+ // The agent must advertise the `survey` capability. The tab is only mounted
+ // when it does, but guard here too so an older agent degrades cleanly.
+ const capable = server?.capabilities?.survey ?? true;
+
+ const load = useCallback(async () => {
+ try {
+ const [surveysRes, obs] = await Promise.all([
+ api.getServerSurveys(serverId),
+ api.getServerObservedStatus(serverId).catch(() => null),
+ ]);
+ const list = surveysRes?.surveys || [];
+ setSnapshots(list);
+ if (obs) {
+ setMode(obs.management_mode || 'managed');
+ setObserved(obs);
+ }
+ if (list.length) {
+ const latest = await api.getServerSurvey(serverId, list[0].id);
+ setMap(latest?.map || null);
+ setTakenAt(latest?.taken_at || null);
+ if (list.length >= 2) {
+ const d = await api.diffServerSurveys(serverId).catch(() => null);
+ setDiff(d?.diff || null);
+ } else {
+ setDiff(null);
+ }
+ } else {
+ setMap(null);
+ setTakenAt(null);
+ setDiff(null);
+ }
+ } catch (err) {
+ console.error('Failed to load survey:', err);
+ }
+ }, [serverId]);
+
+ useEffect(() => {
+ let cancelled = false;
+ (async () => {
+ setLoading(true);
+ await load();
+ if (!cancelled) setLoading(false);
+ })();
+ return () => { cancelled = true; };
+ }, [load]);
+
+ async function refly() {
+ setFlying(true);
+ try {
+ await api.runServerSurvey(serverId);
+ toast.success('Survey complete');
+ await load();
+ } catch (err) {
+ toast.error(err.message || 'Survey failed');
+ } finally {
+ setFlying(false);
+ }
+ }
+
+ async function loadCatalog() {
+ if (showCatalog) {
+ setShowCatalog(false);
+ return;
+ }
+ try {
+ const data = catalog || await api.getSurveyCatalog();
+ setCatalog(data);
+ setShowCatalog(true);
+ } catch (err) {
+ toast.error(err.message || 'Failed to load probe index');
+ }
+ }
+
+ async function switchToObserved() {
+ setSwitching(true);
+ try {
+ await api.setServerManagementMode(serverId, 'observed');
+ toast.success('Switched to Observed (read-only)');
+ setMode('observed');
+ const obs = await api.getServerObservedStatus(serverId).catch(() => null);
+ if (obs) setObserved(obs);
+ } catch (err) {
+ toast.error(err.message || 'Failed to switch mode');
+ } finally {
+ setSwitching(false);
+ }
+ }
+
+ async function toggleAgentUpdateOverride(checked) {
+ setSwitching(true);
+ try {
+ await api.setServerManagementMode(serverId, mode, checked);
+ const obs = await api.getServerObservedStatus(serverId).catch(() => null);
+ if (obs) setObserved(obs);
+ } catch (err) {
+ toast.error(err.message || 'Failed to update setting');
+ } finally {
+ setSwitching(false);
+ }
+ }
+
+ if (!capable) {
+ return (
+ <EmptyState
+ icon={FileSearch}
+ title="Survey not available"
+ description="This agent doesn't support the read-only survey yet. Upgrade the agent to enable Observe mode — it maps what's running on the box without changing anything."
+ />
+ );
+ }
+
+ if (loading) {
+ return <EmptyState loading title="Loading survey" />;
+ }
+
+ return (
+ <div className="survey-tab">
+ <div className="survey-tab__toolbar">
+ <div className="survey-tab__toolbar-info">
+ {takenAt ? (
+ <span className="survey-tab__muted">Last flight {new Date(takenAt).toLocaleString()}</span>
+ ) : (
+ <span className="survey-tab__muted">No flights yet — run one to map this server.</span>
+ )}
+ {map?.foreign_panel_detected && (
+ <Pill kind="amber">
+ <AlertTriangle size={12} aria-hidden="true" /> Another control panel detected
+ </Pill>
+ )}
+ </div>
+ <div className="survey-tab__toolbar-actions">
+ <Button variant="outline" size="sm" onClick={loadCatalog}>
+ <FileSearch size={14} /> {showCatalog ? 'Hide' : 'What we check'}
+ </Button>
+ <Button size="sm" onClick={refly} disabled={flying || serverStatus !== 'online'}>
+ <RefreshCw size={14} className={flying ? 'spin' : ''} />
+ {flying ? 'Surveying…' : (snapshots.length ? 'Re-fly survey' : 'Run survey')}
+ </Button>
+ </div>
+ </div>
+
+ {serverStatus !== 'online' && !snapshots.length && (
+ <p className="survey-tab__muted">The agent is offline — reconnect it to fly a survey.</p>
+ )}
+
+ {map?.foreign_panel_detected && mode === 'managed' && (
+ <div className="survey-tab__suggest">
+ <AlertTriangle size={18} aria-hidden="true" />
+ <div className="survey-tab__suggest-body">
+ <strong>This box looks like it&apos;s run by another control panel.</strong>
+ <p>
+ Two panels writing web-server config will fight over ownership. Switch this
+ server to <em>Observed</em> to keep read-only survey, metrics and backups while
+ ServerKit stops making config changes — then migrate sites over when you&apos;re ready.
+ </p>
+ </div>
+ <Button size="sm" variant="outline" onClick={switchToObserved} disabled={switching}>
+ {switching ? 'Switching…' : 'Switch to Observed'}
+ </Button>
+ </div>
+ )}
+
+ {mode === 'observed' && (
+ <div className="survey-tab__observed">
+ <div className="survey-tab__observed-head">
+ <Pill kind="amber"><ShieldCheck size={12} aria-hidden="true" /> Observed (read-only)</Pill>
+ {observed && (
+ <span
+ className="survey-tab__muted"
+ title="Mutating commands the Observe guard has refused on this server"
+ >
+ {observed.observed_blocked_count} command{observed.observed_blocked_count === 1 ? '' : 's'} blocked
+ </span>
+ )}
+ </div>
+ <p className="survey-tab__muted">
+ ServerKit makes no config changes on this box. Metrics, survey, doctor reads
+ and backups of pointed paths stay on; every mutating action is refused.
+ </p>
+ <label className="survey-tab__observed-toggle">
+ <input
+ type="checkbox"
+ checked={!!observed?.allow_agent_update_observed}
+ disabled={switching || !observed}
+ onChange={(e) => toggleAgentUpdateOverride(e.target.checked)}
+ />
+ <span>
+ Allow <code>agent:update</code> while observing
+ <span className="survey-tab__muted"> — keep the agent binary current without leaving Observed mode</span>
+ </span>
+ </label>
+ </div>
+ )}
+
+ {showCatalog && catalog && (
+ <section className="survey-tab__catalog">
+ <p className="survey-tab__muted">
+ A survey is strictly read-only. Catalog v{catalog.version} — here is exactly what the agent looks at:
+ </p>
+ <ul className="survey-tab__catalog-list">
+ {catalog.probes.map((p) => (
+ <li key={p.id}>
+ <strong>{p.title}</strong> <span className="survey-tab__muted">— {p.reads}</span>
+ </li>
+ ))}
+ </ul>
+ </section>
+ )}
+
+ {diff && (
+ <section className="survey-tab__section">
+ <h3 className="survey-tab__section-title"><RefreshCw size={15} aria-hidden="true" /> Since last flight</h3>
+ <DiffSummary diff={diff} />
+ </section>
+ )}
+
+ {map ? (
+ <>
+ <section className="survey-tab__section">
+ <h3 className="survey-tab__section-title"><Boxes size={15} aria-hidden="true" /> Services</h3>
+ <ServiceGrid services={map.services} />
+ </section>
+
+ <section className="survey-tab__section">
+ <h3 className="survey-tab__section-title"><Globe size={15} aria-hidden="true" /> Sites</h3>
+ <SitesTable sites={map.sites} />
+ </section>
+
+ <SimpleList
+ icon={Database} title="Databases" items={map.databases}
+ empty="No database engines detected."
+ render={(d) => (
+ <>
+ <span className="survey-tab__mono">{d.engine}</span>
+ {d.port ? <span className="survey-tab__muted"> :{d.port}</span> : null}
+ {' '}<Pill kind={d.active ? 'green' : 'gray'}>{d.active ? 'active' : 'inactive'}</Pill>
+ </>
+ )}
+ />
+
+ <SimpleList
+ icon={ShieldCheck} title="TLS certificates" items={map.certs}
+ empty="No certificates detected."
+ render={(c) => (
+ <>
+ <span className="survey-tab__mono">{c.domain}</span>
+ {c.expires_at ? <span className="survey-tab__muted"> — expires {new Date(c.expires_at).toLocaleDateString()}</span> : null}
+ </>
+ )}
+ />
+
+ <SimpleList
+ icon={Clock} title="Cron" items={map.cron}
+ empty="No crontabs detected."
+ render={(c) => (
+ <>
+ <span className="survey-tab__mono">{c.user}</span>
+ <span className="survey-tab__muted"> — {(c.lines || []).length} job(s)</span>
+ </>
+ )}
+ />
+
+ <SimpleList
+ icon={Radio} title="Listening ports" items={map.listeners}
+ empty="No listeners reported."
+ render={(l) => (
+ <>
+ <span className="survey-tab__mono">:{l.port}/{l.proto}</span>
+ <span className="survey-tab__muted"> → {l.process || 'unknown'}</span>
+ </>
+ )}
+ />
+
+ {map.foreign_panels?.length ? (
+ <SimpleList
+ icon={Network} title="Control-panel markers" items={map.foreign_panels}
+ empty=""
+ render={(f) => <code className="survey-tab__mono">{f.marker}</code>}
+ />
+ ) : null}
+ </>
+ ) : (
+ <EmptyState
+ icon={FileSearch}
+ title="No survey yet"
+ description="Fly a read-only survey to map what's running on this server."
+ />
+ )}
+ </div>
+ );
+};
+
+// A compact +added / −removed / ~changed summary across every map category.
+function DiffSummary({ diff }) {
+ const cats = [
+ ['services', 'Services'],
+ ['sites', 'Sites'],
+ ['databases', 'Databases'],
+ ['certs', 'Certs'],
+ ['cron', 'Cron'],
+ ['listeners', 'Listeners'],
+ ];
+ const chips = [];
+ cats.forEach(([key, label]) => {
+ const d = diff?.[key];
+ if (!d) return;
+ const parts = [];
+ if (d.added?.length) parts.push(`+${d.added.length}`);
+ if (d.removed?.length) parts.push(`−${d.removed.length}`);
+ if (d.changed?.length) parts.push(`~${d.changed.length}`);
+ if (parts.length) chips.push({ label, text: parts.join(' ') });
+ });
+ if (diff?.foreign_panel_changed) chips.push({ label: 'Control panel', text: 'changed' });
+
+ if (!chips.length) {
+ return <p className="survey-tab__muted">No changes since the last flight.</p>;
+ }
+ return (
+ <ul className="survey-tab__diff">
+ {chips.map((c) => (
+ <li key={c.label}>
+ <span className="survey-tab__mono">{c.label}</span>
+ <Pill kind="gray">{c.text}</Pill>
+ </li>
+ ))}
+ </ul>
+ );
+}
+
+// Detected services as small chips (name + ports + active/inactive).
+function ServiceGrid({ services }) {
+ const list = services || [];
+ if (!list.length) {
+ return <p className="survey-tab__muted">No managed services detected.</p>;
+ }
+ return (
+ <div className="survey-tab__services">
+ {list.map((s) => (
+ <div key={s.id} className="survey-tab__service">
+ <Boxes size={14} aria-hidden="true" />
+ <span className="survey-tab__service-name">{s.id}</span>
+ {s.ports?.length ? (
+ <span className="survey-tab__service-ports">:{s.ports.join(', :')}</span>
+ ) : null}
+ <Pill kind={s.active ? 'green' : 'gray'}>{s.active ? 'active' : 'inactive'}</Pill>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+// Read-only web-server vhosts, with a "managed by" column that flags sites owned
+// by another control panel.
+function SitesTable({ sites }) {
+ const list = sites || [];
+ if (!list.length) {
+ return <p className="survey-tab__muted">No web-server vhosts detected.</p>;
+ }
+ return (
+ <div className="survey-tab__table-wrap">
+ <table className="survey-tab__table">
+ <thead>
+ <tr>
+ <th>Domain</th>
+ <th>Stack</th>
+ <th>Doc root</th>
+ <th>Upstream</th>
+ <th>Managed by</th>
+ </tr>
+ </thead>
+ <tbody>
+ {list.map((s, i) => (
+ <tr key={s.domain || i}>
+ <td className="survey-tab__mono">{s.domain}</td>
+ <td>{s.stack}</td>
+ <td className="survey-tab__mono">{s.doc_root || '—'}</td>
+ <td className="survey-tab__mono">{s.upstream || '—'}</td>
+ <td>
+ {s.managed_by === 'other-panel'
+ ? <Pill kind="amber">other panel</Pill>
+ : <Pill kind="gray">{s.managed_by}</Pill>}
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ );
+}
+
+// A titled section that renders a simple list of items, or an empty hint.
+function SimpleList({ icon: Icon, title, items, empty, render }) {
+ const list = items || [];
+ return (
+ <section className="survey-tab__section">
+ <h3 className="survey-tab__section-title"><Icon size={15} aria-hidden="true" /> {title}</h3>
+ {list.length ? (
+ <ul className="survey-tab__list">
+ {list.map((item, i) => <li key={i}>{render(item)}</li>)}
+ </ul>
+ ) : (
+ empty ? <p className="survey-tab__muted">{empty}</p> : null
+ )}
+ </section>
+ );
+}
+
+export default SurveyTab;
diff --git a/frontend/src/pages/ServerDetail.jsx b/frontend/src/pages/ServerDetail.jsx
index 1f0135e2..8d2e6e19 100644
--- a/frontend/src/pages/ServerDetail.jsx
+++ b/frontend/src/pages/ServerDetail.jsx
@@ -14,6 +14,7 @@ import ServerDockerTab from '../components/serverdetail/ServerDockerTab';
import CronTab from '../components/serverdetail/CronTab';
import CloudflaredTab from '../components/serverdetail/CloudflaredTab';
import ServerMetricsTab from '../components/serverdetail/ServerMetricsTab';
+import SurveyTab from '../components/serverdetail/SurveyTab';
import ServerSettingsTab, { TokenModal } from '../components/serverdetail/ServerSettingsTab';
import {
STATUS_PILL_KIND,
@@ -38,7 +39,7 @@ const ServerDetail = () => {
const [securityAlerts, setSecurityAlerts] = useState([]);
const toast = useToast();
- const validTabs = ['overview', 'docker', 'proxy', 'cron', 'cloudflared', 'packages', 'services', 'metrics', 'alerts', 'remote-access', 'settings'];
+ const validTabs = ['overview', 'docker', 'proxy', 'cron', 'cloudflared', 'packages', 'services', 'survey', 'metrics', 'alerts', 'remote-access', 'settings'];
const activeTab = validTabs.includes(tab) ? tab : 'overview';
const loadServer = useCallback(async () => {
@@ -224,6 +225,7 @@ const ServerDetail = () => {
...(server.capabilities?.cloudflared ? [{ id: 'cloudflared', label: 'Tunnels' }] : []),
...(server.capabilities?.packages ? [{ id: 'packages', label: 'Packages' }] : []),
...(server.capabilities?.systemd ? [{ id: 'services', label: 'Services' }] : []),
+ ...(server.capabilities?.survey ? [{ id: 'survey', label: 'Survey' }] : []),
{ id: 'metrics', label: 'Metrics' },
...(totalAlertCount > 0
? [{ id: 'alerts', label: 'Alerts', badge: totalAlertCount }]
@@ -351,6 +353,11 @@ const ServerDetail = () => {
<ServicesTab serverId={id} serverStatus={server.status} />
</TabsContent>
)}
+ {server.capabilities?.survey && (
+ <TabsContent value="survey">
+ <SurveyTab serverId={id} serverStatus={server.status} server={server} />
+ </TabsContent>
+ )}
<TabsContent value="metrics">
<ServerMetricsTab serverId={id} metrics={metrics} />
</TabsContent>
diff --git a/frontend/src/plugins/runtime/__tests__/sdkGate.test.mjs b/frontend/src/plugins/runtime/__tests__/sdkGate.test.mjs
new file mode 100644
index 00000000..d974fa34
--- /dev/null
+++ b/frontend/src/plugins/runtime/__tests__/sdkGate.test.mjs
@@ -0,0 +1,46 @@
+// Proving test for the load-time SDK gate (plan 32 Decision 1).
+//
+// The gate is the pure half of the runtime loader's version check, split out so
+// it runs under plain node. This covers the refusal matrix: grace (no range),
+// load (in range / panel reported nothing), and refuse (out of range).
+//
+// Run: node --test src/plugins/runtime/__tests__/sdkGate.test.mjs
+import test from 'node:test';
+import assert from 'node:assert/strict';
+
+import { sdkGateDecision, sdkRefusalMessage } from '../sdkGate.js';
+
+test('no pinned range → grace (warn-and-load for one release)', () => {
+ assert.equal(sdkGateDecision('', '1.5.0'), 'grace');
+ assert.equal(sdkGateDecision(' ', '1.5.0'), 'grace');
+ assert.equal(sdkGateDecision(null, '1.5.0'), 'grace');
+ assert.equal(sdkGateDecision(undefined, '1.5.0'), 'grace');
+});
+
+test('panel reported no SDK version → load (no opinion)', () => {
+ assert.equal(sdkGateDecision('^1.2.0', null), 'load');
+ assert.equal(sdkGateDecision('^1.2.0', ''), 'load');
+ assert.equal(sdkGateDecision('^1.2.0', undefined), 'load');
+});
+
+test('range covers the panel SDK → load', () => {
+ assert.equal(sdkGateDecision('^1.2.0', '1.2.0'), 'load');
+ assert.equal(sdkGateDecision('^1.2.0', '1.9.9'), 'load');
+ assert.equal(sdkGateDecision('~1.2.0', '1.2.9'), 'load');
+ assert.equal(sdkGateDecision('>=2.0.0', '2.0.0'), 'load');
+ assert.equal(sdkGateDecision('*', '3.1.4'), 'load');
+});
+
+test('range excludes the panel SDK → refuse (fail closed)', () => {
+ assert.equal(sdkGateDecision('^1.2.0', '2.0.0'), 'refuse');
+ assert.equal(sdkGateDecision('^1.2.0', '1.1.9'), 'refuse');
+ assert.equal(sdkGateDecision('~1.2.0', '1.3.0'), 'refuse');
+ assert.equal(sdkGateDecision('>=2.0.0', '1.9.0'), 'refuse');
+});
+
+test('refusal message names the range and the panel version', () => {
+ const msg = sdkRefusalMessage('^2.0.0', '1.4.1');
+ assert.ok(msg.includes('^2.0.0'));
+ assert.ok(msg.includes('1.4.1'));
+ assert.equal(typeof msg, 'string');
+});
diff --git a/frontend/src/plugins/runtime/__tests__/sha256.test.mjs b/frontend/src/plugins/runtime/__tests__/sha256.test.mjs
new file mode 100644
index 00000000..faf24280
--- /dev/null
+++ b/frontend/src/plugins/runtime/__tests__/sha256.test.mjs
@@ -0,0 +1,63 @@
+// Proving test for the dependency-free SHA-256 + the digest seam (plan 32
+// Decision 2). The HTTP-only panel path (pure-JS sha256) MUST compute the same
+// digest as the secure-context path (crypto.subtle). This asserts the pure-JS
+// implementation against known vectors AND against Node's crypto for random
+// inputs, and asserts the digest seam agrees with the pure-JS hash.
+//
+// Run: node --test src/plugins/runtime/__tests__/sha256.test.mjs
+import test from 'node:test';
+import assert from 'node:assert/strict';
+import { createHash, randomBytes } from 'node:crypto';
+
+import { sha256Hex } from '../sha256.js';
+import { digestBytes } from '../digest.js';
+
+const enc = new TextEncoder();
+
+function nodeSha256(bytes) {
+ return createHash('sha256').update(Buffer.from(bytes)).digest('hex');
+}
+
+test('known NIST vectors', () => {
+ // Empty input
+ assert.equal(
+ sha256Hex(new Uint8Array(0)),
+ 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
+ );
+ // "abc"
+ assert.equal(
+ sha256Hex(enc.encode('abc')),
+ 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad',
+ );
+ // 448-bit multi-block message
+ assert.equal(
+ sha256Hex(enc.encode('abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq')),
+ '248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1',
+ );
+});
+
+test('accepts ArrayBuffer, Uint8Array, and DataView views alike', () => {
+ const u8 = enc.encode('serverkit');
+ const expected = nodeSha256(u8);
+ assert.equal(sha256Hex(u8), expected);
+ assert.equal(sha256Hex(u8.buffer), expected);
+ assert.equal(sha256Hex(new DataView(u8.buffer)), expected);
+});
+
+test('agrees with Node crypto across random sizes (incl. padding boundaries)', () => {
+ // Sizes around the 56/64-byte block-padding boundary are the classic
+ // off-by-one traps, so hit them explicitly plus a spread of larger buffers.
+ const sizes = [0, 1, 55, 56, 57, 63, 64, 65, 119, 120, 127, 128, 1000, 4096];
+ for (const n of sizes) {
+ const bytes = new Uint8Array(randomBytes(n));
+ assert.equal(sha256Hex(bytes), nodeSha256(bytes), `size ${n}`);
+ }
+});
+
+test('digest seam agrees with the pure-JS hash', async () => {
+ // In node globalThis.crypto.subtle exists, so digestBytes takes the native
+ // path — this asserts the two implementations produce the IDENTICAL digest.
+ const bytes = new Uint8Array(randomBytes(2048));
+ assert.equal(await digestBytes(bytes), sha256Hex(bytes));
+ assert.equal(await digestBytes(bytes), nodeSha256(bytes));
+});
diff --git a/frontend/src/styles/main.scss b/frontend/src/styles/main.scss
index 3db1aede..3a410616 100644
--- a/frontend/src/styles/main.scss
+++ b/frontend/src/styles/main.scss
@@ -112,6 +112,7 @@
@import 'pages/_workflow';
@import 'pages/_git';
@import 'pages/_servers';
+@import 'pages/_server-survey';
@import 'pages/_downloads';
@import 'pages/_wordpress';
@import 'pages/_wordpress-pipeline';
diff --git a/frontend/src/styles/pages/_cron.scss b/frontend/src/styles/pages/_cron.scss
index dab41474..6789948d 100644
--- a/frontend/src/styles/pages/_cron.scss
+++ b/frontend/src/styles/pages/_cron.scss
@@ -124,6 +124,13 @@
.cron-jobcell {
min-width: 0;
+ &__name {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ flex-wrap: wrap;
+ }
+
&__desc {
margin-top: 2px;
font-size: 12px;
@@ -262,3 +269,169 @@
transform: rotate(360deg);
}
}
+
+// ============================================
+// SCHEDULED TASKS CARD (read-only cron summary
+// on the service + WordPress detail Overview tabs)
+// ============================================
+.scheduled-tasks-card {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ padding: $space-4;
+
+ &__header {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ margin-bottom: $space-3;
+ font-size: 13px;
+ font-weight: $font-weight-semibold;
+ color: var(--text);
+
+ svg {
+ color: var(--text-faint);
+ flex-shrink: 0;
+ }
+ }
+
+ &__loading,
+ &__empty {
+ padding: $space-2 0;
+ font-size: 12.5px;
+ color: var(--text-faint);
+ }
+
+ &__list {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+ }
+
+ &__row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: $space-3;
+ padding: $space-3 0;
+ border-top: 1px solid var(--border-soft);
+
+ &:first-child { border-top: 0; }
+ }
+
+ &__main {
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ }
+
+ &__name {
+ font-size: 13px;
+ color: var(--text);
+ @include truncate();
+ }
+
+ &__sched {
+ font-size: 12px;
+ color: var(--text-dim);
+ }
+
+ &__cron {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+ }
+
+ &__meta {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ flex-shrink: 0;
+ }
+
+ &__next {
+ font-size: 12px;
+ color: var(--text-dim);
+ white-space: nowrap;
+ }
+
+ &__status {
+ flex-shrink: 0;
+
+ &--ok { color: var(--green); }
+ &--bad { color: var(--red); }
+ }
+
+ &__status-hint {
+ font-size: 11px;
+ color: var(--text-faint);
+ white-space: nowrap;
+ }
+
+ &__runs-btn {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ padding: 3px;
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius-sm, 6px);
+ background: transparent;
+ color: var(--text-faint);
+ cursor: pointer;
+ flex-shrink: 0;
+
+ &:hover {
+ color: var(--text);
+ border-color: var(--border);
+ }
+ }
+}
+
+.scheduled-tasks-runs {
+ display: flex;
+ flex-direction: column;
+ gap: $space-3;
+
+ &__empty {
+ font-size: 12.5px;
+ color: var(--text-faint);
+ }
+
+ &__rate {
+ font-size: 12.5px;
+ color: var(--text-dim);
+ }
+
+ &__count { color: var(--text-faint); }
+
+ &__list {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+ }
+
+ &__item {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ padding: $space-2 0;
+ border-top: 1px solid var(--border-soft);
+ font-size: 12px;
+ color: var(--text-dim);
+
+ &:first-child { border-top: 0; }
+ }
+
+ &__when { white-space: nowrap; }
+ &__dur,
+ &__exit {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+ }
+}