summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/machine.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2022-04-13 12:49:41 +0200
committerSimon Rettberg2022-04-13 12:49:41 +0200
commitf0ef328db5fc34db87070dc83e3af9d382a74eed (patch)
tree659ddf697a91daf947b47f0eeda3627ce6929b9f /modules-available/statistics/pages/machine.inc.php
parent[inc/Database] Force more sql_mode options in debug mode (diff)
downloadslx-admin-f0ef328db5fc34db87070dc83e3af9d382a74eed.tar.gz
slx-admin-f0ef328db5fc34db87070dc83e3af9d382a74eed.tar.xz
slx-admin-f0ef328db5fc34db87070dc83e3af9d382a74eed.zip
[statistics] Add PCI device filter option
Diffstat (limited to 'modules-available/statistics/pages/machine.inc.php')
-rw-r--r--modules-available/statistics/pages/machine.inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php
index 4e8f9f34..0d91b017 100644
--- a/modules-available/statistics/pages/machine.inc.php
+++ b/modules-available/statistics/pages/machine.inc.php
@@ -508,11 +508,15 @@ class SubPage
$hdd[$row['prop']] = $row['numeric'] ?? $row['value'];
}
}
+ $result = [];
foreach ($hdds as $k => &$hdd) {
+ if (substr($hdd['dev'] ?? '/dev/sr', 0, 7) === '/dev/sr')
+ continue;
$hdd['devid'] = 'k' . $k;
$hdd['partitions'] = array_values($hdd['partitions']);
+ $result[] = $hdd;
}
- return array_values($hdds);
+ return $result;
}
private static function mangleHdd(array &$hdd)
@@ -702,4 +706,4 @@ class SubPage
return HardwareInfo::GPT[$type] ?? $type;
}
-} \ No newline at end of file
+}