diff options
author | Simon Rettberg | 2022-12-06 15:16:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-12-06 15:16:58 +0100 |
commit | f4e3d5de6f77970b1bae1987e87878630b990ba2 (patch) | |
tree | 9587b4c282f45b09856f56ee747e1b431b8ed57b /modules-available/statistics/inc | |
parent | [locationinfo] Add Slider to configure browser zoom in URL panel (diff) | |
download | slx-admin-f4e3d5de6f77970b1bae1987e87878630b990ba2.tar.gz slx-admin-f4e3d5de6f77970b1bae1987e87878630b990ba2.tar.xz slx-admin-f4e3d5de6f77970b1bae1987e87878630b990ba2.zip |
[statistics] Add ID45 partition size filter
Closes #3927
Diffstat (limited to 'modules-available/statistics/inc')
-rw-r--r-- | modules-available/statistics/inc/statisticsfilter.inc.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules-available/statistics/inc/statisticsfilter.inc.php b/modules-available/statistics/inc/statisticsfilter.inc.php index 996364ae..f90c15c7 100644 --- a/modules-available/statistics/inc/statisticsfilter.inc.php +++ b/modules-available/statistics/inc/statisticsfilter.inc.php @@ -10,7 +10,7 @@ abstract class StatisticsFilter */ const LEGACY_DELIMITER = '~,~'; - const SIZE_ID44 = [0, 8, 16, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 250, 300, 400, 500, 1000, 1500, 2000, 3000, + const SIZE_PARTITION = [0, 8, 16, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 250, 300, 400, 500, 1000, 1500, 2000, 3000, 4000, 6000, 8000, 10000]; const SIZE_RAM = [1, 2, 3, 4, 6, 8, 10, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 320, 480, 512, 768, 1024, 1536, 2048]; @@ -264,7 +264,8 @@ abstract class StatisticsFilter 'realcores' => new SimpleStatisticsFilter('realcores', self::OP_ORDINAL, ''), 'systemmodel' => new SimpleStatisticsFilter('systemmodel', self::OP_STRCMP, 'PC-365 (IBM)'), 'cpumodel' => new SimpleStatisticsFilter('cpumodel', self::OP_STRCMP, 'Pentium Pro 200 MHz'), - 'hddgb' => new Id44GbStatisticsFilter(), + 'hddgb' => new PartitionGbStatisticsFilter('id44mb'), + 'persistentgb' => new PartitionGbStatisticsFilter('id45mb'), 'gbram' => new RamGbStatisticsFilter(), 'kvmstate' => new EnumStatisticsFilter('kvmstate', ['ENABLED', 'DISABLED', 'UNSUPPORTED']), 'badsectors' => new SimpleStatisticsFilter('badsectors', self::OP_ORDINAL, ''), @@ -523,17 +524,17 @@ class RamGbStatisticsFilter extends GbToMbRangeStatisticsFilter } -class Id44GbStatisticsFilter extends GbToMbRangeStatisticsFilter +class PartitionGbStatisticsFilter extends GbToMbRangeStatisticsFilter { - public function __construct() + public function __construct(string $column) { - parent::__construct('id44mb', self::OP_FUZZY_ORDINAL,'GiB'); + parent::__construct($column, self::OP_FUZZY_ORDINAL, 'GiB'); } public function whereClause(string $operator, $argument, array &$args, array &$joins): string { - return parent::rangeClause($operator, $argument, self::SIZE_ID44); + return parent::rangeClause($operator, $argument, self::SIZE_PARTITION); } } |