helpers: Treat spaces in query string more correctly
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
a16c50124c
commit
3be0cd12b3
|
@ -61,9 +61,9 @@ def parse_router_list_search_query(args):
|
|||
elif key == 'mac':
|
||||
k = no + "mac = %s"
|
||||
t.append(value.lower())
|
||||
elif key == 'hardware':
|
||||
elif (key == 'hardware') or (key == 'hood'):
|
||||
k = key + " {} REGEXP %s".format(no)
|
||||
t.append(value.replace("_"," "))
|
||||
t.append(value.replace("_","."))
|
||||
elif (key == 'hostname') or (key == 'firmware'):
|
||||
k = key + " {} REGEXP %s".format(no)
|
||||
t.append(value)
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
</tr>
|
||||
{%- for hood, value in hoods|dictsort %}
|
||||
<tr>
|
||||
<td class="firstrow"><a href="{{ url_for('router_list', q='hood:%s' % hood) }}">{{ hood }}</a></td>
|
||||
<td class="firstrow"><a href="{{ url_for('router_list', q='hood:%s' % hood.replace(' ','_')) }}">{{ hood }}</a></td>
|
||||
<td class="success">{{ value["online"] or 0 }}</td>
|
||||
<td class="danger">{{ value["offline"] or 0 }}</td>
|
||||
<td class="warning">{{ value["unknown"] or 0 }}</td>
|
||||
|
|
Loading…
Reference in New Issue