The Admin → System area was growing a parallel per-container surface
(/admin/config/system/app/<name>) alongside the existing per-app Services
tab on the app page. Two pages onto the same thing is the kind of
duplication that rots fast — they drift, users have to remember which
one to use, and the next person adding a feature has to decide twice.
This commit consolidates onto the existing Services tab (which already
has compose-service awareness, docker socket access, restart actions via
the task system, and live log streaming) and decommissions the parallel
admin sub-page:
- Delete system-app-page.js and its lazyLoad entry. The dispatch in
admin-system.js for the 'app' view now redirects to the app page's
Services tab so old bookmarks still resolve cleanly.
- System index per-app rows navigate to /app/<name>/services (not
/admin/config/system/app/<name>) and the row hint copy is updated
to match.
- Services tab gains the rich container detail the old admin page
rendered, fed by /api/system/containers + /containers/:id +
/containers/:id/stats:
* Inline live chips in each service header: CPU% and memory
(with limit + percent if a limit is set). Memory chip flips
amber at 80% and red at 95% of the configured limit.
* New "service-rich" panel inside the existing expandable
details section (above the log block, so the existing Logs
toggle reveals both):
- Image + image-id + uptime + restart count
- Memory / CPU / PIDs limits + restart policy
- Healthcheck pill + last 3 probes (collapsible per-probe)
- Networks table (name, IP, gateway, MAC)
- Mounts table with type badges (volume/bind/tmpfs)
* Live stats refresh every 5 s; existing status refresh stays
on 10 s. Both gated on the Services tab being active.
- Backups for the app already live on the existing /app/<name>/backups
tab (loadAppBackups → BackupAppCard.render), so the navigational
promise of "one place per-app" is already met — System index just
needed to route there.
- CSS: services.css picks up .service-live-chip (with warn/danger
colour cues) and the full .service-rich block (grid, tables, mount
badges, healthcheck pills).
Signed-off-by: librelad <librelad@digitalangels.vip>
359 lines
9.7 KiB
CSS
359 lines
9.7 KiB
CSS
/*
|
|
Services tab — rows reuse the .task-item / .task-header / .task-info /
|
|
.task-actions / .task-details / .log-container pattern from the
|
|
task list so the two surfaces look identical. The only service-only
|
|
bits are the status dot inside the status pill, the port chips, and
|
|
a streaming-state hint on the log container.
|
|
*/
|
|
|
|
.services-section {
|
|
padding: 0;
|
|
}
|
|
|
|
/* Mirrors .config-title for visual parity across tabs. */
|
|
.services-title {
|
|
padding: 20px;
|
|
background: transparent;
|
|
border-bottom: 1px solid var(--border-color);
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.services-title h3 {
|
|
margin: 0 0 8px 0;
|
|
color: var(--text-primary, #fff);
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.services-title p {
|
|
margin: 0;
|
|
color: var(--text-secondary, #ccc);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.services-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Recessed dark panel wrapping the service rows — mirrors the
|
|
.tasks-container the Tasks tab uses on the app detail page so the
|
|
two tabs share one visual idiom. rgba(bg, 0.2) reads as a sunken
|
|
pocket inside the tab-pane's glass surface. */
|
|
.services-rows {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.6rem;
|
|
padding: 16px;
|
|
margin: 16px;
|
|
background: rgba(var(--bg-rgb), 0.2);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Loading + empty + error states */
|
|
/* ------------------------------------------------------------------ */
|
|
.services-loading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.6rem;
|
|
padding: 2rem;
|
|
color: var(--text-secondary, var(--text-muted));
|
|
}
|
|
|
|
.services-spinner {
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid rgba(var(--text-rgb), 0.15);
|
|
border-top-color: var(--accent-color, var(--accent));
|
|
border-radius: 50%;
|
|
animation: services-spin 0.7s linear infinite;
|
|
}
|
|
|
|
@keyframes services-spin { to { transform: rotate(360deg); } }
|
|
|
|
.services-empty {
|
|
text-align: center;
|
|
padding: 2.5rem 1rem;
|
|
color: var(--text-secondary, var(--text-muted));
|
|
}
|
|
|
|
.services-empty-icon {
|
|
font-size: 2rem;
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.services-empty p {
|
|
margin: 0.25rem 0;
|
|
}
|
|
|
|
.services-empty-hint {
|
|
font-size: 0.85rem;
|
|
opacity: 0.75;
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Status dot inside the .task-status pill */
|
|
/* ------------------------------------------------------------------ */
|
|
.service-dot {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
margin-right: 6px;
|
|
vertical-align: middle;
|
|
background: var(--text-muted);
|
|
}
|
|
|
|
@keyframes service-pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.55; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Port + IP chips inside .task-info (alongside status / time) */
|
|
/* ------------------------------------------------------------------ */
|
|
.service-port {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
font-size: 0.72rem;
|
|
background: rgba(var(--accent-rgb), 0.08);
|
|
border: 1px solid rgba(var(--accent-rgb), 0.25);
|
|
color: var(--text-secondary);
|
|
padding: 2px 7px;
|
|
border-radius: 4px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.service-port-arrow {
|
|
opacity: 0.5;
|
|
margin: 0 1px;
|
|
}
|
|
|
|
.service-port-proto {
|
|
margin-left: 4px;
|
|
font-size: 0.65rem;
|
|
opacity: 0.6;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.service-ip {
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
background: rgba(var(--text-rgb), 0.05);
|
|
border: 1px solid rgba(var(--text-rgb), 0.08);
|
|
border-radius: 4px;
|
|
padding: 1px 6px;
|
|
font-size: 0.72rem;
|
|
color: var(--text-secondary, var(--text-muted));
|
|
}
|
|
|
|
/* The Open button — flagged with .open on top of .task-btn so the
|
|
shared task-row hover styles still apply but a slightly different
|
|
accent makes it distinguishable from Restart. */
|
|
.task-btn.open {
|
|
color: var(--text-secondary);
|
|
}
|
|
.task-btn.open:hover {
|
|
background: rgba(var(--accent-rgb), 0.15);
|
|
}
|
|
|
|
.service-app-icon {
|
|
width: 30px;
|
|
height: 30px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Streaming state hint on the log container */
|
|
/* ------------------------------------------------------------------ */
|
|
.service-log-output[data-stream="connecting"]::before {
|
|
content: 'Connecting…';
|
|
color: var(--status-warning);
|
|
display: block;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.service-log-output[data-stream="disconnected"]::before {
|
|
content: '⚠ disconnected — retrying…';
|
|
color: var(--status-warning);
|
|
display: block;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.service-log-output[data-stream="closed"]::after {
|
|
content: '— stream closed —';
|
|
color: var(--text-muted);
|
|
display: block;
|
|
margin-top: 0.25rem;
|
|
}
|
|
|
|
/* Spinner-on-restart while the request is in flight, mirroring the
|
|
subtle “task is doing something” visual cue used by the task list. */
|
|
.task-btn.is-running {
|
|
opacity: 0.6;
|
|
cursor: wait;
|
|
}
|
|
|
|
/* ============================================================
|
|
Live container chips (CPU%, memory) — rendered inline in the
|
|
service row header alongside the existing port/IP chips.
|
|
Updated in place by the periodic stats refresh.
|
|
============================================================ */
|
|
.service-live-chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 2px 9px;
|
|
font-size: 0.74rem;
|
|
font-weight: 600;
|
|
font-variant-numeric: tabular-nums;
|
|
color: rgba(var(--text-rgb), 0.85);
|
|
background: rgba(var(--accent-rgb), 0.12);
|
|
border: 1px solid rgba(var(--accent-rgb), 0.25);
|
|
border-radius: 999px;
|
|
transition: color .2s ease, background .2s ease, border-color .2s ease;
|
|
}
|
|
.service-live-chip.warn {
|
|
color: var(--status-warning);
|
|
background: rgba(var(--status-warning-rgb), 0.14);
|
|
border-color: rgba(var(--status-warning-rgb), 0.4);
|
|
}
|
|
.service-live-chip.danger {
|
|
color: var(--status-danger);
|
|
background: rgba(var(--status-danger-rgb), 0.16);
|
|
border-color: rgba(var(--status-danger-rgb), 0.5);
|
|
}
|
|
|
|
/* ============================================================
|
|
Rich container detail panel — limits, image, healthcheck,
|
|
networks, mounts. Rendered inside .task-details above the
|
|
log container so it's discoverable from the existing "Logs"
|
|
expand action.
|
|
============================================================ */
|
|
.service-rich {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 14px;
|
|
margin: 8px 0 14px;
|
|
}
|
|
|
|
.service-rich-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
|
gap: 10px;
|
|
}
|
|
.service-rich-cell {
|
|
padding: 10px 12px;
|
|
background: rgba(var(--text-rgb), 0.04);
|
|
border: 1px solid rgba(var(--text-rgb), 0.08);
|
|
border-radius: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
min-width: 0;
|
|
}
|
|
.service-rich-cell span {
|
|
font-size: 0.66rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
color: rgba(var(--text-rgb), 0.45);
|
|
font-weight: 700;
|
|
}
|
|
.service-rich-cell strong {
|
|
font-size: 0.88rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
word-break: break-word;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.service-rich-section h4 {
|
|
font-size: 0.78rem;
|
|
font-weight: 700;
|
|
margin: 0 0 6px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
color: rgba(var(--text-rgb), 0.7);
|
|
}
|
|
|
|
.service-rich-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 0.8rem;
|
|
background: rgba(var(--text-rgb), 0.03);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
}
|
|
.service-rich-table th {
|
|
text-align: left;
|
|
font-size: 0.66rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
color: rgba(var(--text-rgb), 0.45);
|
|
padding: 8px 10px;
|
|
border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
|
|
}
|
|
.service-rich-table td {
|
|
padding: 7px 10px;
|
|
border-bottom: 1px solid rgba(var(--text-rgb), 0.04);
|
|
color: rgba(var(--text-rgb), 0.85);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.service-rich-table tr:last-child td { border-bottom: none; }
|
|
|
|
.service-mount-type {
|
|
display: inline-block;
|
|
padding: 1px 7px;
|
|
border-radius: 4px;
|
|
font-size: 0.65rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
.service-mount-volume { background: rgba(var(--status-success-rgb), 0.2); color: var(--status-success); }
|
|
.service-mount-bind { background: rgba(var(--accent-rgb), 0.18); color: var(--accent); }
|
|
.service-mount-tmpfs { background: rgba(var(--status-warning-rgb), 0.18); color: var(--status-warning); }
|
|
.service-mount-path {
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
font-size: 0.76rem;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.service-health {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.service-health-pill {
|
|
padding: 2px 10px;
|
|
border-radius: 999px;
|
|
font-size: 0.7rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
.service-health-healthy { background: rgba(var(--status-success-rgb), 0.18); color: var(--status-success); }
|
|
.service-health-starting { background: rgba(var(--status-warning-rgb), 0.18); color: var(--status-warning); }
|
|
.service-health-unhealthy { background: rgba(var(--status-danger-rgb), 0.18); color: var(--status-danger); }
|
|
.service-health-unknown { background: rgba(var(--text-rgb), 0.10); color: rgba(var(--text-rgb), 0.6); }
|
|
.service-health-fail { color: var(--status-danger); font-size: 0.76rem; font-weight: 600; }
|
|
.service-health-log {
|
|
background: rgba(var(--text-rgb), 0.03);
|
|
border-radius: 6px;
|
|
margin-top: 4px;
|
|
padding: 4px 8px;
|
|
font-size: 0.76rem;
|
|
}
|
|
.service-health-log summary { cursor: pointer; color: rgba(var(--text-rgb), 0.65); }
|
|
.service-health-log pre {
|
|
margin: 6px 0 0;
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
font-size: 0.76rem;
|
|
white-space: pre-wrap;
|
|
color: rgba(var(--text-rgb), 0.7);
|
|
}
|