Change "denied" to "blocked" to be consistent
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
2af4991abb
commit
525b10ec92
|
@ -201,9 +201,9 @@ def router_info(dbid):
|
|||
flash("<b>Router has no br-mesh and thus cannot be banned!</b>", "danger")
|
||||
else:
|
||||
flash("<b>You are not authorized to perform this action!</b>", "danger")
|
||||
elif request.form.get("act") == "changedenied" and mac:
|
||||
elif request.form.get("act") == "changeblocked" and mac:
|
||||
if session.get('admin'):
|
||||
if request.form.get("denied") == "true":
|
||||
if request.form.get("blocked") == "true":
|
||||
added = mysql.utcnow()
|
||||
mysql.execute("INSERT INTO blocked (mac, added) VALUES (%s, %s)",(mac,added,))
|
||||
mysql.commit()
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
{%- endif %}
|
||||
{%- if authadmin %}
|
||||
<li><a href="#" onclick="$('#act').val('ban'); $('#actform').submit()">Ban Router</a></li>
|
||||
<li><a href="#" onclick="$('#deniedform').submit()">Toggle denied status</a></li>
|
||||
<li><a href="#" onclick="$('#blockedform').submit()">Toggle blocked status</a></li>
|
||||
{%- endif %}
|
||||
<li><a href="#" onclick="$('#act').val('report'); $('#actform').submit()">Report abusive Router</a></li>
|
||||
</ul>
|
||||
|
@ -156,7 +156,7 @@
|
|||
<tr><th>Hardware</th><td><span title="{{ router.chipset }}">{{ router.hardware }}</span></td></tr>
|
||||
<tr><th>WAN Uplink</th><td><span class="{{ "glyphicon glyphicon-ok" if router.wan_uplink else "glyphicon glyphicon-remove" }}"></span>
|
||||
{%- if router.blocked %}
|
||||
<span style="color:#d90000"> - Router DENIED by KeyXchange!</span>
|
||||
<span style="color:#d90000"> - Router BLOCKED by KeyXchange!</span>
|
||||
{%- endif -%}
|
||||
</td></tr>
|
||||
<tr><th>Clients</th><td>{{ router.clients }}</td></tr>
|
||||
|
@ -424,9 +424,9 @@
|
|||
</script>
|
||||
|
||||
{%- if session.admin %}
|
||||
<form method="post" id="deniedform">
|
||||
<input type="hidden" name="act" value="changedenied" />
|
||||
<input type="hidden" name="denied" value="{{ "false" if router.blocked else "true" }}" />
|
||||
<form method="post" id="blockedform">
|
||||
<input type="hidden" name="act" value="changeblocked" />
|
||||
<input type="hidden" name="blocked" value="{{ "false" if router.blocked else "true" }}" />
|
||||
</form>
|
||||
{%- endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
{%- for router in routers %}
|
||||
<tr>
|
||||
<td class="text-nowrap-responsive"><a href="{{ url_for("router_info", dbid=router.id) }}">{{ router.hostname }}</a>
|
||||
{%- if router.reset %} - <span style="color:#d90000">Reset!</span>{%- endif %}{%- if router.blocked %} - <span style="color:#d90000">Denied!</span>{%- endif %}
|
||||
{%- if router.reset %} - <span style="color:#d90000">Reset!</span>{%- endif %}{%- if router.blocked %} - <span style="color:#d90000">Blocked!</span>{%- endif %}
|
||||
</td>
|
||||
<td class="text-center"><span class="{{ router.status|status2css }}">{{ router.status }}</span></td>
|
||||
<td>{{ router.hood }}</td>
|
||||
|
|
Loading…
Reference in New Issue