summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/templates
diff options
context:
space:
mode:
authorSimon Rettberg2019-11-27 17:25:46 +0100
committerSimon Rettberg2019-11-27 17:25:46 +0100
commitca312a6ace43a6fde58d1c09057c7b0bd34f15a2 (patch)
tree3cb4e5ac2b29f7fcc99dfda5df26f11a64caeaf3 /modules-available/rebootcontrol/templates
parent[js_ip/locations] Mode cidr/ip handling to own module (diff)
downloadslx-admin-ca312a6ace43a6fde58d1c09057c7b0bd34f15a2.tar.gz
slx-admin-ca312a6ace43a6fde58d1c09057c7b0bd34f15a2.tar.xz
slx-admin-ca312a6ace43a6fde58d1c09057c7b0bd34f15a2.zip
[statistics/rebootcontrol] Implement editing subnet
Diffstat (limited to 'modules-available/rebootcontrol/templates')
-rw-r--r--modules-available/rebootcontrol/templates/jumphost-edit.html4
-rw-r--r--modules-available/rebootcontrol/templates/jumphost-list.html3
-rw-r--r--modules-available/rebootcontrol/templates/status-checkconnection.html4
-rw-r--r--modules-available/rebootcontrol/templates/status-reboot.html5
-rw-r--r--modules-available/rebootcontrol/templates/subnet-edit.html64
-rw-r--r--modules-available/rebootcontrol/templates/subnet-list.html58
-rw-r--r--modules-available/rebootcontrol/templates/task-list.html2
7 files changed, 127 insertions, 13 deletions
diff --git a/modules-available/rebootcontrol/templates/jumphost-edit.html b/modules-available/rebootcontrol/templates/jumphost-edit.html
index 82629d2e..7a79dc86 100644
--- a/modules-available/rebootcontrol/templates/jumphost-edit.html
+++ b/modules-available/rebootcontrol/templates/jumphost-edit.html
@@ -2,7 +2,7 @@
<form method="post" action="?do=rebootcontrol">
<input type="hidden" name="token" value="{{token}}">
- <input type="hidden" name="action" value="savejumphost">
+ <input type="hidden" name="show" value="jumphost">
<input type="hidden" name="hostid" value="{{hostid}}">
<div class="list-group">
<div class="list-group-item">
@@ -34,7 +34,7 @@
</div>
<div class="buttonbar text-right">
<button type="reset" class="btn btn-default">{{lang_reset}}</button>
- <button type="submit" class="btn btn-primary">
+ <button type="submit" class="btn btn-primary" name="action" value="save">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{lang_save}}
</button>
diff --git a/modules-available/rebootcontrol/templates/jumphost-list.html b/modules-available/rebootcontrol/templates/jumphost-list.html
index 3fbe4c21..8453d2bb 100644
--- a/modules-available/rebootcontrol/templates/jumphost-list.html
+++ b/modules-available/rebootcontrol/templates/jumphost-list.html
@@ -6,7 +6,8 @@
<form method="post" action="?do=rebootcontrol">
<input type="hidden" name="token" value="{{token}}">
- <input type="hidden" name="action" value="jumphost">
+ <input type="hidden" name="show" value="jumphost">
+ <input type="hidden" name="action" value="list">
<table class="table">
<thead>
<tr>
diff --git a/modules-available/rebootcontrol/templates/status-checkconnection.html b/modules-available/rebootcontrol/templates/status-checkconnection.html
index c30b42d9..e31d95ea 100644
--- a/modules-available/rebootcontrol/templates/status-checkconnection.html
+++ b/modules-available/rebootcontrol/templates/status-checkconnection.html
@@ -1,9 +1,5 @@
<h3>{{lang_checkingJumpHost}}: {{host}}</h3>
-<a href="?do=rebootcontrol" class="btn btn-primary pull-right">
- <span class="glyphicon glyphicon-arrow-left"></span>
- {{lang_back}}
-</a>
<div class="clearfix"></div>
<div class="collapse alert alert-success" id="result-ok">
<span class="glyphicon glyphicon-check"></span>
diff --git a/modules-available/rebootcontrol/templates/status-reboot.html b/modules-available/rebootcontrol/templates/status-reboot.html
index 594faa4c..4be95e81 100644
--- a/modules-available/rebootcontrol/templates/status-reboot.html
+++ b/modules-available/rebootcontrol/templates/status-reboot.html
@@ -1,10 +1,5 @@
<h3>{{lang_location}}: {{locationName}}</h3>
-<a href="?do=rebootcontrol" class="btn btn-primary pull-right">
- <span class="glyphicon glyphicon-arrow-left"></span>
- {{lang_back}}
-</a>
-
<div>
<table class="table table-hover stupidtable" id="dataTable">
<thead>
diff --git a/modules-available/rebootcontrol/templates/subnet-edit.html b/modules-available/rebootcontrol/templates/subnet-edit.html
new file mode 100644
index 00000000..4c3702ba
--- /dev/null
+++ b/modules-available/rebootcontrol/templates/subnet-edit.html
@@ -0,0 +1,64 @@
+<!-- subnetid, start, end, fixed, isdirect, lastdirectcheck, lastseen, seencount -->
+
+<form method="post" action="?do=rebootcontrol">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="show" value="subnet">
+ <input type="hidden" name="id" value="{{subnetid}}">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_editSubnet}}: <b>{{start_s}} - {{end_s}}</b>
+ </div>
+ <div class="list-group">
+ <div class="list-group-item">
+ <div class="checkbox">
+ <input id="fixed_cb" type="checkbox" name="fixed" {{#fixed}}checked{{/fixed}} {{perms.subnet.flag.disabled}}>
+ <label for="fixed_cb">{{lang_fixSubnetSettings}}</label>
+ </div>
+ <div class="slx-space"></div>
+ <p>{{lang_fixSubnetDesc}}</p>
+ </div>
+ <div class="list-group-item {{^fixed}}collapse{{/fixed}} subnet-option">
+ <div class="checkbox">
+ <input id="direct_cb" type="checkbox" name="isdirect" {{#isdirect}}checked{{/isdirect}} {{perms.subnet.flag.disabled}}>
+ <label for="direct_cb">{{lang_reachableFromServer}}</label>
+ </div>
+ <div class="slx-space"></div>
+ <p>{{lang_reachableFromServerDesc}}</p>
+ </div>
+ <div class="list-group-item {{perms.jumphost.view.hidden}}">
+ <label>{{lang_assignedJumpHosts}}</label>
+ {{#jumpHosts}}
+ <div class="row">
+ <div class="col-md-12">
+ <div class="checkbox">
+ <input id="jhb{{hostid}}" type="checkbox" name="jumphost[{{hostid}}]" {{checked}}
+ {{perms.jumphost.assign-subnet.disabled}}>
+ <label for="jhb{{hostid}}">{{host}}:{{port}}</label>
+ </div>
+ </div>
+ </div>
+ {{/jumpHosts}}
+ </div>
+ </div>
+ <div class="panel-footer text-right">
+ <button type="submit" class="btn btn-primary" name="action" value="edit" {{perms.subnet.flag.disabled}}>
+ <span class="glyphicon glyphicon-floppy-disk"></span>
+ {{lang_save}}
+ </button>
+ </div>
+ </div>
+</form>
+<script><!--
+document.addEventListener('DOMContentLoaded', function() {
+ var $overrides = $('.subnet-option');
+ var $cb = $('#fixed_cb');
+ $cb.change(function() {
+ if ($cb.is(':checked')) {
+ $overrides.show();
+ } else {
+ $overrides.hide();
+ }
+ }).change();
+
+});
+//--></script> \ No newline at end of file
diff --git a/modules-available/rebootcontrol/templates/subnet-list.html b/modules-available/rebootcontrol/templates/subnet-list.html
new file mode 100644
index 00000000..e2747316
--- /dev/null
+++ b/modules-available/rebootcontrol/templates/subnet-list.html
@@ -0,0 +1,58 @@
+<!-- subnetid, start, end, fixed, isdirect, lastdirectcheck, lastseen, seencount -->
+
+<h2>{{lang_subnets}}</h2>
+
+<p>{{lang_subnetsDescription}}</p>
+
+<table class="table">
+ <thead>
+ <tr>
+ <th>{{lang_start}}</th>
+ <th>{{lang_end}}</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>
+ </tr>
+ </thead>
+ <tbody>
+ {{#subnets}}
+ <tr>
+ <td>
+ <a href="?do=rebootcontrol&show=subnet&what=subnet&id={{subnetid}}">{{start_s}}</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="{{lastseen_class}}">{{lastseen_s}}</td>
+ </tr>
+ {{/subnets}}
+ </tbody>
+</table>
+
+<form method="post" action="?do=rebootcontrol">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="show" value="subnet">
+ <div class="list-group">
+ <div class="list-group-item cidrmagic">
+ <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>
+ <div class="col-md-4 text-right">
+ <button class="btn btn-primary" name="action" value="add">
+ <span class="glyphicon glyphicon-floppy-disk"></span>
+ {{lang_create}}
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+</form> \ 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 87515085..8ae4975f 100644
--- a/modules-available/rebootcontrol/templates/task-list.html
+++ b/modules-available/rebootcontrol/templates/task-list.html
@@ -13,7 +13,7 @@
{{#list}}
<tr>
<td>
- <a href="?do=rebootcontrol&amp;show=task&amp;taskid={{taskId}}">{{mode}}</a>
+ <a href="?do=rebootcontrol&amp;show=task&amp;what=task&amp;taskid={{taskId}}">{{mode}}</a>
</td>
<td>
{{locationName}}