Compare commits
No commits in common. "18ce2b539937413f4a3803a9cba4f4f6147e9c49" and "030dc33d551b992846a936444c18c5331c040860" have entirely different histories.
18ce2b5399
...
030dc33d55
@ -16,10 +16,7 @@ def success():
|
|||||||
|
|
||||||
@app.route('/', methods=['GET', 'POST'])
|
@app.route('/', methods=['GET', 'POST'])
|
||||||
def main_page():
|
def main_page():
|
||||||
client = InfluxDBClient('localhost', 8086, 'root', 'root', 'gas')
|
return render_template('index.html')
|
||||||
query = 'select TOP(odometer, 5) from odyssey'
|
|
||||||
data = client.query(query)
|
|
||||||
return render_template('index.html', data=data)
|
|
||||||
|
|
||||||
@app.route('/add_time', methods=['POST', 'GET'])
|
@app.route('/add_time', methods=['POST', 'GET'])
|
||||||
def add_time():
|
def add_time():
|
||||||
@ -35,8 +32,6 @@ def add_time():
|
|||||||
time = now
|
time = now
|
||||||
odometer = request.form['odometer']
|
odometer = request.form['odometer']
|
||||||
oilhealth= request.form['oilhealth']
|
oilhealth= request.form['oilhealth']
|
||||||
if oilhealth != '':
|
|
||||||
oilhealth = float(oilhealth)
|
|
||||||
fuel = request.form['fuel']
|
fuel = request.form['fuel']
|
||||||
if fuel != '':
|
if fuel != '':
|
||||||
fuel = float(fuel)
|
fuel = float(fuel)
|
||||||
@ -44,10 +39,6 @@ def add_time():
|
|||||||
if fuelcost != '':
|
if fuelcost != '':
|
||||||
fuelcost = float(fuelcost)
|
fuelcost = float(fuelcost)
|
||||||
winter = request.form['winter']
|
winter = request.form['winter']
|
||||||
if winter == 'TRUE':
|
|
||||||
winter = True
|
|
||||||
else:
|
|
||||||
winter = False
|
|
||||||
|
|
||||||
json_body = [
|
json_body = [
|
||||||
{
|
{
|
||||||
@ -58,7 +49,7 @@ def add_time():
|
|||||||
"oilhealth": oilhealth,
|
"oilhealth": oilhealth,
|
||||||
"fuel": fuel,
|
"fuel": fuel,
|
||||||
"fuelcost": fuelcost,
|
"fuelcost": fuelcost,
|
||||||
"winter": winter
|
"winter": bool(winter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
0
static/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/favorite.svg
vendored
Normal file → Executable file
0
static/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/favorite.svg
vendored
Normal file → Executable file
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
0
static/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/menu.svg
vendored
Normal file → Executable file
0
static/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/menu.svg
vendored
Normal file → Executable file
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 220 B |
0
static/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/more_vert.svg
vendored
Normal file → Executable file
0
static/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/more_vert.svg
vendored
Normal file → Executable file
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
0
static/bower_components/angular-material/modules/closure/select/select.css
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/closure/select/select.css
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/closure/select/select.js
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/closure/select/select.js
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/js/select/select.css
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/js/select/select.css
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/js/select/select.js
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/js/select/select.js
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/js/select/select.min.css
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/js/select/select.min.css
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/js/select/select.min.js
vendored
Normal file → Executable file
0
static/bower_components/angular-material/modules/js/select/select.min.js
vendored
Normal file → Executable file
@ -17,54 +17,45 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label for="date">Date:</label>
|
<label for="date">Date:</label>
|
||||||
<input type=date name="date" class="form-control" placeholder="Ex: 2009-11-10">
|
<input type=text name="date" class="form-control" placeholder="Ex: 2009-11-10">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label for="time">Time:</label>
|
<label for="time">Time:</label>
|
||||||
<input type=time name="time" class="form-control" placeholder="Ex: 17:59:03">
|
<input type=text name="time" class="form-control" placeholder="Ex: 17:59:03">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label for="odometer">Odometer:</label>
|
<label for="odometer">Odometer:</label>
|
||||||
<input type=number name="odometer" class="form-control" placeholder="Ex: 3008">
|
<input type=text name="odometer" class="form-control" placeholder="Ex: 3008">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label for="oilhealth">Oil Health:</label>
|
<label for="oilhealth">Oil Health:</label>
|
||||||
<input type=number name="oilhealth" class="form-control" placeholder="Ex: 80">
|
<input type=text name="oilhealth" class="form-control" placeholder="Ex: 80">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label for="fuel">Fuel (L):</label>
|
<label for="fuel">Fuel (L):</label>
|
||||||
<input type=number step="0.001" name="fuel" class="form-control" placeholder="Ex: 70.175">
|
<input type=text name="fuel" class="form-control" placeholder="Ex: 70.175">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label for="fuelcost">Fuel Cost ($/L):</label>
|
<label for="fuelcost">Fuel Cost ($/L):</label>
|
||||||
<input type=number step="0.001" name="fuelcost" class="form-control" placeholder="Ex: 1.059">
|
<input type=text name="fuelcost" class="form-control" placeholder="Ex: 1.059">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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" default="false">
|
<select name="winter" class="form-control">
|
||||||
<option value="TRUE">True</option>
|
<option value="true">True</option>
|
||||||
<option value="FALSE" selected>False</option>
|
<option value="false">False</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div><br>
|
</div>
|
||||||
<input type="submit" value="Go">
|
<input type="submit" value="Go">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<br>
|
|
||||||
Last Mileage
|
|
||||||
<ul>
|
|
||||||
{% for point in data %}
|
|
||||||
{% for item in point %}
|
|
||||||
<li>
|
|
||||||
{{ item['top'] }}
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</ul>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user