query string: Use beginning and end markers
Since we use regex for the query string, we have to set markers for beginning and end when we want to match only the whole field. Fixes #85 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
17ea9274bb
commit
d71d35af10
|
@ -356,7 +356,7 @@ function global_router_firmwares_graph() {
|
|||
});
|
||||
placeholder.bind("plotclick", function(event, pos, obj) {
|
||||
if (obj && obj.series.label != "Other") {
|
||||
window.location.href = routers_page_url + "?q=firmware:" + obj.series.label;
|
||||
window.location.href = routers_page_url + "?q=firmware:^" + obj.series.label + "$";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ function global_router_models_graph() {
|
|||
});
|
||||
placeholder.bind("plotclick", function(event, pos, obj) {
|
||||
if (obj && obj.series.label != "Other") {
|
||||
window.location.href = routers_page_url + "?q=hardware:" + obj.series.label.replace(/ /g, '_');
|
||||
window.location.href = routers_page_url + "?q=hardware:^" + obj.series.label.replace(/ /g, '_') + "$";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
<tr><th>Position</th><td>{{ router.position_comment }}</td></tr>
|
||||
{%- endif %}
|
||||
{%- if router.hood %}
|
||||
<tr><th>Hood</th><td><a href="{{ url_for('router_list', q='hood:%s' % router.hood) }}">{{ router.hood }}</a>
|
||||
<tr><th>Hood</th><td><a href="{{ url_for('router_list', q='hood:^%s$' % router.hood) }}">{{ router.hood }}</a>
|
||||
{%- if router.community %}
|
||||
({{ router.community }})
|
||||
{%- endif -%}
|
||||
|
|
|
@ -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.replace(' ','_')) }}">{{ 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 }}{%- if value["orphaned"] %} ({{ value["orphaned"] or 0 }}){%- endif %}</td>
|
||||
<td class="warning">{{ value["unknown"] or 0 }}</td>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<table class="table table-condensed">
|
||||
<tr><th>Nickname</th><td>
|
||||
{{ user.nickname }}
|
||||
(<a href="{{ url_for('router_list', q='nickname:%s' % user.nickname) }}">Filter</a>)
|
||||
(<a href="{{ url_for('router_list', q='nickname:^%s$' % user.nickname) }}">Filter</a>)
|
||||
</td></tr>
|
||||
{%- if user.email %}
|
||||
<tr><th>E-Mail</th><td>
|
||||
|
|
Loading…
Reference in New Issue