diff options
author | Simon Rettberg | 2024-12-18 11:21:33 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-12-18 11:21:33 +0100 |
commit | b43e0ab6489d4c5b69074234fbb99ffd0de6da55 (patch) | |
tree | eb8656e2a060e75e3968797a25c566df0981880a | |
parent | [statistics] Track firmware used by clients and display in machine details (diff) | |
download | slx-admin-b43e0ab6489d4c5b69074234fbb99ffd0de6da55.tar.gz slx-admin-b43e0ab6489d4c5b69074234fbb99ffd0de6da55.tar.xz slx-admin-b43e0ab6489d4c5b69074234fbb99ffd0de6da55.zip |
[statistics] Display/filter by firmware in client list
5 files changed, 6 insertions, 1 deletions
diff --git a/modules-available/statistics/inc/statisticsfilter.inc.php b/modules-available/statistics/inc/statisticsfilter.inc.php index 5e6448c7..dbbb39e1 100644 --- a/modules-available/statistics/inc/statisticsfilter.inc.php +++ b/modules-available/statistics/inc/statisticsfilter.inc.php @@ -265,6 +265,7 @@ abstract class StatisticsFilter 'persistentgb' => new PartitionGbStatisticsFilter('id45mb'), 'gbram' => new RamGbStatisticsFilter(), 'kvmstate' => new EnumStatisticsFilter('kvmstate', ['ENABLED', 'DISABLED', 'UNSUPPORTED']), + 'firmware' => new EnumStatisticsFilter('firmware', ['BIOS', 'EFI']), 'badsectors' => new SimpleStatisticsFilter('badsectors', self::OP_ORDINAL, ''), 'currentuser' => new SimpleStatisticsFilter('currentuser', self::OP_STRCMP, 'login'), 'state' => new StateStatisticsFilter(), diff --git a/modules-available/statistics/lang/de/filters.json b/modules-available/statistics/lang/de/filters.json index ef423daa..822558e2 100644 --- a/modules-available/statistics/lang/de/filters.json +++ b/modules-available/statistics/lang/de/filters.json @@ -3,6 +3,7 @@ "clientip": "IP-Adresse", "cpumodel": "CPU-Modell", "currentuser": "Aktueller\/Letzter Benutzer", + "firmware": "Firmware", "firstseen": "Erster Boot", "gbram": "RAM (GB)", "hddgb": "ID44 (GB)", diff --git a/modules-available/statistics/lang/en/filters.json b/modules-available/statistics/lang/en/filters.json index 79372115..225d8613 100644 --- a/modules-available/statistics/lang/en/filters.json +++ b/modules-available/statistics/lang/en/filters.json @@ -3,6 +3,7 @@ "clientip": "IP address", "cpumodel": "CPU model", "currentuser": "Current\/last user", + "firmware": "Firmware", "firstseen": "First boot", "gbram": "RAM (GB)", "hddgb": "ID44 (GB)", diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php index f08cd71c..f9cf413c 100644 --- a/modules-available/statistics/pages/list.inc.php +++ b/modules-available/statistics/pages/list.inc.php @@ -35,7 +35,7 @@ class SubPage } $allRows = Database::queryAll("SELECT m.machineuuid, m.locationid, m.macaddr, m.clientip, m.lastseen, m.logintime, m.state, m.currentuser, m.currentrunmode, m.realcores, m.mbram, m.kvmstate, m.cpumodel, m.id44mb, - m.id45mb, m.hostname, m.notes IS NOT NULL AS hasnotes, + m.id45mb, m.hostname, m.notes IS NOT NULL AS hasnotes, m.firmware, m.badsectors, Count(s.machineuuid) AS confvars $xtra FROM machine m LEFT JOIN setting_machine s ON (m.machineuuid = s.machineuuid) $join WHERE $where GROUP BY m.machineuuid", $args); diff --git a/modules-available/statistics/templates/clientlist.html b/modules-available/statistics/templates/clientlist.html index d94b363e..5b83b069 100644 --- a/modules-available/statistics/templates/clientlist.html +++ b/modules-available/statistics/templates/clientlist.html @@ -38,6 +38,7 @@ <th data-sort="int" data-column="nicspeed" class="text-right">{{lang_nicSpeed}}</th> <th data-sort="int" data-column="lastseen" class="text-right">{{lang_lastSeen}}</th> <th data-sort="string" data-column="kvmstate">{{lang_kvmSupport}}</th> + <th data-sort="string" data-column="firmware">{{lang_firmware}}</th> <th data-sort="int" data-column="gbram" class="text-right">{{lang_gbRam}}</th> <th data-sort="int" data-column="hddgb" class="text-right">{{lang_tmpGb}}</th> <th data-sort="int" data-column="persistentgb" class="text-right">{{lang_persistentPart}}</th> @@ -115,6 +116,7 @@ </td> <td data-sort-value="{{lastseen_int}}" class="text-right text-nowrap">{{lastseen}}</td> <td class="{{kvmclass}}">{{kvmstate}}</td> + <td>{{firmware}}</td> <td data-sort-value="{{mbram}}" class="text-right {{ramclass}}">{{gbram}} GiB</td> <td data-sort-value="{{id44mb}}" class="text-right {{hddclass}}"> {{gbtmp}} GiB |