summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-15 17:19:24 +0100
committerSimon Rettberg2019-03-15 17:19:24 +0100
commitd58d44512321e7a369feb2dcfdb9bb88d260541b (patch)
tree9119a93ebb4e3936b134246bc3ebbceffbdda571 /modules-available/statistics
parent[locationinfo] Update translations (diff)
downloadslx-admin-d58d44512321e7a369feb2dcfdb9bb88d260541b.tar.gz
slx-admin-d58d44512321e7a369feb2dcfdb9bb88d260541b.tar.xz
slx-admin-d58d44512321e7a369feb2dcfdb9bb88d260541b.zip
[statistics/roomplanner] Add SVG roomplan generator
Show in machine details if machine is part of some location's room plan.
Diffstat (limited to 'modules-available/statistics')
-rw-r--r--modules-available/statistics/lang/de/template-tags.json1
-rw-r--r--modules-available/statistics/lang/en/template-tags.json1
-rw-r--r--modules-available/statistics/page.inc.php2
-rw-r--r--modules-available/statistics/templates/machine-main.html15
4 files changed, 17 insertions, 2 deletions
diff --git a/modules-available/statistics/lang/de/template-tags.json b/modules-available/statistics/lang/de/template-tags.json
index 2567eea1..c0d646e7 100644
--- a/modules-available/statistics/lang/de/template-tags.json
+++ b/modules-available/statistics/lang/de/template-tags.json
@@ -73,6 +73,7 @@
"lang_replaceMachinesHeading": "Rechner ersetzen",
"lang_replaceNew": "Alter Rechner",
"lang_replaceOld": "Neuer Rechner",
+ "lang_roomplan": "Raumplan",
"lang_runMode": "Betriebsmodus",
"lang_runmodeMachines": "Mit besonderem Betriebsmodus",
"lang_runtimeHours": "Laufzeit (Stunden)",
diff --git a/modules-available/statistics/lang/en/template-tags.json b/modules-available/statistics/lang/en/template-tags.json
index 1d9cd4da..044c8df5 100644
--- a/modules-available/statistics/lang/en/template-tags.json
+++ b/modules-available/statistics/lang/en/template-tags.json
@@ -73,6 +73,7 @@
"lang_replaceMachinesHeading": "Replace machines",
"lang_replaceNew": "Old machine",
"lang_replaceOld": "New machine",
+ "lang_roomplan": "Location",
"lang_runMode": "Mode of operation",
"lang_runmodeMachines": "With special mode of operation",
"lang_runtimeHours": "Runtime (hours)",
diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php
index b9a3229f..d1749187 100644
--- a/modules-available/statistics/page.inc.php
+++ b/modules-available/statistics/page.inc.php
@@ -805,7 +805,7 @@ class Page_Statistics extends Page
private function showMachine($uuid)
{
$client = Database::queryFirst('SELECT machineuuid, locationid, macaddr, clientip, firstseen, lastseen, logintime, lastboot, state,
- mbram, live_tmpsize, live_tmpfree, live_swapsize, live_swapfree, live_memsize, live_memfree,
+ mbram, live_tmpsize, live_tmpfree, live_swapsize, live_swapfree, live_memsize, live_memfree, Length(position) AS hasroomplan,
kvmstate, cpumodel, id44mb, data, hostname, currentuser, currentsession, notes FROM machine WHERE machineuuid = :uuid',
array('uuid' => $uuid));
if ($client === false) {
diff --git a/modules-available/statistics/templates/machine-main.html b/modules-available/statistics/templates/machine-main.html
index b859b79a..8156f0aa 100644
--- a/modules-available/statistics/templates/machine-main.html
+++ b/modules-available/statistics/templates/machine-main.html
@@ -16,7 +16,7 @@
{{lang_machineSummary}}
</div>
<div class="panel-body">
- <table class="table table-condensed">
+ <table class="table table-condensed" style="margin-bottom:-5px">
<tr>
<td class="text-nowrap">{{lang_uuid}}</td>
<td>{{machineuuid}}</td>
@@ -88,6 +88,19 @@
</td>
</tr>
{{/modeid}}
+ {{#hasroomplan}}
+ <tr>
+ <td class="text-nowrap">
+ {{lang_roomplan}}
+ </td>
+ <td class="text-center">
+ <a href="?do=roomplanner&amp;locationid={{locationid}}" target="_blank"
+ onclick="window.open(this.href, '_blank', 'toolbar=0,scrollbars,resizable');return false">
+ <img src="api.php?do=roomplanner&amp;show=svg&amp;locationid={{locationid}}&amp;machineuuid={{machineuuid}}"/>
+ </a>
+ </td>
+ </tr>
+ {{/hasroomplan}}
</table>
</div>
</div>