dev_conf.html
71 lines
| 2.2 KiB
| text/html
|
HtmlDjangoLexer
|
r13 | {% extends "base.html" %} | |
{% load bootstrap3 %} | |||
{% load static %} | |||
{% load main_tags %} | |||
{% block conf-active %}active{% endblock %} | |||
{% block content-title %}{{title}}{% endblock %} | |||
{% block content-suptitle %}{{suptitle}}{% endblock %} | |||
{% block content %} | |||
|
r26 | ||
|
r53 | <span class=" dropdown pull-right"> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Options<span class="caret"></span></a> | |||
<ul class="dropdown-menu" role="menu"> | |||
<li><a href="{{ dev_conf.get_absolute_url_edit }}">Edit</a></li> | |||
<li><a href="{{ dev_conf.get_absolute_url_import }}">Import </a></li> | |||
<li><a href="{{ dev_conf.get_absolute_url_export }}">Export </a></li> | |||
<li><a>----------------</a></li> | |||
<li><a href="{{ dev_conf.get_absolute_url_write }}">Write</a></li> | |||
<li><a href="{{ dev_conf.get_absolute_url_read }}">Read</a></li> | |||
<li><a href="{{ dev_conf.get_absolute_url_start}}">Start</a></li> | |||
<li><a href="{{ dev_conf.get_absolute_url_stop }}">Stop</a></li> | |||
<li><a href="{{ dev_conf.get_absolute_url_status }}">Update Status</a></li> | |||
</ul> | |||
</span> | |||
|
r13 | <table class="table table-bordered"> | |
|
r30 | <tr> | |
<th>Status</th> | |||
|
r53 | <td>{%if status %} <span class="glyphicon glyphicon-ok-circle text-success" aria-hidden="true"></span> {{status}} {% else %} <span class="glyphicon glyphicon-remove-circle text-danger" aria-hidden="true"></span> Disconnected {% endif %}</td> | |
|
r30 | </tr> | |
{% for key in dev_conf_keys %} | |||
<tr> | |||
<th>{% get_verbose_field_name dev_conf key %}</th> | |||
<td>{{dev_conf|attr:key}}</td> | |||
</tr> | |||
{% endfor %} | |||
|
r13 | </table> | |
|
r26 | ||
|
r13 | {% endblock %} | |
{% block sidebar%} | |||
{% include "sidebar_devices.html" %} | |||
{% endblock %} | |||
{% block extra-js%} | |||
<script type="text/javascript"> | |||
|
r15 | $("#bt_edit").click(function() { | |
|
r30 | document.location = "{{ dev_conf.get_absolute_url_edit }}"; | |
}); | |||
$("#bt_read").click(function() { | |||
document.location = "{{ dev_conf.get_absolute_url_read }}"; | |||
}); | |||
$("#bt_write").click(function() { | |||
document.location = "{{ dev_conf.get_absolute_url_write }}"; | |||
}); | |||
$("#bt_import").click(function() { | |||
document.location = "{{ dev_conf.get_absolute_url_import }}"; | |||
}); | |||
$("#bt_export").click(function() { | |||
document.location = "{{ dev_conf.get_absolute_url_export }}"; | |||
|
r13 | }); | |
</script> | |||
{% endblock %} |