summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages
diff options
context:
space:
mode:
authorSimon Rettberg2023-05-24 16:59:16 +0200
committerSimon Rettberg2023-05-24 16:59:16 +0200
commitfa7fe9bd323d1888b06480b748d0db4a39fc5c9b (patch)
treeb7c893379aa351d3b104817899fb84c4e9539c6f /modules-available/statistics/pages
parentType annotations, better RNG (diff)
downloadslx-admin-fa7fe9bd323d1888b06480b748d0db4a39fc5c9b.tar.gz
slx-admin-fa7fe9bd323d1888b06480b748d0db4a39fc5c9b.tar.xz
slx-admin-fa7fe9bd323d1888b06480b748d0db4a39fc5c9b.zip
[statistics] hints: Only show machines active in recent past (60 days)
Diffstat (limited to 'modules-available/statistics/pages')
-rw-r--r--modules-available/statistics/pages/hints.inc.php5
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');