Skip to content
Snippets Groups Projects
Commit 11688780 authored by Wortman, Elliot (UG - Comp Sci & Elec Eng)'s avatar Wortman, Elliot (UG - Comp Sci & Elec Eng)
Browse files

Volar + pep8 formatting

parent 051617a0
No related branches found
No related tags found
1 merge request!6Tooltips + Formatting
......@@ -16,18 +16,19 @@ def main():
def values():
return read_latest_entry_as_json()
@app.route("/past-values")
def pastValues():
past_values = {"npkData": {
"nitrogen": [120, 118, 119, 121, 120, 122, 120],
"phosphorus": [110, 112, 111, 113, 110, 112, 111],
"potassium": [115, 116, 117, 115, 114, 116, 117]
},
"thmData": {
},
"thmData": {
"temperature": [18, 19, 20, 18, 17, 18, 19],
"humidity": [50, 52, 53, 50, 49, 51, 52],
"moisture": [40, 42, 45, 43, 41, 40, 44]
}}
}}
return jsonify(past_values)
......
......@@ -46,42 +46,48 @@ export default {
Nitrogen (N): 
<li class="list-group-item"
v-bind:class="getClass(values[0].N, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])"
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeNPK[1] + '-' + this.rangeNPK[2] + ' ppm'">{{
data-bs-toggle="tooltip"
:data-bs-title="'Ideal conditions: ' + this.rangeNPK[1] + '-' + this.rangeNPK[2] + ' ppm'">{{
values[0].N }} ppm</li>
</div>
<div class="valueBox">
Phosphorus (P):&nbsp;
<li class="list-group-item"
v-bind:class="getClass(values[1].P, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])"
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeNPK[1] + '-' + this.rangeNPK[2] + ' ppm'">{{
data-bs-toggle="tooltip"
:data-bs-title="'Ideal conditions: ' + this.rangeNPK[1] + '-' + this.rangeNPK[2] + ' ppm'">{{
values[1].P }} ppm</li>
</div>
<div class="valueBox">
Potassium (K):&nbsp;
<li class="list-group-item"
v-bind:class="getClass(values[2].K, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])"
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeNPK[1] + '-' + this.rangeNPK[2] + ' ppm'">{{
data-bs-toggle="tooltip"
:data-bs-title="'Ideal conditions: ' + this.rangeNPK[1] + '-' + this.rangeNPK[2] + ' ppm'">{{
values[2].K }} ppm</li>
</div>
<div class="valueBox">
Temperature:&nbsp;
<li class="list-group-item"
v-bind:class="getClass(values[3].T, this.rangeT[0], this.rangeT[1], this.rangeT[2], this.rangeT[3])"
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeT[1] + '-' + this.rangeT[2] + ' °C'">{{
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeT[1] + '-' + this.rangeT[2] + ' °C'">
{{
values[3].T }} °C</li>
</div>
<div class="valueBox">
Humidity:&nbsp;
<li class="list-group-item"
v-bind:class="getClass(values[4].H, this.rangeHM[0], this.rangeHM[1], this.rangeHM[2], this.rangeHM[3])"
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeHM[1] + '-' + this.rangeHM[2] + ' %'">{{
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeHM[1] + '-' + this.rangeHM[2] + ' %'">
{{
values[4].H }} %</li>
</div>
<div class="valueBox">
Moisture:&nbsp;
<li class="list-group-item"
v-bind:class="getClass(values[5].M, this.rangeHM[0], this.rangeHM[1], this.rangeHM[2], this.rangeHM[3])"
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeHM[1] + '-' + this.rangeHM[2] + ' %'">{{
data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions: ' + this.rangeHM[1] + '-' + this.rangeHM[2] + ' %'">
{{
values[5].M }} %</li>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment