Initial Seg Data Server Net platform
This commit is contained in:
400
frontend/src/main.tsx
Normal file
400
frontend/src/main.tsx
Normal file
@@ -0,0 +1,400 @@
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import {
|
||||
Activity,
|
||||
BarChart3,
|
||||
Cpu,
|
||||
Database,
|
||||
FileSearch,
|
||||
Gauge,
|
||||
HardDrive,
|
||||
Layers3,
|
||||
Play,
|
||||
RefreshCcw,
|
||||
ShieldCheck,
|
||||
Square,
|
||||
Terminal,
|
||||
UploadCloud,
|
||||
Zap
|
||||
} from "lucide-react";
|
||||
import "./styles.css";
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE ?? "http://localhost:8000";
|
||||
|
||||
type Job = {
|
||||
id: string;
|
||||
type: string;
|
||||
status: string;
|
||||
description: string;
|
||||
created_at: string;
|
||||
started_at?: string;
|
||||
finished_at?: string;
|
||||
log_tail?: string;
|
||||
params: Record<string, unknown>;
|
||||
};
|
||||
|
||||
type Catalog = {
|
||||
task_types: string[];
|
||||
segmodel_architectures: string[];
|
||||
yolo_models: string[];
|
||||
mmseg_algorithms: string[];
|
||||
datasets: Array<{ name: string; path: string; source: string }>;
|
||||
weights: { count: number; total_bytes: number; updated_at?: string };
|
||||
};
|
||||
|
||||
type GpuPayload = {
|
||||
available: boolean;
|
||||
gpus: Array<{
|
||||
index: number;
|
||||
name: string;
|
||||
memory_total_mb: number;
|
||||
memory_used_mb: number;
|
||||
memory_free_mb: number;
|
||||
utilization_gpu_percent: number;
|
||||
temperature_c: number;
|
||||
}>;
|
||||
};
|
||||
|
||||
async function api<T>(path: string, init?: RequestInit): Promise<T> {
|
||||
const res = await fetch(`${API_BASE}${path}`, {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
...init
|
||||
});
|
||||
if (!res.ok) throw new Error(await res.text());
|
||||
return res.json();
|
||||
}
|
||||
|
||||
const defaultParams: Record<string, Record<string, unknown>> = {
|
||||
"mock.echo": { message: "hello from Seg Data Server" },
|
||||
"dataset.video_frames": { video: "../Seg_Predict_Own_Video_V2/LC_Video_1.mp4", interval: 0.5, resize: "1920x1080" },
|
||||
"segmodel.train": { architecture: "Unet" },
|
||||
"segmodel.predict": { architecture: "Unet", run_choice: 1 },
|
||||
"yolo.train": { model: "YOLOv8n-seg" },
|
||||
"yolo.predict": { model: "YOLOv8n-seg", pt_name: "best.pt", conf: 0.2, run_choice: 1 },
|
||||
"yolo.heatmap": { model: "YOLOv8n-seg", cam_method: "All", pt_name: "best.pt", run_choice: 1 },
|
||||
"mmseg.generate_alg": { dataset_choice: 1, gpu_count: 1, gpu_ids: [0], schedule_mode: 2, max_epochs: 300, algorithm_choice: 1 },
|
||||
"mmseg.train": { config: "configs/example.py", work_dir: "../DataSet_Public_outputs/example" },
|
||||
"mmseg.metrics": { input_dir: "../Hardisk", output_dir: "../BestMode_Predict_Results_DataSet_Public", dataset_choice: 1, algorithm_choice: 0 },
|
||||
"mmseg.flops_fps": { input_dir: "../Hardisk", output_dir: "../BestMode_Predict_Results_DataSet_Public", repeat_times: 3, dataset_choice: 1, algorithm_choice: 0 },
|
||||
"analysis.all": { input_dir: "../BestMode_Predict_Results_DataSet_Public", output_dir: "./", dataset_choice: 1 }
|
||||
};
|
||||
|
||||
function formatBytes(value?: number) {
|
||||
if (!value) return "0 B";
|
||||
const units = ["B", "KB", "MB", "GB", "TB"];
|
||||
let next = value;
|
||||
let unit = 0;
|
||||
while (next >= 1024 && unit < units.length - 1) {
|
||||
next /= 1024;
|
||||
unit += 1;
|
||||
}
|
||||
return `${next.toFixed(unit > 1 ? 2 : 0)} ${units[unit]}`;
|
||||
}
|
||||
|
||||
function useData() {
|
||||
const [catalog, setCatalog] = useState<Catalog | null>(null);
|
||||
const [gpus, setGpus] = useState<GpuPayload | null>(null);
|
||||
const [jobs, setJobs] = useState<Job[]>([]);
|
||||
const [results, setResults] = useState<Array<Record<string, unknown>>>([]);
|
||||
const [error, setError] = useState<string>("");
|
||||
|
||||
async function refresh() {
|
||||
try {
|
||||
const [catalogNext, gpusNext, jobsNext, resultsNext] = await Promise.all([
|
||||
api<Catalog>("/api/catalog"),
|
||||
api<GpuPayload>("/api/system/gpus"),
|
||||
api<Job[]>("/api/jobs"),
|
||||
api<Array<Record<string, unknown>>>("/api/results")
|
||||
]);
|
||||
setCatalog(catalogNext);
|
||||
setGpus(gpusNext);
|
||||
setJobs(jobsNext);
|
||||
setResults(resultsNext.slice(0, 80));
|
||||
setError("");
|
||||
} catch (err) {
|
||||
setError(String(err));
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
refresh();
|
||||
const timer = window.setInterval(refresh, 5000);
|
||||
return () => window.clearInterval(timer);
|
||||
}, []);
|
||||
|
||||
return { catalog, gpus, jobs, results, error, refresh };
|
||||
}
|
||||
|
||||
function StatusPill({ status }: { status: string }) {
|
||||
return <span className={`pill pill-${status}`}>{status}</span>;
|
||||
}
|
||||
|
||||
function App() {
|
||||
const { catalog, gpus, jobs, results, error, refresh } = useData();
|
||||
const [taskType, setTaskType] = useState("mock.echo");
|
||||
const [params, setParams] = useState(JSON.stringify(defaultParams["mock.echo"], null, 2));
|
||||
const [selectedJob, setSelectedJob] = useState<Job | null>(null);
|
||||
const [log, setLog] = useState("");
|
||||
const [busy, setBusy] = useState(false);
|
||||
|
||||
const runningCount = jobs.filter((job) => job.status === "running").length;
|
||||
const successCount = jobs.filter((job) => job.status === "success").length;
|
||||
const failedCount = jobs.filter((job) => job.status === "failed").length;
|
||||
|
||||
const taskGroups = useMemo<Record<string, string[]>>(() => {
|
||||
const items = catalog?.task_types ?? [];
|
||||
return {
|
||||
dataset: items.filter((task) => task.startsWith("dataset.")),
|
||||
segmodel: items.filter((task) => task.startsWith("segmodel.")),
|
||||
yolo: items.filter((task) => task.startsWith("yolo.")),
|
||||
mmseg: items.filter((task) => task.startsWith("mmseg.")),
|
||||
analysis: items.filter((task) => task.startsWith("analysis.") || task.startsWith("system.") || task.startsWith("mock."))
|
||||
};
|
||||
}, [catalog]);
|
||||
|
||||
function pickTask(next: string) {
|
||||
setTaskType(next);
|
||||
setParams(JSON.stringify(defaultParams[next] ?? {}, null, 2));
|
||||
}
|
||||
|
||||
async function createJob() {
|
||||
setBusy(true);
|
||||
try {
|
||||
await api<Job>("/api/jobs", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ type: taskType, params: JSON.parse(params) })
|
||||
});
|
||||
await refresh();
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function syncWeights() {
|
||||
setBusy(true);
|
||||
try {
|
||||
await api("/api/weights/sync", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ mode: "copy", hash_files: true, skip_existing: true })
|
||||
});
|
||||
await refresh();
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function inspectJob(job: Job) {
|
||||
const detail = await api<Job>(`/api/jobs/${job.id}`);
|
||||
setSelectedJob(detail);
|
||||
setLog(detail.log_tail ?? "");
|
||||
const source = new EventSource(`${API_BASE}/api/jobs/${job.id}/events`);
|
||||
source.onmessage = (event) => {
|
||||
const payload = JSON.parse(event.data);
|
||||
if (payload.chunk) setLog((prev) => `${prev}${payload.chunk}`);
|
||||
setSelectedJob(payload.job);
|
||||
if (["success", "failed", "cancelled"].includes(payload.job.status)) source.close();
|
||||
};
|
||||
}
|
||||
|
||||
async function cancelSelectedJob() {
|
||||
if (!selectedJob) return;
|
||||
await api(`/api/jobs/${selectedJob.id}/cancel`, { method: "POST" });
|
||||
await refresh();
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="shell">
|
||||
<aside className="rail">
|
||||
<div className="brand">
|
||||
<div className="mark"><Layers3 size={24} /></div>
|
||||
<div>
|
||||
<strong>Seg Data Server</strong>
|
||||
<span>Net Console</span>
|
||||
</div>
|
||||
</div>
|
||||
<nav>
|
||||
<a href="#jobs"><Terminal size={18} />任务</a>
|
||||
<a href="#gpu"><Cpu size={18} />GPU</a>
|
||||
<a href="#weights"><HardDrive size={18} />权重</a>
|
||||
<a href="#results"><BarChart3 size={18} />结果</a>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<section className="workspace">
|
||||
<header className="topbar">
|
||||
<div>
|
||||
<p className="eyebrow">Segmentation Operations</p>
|
||||
<h1>训练、预测、分析与权重资产控制台</h1>
|
||||
</div>
|
||||
<button className="iconButton" onClick={refresh} title="刷新">
|
||||
<RefreshCcw size={18} />
|
||||
</button>
|
||||
</header>
|
||||
|
||||
{error && <div className="alert">{error}</div>}
|
||||
|
||||
<section className="metrics">
|
||||
<div className="metric">
|
||||
<Activity size={20} />
|
||||
<span>运行中</span>
|
||||
<strong>{runningCount}</strong>
|
||||
</div>
|
||||
<div className="metric">
|
||||
<ShieldCheck size={20} />
|
||||
<span>成功</span>
|
||||
<strong>{successCount}</strong>
|
||||
</div>
|
||||
<div className="metric">
|
||||
<Zap size={20} />
|
||||
<span>失败</span>
|
||||
<strong>{failedCount}</strong>
|
||||
</div>
|
||||
<div className="metric">
|
||||
<Database size={20} />
|
||||
<span>数据集</span>
|
||||
<strong>{catalog?.datasets.length ?? 0}</strong>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="grid two" id="jobs">
|
||||
<div className="panel taskPanel">
|
||||
<div className="panelHead">
|
||||
<div>
|
||||
<p className="eyebrow">Job Builder</p>
|
||||
<h2>创建任务</h2>
|
||||
</div>
|
||||
<button className="primary" disabled={busy} onClick={createJob}>
|
||||
<Play size={17} />启动
|
||||
</button>
|
||||
</div>
|
||||
<div className="taskColumns">
|
||||
{Object.entries(taskGroups).map(([group, values]) => (
|
||||
<div key={group} className="taskGroup">
|
||||
<span>{group}</span>
|
||||
{values.map((task) => (
|
||||
<button key={task} className={task === taskType ? "selected" : ""} onClick={() => pickTask(task)}>
|
||||
{task}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<label className="field">
|
||||
<span>参数 JSON</span>
|
||||
<textarea value={params} onChange={(event) => setParams(event.target.value)} />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="panel">
|
||||
<div className="panelHead">
|
||||
<div>
|
||||
<p className="eyebrow">Queue</p>
|
||||
<h2>最近任务</h2>
|
||||
</div>
|
||||
<Gauge size={22} />
|
||||
</div>
|
||||
<div className="jobList">
|
||||
{jobs.slice(0, 12).map((job) => (
|
||||
<button key={job.id} className="jobRow" onClick={() => inspectJob(job)}>
|
||||
<span>{job.type}</span>
|
||||
<StatusPill status={job.status} />
|
||||
<small>{job.description || job.id.slice(0, 8)}</small>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="grid three">
|
||||
<div className="panel" id="gpu">
|
||||
<div className="panelHead">
|
||||
<div>
|
||||
<p className="eyebrow">Hardware</p>
|
||||
<h2>GPU</h2>
|
||||
</div>
|
||||
<Cpu size={22} />
|
||||
</div>
|
||||
{(gpus?.gpus ?? []).map((gpu) => (
|
||||
<div className="gpu" key={gpu.index}>
|
||||
<div>
|
||||
<strong>GPU {gpu.index}</strong>
|
||||
<span>{gpu.name}</span>
|
||||
</div>
|
||||
<meter value={gpu.memory_used_mb} max={gpu.memory_total_mb} />
|
||||
<small>{gpu.memory_free_mb} MB free · {gpu.utilization_gpu_percent}% · {gpu.temperature_c}C</small>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="panel" id="weights">
|
||||
<div className="panelHead">
|
||||
<div>
|
||||
<p className="eyebrow">Assets</p>
|
||||
<h2>权重</h2>
|
||||
</div>
|
||||
<button className="iconButton" disabled={busy} onClick={syncWeights} title="同步权重">
|
||||
<UploadCloud size={18} />
|
||||
</button>
|
||||
</div>
|
||||
<div className="bigNumber">{catalog?.weights.count ?? 0}</div>
|
||||
<p className="muted">{formatBytes(catalog?.weights.total_bytes)} indexed</p>
|
||||
<p className="muted">{catalog?.weights.updated_at ?? "manifest not generated"}</p>
|
||||
</div>
|
||||
|
||||
<div className="panel">
|
||||
<div className="panelHead">
|
||||
<div>
|
||||
<p className="eyebrow">Catalog</p>
|
||||
<h2>模型</h2>
|
||||
</div>
|
||||
<FileSearch size={22} />
|
||||
</div>
|
||||
<p className="muted">SegModel {catalog?.segmodel_architectures.length ?? 0} · YOLO {catalog?.yolo_models.length ?? 0} · MMSeg {catalog?.mmseg_algorithms.length ?? 0}</p>
|
||||
<div className="chips">
|
||||
{(catalog?.segmodel_architectures ?? []).slice(0, 8).map((item) => <span key={item}>{item}</span>)}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="grid two">
|
||||
<div className="panel logPanel">
|
||||
<div className="panelHead">
|
||||
<div>
|
||||
<p className="eyebrow">Live Log</p>
|
||||
<h2>{selectedJob?.type ?? "选择一个任务"}</h2>
|
||||
</div>
|
||||
<button className="iconButton" disabled={!selectedJob} onClick={cancelSelectedJob} title="取消任务">
|
||||
<Square size={18} />
|
||||
</button>
|
||||
</div>
|
||||
<pre>{log || "No log selected."}</pre>
|
||||
</div>
|
||||
|
||||
<div className="panel" id="results">
|
||||
<div className="panelHead">
|
||||
<div>
|
||||
<p className="eyebrow">Artifacts</p>
|
||||
<h2>最近结果</h2>
|
||||
</div>
|
||||
<BarChart3 size={22} />
|
||||
</div>
|
||||
<div className="resultList">
|
||||
{results.map((item) => (
|
||||
<a key={String(item.path)} href={`${API_BASE}/api/artifacts/${item.relative_path}`} target="_blank" rel="noreferrer">
|
||||
<span>{String(item.name)}</span>
|
||||
<small>{formatBytes(Number(item.size))}</small>
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
);
|
||||
392
frontend/src/styles.css
Normal file
392
frontend/src/styles.css
Normal file
@@ -0,0 +1,392 @@
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
--ink: #eef2e8;
|
||||
--muted: #9aa89a;
|
||||
--panel: #151815;
|
||||
--panel-2: #1d211d;
|
||||
--line: #333b32;
|
||||
--field: #0d100d;
|
||||
--green: #9de26f;
|
||||
--amber: #d3b35b;
|
||||
--red: #f07167;
|
||||
--cyan: #73d2de;
|
||||
--blue: #7aa2ff;
|
||||
--shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
|
||||
font-family: "Aptos", "Segoe UI", "Noto Sans CJK SC", sans-serif;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-width: 1100px;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(157, 226, 111, 0.07) 1px, transparent 1px),
|
||||
linear-gradient(180deg, rgba(115, 210, 222, 0.045) 1px, transparent 1px),
|
||||
#0b0d0b;
|
||||
background-size: 52px 52px;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
button {
|
||||
border: 0;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.shell {
|
||||
display: grid;
|
||||
grid-template-columns: 260px 1fr;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.rail {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
padding: 24px 18px;
|
||||
border-right: 1px solid var(--line);
|
||||
background: rgba(12, 15, 12, 0.92);
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 34px;
|
||||
}
|
||||
|
||||
.mark {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: #0a0d0a;
|
||||
background: var(--green);
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.brand strong, .brand span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.brand span {
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
nav {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
nav a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
color: var(--muted);
|
||||
padding: 11px 10px;
|
||||
border-radius: 6px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
color: var(--ink);
|
||||
background: var(--panel-2);
|
||||
}
|
||||
|
||||
.workspace {
|
||||
padding: 26px;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 6px;
|
||||
color: var(--green);
|
||||
font-size: 12px;
|
||||
letter-spacing: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
margin: 0;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 28px;
|
||||
font-weight: 720;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.iconButton, .primary {
|
||||
height: 38px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.iconButton {
|
||||
width: 38px;
|
||||
background: var(--panel-2);
|
||||
border: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.primary {
|
||||
padding: 0 14px;
|
||||
background: var(--green);
|
||||
color: #0b0d0b;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.primary:disabled, .iconButton:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.alert {
|
||||
padding: 12px 14px;
|
||||
border: 1px solid rgba(240, 113, 103, 0.5);
|
||||
background: rgba(240, 113, 103, 0.12);
|
||||
border-radius: 6px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.metrics, .grid {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.metrics {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.metric, .panel {
|
||||
border: 1px solid var(--line);
|
||||
background: rgba(21, 24, 21, 0.94);
|
||||
border-radius: 8px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.metric {
|
||||
display: grid;
|
||||
grid-template-columns: 28px 1fr auto;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.metric span, .muted, small {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.metric strong {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.grid.two {
|
||||
grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.grid.three {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.panel {
|
||||
padding: 18px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.panelHead {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.taskColumns {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.taskGroup {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.taskGroup > span {
|
||||
display: block;
|
||||
color: var(--amber);
|
||||
font-size: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.taskGroup button {
|
||||
width: 100%;
|
||||
display: block;
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
margin-bottom: 6px;
|
||||
border-radius: 5px;
|
||||
background: #101310;
|
||||
border: 1px solid transparent;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.taskGroup button.selected {
|
||||
border-color: var(--green);
|
||||
color: var(--ink);
|
||||
background: rgba(157, 226, 111, 0.08);
|
||||
}
|
||||
|
||||
.field {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.field span {
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
min-height: 180px;
|
||||
resize: vertical;
|
||||
padding: 12px;
|
||||
color: var(--ink);
|
||||
background: var(--field);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 6px;
|
||||
font-family: "Cascadia Code", "JetBrains Mono", monospace;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.jobList, .resultList {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
max-height: 460px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.jobRow, .resultList a {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
gap: 8px;
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
background: #101310;
|
||||
border: 1px solid var(--line);
|
||||
text-decoration: none;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.jobRow small {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.pill {
|
||||
padding: 3px 8px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
border: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.pill-running { color: var(--cyan); }
|
||||
.pill-success { color: var(--green); }
|
||||
.pill-failed { color: var(--red); }
|
||||
.pill-cancelled { color: var(--amber); }
|
||||
|
||||
.gpu {
|
||||
display: grid;
|
||||
gap: 9px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.gpu strong, .gpu span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.gpu span {
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
meter {
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
accent-color: var(--green);
|
||||
}
|
||||
|
||||
.bigNumber {
|
||||
font-size: 54px;
|
||||
font-weight: 760;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.chips span {
|
||||
padding: 6px 9px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 999px;
|
||||
color: var(--muted);
|
||||
background: #101310;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.logPanel pre {
|
||||
min-height: 340px;
|
||||
max-height: 520px;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 14px;
|
||||
color: #dbe7d8;
|
||||
background: #080a08;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 6px;
|
||||
font-family: "Cascadia Code", "JetBrains Mono", monospace;
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.resultList a:hover, .jobRow:hover {
|
||||
border-color: var(--green);
|
||||
}
|
||||
|
||||
@media (max-width: 1180px) {
|
||||
body { min-width: 960px; }
|
||||
.shell { grid-template-columns: 220px 1fr; }
|
||||
.taskColumns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
||||
.grid.three { grid-template-columns: 1fr; }
|
||||
.grid.two { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
2
frontend/src/vite-env.d.ts
vendored
Normal file
2
frontend/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
Reference in New Issue
Block a user