diff options
author | Simon Rettberg | 2019-11-22 17:14:06 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-11-22 17:14:06 +0100 |
commit | 95c8a36dfc7e63f23eae3b411fd1a371da6f774c (patch) | |
tree | 3478a4ae1e21c5e315a38488d1af655f93843420 /modules-available/rebootcontrol/templates/status.html | |
parent | [inc/Taskmanagercallback] Remove unused function (diff) | |
download | slx-admin-95c8a36dfc7e63f23eae3b411fd1a371da6f774c.tar.gz slx-admin-95c8a36dfc7e63f23eae3b411fd1a371da6f774c.tar.xz slx-admin-95c8a36dfc7e63f23eae3b411fd1a371da6f774c.zip |
[rebootcontrol] Start adding WOL functionality
Diffstat (limited to 'modules-available/rebootcontrol/templates/status.html')
-rw-r--r-- | modules-available/rebootcontrol/templates/status.html | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/modules-available/rebootcontrol/templates/status.html b/modules-available/rebootcontrol/templates/status.html deleted file mode 100644 index c05b2fad..00000000 --- a/modules-available/rebootcontrol/templates/status.html +++ /dev/null @@ -1,70 +0,0 @@ -<div> - <form class="form-inline"> - <b>{{lang_location}}: {{locationName}}</b> - <input type="hidden" name="do" value="rebootcontrol"> - <input type="hidden" name="location" value="{{locationId}}"> - <button type="submit" class="btn btn-primary pull-right"><span class="glyphicon glyphicon-arrow-left"></span> {{lang_back}}</button> - </form> -</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> - - <tbody> - {{#clients}} - <tr> - <td>{{hostname}}{{^hostname}}{{machineuuid}}{{/hostname}}</td> - <td>{{clientip}}</td> - <td id="status-{{machineuuid}}"></td> - </tr> - {{/clients}} - </tbody> - </table> -</div> - -<div data-tm-id="{{taskId}}" data-tm-log="error" data-tm-callback="updateStatus"></div> - -<script type="application/javascript"> - statusStrings = { - "CONNECTING" : "{{lang_connecting}}", - "REBOOTING" : "{{lang_rebooting}}", - "REBOOT_AT" : "{{lang_rebootAt}}", - "ONLINE" : "{{lang_online}}", - "ERROR" : "{{lang_error}}", - "SHUTDOWN" : "{{lang_shutdown}}", - "SHUTDOWN_AT" : "{{lang_shutdownAt}}", - "AUTH_FAIL" : "{{lang_authFail}}" - }; - - function updateStatus(task) { - if (!task || !task.data || !task.data.clientStatus) - return; - var clientStatus = task.data.clientStatus; - for (var uuid in clientStatus) { - if (!clientStatus.hasOwnProperty(uuid)) - continue; - var $s = $("#status-" + uuid); - var status = clientStatus[uuid]; - if ($s.data('state') === status) - continue; - $s.data('state', status); - var text = statusStrings[status]; - if (status === 'SHUTDOWN_AT' || status === 'REBOOT_AT') { - text += ' ' + task.data.time; - } - $s.text(text); - if (status === 'CONNECTING' || status === 'REBOOTING') { - $s.append('<span class="glyphicon glyphicon-hourglass"></span>'); - } - } - } -</script> |