fix: cast to float & rendering
parent
c278f83517
commit
ed14f7f5e8
|
@ -68,7 +68,7 @@ class Querying():
|
||||||
key = f'{d}|asns|{ipversion}'
|
key = f'{d}|asns|{ipversion}'
|
||||||
r = self.ranking.zscore(key, asn)
|
r = self.ranking.zscore(key, asn)
|
||||||
if r:
|
if r:
|
||||||
return r
|
return float(r)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def get_sources(self, date: Dates=datetime.date.today()):
|
def get_sources(self, date: Dates=datetime.date.today()):
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
<input name="date" type="date" value="{{ date }}">
|
<input name="date" type="date" value="{{ date }}">
|
||||||
<input type="submit" value="Set date">
|
<input type="submit" value="Set date">
|
||||||
</form>
|
</form>
|
||||||
<form style="width:250px; display:inline-block;" action="" method=post>
|
<form style="width:220px; display:inline-block;" action="" method=post>
|
||||||
<select name="ipversion">
|
<select name="ipversion">
|
||||||
<option value="v4" {% if ipversion == 'v4' %} selected="selected"{% endif %}>v4</option>
|
<option value="v4" {% if ipversion == 'v4' %} selected="selected"{% endif %}>v4</option>
|
||||||
<option value="v6" {% if ipversion == 'v6' %} selected="selected"{% endif %}>v6</option>
|
<option value="v6" {% if ipversion == 'v6' %} selected="selected"{% endif %}>v6</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Set IP version">
|
<input type="submit" value="Set IP version">
|
||||||
</form>
|
</form>
|
||||||
<form style="width:300px; display:inline-block;" action="" method=post>
|
<form style="width:350px; display:inline-block;" action="" method=post>
|
||||||
<select name="source">
|
<select name="source">
|
||||||
<option value="" {% if not source %} selected="selected"{% endif %}>all</option>
|
<option value="" {% if not source %} selected="selected"{% endif %}>all</option>
|
||||||
{% for s in sources %}
|
{% for s in sources %}
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Set source">
|
<input type="submit" value="Set source">
|
||||||
</form>
|
</form>
|
||||||
<form style="width:400px; display:inline-block;" action="{{ url_for('asn_details') }}" method=post>
|
<form style="width:350px; display:inline-block;" action="{{ url_for('asn_details') }}" method=post>
|
||||||
ASN to search: <input type=number name=asn>
|
ASN to search: <input type=number name=asn>
|
||||||
<input type="submit" value="Search">
|
<input type="submit" value="Search">
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue