diff options
author | Simon Rettberg | 2020-07-07 16:39:42 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-07-07 16:39:42 +0200 |
commit | 1b7fe0bb7f4f5ad2b2d3bdeb4ade3a682d9cb7ea (patch) | |
tree | 16634f3c7f54d7c3cff9367642c94889e11ad7de /modules-available/statistics/install.inc.php | |
parent | [statistics] Fix system model list width in summary mode (diff) | |
download | slx-admin-1b7fe0bb7f4f5ad2b2d3bdeb4ade3a682d9cb7ea.tar.gz slx-admin-1b7fe0bb7f4f5ad2b2d3bdeb4ade3a682d9cb7ea.tar.xz slx-admin-1b7fe0bb7f4f5ad2b2d3bdeb4ade3a682d9cb7ea.zip |
[statistics] Keep track of client runmode
Diffstat (limited to 'modules-available/statistics/install.inc.php')
-rw-r--r-- | modules-available/statistics/install.inc.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules-available/statistics/install.inc.php b/modules-available/statistics/install.inc.php index fed9b318..e8788224 100644 --- a/modules-available/statistics/install.inc.php +++ b/modules-available/statistics/install.inc.php @@ -287,5 +287,15 @@ if (!tableHasColumn('machine', 'live_cpuload')) { $res[] = UPDATE_DONE; } +// 2020-06-29: Track current runmode (as reported by client) +if (!tableHasColumn('machine', 'currentrunmode')) { + $ret = Database::exec("ALTER TABLE `machine` + ADD COLUMN `currentrunmode` varchar(30) NOT NULL DEFAULT '' AFTER `hostname`"); + if ($ret === false) { + finalResponse(UPDATE_FAILED, 'Adding live_cpuload column to machine table failed: ' . Database::lastError()); + } + $res[] = UPDATE_DONE; +} + // Create response responseFromArray($res); |