diff options
Diffstat (limited to 'templates/admin/switch_on_all_board.html')
-rw-r--r-- | templates/admin/switch_on_all_board.html | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/templates/admin/switch_on_all_board.html b/templates/admin/switch_on_all_board.html new file mode 100644 index 0000000..4f5298c --- /dev/null +++ b/templates/admin/switch_on_all_board.html @@ -0,0 +1,90 @@ +{% extends "layout.html" %} +{% load staticfiles %} +{% block style_block %} + <style> + .default { + background-color: #999; + } + .default[href]:hover, + .default[href]:focus { + background-color: #808080; + } + .primary { + background-color: #428bca; + } + .primary[href]:hover, + .primary[href]:focus { + background-color: #3071a9; + } + .success { + background-color: #5cb85c; + } + .success[href]:hover, + .success[href]:focus { + background-color: #449d44; + } + .info { + background-color: #5bc0de; + } + .info[href]:hover, + .info[href]:focus { + background-color: #31b0d5; + } + .warning { + background-color: #f0ad4e; + } + .warning[href]:hover, + .warning[href]:focus { + background-color: #ec971f; + } + .danger { + background-color: #d9534f; + } + .danger[href]:hover, + .danger[href]:focus { + background-color: #c9302c; + } + </style> +{% endblock %} +{% block content %} +<div class="container"> + <div class="row"> + {% include "account/sub_nav.html" %} + <div class="span12"> + {% include "admin/sub_nav.html" %} + <h1>Board status</h1> + <table class="table table-bordered"> + <thead> + <tr> + <th>Board MID</th> + <th>Status</th> + <th>Power Status</th> + </tr> + </thead> + <tbody> + {% for b in boards %} + <tr> + <td class = "board_id">{{ b.mid }}</td> + <td><span style="cursor: pointer;" class="label label-{% if not b.online %}important{% elif b.temp_offline %}warning{% else %}success{% endif %}">{% if not b.online %}Offline{% elif b.temp_offline %}Temp Offline{% else %}Online{% endif %}</span></td> + <td><span style = "cursor: pointer;" class = "label {% if not b.power_status %}danger{% else %}success{% endif %}">{% if not b.power_status %}OFF{% else %}ON{% endif %}</span></td> + </tr> + {% endfor %} + </tbody> + </table> + </div> + </div> +</div> +<script> + // $(window).bind("beforeunload",function(event){ + // return "Please don't refresh. This will change the state of off devices to disconnected." + // }); + + // This function does not allow to refresh the admin page. Refreshing admin Page will change the state of device + function disableF5(e){ + if ((e.which || e.keyCode) == 116 || (e.which || e.keyCode) == 82) e. preventDefault(); + }; + $(document).ready(function(){ + $(document).on("keydown",disableF5); + }); +</script> +{% endblock %}
\ No newline at end of file |