diff options
author | Christian Hofmaier | 2020-10-13 18:24:41 +0200 |
---|---|---|
committer | Christian Hofmaier | 2020-10-13 18:24:41 +0200 |
commit | 6ef48b756c51e33f64f74fc9fdd96c9e6f4ff1c0 (patch) | |
tree | 1b25330880065efa168cb5c69773d545df7cfc01 /modules-available/statistics/pages/list.inc.php | |
parent | [locationinfo] add forward link to location module (diff) | |
parent | [dozmod] Implement deleting orphaned files from vm store (diff) | |
download | slx-admin-6ef48b756c51e33f64f74fc9fdd96c9e6f4ff1c0.tar.gz slx-admin-6ef48b756c51e33f64f74fc9fdd96c9e6f4ff1c0.tar.xz slx-admin-6ef48b756c51e33f64f74fc9fdd96c9e6f4ff1c0.zip |
Merge branch 'master' of git.openslx.org:openslx-ng/slx-admin
merge branch 'master'
Diffstat (limited to 'modules-available/statistics/pages/list.inc.php')
-rw-r--r-- | modules-available/statistics/pages/list.inc.php | 13 |
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']]; |