diff options
Diffstat (limited to 'modules-available/statistics/pages/hints.inc.php')
-rw-r--r-- | modules-available/statistics/pages/hints.inc.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/modules-available/statistics/pages/hints.inc.php b/modules-available/statistics/pages/hints.inc.php index d5e7487b..5c6acfbb 100644 --- a/modules-available/statistics/pages/hints.inc.php +++ b/modules-available/statistics/pages/hints.inc.php @@ -10,6 +10,13 @@ class SubPage public static function doRender() { + self::showMemoryUpgrade(); + self::showMemorySlow(); + self::showUnusedSpace(); + } + + private static function showMemoryUpgrade() + { $q = new HardwareQuery(HardwareInfo::MAINBOARD); $q->addLocalColumn('Memory Slot Occupied'); $q->addGlobalColumn('Memory Slot Count'); @@ -33,4 +40,38 @@ class SubPage Render::addTemplate('hints-ram-upgrade', ['list' => $list]); } + private static function showMemorySlow() + { + $q = new HardwareQuery(HardwareInfo::RAM_MODULE); + $q->addLocalColumn('Locator'); + $q->addLocalColumn('Bank Locator'); + $q->addGlobalColumn('Form Factor'); + $q->addGlobalColumn('Type'); + $q->addGlobalColumn('Size'); + $q->addGlobalColumn('Manufacturer'); + $q->addLocalColumn('Serial Number'); + $q->addMachineColumn('clientip'); + $q->addMachineColumn('hostname'); + $q->addCompare(true, 'Speed', '>', false, 'Configured Memory Speed'); + $list = $q->query()->fetchAll(); + Render::addTemplate('hints-ram-underclocked', ['list' => $list]); + } + + private static function showUnusedSpace() + { + $q = new HardwareQuery(HardwareInfo::HDD); + $q->addWhere(false, 'unused', '>', 2000000000); // 2 GB + $q->addMachineWhere('id44mb', '<', 20000); // 20 GB + $id44 = $q->query()->fetchAll(); + $q = new HardwareQuery(HardwareInfo::HDD); + $q->addWhere(false, 'unused', '>', 25000000000); // 25 GB + $q->addMachineWhere('id44mb', '>', 20000); // 20 GB + $q->addMachineWhere('id45mb', '<', 20000); // 20 GB + $id45 = $q->query()->fetchAll(); + Render::addTemplate('hints-hdd-grow', [ + 'id44' => $id44, + 'id45' => $id45, + ]); + } + }
\ No newline at end of file |