summaryrefslogtreecommitdiffstats
path: root/templates/statistics
diff options
context:
space:
mode:
authorSimon Rettberg2015-11-30 13:48:11 +0100
committerSimon Rettberg2015-11-30 13:48:11 +0100
commite5c5e8422a74694d1abcd28f420450a25094c4b9 (patch)
tree8bd1f0ad89b264f6d1dcf7f7fa4c0295f3c2672b /templates/statistics
parentImplement statistics logging (diff)
downloadslx-admin-e5c5e8422a74694d1abcd28f420450a25094c4b9.tar.gz
slx-admin-e5c5e8422a74694d1abcd28f420450a25094c4b9.tar.xz
slx-admin-e5c5e8422a74694d1abcd28f420450a25094c4b9.zip
Improve client logging
Diffstat (limited to 'templates/statistics')
-rw-r--r--templates/statistics/clientlist.html6
-rw-r--r--templates/statistics/cpumodels.html2
-rw-r--r--templates/statistics/id44.html4
-rw-r--r--templates/statistics/kvmstate.html2
-rw-r--r--templates/statistics/machine-hdds.html2
-rw-r--r--templates/statistics/machine-main.html5
-rw-r--r--templates/statistics/machine-notes.html17
-rw-r--r--templates/statistics/memory.html4
-rw-r--r--templates/statistics/newclients.html44
9 files changed, 77 insertions, 9 deletions
diff --git a/templates/statistics/clientlist.html b/templates/statistics/clientlist.html
index e5f91493..879e27c4 100644
--- a/templates/statistics/clientlist.html
+++ b/templates/statistics/clientlist.html
@@ -14,7 +14,11 @@
</tr>
{{#rows}}
<tr>
- <td class="slx-nowrap"><a href="?do=Statistics&amp;uuid={{machineuuid}}"><b>{{hostname}}</b></a><div class="small">{{machineuuid}}</div></td>
+ <td class="slx-nowrap">
+ {{#hasnotes}}<span class="glyphicon glyphicon-exclamation-sign pull-right"></span>{{/hasnotes}}
+ <a href="?do=Statistics&amp;uuid={{machineuuid}}"><b>{{hostname}}</b></a>
+ <div class="small">{{machineuuid}}</div>
+ </td>
<td><b><a href="?do=Statistics&amp;filter=subnet&amp;argument={{subnet}}">{{subnet}}</a>{{lastoctet}}</b><br>{{macaddr}}</td>
<td class="text-right">{{lastboot}}</td>
<td class="{{kvmclass}}">{{kvmstate}}</td>
diff --git a/templates/statistics/cpumodels.html b/templates/statistics/cpumodels.html
index c3d43aa4..f98b89db 100644
--- a/templates/statistics/cpumodels.html
+++ b/templates/statistics/cpumodels.html
@@ -31,8 +31,8 @@
animation: false,
tooltipTemplate: "<%if (label){%><%=label%><%}%>",
customTooltips: function(tooltip) {
+ if (sel !== false) sel.removeClass('info');
if (!tooltip) {
- if (sel !== false) sel.removeClass('info');
sel = false;
return;
}
diff --git a/templates/statistics/id44.html b/templates/statistics/id44.html
index cd4e32d7..d9c92c47 100644
--- a/templates/statistics/id44.html
+++ b/templates/statistics/id44.html
@@ -12,7 +12,7 @@
<th class="text-right">{{lang_machineCount}}</th>
</tr>
{{#rows}}
- <tr id="tmpid{{gb}}">
+ <tr id="tmpid{{gb}}" class="{{class}}">
<td class="text-left slx-nowrap"><a href="?do=Statistics&amp;filter=hddgb&amp;argument={{gb}}">{{gb}}&thinsp;GiB</td>
<td class="text-right">{{count}}</td>
</tr>
@@ -29,8 +29,8 @@
animation: false,
tooltipTemplate: "<%if (label){%><%=label%><%}%>",
customTooltips: function(tooltip) {
+ if (sel !== false) sel.removeClass('info');
if (!tooltip) {
- if (sel !== false) sel.removeClass('info');
sel = false;
return;
}
diff --git a/templates/statistics/kvmstate.html b/templates/statistics/kvmstate.html
index ea95df4e..5431990c 100644
--- a/templates/statistics/kvmstate.html
+++ b/templates/statistics/kvmstate.html
@@ -29,8 +29,8 @@
animation: false,
tooltipTemplate: "<%if (label){%><%=label%><%}%>",
customTooltips: function(tooltip) {
+ if (sel !== false) sel.removeClass('info');
if (!tooltip) {
- if (sel !== false) sel.removeClass('info');
sel = false;
return;
}
diff --git a/templates/statistics/machine-hdds.html b/templates/statistics/machine-hdds.html
index 98cf65c5..cb3cbffc 100644
--- a/templates/statistics/machine-hdds.html
+++ b/templates/statistics/machine-hdds.html
@@ -35,8 +35,8 @@
animation: false,
tooltipTemplate: "<%if (label){%><%=label%><%}%>",
customTooltips: function(tooltip) {
+ if (sel !== false) sel.removeClass('info');
if (!tooltip) {
- if (sel !== false) sel.removeClass('info');
sel = false;
return;
}
diff --git a/templates/statistics/machine-main.html b/templates/statistics/machine-main.html
index ac8b8001..985194bf 100644
--- a/templates/statistics/machine-main.html
+++ b/templates/statistics/machine-main.html
@@ -1,4 +1,7 @@
-<h1>{{hostname}} {{#hostname}}–{{/hostname}} {{clientip}}</h1>
+<h1>
+ {{hostname}} {{#hostname}}–{{/hostname}} {{clientip}}
+ {{#notes}}<a href="#usernotes"><span class="glyphicon glyphicon-exclamation-sign"></span></a>{{/notes}}
+</h1>
<div class="row">
<div class="col-md-6">
diff --git a/templates/statistics/machine-notes.html b/templates/statistics/machine-notes.html
new file mode 100644
index 00000000..c4f97543
--- /dev/null
+++ b/templates/statistics/machine-notes.html
@@ -0,0 +1,17 @@
+<a name="usernotes"></a>
+<h3>{{lang_notes}}</h3>
+<div class="row">
+ <div class="col-md-12">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <form action="?do=Statistics" method="post">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="setnotes">
+ <input type="hidden" name="uuid" value="{{machineuuid}}">
+ <textarea name="content" class="form-control" cols="101" rows="10">{{notes}}</textarea>
+ <button type="submit" class="btn btn-primary">{{lang_save}}</button>
+ </form>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/templates/statistics/memory.html b/templates/statistics/memory.html
index b9ee77fb..1ebfbae0 100644
--- a/templates/statistics/memory.html
+++ b/templates/statistics/memory.html
@@ -12,7 +12,7 @@
<th class="text-right">{{lang_machineCount}}</th>
</tr>
{{#rows}}
- <tr id="ramid{{gb}}">
+ <tr id="ramid{{gb}}" class="{{class}}">
<td class="text-left slx-nowrap"><a href="?do=Statistics&amp;filter=gbram&amp;argument={{gb}}">{{gb}}&thinsp;GiB</a></td>
<td class="text-right">{{count}}</td>
</tr>
@@ -29,8 +29,8 @@
animation: false,
tooltipTemplate: "<%if (label){%><%=label%><%}%>",
customTooltips: function(tooltip) {
+ if (sel !== false) sel.removeClass('info');
if (!tooltip) {
- if (sel !== false) sel.removeClass('info');
sel = false;
return;
}
diff --git a/templates/statistics/newclients.html b/templates/statistics/newclients.html
new file mode 100644
index 00000000..0d9c74df
--- /dev/null
+++ b/templates/statistics/newclients.html
@@ -0,0 +1,44 @@
+<div class="col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_newMachines}}
+ </div>
+ <div class="panel-body">
+ <table class="table table-condensed table-striped" id="newclienttable">
+ <tr>
+ <th>{{lang_machine}}</th>
+ <th class="text-right"></th>
+ <th>64Bit</th>
+ <th class="text-right">RAM</th>
+ <th class="text-right">HDD</th>
+ </tr>
+ {{#rows}}
+ <tr style="{{style}}">
+ <td class="slx-nowrap"><a href="?do=Statistics&amp;uuid={{machineuuid}}">{{hostname}}</a></td>
+ <td class="text-right">{{firstseen}}</td>
+ <td class="{{kvmclass}}">{{kvmicon}}</td>
+ <td class="text-right {{ramclass}}">{{gbram}}&thinsp;GiB</td>
+ <td class="text-right {{hddclass}}">{{gbtmp}}&thinsp;GiB</td>
+ </tr>
+ {{/rows}}
+ {{#openbutton}}
+ <tr>
+ <td colspan="5" onclick="slxExpandNew(this)">
+ <span class="btn-group btn-group-justified">
+ <span class="btn btn-default">
+ <span class="glyphicon glyphicon-menu-down"></span>
+ </span>
+ </span>
+ <script type="text/javascript">
+ function slxExpandNew(b) {
+ $('#newclienttable').find('tr').show();
+ $(b).hide();
+ }
+ </script>
+ </td>
+ </tr>
+ {{/openbutton}}
+ </table>
+ </div>
+ </div>
+</div> \ No newline at end of file