diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm index 5150ec47..8d640f93 100644 --- a/src/lib/Hydra/Helper/Nix.pm +++ b/src/lib/Hydra/Helper/Nix.pm @@ -363,6 +363,14 @@ sub getMachines { , speedFactor => $machine->{speedFactor} , supportedFeatures => [ @{$machine->{supportedFeatures}}, @{$machine->{mandatoryFeatures}} ] , mandatoryFeatures => [ @{$machine->{mandatoryFeatures}} ] + # New fields for the machine status + , primarySystemType => $machine->{systems}[0] + , hasCapacity => $machine->{hasCapacity} + , hasDynamicCapacity => $machine->{hasDynamicCapacity} + , hasStaticCapacity => $machine->{hasStaticCapacity} + , score => $machine->{score} + , stats => $machine->{stats} + , memTotal => $machine->{totalMem} }; } } else { diff --git a/src/root/common.tt b/src/root/common.tt index 86335a74..7a93cc95 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -685,6 +685,14 @@ BLOCK includeFlot %] [% END; +BLOCK renderYesNo %] +[% IF value %] +Yes +[% ELSE %] +No +[% END %] +[% END; + BLOCK createChart %]
diff --git a/src/root/machine-status.tt b/src/root/machine-status.tt index 725598eb..924bdb52 100644 --- a/src/root/machine-status.tt +++ b/src/root/machine-status.tt @@ -19,10 +19,53 @@ [% INCLUDE renderMachineName machine=m.key %] - [% IF m.value.systemTypes %] + [% IF m.value.primarySystemType %] - ([% comma=0; FOREACH system IN m.value.systemTypes %][% IF comma; %], [% ELSE; comma = 1; END %][% system %][% END %]) + ([% m.value.primarySystemType %]) +   + [% WRAPPER makePopover title="Details" classes="btn-secondary btn-sm" %] + + [% END %] + [% ELSE %] + [% IF m.value.systemTypes %] + + ([% comma=0; FOREACH system IN m.value.systemTypes %][% IF comma; %], [% ELSE; comma = 1; END %][% system %][% END %]) + + [% END %] [% END %] [% IF m.value.nrStepsDone %] diff --git a/src/root/static/css/hydra.css b/src/root/static/css/hydra.css index b55f557a..3899e766 100644 --- a/src/root/static/css/hydra.css +++ b/src/root/static/css/hydra.css @@ -181,6 +181,14 @@ a.squiggle:hover { padding-bottom: 1px; } +table.pressureTable { + margin-left: 2em; +} + +table.pressureTable td { + padding: 0 .4em; +} + @media (prefers-color-scheme: dark) { /* Prevent some flickering */ html {