Compare commits
No commits in common. "da166e5169e72a4843350efec01681c80cf401dc" and "e8b41b402e684d3f8954d1059bef2714d3da148a" have entirely different histories.
da166e5169
...
e8b41b402e
@ -27,7 +27,7 @@ def success():
|
|||||||
def main_page():
|
def main_page():
|
||||||
query_api = client.query_api()
|
query_api = client.query_api()
|
||||||
query = 'from(bucket: "gas")\
|
query = 'from(bucket: "gas")\
|
||||||
|> range(start: -90d)\
|
|> range(start: -30d)\
|
||||||
|> filter(fn: (r) => r["_measurement"] == "2016_odyssey")\
|
|> filter(fn: (r) => r["_measurement"] == "2016_odyssey")\
|
||||||
|> filter(fn: (r) => r["_field"] == "odometer")\
|
|> filter(fn: (r) => r["_field"] == "odometer")\
|
||||||
|> sort(columns: ["_value"], desc: false)\
|
|> sort(columns: ["_value"], desc: false)\
|
||||||
@ -50,10 +50,6 @@ def main_page():
|
|||||||
temp['fuelcost'] = record['fuelcost']
|
temp['fuelcost'] = record['fuelcost']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
try:
|
|
||||||
temp['winter'] = record['winter']
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
results.append(temp)
|
results.append(temp)
|
||||||
# .append((record.get_time(), record.get_field(), record.get_value()))
|
# .append((record.get_time(), record.get_field(), record.get_value()))
|
||||||
newlist = sorted(results, key=itemgetter('time'), reverse=True)
|
newlist = sorted(results, key=itemgetter('time'), reverse=True)
|
||||||
|
@ -47,17 +47,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label for="winter">Winter Tires:</label>
|
<label for="winter">Winter Tires:</label>
|
||||||
<select name="winter" class="form-control">
|
<select name="winter" class="form-control" default="false">
|
||||||
{% if data %}
|
|
||||||
{% if data[0]['winter'] == "True" %}
|
|
||||||
<option value="TRUE" selected>True</option>
|
|
||||||
<option value="FALSE">False</option>
|
|
||||||
|
|
||||||
{% else %}
|
|
||||||
<option value="TRUE">True</option>
|
<option value="TRUE">True</option>
|
||||||
<option value="FALSE" selected>False</option>
|
<option value="FALSE" selected>False</option>
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div><br>
|
</div><br>
|
||||||
|
Loading…
Reference in New Issue
Block a user