Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/shared/src/jobq-graph/hive-jobq-graph.css
iris 1e13b88c8c jobq graph: state filter on /api/jobq/graph + multi-select checkboxes
GET /api/jobq/graph gains a states query param (comma-separated
hive_jobq::State names): narrows the served root groups to the named
states, keeping a group whole (filtering by a root's own state, which
is already its subtree's rolled-up answer). Absent, empty, or fully
unrecognised is the identity filter, matching prior behaviour.

hive-jobq-graph.js gains a row of per-state checkboxes above the tree,
re-fetching the endpoint with the selection on toggle. Default
selection hides Done and Skipped.

Server-side filtering (not client-side hiding) so hive-jobq-graph-update's
node list, and everything downstream of it in builds.js (count pill,
live-log panel), only ever sees what's actually shown.
2026-08-10 23:05:03 +02:00

129 lines
2.6 KiB
CSS

/* hive-jobq-graph.css — shadow-scoped styles for <hive-jobq-graph>. Theme
custom properties (--fg, --red, ...) pierce the shadow boundary by
inheritance and are used directly; only plain class rules live here,
same split every other shadow-DOM component (<hive-dialog>, ...) uses. */
:host {
display: block;
font-family: inherit;
font-size: inherit;
color: var(--fg);
}
.jg-filter {
display: flex;
flex-wrap: wrap;
gap: 0.15em 0.9em;
margin: 0 0 0.5em;
font-size: 0.85em;
}
.jg-filter-label {
display: inline-flex;
align-items: center;
gap: 0.3em;
color: var(--muted);
cursor: pointer;
user-select: none;
}
.jg-filter-label:has(input:checked) {
color: var(--fg);
}
.jg-body {
display: flex;
flex-direction: column;
gap: 0.15em;
}
.jg-node {
margin: 0;
}
/* Nested groups indent + get a guide line, rather than a hand-rolled
connector-glyph tree — cheaper to build and reads fine at any depth. */
.jg-node .jg-node {
margin-left: 1.1em;
padding-left: 0.6em;
border-left: 1px solid var(--muted);
margin-top: 0.15em;
}
.jg-row {
display: flex;
align-items: baseline;
gap: 0.35em;
flex-wrap: wrap;
}
.jg-state {
font-weight: bold;
min-width: 1.2em;
text-align: center;
}
.jg-state-pending { color: var(--muted); }
.jg-state-running { color: var(--cyan); }
.jg-state-finishing { color: var(--cyan); opacity: 0.75; }
.jg-state-done { color: var(--green); }
.jg-state-failed { color: var(--red); }
.jg-state-cancelled { color: var(--muted); text-decoration: line-through; }
.jg-state-skipped { color: var(--muted); opacity: 0.5; }
.jg-label {
color: var(--fg);
}
.jg-cancel-btn {
margin-left: auto;
background: transparent;
border: 1px solid var(--muted);
color: var(--muted);
border-radius: 999px;
width: 1.4em;
height: 1.4em;
font-size: 0.8em;
line-height: 1;
padding: 0;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: color 0.15s ease, border-color 0.15s ease;
}
.jg-cancel-btn:hover,
.jg-cancel-btn:focus-visible {
color: var(--red);
border-color: var(--red);
outline: none;
}
.jg-data {
margin: 0.1em 0 0 1.6em;
font-size: 0.85em;
color: var(--muted);
display: grid;
grid-template-columns: auto 1fr;
gap: 0 0.5em;
}
.jg-data dt { font-weight: 600; }
.jg-data dd { margin: 0; word-break: break-word; }
.jg-waits-on {
margin: 0.1em 0 0 1.6em;
font-size: 0.85em;
color: var(--cyan);
}
.jg-error {
color: var(--red);
font-size: 0.85em;
margin: 0.2em 0 0.2em 1.6em;
white-space: pre-wrap;
}
.jg-empty,
.jg-error-msg {
color: var(--muted);
font-style: italic;
margin: 0;
}