summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/templates
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/rebootcontrol/templates')
-rw-r--r--modules-available/rebootcontrol/templates/header.html26
-rw-r--r--modules-available/rebootcontrol/templates/status-reboot.html56
-rw-r--r--modules-available/rebootcontrol/templates/status-wol.html52
-rw-r--r--modules-available/rebootcontrol/templates/subnet-edit.html10
-rw-r--r--modules-available/rebootcontrol/templates/subnet-list.html33
-rw-r--r--modules-available/rebootcontrol/templates/task-header.html4
-rw-r--r--modules-available/rebootcontrol/templates/task-list.html22
7 files changed, 142 insertions, 61 deletions
diff --git a/modules-available/rebootcontrol/templates/header.html b/modules-available/rebootcontrol/templates/header.html
index 4f240b81..6d38b939 100644
--- a/modules-available/rebootcontrol/templates/header.html
+++ b/modules-available/rebootcontrol/templates/header.html
@@ -15,20 +15,40 @@
<h4 class="modal-title"><b>{{lang_settings}}</b></h4>
</div>
<div class="modal-body">
- <p>{{lang_pubKey}}</p>
+ <label for="pubkey">{{lang_pubKey}}</label>
<pre id="pubkey">{{pubkey}}</pre>
<p>{{lang_newKeypairExplanation}}</p>
<div class="checkbox">
<input {{perms.newkeypair.disabled}} type="checkbox" id="keypair-confirm">
<label for="keypair-confirm">{{lang_keypairConfirmCheck}}</label>
</div>
- </div>
- <div class="modal-footer">
<button {{perms.newkeypair.disabled}} class="btn btn-danger pull-right" id="keypair-button"
onclick="generateNewKeypair()" type="button">
<span class="glyphicon glyphicon-refresh"></span>
{{lang_genNew}}
</button>
+ <div class="clearfix"></div>
+ </div>
+ <div class="modal-body">
+ <label>{{lang_wolDiscoverHeading}}</label>
+ <form method="post" action="?do=rebootcontrol">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="toggle-wol">
+ <div class="checkbox">
+ <input {{perms.woldiscover.disabled}} id="wol-auto-discover" type="checkbox" name="enabled" {{wol_auto_checked}}>
+ <label for="wol-auto-discover">{{lang_wolAutoDiscoverCheck}}</label>
+ </div>
+ <div class="slx-space"></div>
+ <p>{{lang_wolDiscoverDescription}}</p>
+ <button {{perms.woldiscover.disabled}} class="btn btn-primary pull-right"
+ onclick="generateNewKeypair()" type="submit">
+ <span class="glyphicon glyphicon-floppy-disk"></span>
+ {{lang_saveWolAutoDiscover}}
+ </button>
+ <div class="clearfix"></div>
+ </form>
+ </div>
+ <div class="modal-body">
</div>
</div>
</div>
diff --git a/modules-available/rebootcontrol/templates/status-reboot.html b/modules-available/rebootcontrol/templates/status-reboot.html
index 4be95e81..240c4387 100644
--- a/modules-available/rebootcontrol/templates/status-reboot.html
+++ b/modules-available/rebootcontrol/templates/status-reboot.html
@@ -1,30 +1,35 @@
-<h3>{{lang_location}}: {{locationName}}</h3>
+<h3>{{action}}</h3>
+{{#locations}}
+<div class="loc">{{name}}</div>
+{{/locations}}
+<div class="clearfix slx-space"></div>
-<div>
- <table class="table table-hover stupidtable" id="dataTable">
- <thead>
- <tr>
- <th data-sort="string">{{lang_client}}</th>
- <th data-sort="ipv4">{{lang_ip}}</th>
- <th data-sort="string">
- {{lang_status}}
- </th>
- </tr>
- </thead>
+<table class="table table-hover stupidtable" id="dataTable">
+ <thead>
+ <tr>
+ <th data-sort="string">{{lang_client}}</th>
+ <th data-sort="ipv4">{{lang_ip}}</th>
+ <th data-sort="string">
+ {{lang_status}}
+ </th>
+ </tr>
+ </thead>
- <tbody>
- {{#clients}}
- <tr>
- <td>{{hostname}}{{^hostname}}{{machineuuid}}{{/hostname}}</td>
- <td>{{clientip}}</td>
- <td id="status-{{machineuuid}}"></td>
- </tr>
- {{/clients}}
- </tbody>
- </table>
-</div>
+ <tbody>
+ {{#clients}}
+ <tr>
+ <td>{{hostname}}{{^hostname}}{{machineuuid}}{{/hostname}}</td>
+ <td>{{clientip}}</td>
+ <td>
+ <span id="status-{{machineuuid}}" class="machineuuid" data-uuid="{{machineuuid}}"></span>
+ <span id="text-{{machineuuid}}"></span>
+ </td>
+ </tr>
+ {{/clients}}
+ </tbody>
+</table>
-<div data-tm-id="{{taskId}}" data-tm-log="error" data-tm-callback="updateStatus"></div>
+<div data-tm-id="{{id}}" data-tm-log="error" data-tm-callback="updateStatus"></div>
<script type="application/javascript">
statusStrings = {
@@ -41,11 +46,12 @@
function updateStatus(task) {
if (!task || !task.data || !task.data.clientStatus)
return;
+ stillActive = true;
var clientStatus = task.data.clientStatus;
for (var uuid in clientStatus) {
if (!clientStatus.hasOwnProperty(uuid))
continue;
- var $s = $("#status-" + uuid);
+ var $s = $("#text-" + uuid);
var status = clientStatus[uuid];
if ($s.data('state') === status)
continue;
diff --git a/modules-available/rebootcontrol/templates/status-wol.html b/modules-available/rebootcontrol/templates/status-wol.html
new file mode 100644
index 00000000..da19b57d
--- /dev/null
+++ b/modules-available/rebootcontrol/templates/status-wol.html
@@ -0,0 +1,52 @@
+{{#locations}}
+<div class="loc">{{name}}</div>
+{{/locations}}
+<div class="clearfix slx-space"></div>
+
+{{#tasks}}
+<div data-tm-id="{{id}}" data-tm-callback="wolCallback">{{lang_aWolJob}}</div>
+{{/tasks}}
+{{^tasks}}
+<div class="alert alert-warning">
+ <span class="glyphicon glyphicon-exclamation-sign"></span>
+ {{lang_noTasksForJob}}
+</div>
+{{/tasks}}
+
+<pre>{{log}}</pre>
+
+<table class="table table-hover stupidtable" id="dataTable">
+ <thead>
+ <tr>
+ <th data-sort="string">{{lang_client}}</th>
+ <th data-sort="ipv4">{{lang_ip}}</th>
+ <th data-sort="string">
+ {{lang_status}}
+ </th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {{#clients}}
+ <tr>
+ <td>{{hostname}}{{^hostname}}{{machineuuid}}{{^machineuuid}}{{clientip}}{{/machineuuid}}{{/hostname}}</td>
+ <td>{{clientip}}</td>
+ {{#machineuuid}}
+ <td>
+ <span id="status-{{machineuuid}}" class="machineuuid" data-uuid="{{machineuuid}}"></span>
+ <span id="spinner-{{machineuuid}}" class="glyphicon glyphicon-refresh slx-rotation">
+ </td>
+ {{/machineuuid}}
+ {{^machineuuid}}
+ <td></td>
+ {{/machineuuid}}
+ </tr>
+ {{/clients}}
+ </tbody>
+</table>
+
+<script><!--
+function wolCallback(task) {
+ stillActive = true;
+}
+//--></script> \ No newline at end of file
diff --git a/modules-available/rebootcontrol/templates/subnet-edit.html b/modules-available/rebootcontrol/templates/subnet-edit.html
index 4c3702ba..d8173863 100644
--- a/modules-available/rebootcontrol/templates/subnet-edit.html
+++ b/modules-available/rebootcontrol/templates/subnet-edit.html
@@ -6,7 +6,7 @@
<input type="hidden" name="id" value="{{subnetid}}">
<div class="panel panel-default">
<div class="panel-heading">
- {{lang_editSubnet}}: <b>{{start_s}} - {{end_s}}</b>
+ {{lang_editSubnet}}: <b>{{cidr}}</b> ({{start_s}}&thinsp;-&thinsp;{{end_s}})
</div>
<div class="list-group">
<div class="list-group-item">
@@ -39,6 +39,12 @@
</div>
{{/jumpHosts}}
</div>
+ <div class="list-group-item">
+ <label>{{lang_reachableFrom}}</label>
+ {{#sourceNets}}
+ <div>{{cidr}}</div>
+ {{/sourceNets}}
+ </div>
</div>
<div class="panel-footer text-right">
<button type="submit" class="btn btn-primary" name="action" value="edit" {{perms.subnet.flag.disabled}}>
@@ -61,4 +67,4 @@ document.addEventListener('DOMContentLoaded', function() {
}).change();
});
-//--></script> \ No newline at end of file
+//--></script>
diff --git a/modules-available/rebootcontrol/templates/subnet-list.html b/modules-available/rebootcontrol/templates/subnet-list.html
index e2747316..c5faae2b 100644
--- a/modules-available/rebootcontrol/templates/subnet-list.html
+++ b/modules-available/rebootcontrol/templates/subnet-list.html
@@ -7,26 +7,22 @@
<table class="table">
<thead>
<tr>
- <th>{{lang_start}}</th>
- <th>{{lang_end}}</th>
+ <th>{{lang_subnet}}</th>
<th class="slx-smallcol">{{lang_isFixed}}</th>
<th class="slx-smallcol">{{lang_isDirect}}</th>
- <th class="slx-smallcol">{{lang_jumphostCount}}</th>
- <th>{{lang_lastseen}}</th>
+ <th class="slx-smallcol">{{lang_wolReachability}}</th>
+ <th class="slx-smallcol">{{lang_lastseen}}</th>
</tr>
</thead>
<tbody>
{{#subnets}}
<tr>
<td>
- <a href="?do=rebootcontrol&show=subnet&what=subnet&id={{subnetid}}">{{start_s}}</a>
+ <a href="?do=rebootcontrol&show=subnet&what=subnet&id={{subnetid}}">{{cidr}}</a>
</td>
- <td>
- <a href="?do=rebootcontrol&show=subnet&what=subnet&id={{subnetid}}">{{end_s}}</a>
- </td>
- <td>{{#fixed}}<span class="glyphicon glyphicon-lock"></span>{{/fixed}}</td>
- <td>{{#isdirect}}<span class="glyphicon glyphicon-ok"></span>{{/isdirect}}</td>
- <td>{{jumphostcount}}</td>
+ <td class="text-center">{{#fixed}}<span class="glyphicon glyphicon-lock"></span>{{/fixed}}</td>
+ <td class="text-center">{{#isdirect}}<span class="glyphicon glyphicon-ok"></span>{{/isdirect}}</td>
+ <td class="text-right">{{jumphostcount}} / {{sourcecount}}</td>
<td class="{{lastseen_class}}">{{lastseen_s}}</td>
</tr>
{{/subnets}}
@@ -37,22 +33,19 @@
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="show" value="subnet">
<div class="list-group">
- <div class="list-group-item cidrmagic">
+ <div class="list-group-item">
<label>{{lang_addNewSubnet}}</label>
<div class="row">
- <div class="col-md-4">
- <input class="form-control cidrstart" type="text" name="start" placeholder="1.2.3.4/24">
- </div>
- <div class="col-md-4">
- <input class="form-control cidrend" type="text" name="end">
+ <div class="col-md-4 col-sm-6">
+ <input class="form-control" type="text" name="cidr" placeholder="1.2.3.0/24">
</div>
- <div class="col-md-4 text-right">
+ <div class="col-md-4 col-sm-6">
<button class="btn btn-primary" name="action" value="add">
<span class="glyphicon glyphicon-floppy-disk"></span>
- {{lang_create}}
+ {{lang_add}}
</button>
</div>
</div>
</div>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/modules-available/rebootcontrol/templates/task-header.html b/modules-available/rebootcontrol/templates/task-header.html
new file mode 100644
index 00000000..211c16e5
--- /dev/null
+++ b/modules-available/rebootcontrol/templates/task-header.html
@@ -0,0 +1,4 @@
+<p>
+ {{lang_taskListIntro}}
+</p>
+<div class="slx-space"></div> \ No newline at end of file
diff --git a/modules-available/rebootcontrol/templates/task-list.html b/modules-available/rebootcontrol/templates/task-list.html
index 8ae4975f..5ab75675 100644
--- a/modules-available/rebootcontrol/templates/task-list.html
+++ b/modules-available/rebootcontrol/templates/task-list.html
@@ -2,9 +2,8 @@
<table class="table">
<thead>
<tr>
- <th>{{lang_mode}}</th>
+ <th>{{lang_task}}</th>
<th>{{lang_location}}</th>
- <th>{{lang_time}}</th>
<th>{{lang_clientCount}}</th>
<th>{{lang_status}}</th>
</tr>
@@ -12,19 +11,20 @@
<tbody>
{{#list}}
<tr>
- <td>
- <a href="?do=rebootcontrol&amp;show=task&amp;what=task&amp;taskid={{taskId}}">{{mode}}</a>
+ <td class="text-nowrap">
+ <a href="?do=rebootcontrol&amp;show=task&amp;what=task&amp;taskid={{id}}">{{type}}</a>
+ <div class="small">{{action}}</div>
</td>
<td>
- {{locationName}}
+ {{#locations}}
+ <div class="loc">{{name}}</div>
+ {{/locations}}
+ <div class="clearfix"></div>
</td>
- <td>
- {{time}}
+ <td class="text-nowrap">
+ {{clients}}
</td>
- <td>
- {{clientCount}}
- </td>
- <td>
+ <td class="text-nowrap">
{{status}}
</td>
</tr>