From fa7fe9bd323d1888b06480b748d0db4a39fc5c9b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 24 May 2023 16:59:16 +0200 Subject: [statistics] hints: Only show machines active in recent past (60 days) --- modules-available/statistics/pages/hints.inc.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules-available') diff --git a/modules-available/statistics/pages/hints.inc.php b/modules-available/statistics/pages/hints.inc.php index dc789e9f..55dbca52 100644 --- a/modules-available/statistics/pages/hints.inc.php +++ b/modules-available/statistics/pages/hints.inc.php @@ -43,6 +43,7 @@ class SubPage if (!empty($locs)) { $q->addMachineWhere('locationid', 'IN', $locs); } + $q->addMachineWhere('lastseen', '>', strtotime('-60 days')); $q->addLocalColumn('Memory Slot Occupied'); $q->addGlobalColumn('Memory Slot Count'); $q->addGlobalColumn('Memory Maximum Capacity'); @@ -80,6 +81,7 @@ class SubPage if (!empty($locs)) { $q->addMachineWhere('locationid', 'IN', $locs); } + $q->addMachineWhere('lastseen', '>', strtotime('-60 days')); //$q->addLocalColumn('Locator'); //$q->addLocalColumn('Bank Locator'); $q->addGlobalColumn('Form Factor'); @@ -119,6 +121,7 @@ class SubPage if (!empty($locs)) { $q->addMachineWhere('locationid', 'IN', $locs); } + $q->addMachineWhere('lastseen', '>', strtotime('-60 days')); $q->addMachineColumn('clientip'); $q->addMachineColumn('hostname'); $q->addLocalColumn('unused')->addCondition('>', 2000000000); // 2 GB @@ -135,6 +138,7 @@ class SubPage if (!empty($locs)) { $q->addMachineWhere('locationid', 'IN', $locs); } + $q->addMachineWhere('lastseen', '>', strtotime('-60 days')); $q->addMachineColumn('clientip'); $q->addMachineColumn('hostname'); $q->addLocalColumn('unused')->addCondition('>', 50000000000); // 50 GB @@ -167,6 +171,7 @@ class SubPage if (!empty($locs)) { $q->addMachineWhere('locationid', 'IN', $locs); } + $q->addMachineWhere('lastseen', '>', strtotime('-60 days')); $q->addMachineColumn('clientip'); $q->addMachineColumn('hostname'); $q->addMachineColumn('state'); -- cgit v1.2.3-55-g7522