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.html49
-rw-r--r--modules-available/rebootcontrol/templates/jumphost-list.html6
-rw-r--r--modules-available/rebootcontrol/templates/status-checkconnection.html2
-rw-r--r--modules-available/rebootcontrol/templates/status-exec.html15
-rw-r--r--modules-available/rebootcontrol/templates/status-reboot.html7
-rw-r--r--modules-available/rebootcontrol/templates/status-wol.html52
-rw-r--r--modules-available/rebootcontrol/templates/subnet-edit.html8
-rw-r--r--modules-available/rebootcontrol/templates/subnet-list.html35
-rw-r--r--modules-available/rebootcontrol/templates/task-list.html4
9 files changed, 140 insertions, 38 deletions
diff --git a/modules-available/rebootcontrol/templates/header.html b/modules-available/rebootcontrol/templates/header.html
index 6d38b939..47d97714 100644
--- a/modules-available/rebootcontrol/templates/header.html
+++ b/modules-available/rebootcontrol/templates/header.html
@@ -27,29 +27,52 @@
<span class="glyphicon glyphicon-refresh"></span>
{{lang_genNew}}
</button>
- <div class="clearfix"></div>
+ <div class="clearfix slx-space"></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">
+ <form method="post" action="?do=rebootcontrol">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="toggle-wol">
+ <div class="modal-body">
+ <label for="port-input">{{lang_wol}}</label>
+ <div class="input-group">
+ <span class="input-group-addon">{{lang_wolDestPort}}</span>
+ <input {{perms.woldiscover.disabled}} type="number" min="1" max="65535"
+ class="form-control" name="port" value="{{port}}" id="port-input">
+ </div>
+ </div>
+ <div class="modal-body">
+ <label>{{lang_wolDiscoverHeading}}</label>
<div class="checkbox">
- <input {{perms.woldiscover.disabled}} id="wol-auto-discover" type="checkbox" name="enabled" {{wol_auto_checked}}>
+ <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="checkbox">
+ <input {{perms.woldiscover.disabled}} id="wol-c2c"
+ type="checkbox" name="enabled-c2c" {{wol_c2c_checked}}>
+ <label for="wol-c2c">{{lang_wolDiscoverClientToClient}}</label>
+ </div>
<div class="slx-space"></div>
<p>{{lang_wolDiscoverDescription}}</p>
+ </div>
+ <div class="modal-body">
+ <label for="bcast-input">{{lang_directedBroadcastOverrideHeading}}</label>
+ <div class="input-group">
+ <span class="input-group-addon">{{lang_directedBroadcastAddress}}</span>
+ <input {{perms.woldiscover.disabled}} type="text" pattern="[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"
+ minlength="7" maxlength="15" class="form-control" name="dbcast" value="{{dbcast}}" id="bcast-input">
+ </div>
+ <p>{{lang_directedBroadcastDescription}}</p>
+ </div>
+ <div class="modal-body">
<button {{perms.woldiscover.disabled}} class="btn btn-primary pull-right"
onclick="generateNewKeypair()" type="submit">
<span class="glyphicon glyphicon-floppy-disk"></span>
- {{lang_saveWolAutoDiscover}}
+ {{lang_save}}
</button>
<div class="clearfix"></div>
- </form>
- </div>
- <div class="modal-body">
- </div>
+ </div>
+ </form>
</div>
</div>
</div>
@@ -84,4 +107,4 @@ document.addEventListener('DOMContentLoaded', function() {
});
-</script> \ No newline at end of file
+</script>
diff --git a/modules-available/rebootcontrol/templates/jumphost-list.html b/modules-available/rebootcontrol/templates/jumphost-list.html
index 6023c872..083480b8 100644
--- a/modules-available/rebootcontrol/templates/jumphost-list.html
+++ b/modules-available/rebootcontrol/templates/jumphost-list.html
@@ -1,8 +1,6 @@
-<h2>{{lang_settings}}</h2>
+<h2>{{lang_wolReachability}}</h2>
-<h3>{{lang_wolReachability}}</h3>
-
-<h4>{{lang_jumpHosts}}</h4>
+<h3>{{lang_jumpHosts}}</h3>
<form method="post" action="?do=rebootcontrol">
<input type="hidden" name="token" value="{{token}}">
diff --git a/modules-available/rebootcontrol/templates/status-checkconnection.html b/modules-available/rebootcontrol/templates/status-checkconnection.html
index e31d95ea..da1177e7 100644
--- a/modules-available/rebootcontrol/templates/status-checkconnection.html
+++ b/modules-available/rebootcontrol/templates/status-checkconnection.html
@@ -1,4 +1,4 @@
-<h3>{{lang_checkingJumpHost}}: {{host}}</h3>
+<h3>{{lang_checkingJumpHost}}: {{host}} – {{timestamp_s}}</h3>
<div class="clearfix"></div>
<div class="collapse alert alert-success" id="result-ok">
diff --git a/modules-available/rebootcontrol/templates/status-exec.html b/modules-available/rebootcontrol/templates/status-exec.html
index 403b7fca..a3efef5f 100644
--- a/modules-available/rebootcontrol/templates/status-exec.html
+++ b/modules-available/rebootcontrol/templates/status-exec.html
@@ -1,3 +1,5 @@
+<h3>{{timestamp_s}}</h3>
+
<div data-tm-id="{{id}}" data-tm-log="error" data-tm-callback="updateStatus">{{lang_executingRemotely}}</div>
<div class="slx-space"></div>
@@ -14,7 +16,11 @@
{{#clients}}
<div class="list-group-item" id="client-{{machineuuid}}">
<div class="row">
- <div class="col-md-6 col-sm-8 col-xs-12 slx-bold">{{hostname}}{{^hostname}}{{clientip}}{{/hostname}}</div>
+ <div class="col-md-6 col-sm-8 col-xs-12 slx-bold">
+ <a href="?do=statistics&amp;uuid={{machineuuid}}">
+ {{hostname}}{{^hostname}}{{clientip}}{{/hostname}}
+ </a>
+ </div>
<div class="col-md-4 col-sm-2 col-xs-6 state"></div>
<div class="col-md-2 col-sm-2 col-xs-6 text-right exitCode"></div>
</div>
@@ -57,6 +63,13 @@ function updateStatusClient(id, status) {
$p.find('.exitCode').text(status.exitCode).addClass((status.exitCode === 0 ? 'text-success' : 'text-danger'));
}
ignoreHosts[id] = true;
+ var txt = status.stdout.trim();
+ if (txt.startsWith('<') && txt.endsWith('</svg>')) {
+ var $i = $('<img class="img-responsive">');
+ $i[0].src = 'data:image/svg+xml,' + encodeURIComponent(txt);
+ $p.find('.stdout').hide();
+ $p.append($i);
+ }
}
}
diff --git a/modules-available/rebootcontrol/templates/status-reboot.html b/modules-available/rebootcontrol/templates/status-reboot.html
index 240c4387..34971845 100644
--- a/modules-available/rebootcontrol/templates/status-reboot.html
+++ b/modules-available/rebootcontrol/templates/status-reboot.html
@@ -1,4 +1,5 @@
-<h3>{{action}}</h3>
+<h3>{{action}} – {{timestamp_s}}</h3>
+
{{#locations}}
<div class="loc">{{name}}</div>
{{/locations}}
@@ -18,7 +19,7 @@
<tbody>
{{#clients}}
<tr>
- <td>{{hostname}}{{^hostname}}{{machineuuid}}{{/hostname}}</td>
+ <td><a href="?do=statistics&amp;uuid={{machineuuid}}">{{hostname}}{{^hostname}}{{machineuuid}}{{/hostname}}</a></td>
<td>{{clientip}}</td>
<td>
<span id="status-{{machineuuid}}" class="machineuuid" data-uuid="{{machineuuid}}"></span>
@@ -46,7 +47,7 @@
function updateStatus(task) {
if (!task || !task.data || !task.data.clientStatus)
return;
- stillActive = true;
+ stillActive = 25;
var clientStatus = task.data.clientStatus;
for (var uuid in clientStatus) {
if (!clientStatus.hasOwnProperty(uuid))
diff --git a/modules-available/rebootcontrol/templates/status-wol.html b/modules-available/rebootcontrol/templates/status-wol.html
index 3e83126c..70517f84 100644
--- a/modules-available/rebootcontrol/templates/status-wol.html
+++ b/modules-available/rebootcontrol/templates/status-wol.html
@@ -1,10 +1,12 @@
+<h3>{{timestamp_s}}</h3>
+
{{#locations}}
<div class="loc">{{name}}</div>
{{/locations}}
<div class="clearfix slx-space"></div>
{{#tasks}}
-<div data-tm-id="{{.}}" data-tm-callback="wolCallback">{{lang_aWolJob}}</div>
+<div data-tm-id="{{.}}" data-tm-callback="wolCallback" data-tm-log="messages">{{lang_aWolJob}}</div>
{{/tasks}}
{{^tasks}}
<div class="alert alert-warning">
@@ -29,24 +31,52 @@
<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}}
+ <a href="?do=statistics&amp;uuid={{machineuuid}}">
+ {{hostname}}{{^hostname}}{{machineuuid}}{{/hostname}}
+ </a>
{{/machineuuid}}
{{^machineuuid}}
- <td></td>
+ {{hostname}}{{^hostname}}{{clientip}}{{/hostname}}
+ {{/machineuuid}}
+ </td>
+ <td>{{clientip}}</td>
+ <td>
+ {{#machineuuid}}
+ <span id="status-{{machineuuid}}" class="machineuuid" data-uuid="{{machineuuid}}"></span>
+ <span id="spinner-{{machineuuid}}" class="glyphicon glyphicon-refresh slx-rotation"></span>
{{/machineuuid}}
+ </td>
</tr>
{{/clients}}
</tbody>
</table>
-<script><!--
+<a class="text-muted" href="#debug-out" data-toggle="collapse">Debug</a>
+<pre id="debug-out" class="collapse"></pre>
+
+<script>
function wolCallback(task) {
- stillActive = true;
+ if (task.statusCode === 'TASK_WAITING' || task.statusCode === 'TASK_PROCESSING') {
+ stillActive = 25;
+ } else if (task.data && task.data.result) {
+ var $do = $('#debug-out');
+ var txt = $do.text();
+ var res = task.data.result;
+ for (var k in res) {
+ if (res.hasOwnProperty(k)) {
+ txt += k + ":\n";
+ if (res[k].stdout && res[k].stdout.trimEnd && res[k].stdout.trimEnd()) {
+ txt += res[k].stdout.trimEnd() + "\n";
+ }
+ if (res[k].stderr && res[k].stderr.trimEnd && res[k].stderr.trimEnd()) {
+ txt += res[k].stderr.trimEnd() + "\n";
+ }
+ txt += "Exit " + res[k].exitCode + "\n\n";
+ }
+ }
+ $do.text(txt);
+ }
}
-//--></script> \ No newline at end of file
+</script>
diff --git a/modules-available/rebootcontrol/templates/subnet-edit.html b/modules-available/rebootcontrol/templates/subnet-edit.html
index d8173863..570865c7 100644
--- a/modules-available/rebootcontrol/templates/subnet-edit.html
+++ b/modules-available/rebootcontrol/templates/subnet-edit.html
@@ -39,14 +39,22 @@
</div>
{{/jumpHosts}}
</div>
+ {{#showC2C}}
<div class="list-group-item">
<label>{{lang_reachableFrom}}</label>
{{#sourceNets}}
<div>{{cidr}}</div>
{{/sourceNets}}
</div>
+ {{/showC2C}}
</div>
<div class="panel-footer text-right">
+ <button type="submit" class="btn btn-danger" name="action" value="delete"
+ data-confirm="{{lang_confirmDeleteSubnet}}"
+ {{perms.subnet.edit.disabled}} {{perms.subnet.flag.disabled}}>
+ <span class="glyphicon glyphicon-trash"></span>
+ {{lang_delete}}
+ </button>
<button type="submit" class="btn btn-primary" name="action" value="edit" {{perms.subnet.flag.disabled}}>
<span class="glyphicon glyphicon-floppy-disk"></span>
{{lang_save}}
diff --git a/modules-available/rebootcontrol/templates/subnet-list.html b/modules-available/rebootcontrol/templates/subnet-list.html
index bf6cee1c..2bc9208f 100644
--- a/modules-available/rebootcontrol/templates/subnet-list.html
+++ b/modules-available/rebootcontrol/templates/subnet-list.html
@@ -1,6 +1,6 @@
-<!-- subnetid, start, end, fixed, isdirect, lastdirectcheck, lastseen, seencount -->
+<h2>{{lang_wolReachability}}</h2>
-<h2>{{lang_subnets}}</h2>
+<h3>{{lang_subnets}}</h3>
<p>{{lang_subnetsDescription}}</p>
@@ -20,17 +20,42 @@
{{#subnets}}
<tr>
<td>
- <a href="?do=rebootcontrol&show=subnet&what=subnet&id={{subnetid}}">{{cidr}}</a>
+ <div style="display: inline-block; min-width: 10em">
+ <a href="?do=rebootcontrol&amp;show=subnet&amp;what=subnet&amp;id={{subnetid}}">{{cidr}}</a>
+ </div>
+ <a href="?do=statistics&amp;show=list&amp;filters=clientip={{cidr}}" class="btn btn-default btn-xs">
+ <span class="glyphicon glyphicon-eye-open"></span>
+ </a>
</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>
+ <td class="text-right"><span class="badge">{{jumphostcount}}</span> / <span class="badge">{{sourcecount}}</span></td>
+ <td class="{{lastseen_class}} text-nowrap">{{lastseen_s}}</td>
</tr>
{{/subnets}}
</tbody>
</table>
+<div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_help}}
+ </div>
+ <div class="panel-body">
+ <p>
+ <b>{{lang_isFixed}}</b>:
+ {{lang_isFixedHelp}}
+ </p>
+ <p>
+ <b>{{lang_isDirect}}</b>:
+ {{lang_isDirectHelp}}
+ </p>
+ <p>
+ <b>{{lang_wolReachability}}</b>:
+ {{lang_wolReachabilityHelp}}
+ </p>
+ </div>
+</div>
+
<form method="post" action="?do=rebootcontrol">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="show" value="subnet">
diff --git a/modules-available/rebootcontrol/templates/task-list.html b/modules-available/rebootcontrol/templates/task-list.html
index 5ab75675..dcb04450 100644
--- a/modules-available/rebootcontrol/templates/task-list.html
+++ b/modules-available/rebootcontrol/templates/task-list.html
@@ -2,6 +2,7 @@
<table class="table">
<thead>
<tr>
+ <th>{{lang_when}}</th>
<th>{{lang_task}}</th>
<th>{{lang_location}}</th>
<th>{{lang_clientCount}}</th>
@@ -12,6 +13,9 @@
{{#list}}
<tr>
<td class="text-nowrap">
+ {{timestamp_s}}
+ </td>
+ <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>