summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/list.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/statistics/pages/list.inc.php')
-rw-r--r--modules-available/statistics/pages/list.inc.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php
index 2dab152d..9f2df897 100644
--- a/modules-available/statistics/pages/list.inc.php
+++ b/modules-available/statistics/pages/list.inc.php
@@ -40,7 +40,8 @@ class SubPage
}
}
$res = Database::simpleQuery("SELECT m.machineuuid, m.locationid, m.macaddr, m.clientip, m.lastseen,
- m.logintime, m.state, m.currentuser, m.realcores, m.mbram, m.kvmstate, m.cpumodel, m.id44mb, m.hostname, m.notes IS NOT NULL AS hasnotes,
+ m.logintime, m.state, m.currentuser, m.currentrunmode, m.realcores, m.mbram, m.kvmstate, m.cpumodel, m.id44mb,
+ m.hostname, m.notes IS NOT NULL AS hasnotes,
m.badsectors, Count(s.machineuuid) AS confvars $xtra FROM machine m
LEFT JOIN setting_machine s USING (machineuuid)
$join WHERE $where GROUP BY m.machineuuid", $args);
@@ -101,6 +102,16 @@ class SubPage
unset($row['currentuser']);
}
}
+ if ($row['state'] === 'IDLE' || $row['state'] === 'OCCUPIED') {
+ if ((!empty($row['currentrunmode']) || !empty($row['rmmodule']))
+ && $row['currentrunmode'] !== $row['rmmodule']) {
+ $row['wrongRunMode'] = true;
+ if (!empty($row['currentrunmode'])) {
+ $wrongModule = Module::get($row['currentrunmode']);
+ $row['currentrunmode'] = $wrongModule === false ? $row['currentrunmode'] : $wrongModule->getDisplayName();
+ }
+ }
+ }
$row['state_' . $row['state']] = true;
if ($row['locationid'] > 0) {
$row['location'] = $location[$row['locationid']];