mirror of
https://github.com/hansjone/netx.git
synced 2026-10-14 17:20:46 +08:00
Add column filters and clearer API error mapping for NE management, tighten port validation, and slim the workbench into reusable modules with cleaner styles. Co-authored-by: Cursor <cursoragent@cursor.com>
179 lines
15 KiB
CSS
179 lines
15 KiB
CSS
/* Desktop console: launcher and network on the left, tasks on the right,
|
|
with a single resource strip below. Page geometry has one owning layer. */
|
|
.app--shell .app-main:has(> .workbench) {
|
|
padding: 28px 32px 32px;
|
|
background: var(--nx-bg);
|
|
}
|
|
|
|
.workbench { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
|
|
.wb-panel { min-width: 0; border: 1px solid var(--nx-line-soft); border-radius: var(--nx-radius-lg); background: var(--nx-surface-1); }
|
|
.wb-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 4px; }
|
|
.wb-head__title-row, .wb-head__actions { display: flex; align-items: center; gap: 16px; }
|
|
.wb-head__title { margin: 0; color: var(--nx-text-strong); font-size: 24px; font-weight: 600; line-height: 1.5; }
|
|
.wb-head__updated { color: var(--nx-text-faint); font-size: 12px; }
|
|
.wb-head__health { display: inline-flex; align-items: center; gap: 6px; color: var(--nx-text-muted); font-size: 12px; }
|
|
.wb-head__health.is-ok { color: var(--nx-ok); }
|
|
.wb-head__health.is-busy { color: var(--nx-warn); }
|
|
.wb-head__health-dot, .wb-fleet__live > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
|
|
.app--shell .app-main .wb-refresh { height: 32px; gap: 6px; background: transparent; border-color: var(--nx-line); color: var(--nx-text-muted); font-size: 12px; box-shadow: none; }
|
|
.wb-refresh__icon { display: inline-flex; }
|
|
.wb-refresh__icon.is-spinning { animation: wb-spin 1s linear infinite; }
|
|
@keyframes wb-spin { to { transform: rotate(360deg); } }
|
|
|
|
.wb-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: stretch; }
|
|
.wb-main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
|
|
.wb-side { min-width: 0; display: flex; }
|
|
.wb-panel-title, .wb-fleet__title, .wb-rail__title { margin: 0; color: var(--nx-text); font-size: 15px; font-weight: 600; line-height: 1.5; }
|
|
|
|
/* Five primary destinations, followed by one quiet system toolbar. */
|
|
.wb-modules { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
|
|
.wb-modules__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
|
|
.wb-search { display: flex; align-items: center; gap: 8px; width: 230px; height: 32px; padding: 0 10px; border: 1px solid var(--nx-line-soft); border-radius: var(--nx-radius-sm); color: var(--nx-text-faint); background: var(--nx-field); }
|
|
.wb-search:focus-within { border-color: var(--nx-accent); box-shadow: var(--nx-ring); }
|
|
.app--shell .app-main .wb-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; border-radius: 0; box-shadow: none; background: transparent; color: var(--nx-text); font: 12px var(--nx-font-sans); }
|
|
.wb-search input::-webkit-search-cancel-button { display: none; }
|
|
.wb-search svg { width: 15px; height: 15px; flex-shrink: 0; }
|
|
.app--shell .app-main .wb-search__clear { width: 22px; height: 24px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--nx-text-muted); box-shadow: none; }
|
|
.wb-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
|
|
.app--shell .app-main .wb-tile {
|
|
width: 100%; height: auto; min-height: 120px; padding: 16px 10px;
|
|
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
|
|
border: 1px solid transparent; border-radius: var(--nx-radius); background: transparent;
|
|
color: var(--nx-text); text-align: center; white-space: normal; box-shadow: none;
|
|
transition: background .15s, border-color .15s;
|
|
}
|
|
.app--shell .app-main .wb-tile:hover { background: var(--nx-surface-2); border-color: var(--nx-line-soft); }
|
|
.app--shell .app-main .wb-tile:focus-visible { box-shadow: var(--nx-ring); }
|
|
.wb-tile__label { font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--nx-text); }
|
|
.wb-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: var(--nx-radius-lg); color: var(--nx-accent); background: var(--nx-accent-soft); flex-shrink: 0; }
|
|
.wb-card__icon svg { width: 24px; height: 24px; }
|
|
.wb-section--system { display: flex; align-items: center; gap: 28px; padding-top: 18px; border-top: 1px solid var(--nx-line-soft); }
|
|
.wb-section__title { margin: 0; font-size: 12px; font-weight: 400; color: var(--nx-text-faint); white-space: nowrap; }
|
|
.wb-section--system .wb-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
|
|
.app--shell .app-main .wb-section--system .wb-tile { width: auto; min-height: 34px; flex-direction: row; gap: 8px; padding: 4px 10px; text-align: left; }
|
|
.wb-section--system .wb-card__icon { width: 20px; height: 20px; border-radius: 0; background: transparent; color: var(--nx-text-muted); }
|
|
.wb-section--system .wb-card__icon svg { width: 16px; height: 16px; }
|
|
.wb-section--system .wb-tile__label { font-size: 13px; font-weight: 400; color: var(--nx-text-muted); }
|
|
.wb-modules__empty { padding: 40px 0; text-align: center; font-size: 13px; color: var(--nx-text-muted); }
|
|
.wb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
|
|
|
|
/* A single network panel; columns are separated by rules, not nested cards. */
|
|
.wb-fleet { padding: 24px; }
|
|
.wb-fleet__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
|
|
.wb-fleet__live { display: inline-flex; align-items: center; gap: 6px; color: var(--nx-text-faint); font-size: 11px; }
|
|
.wb-fleet__live > span { color: var(--nx-ok); }
|
|
.wb-fleet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
.app--shell .app-main .wb-fleet__card {
|
|
width: 100%; max-width: none; height: auto; min-width: 0; margin: 0; padding: 0 24px;
|
|
display: flex; flex-direction: column; gap: 20px;
|
|
border: 0; border-radius: 0; background: transparent; color: var(--nx-text); font: inherit; text-align: left; box-shadow: none;
|
|
}
|
|
.app--shell .app-main .wb-fleet__card:first-child { padding-left: 0; }
|
|
.app--shell .app-main .wb-fleet__card:last-child { padding-right: 0; }
|
|
.app--shell .app-main .wb-fleet__card + .wb-fleet__card { border-left: 1px solid var(--nx-line-soft); }
|
|
.app--shell .app-main button.wb-fleet__card { cursor: pointer; }
|
|
.app--shell .app-main button.wb-fleet__card:hover:enabled .wb-fleet__card-label { color: var(--nx-accent); }
|
|
.app--shell .app-main button.wb-fleet__card:focus-visible { border-radius: var(--nx-radius); box-shadow: var(--nx-ring); }
|
|
.app--shell .app-main button.wb-fleet__card:disabled { cursor: default; opacity: .65; }
|
|
.wb-fleet__card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
.wb-fleet__card-label { font-size: 13px; font-weight: 500; color: var(--nx-text-soft); }
|
|
.wb-fleet__card-badge { font-size: 11px; color: var(--nx-text-faint); white-space: nowrap; }
|
|
.wb-fleet__viz { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 20px; align-items: center; }
|
|
.wb-fleet__donut { position: relative; width: 80px; height: 80px; border-radius: 50%; }
|
|
.wb-fleet__donut-hole { position: absolute; inset: 14%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 50%; background: var(--nx-surface-1); }
|
|
.wb-fleet__donut-value { font: 600 18px var(--nx-font-mono); color: var(--nx-text); }
|
|
.wb-fleet__donut-unit { font-size: 9px; color: var(--nx-text-faint); }
|
|
.wb-fleet__rows { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
|
|
.wb-fleet__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 1.5; color: var(--nx-text-muted); }
|
|
.wb-fleet__legend { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
|
|
.wb-fleet__legend-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.wb-fleet__swatch { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; background: var(--nx-text-faint); }
|
|
.wb-fleet__swatch.is-ok { background: var(--nx-ok); }
|
|
.wb-fleet__swatch.is-bad { background: var(--nx-bad); }
|
|
.wb-fleet__swatch.is-mid { background: var(--nx-accent); }
|
|
.wb-fleet__row strong { font: 500 12px var(--nx-font-mono); color: var(--nx-text-soft); }
|
|
.wb-fleet__row strong.is-ok, .wb-fleet__sched-state.is-ok, .wb-fleet__foot em.is-ok { color: var(--nx-ok); }
|
|
.wb-fleet__row strong.is-bad { color: var(--nx-bad); }
|
|
.wb-fleet__row strong.is-mid { color: var(--nx-accent); }
|
|
.wb-fleet__row strong.is-muted { color: var(--nx-text-faint); }
|
|
.wb-fleet__card--sched .wb-fleet__viz { display: block; }
|
|
.wb-fleet__card--sched .wb-fleet__rows { gap: 0; }
|
|
.app--shell .app-main button.wb-fleet__row--sched { width: 100%; min-height: 28px; height: auto; margin: 0; padding: 3px 0; display: grid; grid-template-columns: minmax(0, 1fr) 34px 42px; gap: 12px; border: 0; border-radius: 4px; background: transparent; box-shadow: none; color: var(--nx-text-muted); font: 12px var(--nx-font-sans); text-align: left; cursor: pointer; }
|
|
.app--shell .app-main button.wb-fleet__row--sched:hover { color: var(--nx-text); background: var(--nx-accent-soft); }
|
|
.app--shell .app-main button.wb-fleet__row--sched:focus-visible { box-shadow: var(--nx-ring); }
|
|
.wb-fleet__sched-state, .wb-fleet__sched-age { font: 11px var(--nx-font-mono); }
|
|
.wb-fleet__sched-age { color: var(--nx-text-faint); text-align: right; }
|
|
.wb-fleet__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: auto; font-size: 10px; line-height: 1.6; color: var(--nx-text-faint); }
|
|
.wb-fleet__foot em { color: var(--nx-text-muted); font-style: normal; }
|
|
.wb-fleet__foot em.is-warn { color: var(--nx-warn); }
|
|
|
|
/* Tasks are one continuous list, with no card inside a card. */
|
|
.wb-rail { width: 100%; padding: 24px; display: flex; flex-direction: column; }
|
|
.wb-rail__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
.wb-rail__title { display: flex; align-items: center; gap: 8px; }
|
|
.wb-rail__count { font: 12px var(--nx-font-mono); color: var(--nx-text-faint); }
|
|
.app--shell .app-main .wb-rail__all { height: 24px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--nx-accent); font-size: 11px; box-shadow: none; }
|
|
.wb-rail__list { list-style: none; padding: 0; margin: 18px 0 0; max-height: 510px; overflow-y: auto; }
|
|
.wb-rail__list li + li { border-top: 1px solid var(--nx-line-soft); }
|
|
.app--shell .app-main .wb-rail__item { width: 100%; height: auto; margin: 0; padding: 18px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; border: 0; border-radius: 0; background: transparent; color: var(--nx-text); box-shadow: none; font: inherit; text-align: left; cursor: pointer; }
|
|
.app--shell .app-main .wb-rail__item:hover .wb-rail__item-title { color: var(--nx-accent); }
|
|
.app--shell .app-main .wb-rail__item:focus-visible { border-radius: var(--nx-radius-sm); box-shadow: var(--nx-ring); }
|
|
.wb-rail__item-title { font-size: 13px; line-height: 1.6; font-weight: 500; overflow-wrap: anywhere; }
|
|
.wb-rail__item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12px; }
|
|
.wb-rail__status { display: inline-flex; align-items: center; gap: 5px; }
|
|
.wb-rail__status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
|
|
.wb-rail__status--running { color: var(--nx-accent); }
|
|
.wb-rail__status--ok { color: var(--nx-ok); }
|
|
.wb-rail__status--paused { color: var(--nx-warn); }
|
|
.wb-rail__status--stopped { color: var(--nx-bad); }
|
|
.wb-rail__status--other, .wb-rail__progress { color: var(--nx-text-muted); }
|
|
.wb-rail__time { font-size: 11px; color: var(--nx-text-faint); }
|
|
.wb-rail__empty { margin: auto 0; padding: 40px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--nx-text-muted); font-size: 12px; text-align: center; }
|
|
.wb-rail__empty strong { font-weight: 500; }
|
|
.wb-rail__empty-icon, .wb-rail__empty-icon svg { display: inline-flex; width: 24px; height: 24px; color: var(--nx-ok); }
|
|
.wb-rail__empty--error > svg { color: var(--nx-warn); }
|
|
|
|
/* Resource telemetry is subordinate to the work area. */
|
|
.wb-runtime { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) 100px; gap: 24px; align-items: center; padding: 20px 24px; }
|
|
.wb-runtime__head { grid-column: 1; grid-row: 1; }
|
|
.wb-runtime__head > svg { display: none; }
|
|
.wb-runtime__group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 22px; }
|
|
.wb-runtime__group--host { grid-column: 2; grid-row: 1; }
|
|
.wb-runtime__group--capacity { grid-column: 3; grid-row: 1; padding-left: 24px; border-left: 1px solid var(--nx-line-soft); }
|
|
.wb-runtime__group h3 { grid-column: 1 / -1; margin: 0; font-size: 11px; font-weight: 400; color: var(--nx-text-faint); }
|
|
.wb-runtime .wb-stat { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 0; background: transparent; border: 0; box-shadow: none; }
|
|
.wb-stat__label { font-size: 11px; color: var(--nx-text-muted); }
|
|
.wb-stat__value { font: 11px var(--nx-font-mono); font-variant-numeric: tabular-nums; color: var(--nx-text-soft); white-space: nowrap; }
|
|
.wb-stat__track { grid-column: 1 / -1; width: 100%; height: 2px; overflow: hidden; background: var(--nx-line-soft); }
|
|
.wb-stat__fill { display: block; height: 100%; background: var(--nx-accent); }
|
|
.wb-stat.is-high .wb-stat__fill { background: var(--nx-warn); }
|
|
.wb-stat.is-muted .wb-stat__value { color: var(--nx-text-faint); }
|
|
.wb-runtime__foot { grid-column: 4; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-size: 10px; color: var(--nx-text-faint); }
|
|
.wb-runtime__foot strong { color: var(--nx-text-muted); font: 12px var(--nx-font-mono); }
|
|
.wb-runtime__error { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 12px; color: var(--nx-warn); }
|
|
|
|
@media (min-width: 1800px) {
|
|
.app--shell .app-main:has(> .workbench) { padding: 32px 40px; }
|
|
.wb-body { grid-template-columns: minmax(0, 1fr) 360px; }
|
|
.wb-modules, .wb-fleet, .wb-rail { padding: 28px; }
|
|
.app--shell .app-main .wb-tile { min-height: 132px; }
|
|
.wb-tile__label { font-size: 16px; }
|
|
.wb-fleet__viz { grid-template-columns: 88px minmax(0, 1fr); }
|
|
.wb-fleet__donut { width: 88px; height: 88px; }
|
|
.wb-fleet__donut-value { font-size: 20px; }
|
|
.wb-runtime { grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr) 120px; }
|
|
.wb-stat__label, .wb-stat__value { font-size: 12px; }
|
|
}
|
|
|
|
@media (max-width: 1399px) {
|
|
.wb-body { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
|
|
.wb-modules, .wb-fleet, .wb-rail { padding: 20px; }
|
|
.app--shell .app-main .wb-fleet__card { padding-inline: 16px; }
|
|
.wb-fleet__viz { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
|
|
.wb-fleet__donut { width: 64px; height: 64px; }
|
|
.wb-fleet__donut-value { font-size: 16px; }
|
|
.wb-runtime { grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr); }
|
|
.wb-runtime__foot { display: none; }
|
|
.wb-runtime__group { gap: 12px; }
|
|
.wb-runtime .wb-stat { grid-template-columns: 1fr; }
|
|
}
|