Add read-only web dashboard MVP
Adds a disabled-by-default loopback web dashboard MVP with read-only control-plane views, prompt preview redaction, Vite React UI, and validation coverage.
This commit is contained in:
444
apps/dashboard/src/App.tsx
Normal file
444
apps/dashboard/src/App.tsx
Normal file
@@ -0,0 +1,444 @@
|
||||
import { useEffect, useMemo, useState, type ReactNode } from 'react';
|
||||
|
||||
import {
|
||||
type DashboardOverview,
|
||||
type DashboardTask,
|
||||
type StatusSnapshot,
|
||||
fetchDashboardData,
|
||||
} from './api';
|
||||
import './styles.css';
|
||||
|
||||
interface DashboardState {
|
||||
overview: DashboardOverview;
|
||||
snapshots: StatusSnapshot[];
|
||||
tasks: DashboardTask[];
|
||||
}
|
||||
|
||||
const REFRESH_INTERVAL_MS = 15_000;
|
||||
|
||||
function formatDate(value: string | null | undefined): string {
|
||||
if (!value) return '-';
|
||||
const date = new Date(value);
|
||||
if (Number.isNaN(date.getTime())) return value;
|
||||
return new Intl.DateTimeFormat('ko-KR', {
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
}).format(date);
|
||||
}
|
||||
|
||||
function formatPct(value: number): string {
|
||||
return `${Math.round(value)}%`;
|
||||
}
|
||||
|
||||
function statusLabel(status: string): string {
|
||||
switch (status) {
|
||||
case 'processing':
|
||||
return '처리중';
|
||||
case 'waiting':
|
||||
return '대기';
|
||||
case 'inactive':
|
||||
return '휴면';
|
||||
case 'active':
|
||||
return '활성';
|
||||
case 'paused':
|
||||
return '일시정지';
|
||||
case 'completed':
|
||||
return '완료';
|
||||
default:
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
function formatDuration(value: number | null): string {
|
||||
if (value === null) return '-';
|
||||
const seconds = Math.floor(value / 1000);
|
||||
if (seconds < 60) return `${seconds}s`;
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
if (minutes < 60) return `${minutes}m`;
|
||||
const hours = Math.floor(minutes / 60);
|
||||
return `${hours}h ${minutes % 60}m`;
|
||||
}
|
||||
|
||||
function Card({
|
||||
label,
|
||||
value,
|
||||
hint,
|
||||
}: {
|
||||
label: string;
|
||||
value: string | number;
|
||||
hint?: string;
|
||||
}) {
|
||||
return (
|
||||
<section className="card metric-card">
|
||||
<span>{label}</span>
|
||||
<strong>{value}</strong>
|
||||
{hint ? <small>{hint}</small> : null}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
function EmptyState({ children }: { children: ReactNode }) {
|
||||
return <div className="empty-state">{children}</div>;
|
||||
}
|
||||
|
||||
function ControlRail({ data }: { data: DashboardState }) {
|
||||
const queue = data.snapshots.reduce(
|
||||
(acc, snapshot) => {
|
||||
for (const entry of snapshot.entries) {
|
||||
acc.pendingTasks += entry.pendingTasks;
|
||||
if (entry.pendingMessages) acc.pendingMessageRooms += 1;
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{ pendingTasks: 0, pendingMessageRooms: 0 },
|
||||
);
|
||||
|
||||
return (
|
||||
<section className="control-rail" aria-label="control plane summary">
|
||||
<div>
|
||||
<span className="eyebrow">agent heartbeat</span>
|
||||
<strong>
|
||||
{data.overview.rooms.active + data.overview.rooms.waiting}/
|
||||
{data.overview.rooms.total}
|
||||
</strong>
|
||||
<small>processing + waiting rooms</small>
|
||||
</div>
|
||||
<div>
|
||||
<span className="eyebrow">work queue</span>
|
||||
<strong>{queue.pendingTasks}</strong>
|
||||
<small>{queue.pendingMessageRooms} rooms with pending messages</small>
|
||||
</div>
|
||||
<div>
|
||||
<span className="eyebrow">governance</span>
|
||||
<strong>read-only</strong>
|
||||
<small>no approvals, merges, or worker kills in MVP</small>
|
||||
</div>
|
||||
<div>
|
||||
<span className="eyebrow">audit safety</span>
|
||||
<strong>redacted</strong>
|
||||
<small>task prompts are preview-only</small>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
function ServicePanel({ overview }: { overview: DashboardOverview }) {
|
||||
if (overview.services.length === 0) {
|
||||
return (
|
||||
<EmptyState>
|
||||
최근 status snapshot이 없어. 서비스가 아직 heartbeat를 안 쓴 상태일 수
|
||||
있어.
|
||||
</EmptyState>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="service-grid">
|
||||
{overview.services.map((service) => (
|
||||
<section className="card service-card" key={service.serviceId}>
|
||||
<div>
|
||||
<span className="eyebrow">{service.agentType}</span>
|
||||
<h3>{service.assistantName}</h3>
|
||||
</div>
|
||||
<div className="heartbeat-line">
|
||||
<span />
|
||||
<small>heartbeat {formatDate(service.updatedAt)}</small>
|
||||
</div>
|
||||
<dl>
|
||||
<div>
|
||||
<dt>service</dt>
|
||||
<dd>{service.serviceId}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>rooms</dt>
|
||||
<dd>
|
||||
{service.activeRooms}/{service.totalRooms} active
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>updated</dt>
|
||||
<dd>{formatDate(service.updatedAt)}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function RoomPanel({ snapshots }: { snapshots: StatusSnapshot[] }) {
|
||||
const entries = snapshots.flatMap((snapshot) =>
|
||||
snapshot.entries.map((entry) => ({
|
||||
...entry,
|
||||
serviceId: snapshot.serviceId,
|
||||
})),
|
||||
);
|
||||
|
||||
if (entries.length === 0) {
|
||||
return <EmptyState>표시할 룸 상태가 없어.</EmptyState>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>room</th>
|
||||
<th>service</th>
|
||||
<th>agent</th>
|
||||
<th>status</th>
|
||||
<th>queue</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{entries.map((entry) => (
|
||||
<tr key={`${entry.serviceId}:${entry.jid}`}>
|
||||
<td>
|
||||
<strong>{entry.name}</strong>
|
||||
<span>
|
||||
{entry.folder} · {entry.jid}
|
||||
</span>
|
||||
</td>
|
||||
<td>{entry.serviceId}</td>
|
||||
<td>{entry.agentType}</td>
|
||||
<td>
|
||||
<span className={`pill pill-${entry.status}`}>
|
||||
{statusLabel(entry.status)}
|
||||
</span>
|
||||
<small>{formatDuration(entry.elapsedMs)}</small>
|
||||
</td>
|
||||
<td>
|
||||
{entry.pendingTasks} task{entry.pendingMessages ? ' · msg' : ''}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function UsagePanel({ overview }: { overview: DashboardOverview }) {
|
||||
if (overview.usage.rows.length === 0) {
|
||||
return (
|
||||
<EmptyState>
|
||||
사용량 snapshot이 없어. usage dashboard가 꺼져 있거나 아직 수집 전일 수
|
||||
있어.
|
||||
</EmptyState>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="usage-list">
|
||||
{overview.usage.rows.map((row) => (
|
||||
<section className="usage-row" key={row.name}>
|
||||
<div className="usage-title">
|
||||
<strong>{row.name}</strong>
|
||||
<span>fetched {formatDate(overview.usage.fetchedAt)}</span>
|
||||
</div>
|
||||
<div className="bar-line">
|
||||
<span>5h</span>
|
||||
<progress max={100} value={row.h5pct} />
|
||||
<strong>{formatPct(row.h5pct)}</strong>
|
||||
<small>{row.h5reset}</small>
|
||||
</div>
|
||||
<div className="bar-line">
|
||||
<span>7d</span>
|
||||
<progress max={100} value={row.d7pct} />
|
||||
<strong>{formatPct(row.d7pct)}</strong>
|
||||
<small>{row.d7reset}</small>
|
||||
</div>
|
||||
</section>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function TaskPanel({ tasks }: { tasks: DashboardTask[] }) {
|
||||
const sortedTasks = useMemo(
|
||||
() =>
|
||||
[...tasks].sort((a, b) => {
|
||||
const statusRank = { active: 0, paused: 1, completed: 2 } as const;
|
||||
const rankDelta = statusRank[a.status] - statusRank[b.status];
|
||||
if (rankDelta !== 0) return rankDelta;
|
||||
return (a.nextRun ?? a.createdAt).localeCompare(
|
||||
b.nextRun ?? b.createdAt,
|
||||
);
|
||||
}),
|
||||
[tasks],
|
||||
);
|
||||
|
||||
if (sortedTasks.length === 0) {
|
||||
return <EmptyState>등록된 scheduled task가 없어.</EmptyState>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>task</th>
|
||||
<th>status</th>
|
||||
<th>schedule</th>
|
||||
<th>next</th>
|
||||
<th>last</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{sortedTasks.map((task) => (
|
||||
<tr key={task.id}>
|
||||
<td>
|
||||
<strong>{task.isWatcher ? 'CI Watch' : task.id}</strong>
|
||||
<span>{task.promptPreview || '(empty prompt preview)'}</span>
|
||||
<small>
|
||||
{task.groupFolder} · {task.promptLength} chars
|
||||
</small>
|
||||
</td>
|
||||
<td>
|
||||
<span className={`pill pill-${task.status}`}>
|
||||
{statusLabel(task.status)}
|
||||
</span>
|
||||
{task.suspendedUntil ? (
|
||||
<small>until {formatDate(task.suspendedUntil)}</small>
|
||||
) : null}
|
||||
</td>
|
||||
<td>
|
||||
{task.scheduleType} · {task.scheduleValue}
|
||||
<small>{task.contextMode}</small>
|
||||
</td>
|
||||
<td>{formatDate(task.nextRun)}</td>
|
||||
<td>
|
||||
{formatDate(task.lastRun)}
|
||||
{task.lastResult ? <small>{task.lastResult}</small> : null}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function App() {
|
||||
const [data, setData] = useState<DashboardState | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
|
||||
async function refresh(showSpinner = false) {
|
||||
if (showSpinner) setRefreshing(true);
|
||||
try {
|
||||
const nextData = await fetchDashboardData();
|
||||
setData(nextData);
|
||||
setError(null);
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : String(err));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
setRefreshing(false);
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
void refresh();
|
||||
const id = window.setInterval(() => {
|
||||
void refresh();
|
||||
}, REFRESH_INTERVAL_MS);
|
||||
return () => window.clearInterval(id);
|
||||
}, []);
|
||||
|
||||
if (loading && !data) {
|
||||
return (
|
||||
<main className="shell loading">EJClaw Dashboard 불러오는 중...</main>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="shell">
|
||||
<header className="hero">
|
||||
<div>
|
||||
<span className="eyebrow">EJClaw Control Plane · read-only MVP</span>
|
||||
<h1>Agent factory control room</h1>
|
||||
<p>
|
||||
Discord는 pager와 승인 호출로 남기고, 여기서는 agent heartbeat, room
|
||||
queue, scheduled work, quota, audit preview를 한 화면에서 본다.
|
||||
</p>
|
||||
</div>
|
||||
<button disabled={refreshing} onClick={() => void refresh(true)}>
|
||||
{refreshing ? '새로고침 중' : '새로고침'}
|
||||
</button>
|
||||
</header>
|
||||
|
||||
{error ? (
|
||||
<section className="error-card">API 오류: {error}</section>
|
||||
) : null}
|
||||
|
||||
{data ? (
|
||||
<>
|
||||
<ControlRail data={data} />
|
||||
|
||||
<section className="metrics-grid">
|
||||
<Card
|
||||
label="agents"
|
||||
value={data.overview.services.length}
|
||||
hint={formatDate(data.overview.generatedAt)}
|
||||
/>
|
||||
<Card
|
||||
label="rooms"
|
||||
value={data.overview.rooms.total}
|
||||
hint={`${data.overview.rooms.active} processing · ${data.overview.rooms.waiting} waiting`}
|
||||
/>
|
||||
<Card
|
||||
label="tasks"
|
||||
value={data.overview.tasks.total}
|
||||
hint={`${data.overview.tasks.active} active · ${data.overview.tasks.paused} paused`}
|
||||
/>
|
||||
<Card
|
||||
label="CI watchers"
|
||||
value={data.overview.tasks.watchers.active}
|
||||
hint={`${data.overview.tasks.watchers.paused} paused · ${data.overview.tasks.watchers.completed} done`}
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section className="panel">
|
||||
<div className="panel-title">
|
||||
<h2>Agent Heartbeats</h2>
|
||||
<span>최근 heartbeat 기준</span>
|
||||
</div>
|
||||
<ServicePanel overview={data.overview} />
|
||||
</section>
|
||||
|
||||
<section className="panel split-panel">
|
||||
<div>
|
||||
<div className="panel-title">
|
||||
<h2>Cost & Quota</h2>
|
||||
<span>5h / 7d usage snapshot</span>
|
||||
</div>
|
||||
<UsagePanel overview={data.overview} />
|
||||
</div>
|
||||
<div>
|
||||
<div className="panel-title">
|
||||
<h2>Rooms & Queues</h2>
|
||||
<span>processing / waiting / inactive</span>
|
||||
</div>
|
||||
<RoomPanel snapshots={data.snapshots} />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="panel">
|
||||
<div className="panel-title">
|
||||
<h2>Scheduled Work</h2>
|
||||
<span>watchers, heartbeats, redacted prompt previews</span>
|
||||
</div>
|
||||
<TaskPanel tasks={data.tasks} />
|
||||
</section>
|
||||
</>
|
||||
) : null}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
100
apps/dashboard/src/api.ts
Normal file
100
apps/dashboard/src/api.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
export interface DashboardOverview {
|
||||
generatedAt: string;
|
||||
services: Array<{
|
||||
serviceId: string;
|
||||
assistantName: string;
|
||||
agentType: string;
|
||||
updatedAt: string;
|
||||
totalRooms: number;
|
||||
activeRooms: number;
|
||||
}>;
|
||||
rooms: {
|
||||
total: number;
|
||||
active: number;
|
||||
waiting: number;
|
||||
inactive: number;
|
||||
};
|
||||
tasks: {
|
||||
total: number;
|
||||
active: number;
|
||||
paused: number;
|
||||
completed: number;
|
||||
watchers: {
|
||||
active: number;
|
||||
paused: number;
|
||||
completed: number;
|
||||
};
|
||||
};
|
||||
usage: {
|
||||
rows: Array<{
|
||||
name: string;
|
||||
h5pct: number;
|
||||
h5reset: string;
|
||||
d7pct: number;
|
||||
d7reset: string;
|
||||
}>;
|
||||
fetchedAt: string | null;
|
||||
};
|
||||
}
|
||||
|
||||
export interface StatusSnapshot {
|
||||
serviceId: string;
|
||||
agentType: string;
|
||||
assistantName: string;
|
||||
updatedAt: string;
|
||||
entries: Array<{
|
||||
jid: string;
|
||||
name: string;
|
||||
folder: string;
|
||||
agentType: string;
|
||||
status: 'processing' | 'waiting' | 'inactive';
|
||||
elapsedMs: number | null;
|
||||
pendingMessages: boolean;
|
||||
pendingTasks: number;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface DashboardTask {
|
||||
id: string;
|
||||
groupFolder: string;
|
||||
chatJid: string;
|
||||
agentType: string | null;
|
||||
ciProvider: string | null;
|
||||
ciMetadata: string | null;
|
||||
scheduleType: string;
|
||||
scheduleValue: string;
|
||||
contextMode: string;
|
||||
nextRun: string | null;
|
||||
lastRun: string | null;
|
||||
lastResult: string | null;
|
||||
status: 'active' | 'paused' | 'completed';
|
||||
suspendedUntil: string | null;
|
||||
createdAt: string;
|
||||
promptPreview: string;
|
||||
promptLength: number;
|
||||
isWatcher: boolean;
|
||||
}
|
||||
|
||||
async function fetchJson<T>(path: string): Promise<T> {
|
||||
const response = await fetch(path, {
|
||||
headers: { accept: 'application/json' },
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error(`${path} failed: ${response.status}`);
|
||||
}
|
||||
return (await response.json()) as T;
|
||||
}
|
||||
|
||||
export async function fetchDashboardData(): Promise<{
|
||||
overview: DashboardOverview;
|
||||
snapshots: StatusSnapshot[];
|
||||
tasks: DashboardTask[];
|
||||
}> {
|
||||
const [overview, snapshots, tasks] = await Promise.all([
|
||||
fetchJson<DashboardOverview>('/api/overview'),
|
||||
fetchJson<StatusSnapshot[]>('/api/status-snapshots'),
|
||||
fetchJson<DashboardTask[]>('/api/tasks'),
|
||||
]);
|
||||
|
||||
return { overview, snapshots, tasks };
|
||||
}
|
||||
16
apps/dashboard/src/main.tsx
Normal file
16
apps/dashboard/src/main.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
import App from './App';
|
||||
|
||||
const root = document.getElementById('root');
|
||||
|
||||
if (!root) {
|
||||
throw new Error('Dashboard root element was not found');
|
||||
}
|
||||
|
||||
createRoot(root).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
);
|
||||
506
apps/dashboard/src/styles.css
Normal file
506
apps/dashboard/src/styles.css
Normal file
@@ -0,0 +1,506 @@
|
||||
:root {
|
||||
color-scheme: light;
|
||||
--bg: #f3efe4;
|
||||
--bg-ink: #1c211c;
|
||||
--panel: rgba(255, 252, 242, 0.9);
|
||||
--panel-solid: #fffaf0;
|
||||
--panel-border: rgba(43, 55, 38, 0.16);
|
||||
--muted: #6d735f;
|
||||
--accent: #bf5f2c;
|
||||
--accent-strong: #8f351b;
|
||||
--green: #3f7f51;
|
||||
--yellow: #b58a22;
|
||||
--red: #b74734;
|
||||
--shadow: 0 24px 70px rgba(44, 39, 25, 0.18);
|
||||
font-family:
|
||||
'Avenir Next', 'Segoe UI Variable', 'Noto Sans KR', ui-sans-serif,
|
||||
sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--bg-ink);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 18% 12%,
|
||||
rgba(214, 127, 58, 0.22),
|
||||
transparent 28rem
|
||||
),
|
||||
radial-gradient(
|
||||
circle at 88% 8%,
|
||||
rgba(74, 123, 87, 0.18),
|
||||
transparent 24rem
|
||||
),
|
||||
linear-gradient(135deg, #f4ead5 0%, #edf1df 46%, #f5f0e5 100%);
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
table {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.shell {
|
||||
width: min(1480px, calc(100% - 40px));
|
||||
margin: 0 auto;
|
||||
padding: 34px 0 56px;
|
||||
}
|
||||
|
||||
.shell::before {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
content: '';
|
||||
background-image:
|
||||
linear-gradient(rgba(28, 33, 28, 0.055) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(28, 33, 28, 0.045) 1px, transparent 1px);
|
||||
background-size: 44px 44px;
|
||||
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 82%);
|
||||
}
|
||||
|
||||
.loading {
|
||||
display: grid;
|
||||
min-height: 100vh;
|
||||
place-items: center;
|
||||
font-size: clamp(24px, 5vw, 54px);
|
||||
font-weight: 900;
|
||||
letter-spacing: -0.05em;
|
||||
}
|
||||
|
||||
.hero {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
gap: 28px;
|
||||
align-items: end;
|
||||
padding: clamp(28px, 4vw, 54px);
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--panel-border);
|
||||
border-radius: 34px;
|
||||
background:
|
||||
linear-gradient(
|
||||
128deg,
|
||||
rgba(255, 250, 240, 0.96),
|
||||
rgba(255, 250, 240, 0.76)
|
||||
),
|
||||
linear-gradient(45deg, rgba(191, 95, 44, 0.12), rgba(63, 127, 81, 0.1));
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
max-width: 880px;
|
||||
margin: 10px 0 12px;
|
||||
font-family: 'Georgia', 'Noto Serif KR', serif;
|
||||
font-size: clamp(42px, 8vw, 108px);
|
||||
line-height: 0.92;
|
||||
letter-spacing: -0.08em;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
max-width: 720px;
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: clamp(16px, 2vw, 22px);
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
color: var(--accent-strong);
|
||||
font-size: 12px;
|
||||
font-weight: 850;
|
||||
letter-spacing: 0.16em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
button {
|
||||
min-height: 48px;
|
||||
padding: 0 22px;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
color: #fffaf0;
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
|
||||
box-shadow: 0 14px 30px rgba(143, 53, 27, 0.24);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
cursor: wait;
|
||||
opacity: 0.62;
|
||||
}
|
||||
|
||||
.error-card,
|
||||
.card,
|
||||
.panel {
|
||||
border: 1px solid var(--panel-border);
|
||||
background: var(--panel);
|
||||
box-shadow: 0 12px 44px rgba(44, 39, 25, 0.09);
|
||||
backdrop-filter: blur(14px);
|
||||
}
|
||||
|
||||
.error-card {
|
||||
margin-top: 18px;
|
||||
padding: 18px 20px;
|
||||
border-color: rgba(183, 71, 52, 0.35);
|
||||
border-radius: 22px;
|
||||
color: #7c2518;
|
||||
background: rgba(255, 235, 225, 0.82);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.metrics-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
margin: 22px 0;
|
||||
}
|
||||
|
||||
.control-rail {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 1px;
|
||||
margin: 18px 0 22px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--panel-border);
|
||||
border-radius: 28px;
|
||||
background: rgba(43, 55, 38, 0.12);
|
||||
box-shadow: 0 18px 50px rgba(44, 39, 25, 0.08);
|
||||
}
|
||||
|
||||
.control-rail div {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
min-height: 116px;
|
||||
padding: 20px;
|
||||
background:
|
||||
linear-gradient(
|
||||
145deg,
|
||||
rgba(255, 250, 240, 0.9),
|
||||
rgba(255, 250, 240, 0.68)
|
||||
),
|
||||
radial-gradient(
|
||||
circle at 18% 18%,
|
||||
rgba(191, 95, 44, 0.1),
|
||||
transparent 16rem
|
||||
);
|
||||
}
|
||||
|
||||
.control-rail strong {
|
||||
font-size: clamp(22px, 3vw, 38px);
|
||||
line-height: 1;
|
||||
letter-spacing: -0.05em;
|
||||
}
|
||||
|
||||
.control-rail small {
|
||||
color: var(--muted);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.metric-card {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
min-height: 142px;
|
||||
padding: 22px;
|
||||
border-radius: 26px;
|
||||
}
|
||||
|
||||
.metric-card span,
|
||||
.metric-card small,
|
||||
td span,
|
||||
td small,
|
||||
dd,
|
||||
.panel-title span,
|
||||
.usage-title span,
|
||||
.bar-line small {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.metric-card span {
|
||||
font-weight: 850;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.metric-card strong {
|
||||
font-size: clamp(36px, 5vw, 66px);
|
||||
line-height: 0.9;
|
||||
letter-spacing: -0.07em;
|
||||
}
|
||||
|
||||
.panel {
|
||||
margin-top: 18px;
|
||||
padding: 24px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.split-panel {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
|
||||
gap: 22px;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.panel-title h2 {
|
||||
margin: 0;
|
||||
font-family: 'Georgia', 'Noto Serif KR', serif;
|
||||
font-size: clamp(26px, 3vw, 40px);
|
||||
letter-spacing: -0.05em;
|
||||
}
|
||||
|
||||
.service-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.service-card {
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
padding: 20px;
|
||||
border-radius: 24px;
|
||||
background: rgba(255, 250, 240, 0.72);
|
||||
}
|
||||
|
||||
.service-card h3 {
|
||||
margin: 6px 0 0;
|
||||
font-size: 26px;
|
||||
letter-spacing: -0.04em;
|
||||
}
|
||||
|
||||
.heartbeat-line {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.heartbeat-line span {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 999px;
|
||||
background: var(--green);
|
||||
box-shadow: 0 0 0 7px rgba(63, 127, 81, 0.13);
|
||||
}
|
||||
|
||||
dl {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
dl div {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
dt {
|
||||
color: var(--muted);
|
||||
font-weight: 750;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
overflow: auto;
|
||||
border: 1px solid rgba(43, 55, 38, 0.1);
|
||||
border-radius: 22px;
|
||||
background: rgba(255, 250, 240, 0.56);
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
min-width: 720px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 16px;
|
||||
border-bottom: 1px solid rgba(43, 55, 38, 0.1);
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th {
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
background: rgba(255, 250, 240, 0.7);
|
||||
}
|
||||
|
||||
tr:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
td strong,
|
||||
td span,
|
||||
td small {
|
||||
display: block;
|
||||
}
|
||||
|
||||
td strong {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
td small {
|
||||
margin-top: 4px;
|
||||
max-width: 480px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.pill {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
align-items: center;
|
||||
padding: 5px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.pill-processing,
|
||||
.pill-active {
|
||||
color: #173e23;
|
||||
background: rgba(63, 127, 81, 0.18);
|
||||
}
|
||||
|
||||
.pill-waiting,
|
||||
.pill-paused {
|
||||
color: #6e4a05;
|
||||
background: rgba(181, 138, 34, 0.2);
|
||||
}
|
||||
|
||||
.pill-inactive,
|
||||
.pill-completed {
|
||||
color: #625d52;
|
||||
background: rgba(109, 115, 95, 0.16);
|
||||
}
|
||||
|
||||
.usage-list {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.usage-row {
|
||||
padding: 18px;
|
||||
border: 1px solid rgba(43, 55, 38, 0.1);
|
||||
border-radius: 22px;
|
||||
background: rgba(255, 250, 240, 0.62);
|
||||
}
|
||||
|
||||
.usage-title {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.bar-line {
|
||||
display: grid;
|
||||
grid-template-columns: 34px 1fr 54px minmax(60px, auto);
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
progress {
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
overflow: hidden;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
background: rgba(43, 55, 38, 0.1);
|
||||
}
|
||||
|
||||
progress::-webkit-progress-bar {
|
||||
background: rgba(43, 55, 38, 0.1);
|
||||
}
|
||||
|
||||
progress::-webkit-progress-value {
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(90deg, var(--green), var(--accent));
|
||||
}
|
||||
|
||||
progress::-moz-progress-bar {
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(90deg, var(--green), var(--accent));
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 24px;
|
||||
border: 1px dashed rgba(43, 55, 38, 0.2);
|
||||
border-radius: 22px;
|
||||
color: var(--muted);
|
||||
background: rgba(255, 250, 240, 0.45);
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
.hero,
|
||||
.split-panel {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero {
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.metrics-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.control-rail {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.shell {
|
||||
width: min(100% - 24px, 1480px);
|
||||
padding: 18px 0 34px;
|
||||
}
|
||||
|
||||
.hero,
|
||||
.panel {
|
||||
border-radius: 22px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.metrics-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.control-rail {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.panel-title,
|
||||
.usage-title {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.bar-line {
|
||||
grid-template-columns: 28px 1fr 44px;
|
||||
}
|
||||
|
||||
.bar-line small {
|
||||
grid-column: 2 / -1;
|
||||
}
|
||||
}
|
||||
1
apps/dashboard/src/vite-env.d.ts
vendored
Normal file
1
apps/dashboard/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in New Issue
Block a user