You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
4.4 KiB
95 lines
4.4 KiB
{% extends "admin/base_site.html" %}
|
|
{% load static %}
|
|
{% block extrahead %}
|
|
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.css' %}">
|
|
<script src="{% static 'js/jquery-2.1.1.min.js' %}"></script>
|
|
<script src="{% static 'js/bootstrap.js' %}"></script>
|
|
<script src="{% static 'js/recmd.js' %}"></script>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<style>
|
|
.lst{
|
|
padding-left: 0;
|
|
list-style: none;
|
|
}
|
|
</style>
|
|
{% load to_seprate %}
|
|
<div>
|
|
<label><h2>系统管理</h2></label>
|
|
</br>
|
|
<h3>请选择并填写管理命令</h3>
|
|
<form action="." method="POST" id="cmdform" onsubmit="check_form()">
|
|
{% csrf_token %}
|
|
<table class="table" width="90%">
|
|
<tbody>
|
|
<tr>
|
|
<td width="280">
|
|
<span class="dropdown" id="spot">
|
|
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown" id="spotbtn">
|
|
{% if sptname %}
|
|
{{ sptname }}
|
|
{% else %}
|
|
设备选择
|
|
{% endif %}
|
|
</button>
|
|
<input type="hidden" name="sptname" id="sptname" value="{{ sptname }}">
|
|
<ul class="dropdown-menu">
|
|
{% if spots %}
|
|
{% for spt in spots %}
|
|
<li class="lst"><a href="#" onclick="change_spot('{{ spt.sn }}')" id="sptlist{{ spt.sn }}">{{ spt.name }}</a></li>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</ul>
|
|
</span>
|
|
{% if spot %}
|
|
<input type="hidden" name="spotval" id="spotval" value="{{ spot }}">
|
|
{% else %}
|
|
<input type="hidden" name="spotval" id="spotval" value="">
|
|
{% endif %}
|
|
<span class="dropdown" id="cmd">
|
|
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown" id="cmdbtn">
|
|
{% if cmdname %}
|
|
{{ cmdname }}
|
|
{% else %}
|
|
命令选择
|
|
{% endif %}
|
|
</button>
|
|
<input type="hidden" name="cmdname" id="cmdname" value="{{ cmdname }}">
|
|
<ul class="dropdown-menu">
|
|
<li class="lst"><a href="#" onclick="change_cmd('REBOOT')" id="cmdlistREBOOT">重启</a></li>
|
|
<li class="lst"><a href="#" onclick="change_cmd('TIMESPAN')" id="cmdlistTIMESPAN">修改采集时间间隔</a></li>
|
|
<li class="lst"><a href="#" onclick="change_cmd('A_FIRE')" id="cmdlistA_FIRE">修改报警烟雾指数</a></li>
|
|
<li class="lst"><a href="#" onclick="change_cmd('A_TEMP')" id="cmdlistA_TEMP">修改报警温度指数</a></li>
|
|
<li class="lst"><a href="#" onclick="change_cmd('A_HUM')" id="cmdlistA_HUM">修改报警湿度指数</a></li>
|
|
</ul>
|
|
</span>
|
|
<input type="hidden" name="cmdval" id="cmdval" value="{{ cmd }}" onchange="get_device()">
|
|
</td>
|
|
<td>
|
|
<span>
|
|
<label class="pull-left" style="padding-top: 5px">命令参数:</label>
|
|
<input type="text" maxlength="8" class="col-lg-1 col-xs-2" name="paramval" id="paramval" value="{{ param }}">
|
|
<label style="padding-top: 5px">* 重启不用输入参数</label>
|
|
</span>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<input type="submit" value="确定" class="btn-primary">
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
<div style="">
|
|
<hr>
|
|
<h3>当前等待执行命令</h3>
|
|
<ul id="cmdul">
|
|
{% for c in cmdlist %}
|
|
<li class="lst">{{ c|to_seprate }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|