From b43e0ab6489d4c5b69074234fbb99ffd0de6da55 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 18 Dec 2024 11:21:33 +0100 Subject: [statistics] Display/filter by firmware in client list --- modules-available/statistics/inc/statisticsfilter.inc.php | 1 + modules-available/statistics/lang/de/filters.json | 1 + modules-available/statistics/lang/en/filters.json | 1 + modules-available/statistics/pages/list.inc.php | 2 +- modules-available/statistics/templates/clientlist.html | 2 ++ 5 files changed, 6 insertions(+), 1 deletion(-) (limited to 'modules-available') 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 @@ {{lang_nicSpeed}} {{lang_lastSeen}} {{lang_kvmSupport}} + {{lang_firmware}} {{lang_gbRam}} {{lang_tmpGb}} {{lang_persistentPart}} @@ -115,6 +116,7 @@ {{lastseen}} {{kvmstate}} + {{firmware}} {{gbram}} GiB {{gbtmp}} GiB -- cgit v1.2.3-55-g7522