Compare commits
No commits in common. "277930acde913f9bb73b8f330672356f7ca6457c" and "e8b41b402e684d3f8954d1059bef2714d3da148a" have entirely different histories.
277930acde
...
e8b41b402e
32
.drone.yml
32
.drone.yml
@ -1,32 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: build
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
image: python:3-buster
|
|
||||||
commands:
|
|
||||||
- export PYTHONPATH=.
|
|
||||||
- export FLASK_APP=period
|
|
||||||
- apt-get update -qy
|
|
||||||
- apt-get install -y python3-dev python3-pip
|
|
||||||
- pip3 install --upgrade pip
|
|
||||||
- pip3 install --upgrade setuptools
|
|
||||||
- pip3 install Flask gunicorn pytest pytest-cov
|
|
||||||
- pip3 install pendulum
|
|
||||||
# ---
|
|
||||||
# kind: pipeline
|
|
||||||
# type: docker
|
|
||||||
# name: test
|
|
||||||
# steps:
|
|
||||||
# - name: test
|
|
||||||
# image: python:3-buster
|
|
||||||
# commands:
|
|
||||||
# - export PYTHONPATH=.
|
|
||||||
# - export FLASK_APP=period
|
|
||||||
# - apt-get update -qy
|
|
||||||
# - apt-get install -y python3-dev python3-pip
|
|
||||||
# - pip3 install --upgrade pip
|
|
||||||
# - pip3 install --upgrade setuptools
|
|
||||||
# - pip3 install Flask gunicorn pytest pytest-cov
|
|
||||||
# - pip3 install pendulum
|
|
||||||
# - pytest tests --cov --cov-report term --cov-report html --junitxml=report.xml
|
|
@ -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)
|
||||||
|
@ -1,23 +1,14 @@
|
|||||||
autopep8==1.7.0
|
|
||||||
certifi==2022.6.15
|
certifi==2022.6.15
|
||||||
click==8.1.3
|
click==6.6
|
||||||
Flask==2.2.2
|
|
||||||
importlib-metadata==5.0.0
|
|
||||||
influxdb-client==1.30.0
|
influxdb-client==1.30.0
|
||||||
itsdangerous==2.1.2
|
itsdangerous==0.24
|
||||||
Jinja2==3.1.2
|
MarkupSafe==0.23
|
||||||
MarkupSafe==2.1.1
|
|
||||||
pendulum==2.1.2
|
pendulum==2.1.2
|
||||||
pycodestyle==2.9.1
|
|
||||||
python-dateutil==2.8.2
|
|
||||||
python-dotenv==0.21.0
|
|
||||||
pytz==2016.10
|
pytz==2016.10
|
||||||
pytzdata==2020.1
|
pytzdata==2020.1
|
||||||
requests==2.12.4
|
requests==2.12.4
|
||||||
Rx==3.2.0
|
Rx==3.2.0
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
toml==0.10.2
|
|
||||||
urllib3==1.26.9
|
urllib3==1.26.9
|
||||||
Werkzeug==2.2.2
|
Werkzeug==0.11.11
|
||||||
WTForms==2.1
|
WTForms==2.1
|
||||||
zipp==3.10.0
|
|
||||||
|
@ -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>
|
||||||
@ -77,7 +69,6 @@ Last Mileage
|
|||||||
<th scope="col">Oil</th>
|
<th scope="col">Oil</th>
|
||||||
<th scope="col">Litres</th>
|
<th scope="col">Litres</th>
|
||||||
<th scope="col">$/Litre</th>
|
<th scope="col">$/Litre</th>
|
||||||
<th scope="col">$ Total</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -88,9 +79,6 @@ Last Mileage
|
|||||||
<td>{{ point['oilhealth'] }}</td>
|
<td>{{ point['oilhealth'] }}</td>
|
||||||
<td>{{ point['fuel'] }}</td>
|
<td>{{ point['fuel'] }}</td>
|
||||||
<td>{{ point['fuelcost'] }}</td>
|
<td>{{ point['fuelcost'] }}</td>
|
||||||
{% if point['fuel'] %}
|
|
||||||
<td>{{ '%0.2f' % ((point['fuel'] | float) * (point['fuelcost'] | float)) }}</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Loading…
Reference in New Issue
Block a user