From 9b8295a02aa5b8e864c1f42ec52ead4fe0dd3f2f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 15 Jan 2018 17:21:18 +0100 Subject: [statistics] Properly display runmode name in client list --- modules-available/statistics/page.inc.php | 7 +++++++ modules-available/statistics/templates/clientlist.html | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'modules-available') diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index ac103a41..5fe4ebfa 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -661,6 +661,13 @@ class Page_Statistics extends Page } } $row['cpumodel'] = preg_replace('/\(R\)|\(TM\)|\bintel\b|\bamd\b|\bcpu\b|dual-core|\bdual\s+core\b|\bdual\b|\bprocessor\b/i', ' ', $row['cpumodel']); + if (!empty($row['rmmodule'])) { + $data = RunMode::getRunMode($row['machineuuid'], RunMode::DATA_STRINGS); + if ($data !== false) { + $row['moduleName'] = $data['moduleName']; + $row['modeName'] = $data['modeName']; + } + } $rows[] = $row; } if ($singleMachine !== false && $singleMachine !== 'none') { diff --git a/modules-available/statistics/templates/clientlist.html b/modules-available/statistics/templates/clientlist.html index 0ddd98c8..d06eb4f7 100644 --- a/modules-available/statistics/templates/clientlist.html +++ b/modules-available/statistics/templates/clientlist.html @@ -72,7 +72,11 @@ {{/state_STANDBY}} {{hostname}}
{{machineuuid}}
- {{#rmmodule}}
{{lang_runMode}}: {{rmmodule}}
{{/rmmodule}} + {{#rmmodule}} +
{{lang_runMode}}: + {{moduleName}} / {{modeName}} +
+ {{/rmmodule}} {{subnet}}{{lastoctet}}
{{macaddr}} {{lastseen}} -- cgit v1.2.3-55-g7522