##// END OF EJS Templates
Version probada con envio de json, nueva plantilla corregida pero error en conversion de ramp
Version probada con envio de json, nueva plantilla corregida pero error en conversion de ramp

File last commit:

r335:7377db7c77e8
r336:dcfb18d9813e
Show More
dev_conf.html
85 lines | 3.1 KiB | text/html | HtmlDjangoLexer
{% extends "base.html" %}
{% load bootstrap4 %}
{% load static %}
{% load main_tags %}
{% block content-title %}{{title}}{% endblock %}
{% block content-suptitle %}{{suptitle}}{% endblock %}
{% block content %}
{% block menu-actions %}
<span class=" dropdown pull-right">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="fas fa-bars" aria-hidden="true"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ dev_conf.get_absolute_url_edit }}"><span class="fa fa-pencil" aria-hidden="true"></span> Edit</a></li>
<li><a href="{{ dev_conf.get_absolute_url_delete }}"><span class="fa fa-times" aria-hidden="true"></span> Delete</a></li>
<li><a href="{{ dev_conf.get_absolute_url_import }}"><span class="fas fa-cloud-download-alt" aria-hidden="true"></span> Import </a></li>
<li><a href="{{ dev_conf.get_absolute_url_export }}"><span class="fas fa-cloud-upload-alt" aria-hidden="true"></span> Export </a></li>
{% block extra-menu-actions %}
{% endblock %}
<li><a>----------------</a></li>
<li><a href="{{ dev_conf.get_absolute_url_status }}"><span class="fas fa-sync-alt" aria-hidden="true"></span> Status</a></li>
{% if not no_play %}
{% if not only_stop %}
<li><a href="{{ dev_conf.get_absolute_url_start}}"><span class="fas fa-play" aria-hidden="true"></span> Start</a></li>
{% endif %}
<li><a href="{{ dev_conf.get_absolute_url_stop }}"><span class="fas fa-stop" aria-hidden="true"></span> Stop</a></li>
{% endif %}
<li><a href="{{ dev_conf.get_absolute_url_write }}"><span class="fas fa-arrow-circle-down" aria-hidden="true"></span> Write</a></li>
{% if dev_conf.device.device_type.name != 'abs' %}
<li><a href="{{ dev_conf.get_absolute_url_read }}"><span class="fas fa-arrow-circle-up" aria-hidden="true"></span> Read</a></li>
{% endif %}
</ul>
</span>
{% endblock %}
{% block content-detail %}
<table class="table table-bordered">
<tr>
<th>Status</th>
{% if dev_conf.pk == dev_conf.device.conf_active %}
<td class="text-{{dev_conf.device.status_color}}"><strong> {% if dev_conf.device.device_type.name == 'abs' %} {{connected_modules}} {% else %} {{dev_conf.device.get_status_display}}{% endif %}</strong></td>
{% else %}
<td class="text-info"><strong> Connected </strong></td>
{% endif %}
</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 %}
</table>
{% endblock %}
{% block extra-content %}
{% endblock %}
{% endblock %}
{% block extra-js%}
<script type="text/javascript">
$("#bt_edit").click(function() {
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 }}";
});
</script>
{% endblock %}