diff options
author | Simon Rettberg | 2018-01-15 17:21:18 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-01-15 17:21:18 +0100 |
commit | 9b8295a02aa5b8e864c1f42ec52ead4fe0dd3f2f (patch) | |
tree | 3ca156f4ee9e198774f3db5185828e22c06d85b4 /modules-available/statistics | |
parent | [runmode] Do not allow re-assigning clients to new runmode if old mode doesn'... (diff) | |
download | slx-admin-9b8295a02aa5b8e864c1f42ec52ead4fe0dd3f2f.tar.gz slx-admin-9b8295a02aa5b8e864c1f42ec52ead4fe0dd3f2f.tar.xz slx-admin-9b8295a02aa5b8e864c1f42ec52ead4fe0dd3f2f.zip |
[statistics] Properly display runmode name in client list
Diffstat (limited to 'modules-available/statistics')
-rw-r--r-- | modules-available/statistics/page.inc.php | 7 | ||||
-rw-r--r-- | modules-available/statistics/templates/clientlist.html | 6 |
2 files changed, 12 insertions, 1 deletions
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}} <a href="?do=Statistics&uuid={{machineuuid}}"><b>{{hostname}}</b></a> <div class="small">{{machineuuid}}</div> - {{#rmmodule}}<div class="small">{{lang_runMode}}: <a class="slx-bold" href="?do=runmode&module={{rmmodule}}">{{rmmodule}}</a></div>{{/rmmodule}} + {{#rmmodule}} + <div class="small">{{lang_runMode}}: + <a class="slx-bold" href="?do=runmode&module={{rmmodule}}">{{moduleName}}</a> / {{modeName}} + </div> + {{/rmmodule}} </td> <td data-sort-value="{{clientip}}"><b><a href="?do=Statistics&show=list&filters=subnet={{subnet}}">{{subnet}}</a>{{lastoctet}}</b><br>{{macaddr}}</td> <td data-sort-value="{{lastseen_int}}" class="text-right text-nowrap">{{lastseen}}</td> |