mirror of
https://github.com/semi-system/broom.git
synced 2026-12-06 23:25:32 +09:00
Diskless goldens over iSCSI, Add hardware, maintenance VM in the browser, machine power / display / hardware list, roles with permissions and HTTPS for the web admin. Includes the security fixes from the review on #2. Co-authored-by: Mojo-LB <35627917+Mojo-LB@users.noreply.github.com>
43 lines
2.8 KiB
CSS
43 lines
2.8 KiB
CSS
/* app.css — web admin + login page, on top of Bootstrap 5 (bootstrap.min.css): only what Bootstrap has no class for. */
|
|
|
|
/* Sidebar: a fixed column from lg up (below that it is an offcanvas, index.html). */
|
|
@media (min-width:992px){
|
|
/* Taller menu than the window → it scrolls inside its own column (the background stays full height). */
|
|
#sidebar{width:216px;flex-shrink:0;position:sticky;top:0;height:100vh;overflow-y:auto}
|
|
}
|
|
/* Menu groups (index.html): <details> folds; the arrow turns when open. */
|
|
.nav-group>summary{cursor:pointer;list-style:none;user-select:none}
|
|
.nav-group>summary::-webkit-details-marker{display:none}
|
|
.nav-group>summary::before{content:'\25B8';display:inline-block;width:1em;transition:transform .15s}
|
|
.nav-group[open]>summary::before{transform:rotate(90deg)}
|
|
#sidebar .dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--bs-secondary-color);
|
|
margin-right:6px;vertical-align:middle}
|
|
#sidebar .dot.up{background:var(--bs-success)}
|
|
#sidebar .dot.down{background:var(--bs-danger)}
|
|
|
|
/* Data text: machine names, IPs, MACs, sizes, hashes. */
|
|
.mono{font-family:var(--bs-font-monospace);font-size:.875em;color:var(--bs-secondary-color)}
|
|
/* Status lines next to buttons (say() in app.js); long job results (driver lists) wrap inside the card. */
|
|
.msg{font-family:var(--bs-font-monospace);font-size:.875em;color:var(--bs-secondary-color);overflow-wrap:anywhere}
|
|
|
|
/* Tables keep one line per cell (they scroll sideways in .table-responsive); cells that hold prose say otherwise inline. */
|
|
.table td,.table th{white-space:nowrap}
|
|
tr.filters th{padding-top:0}
|
|
tr.filters .form-control,tr.filters .form-select{min-width:72px}
|
|
|
|
/* Icons: symbols of /icons.svg (ic() in app.js), sized + coloured like the text around them. */
|
|
.ic{width:1.05em;height:1.05em;vertical-align:-.17em;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
|
|
.ic.ok{color:var(--bs-success)} .ic.err{color:var(--bs-danger)} .ic.wait,.ic.warn{color:var(--bs-warning)}
|
|
|
|
/* Roles (auth.rs): what an account's role does not allow is not shown — the server refuses it anyway (auth.rs needs()).
|
|
data-owner: the owner's alone. data-perm="x": needs permission x; "vm": Vm or Maintain. body[data-perms] lists the
|
|
signed-in account's permissions (loadMe). */
|
|
body:not([data-role="owner"]) [data-owner]{display:none!important}
|
|
body:not([data-perms~="remote"]) [data-perm="remote"],
|
|
body:not([data-perms~="wake"]) [data-perm="wake"],
|
|
body:not([data-perms~="power"]) [data-perm="power"],
|
|
body:not([data-perms~="games"]) [data-perm="games"],
|
|
body:not([data-perms~="maintain"]) [data-perm="maintain"],
|
|
body:not([data-perms~="versions"]) [data-perm="versions"],
|
|
body:not([data-perms~="vm"]):not([data-perms~="maintain"]) [data-perm="vm"]{display:none!important}
|