diff options
author | Simon Rettberg | 2023-05-24 16:59:16 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-05-24 16:59:16 +0200 |
commit | fa7fe9bd323d1888b06480b748d0db4a39fc5c9b (patch) | |
tree | b7c893379aa351d3b104817899fb84c4e9539c6f | |
parent | Type annotations, better RNG (diff) | |
download | slx-admin-fa7fe9bd323d1888b06480b748d0db4a39fc5c9b.tar.gz slx-admin-fa7fe9bd323d1888b06480b748d0db4a39fc5c9b.tar.xz slx-admin-fa7fe9bd323d1888b06480b748d0db4a39fc5c9b.zip |
[statistics] hints: Only show machines active in recent past (60 days)
-rw-r--r-- | modules-available/statistics/pages/hints.inc.php | 5 |
1 files changed, 5 insertions, 0 deletions
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'); |