diff options
author | Simon Rettberg | 2022-05-10 15:49:58 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-05-10 15:49:58 +0200 |
commit | 988ff2ca8229662615c13a9bc4cca0d9263ba5ec (patch) | |
tree | 04ad652acc49558866971ea9076ae49c404a9653 /modules-available/statistics/inc | |
parent | [statistics] Don't try to check MBR partition IDs for non-MBR drives (diff) | |
download | slx-admin-988ff2ca8229662615c13a9bc4cca0d9263ba5ec.tar.gz slx-admin-988ff2ca8229662615c13a9bc4cca0d9263ba5ec.tar.xz slx-admin-988ff2ca8229662615c13a9bc4cca0d9263ba5ec.zip |
[statistics] Show HDD count in list view
Diffstat (limited to 'modules-available/statistics/inc')
-rw-r--r-- | modules-available/statistics/inc/hardwareparser.inc.php | 2 | ||||
-rw-r--r-- | modules-available/statistics/inc/statisticsfilterset.inc.php | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php index 16710a9f..95b8e31e 100644 --- a/modules-available/statistics/inc/hardwareparser.inc.php +++ b/modules-available/statistics/inc/hardwareparser.inc.php @@ -438,6 +438,8 @@ class HardwareParser // Sum of all ID44/45 partitions in bytes $id44 = $id45 = 0; foreach (($data['drives'] ?? []) as $dev) { + if (($dev['type'] ?? 'drive') !== 'drive') + continue; // TODO: Handle CD/DVD drives? Still relevant? if (empty($dev['readlink'])) // This is the canonical entry name directly under /dev/, e.g. /dev/sda continue; // Use smartctl as the source of truth, lsblk as fallback if data is missing diff --git a/modules-available/statistics/inc/statisticsfilterset.inc.php b/modules-available/statistics/inc/statisticsfilterset.inc.php index e4117a8c..086c4fae 100644 --- a/modules-available/statistics/inc/statisticsfilterset.inc.php +++ b/modules-available/statistics/inc/statisticsfilterset.inc.php @@ -37,12 +37,6 @@ class StatisticsFilterSet $join = implode(' ', array_unique($joins)); $this->cache = compact('where', 'join', 'args'); } - - public function isNoId44Filter(): bool - { - $filter = $this->hasFilter('Id44GbStatisticsFilter'); - return $filter !== false && $filter->argument == 0; - } public function filterNonClients() { |