misc old changes
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
<h5>Conditions in the last <%= model.days ? model.days : '7' %> days</h5>
|
||||
|
||||
<div id="chartContainer" style="height: 370px; width: 100%;"></div>
|
||||
<div id="now" class="form-text">getting inside conditions...</div>
|
||||
|
||||
<div class="fieldset col-12">
|
||||
<select name="waterTime" id="waterTime">
|
||||
<option value="5">5 seconds</option>
|
||||
<option value="15">10 seconds</option>
|
||||
<option value="15">15 seconds</option>
|
||||
<option value="30">30 seconds</option>
|
||||
<option value="60">1 min</option>
|
||||
<option value="120">2 min</option>
|
||||
@@ -13,9 +15,24 @@
|
||||
</select>
|
||||
<button id="water" class="btn">Water</button>
|
||||
<button id="waterStop" class="btn btn-warning">Stop water</button>
|
||||
<div class="btn-group" role="group">
|
||||
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Period
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="btnGroupDrop1">
|
||||
<a class="dropdown-item" href="/n/garden/1">Day</a>
|
||||
<a class="dropdown-item" href="/n/garden/2">2 Days</a>
|
||||
<a class="dropdown-item" href="/n/garden/7">Week</a>
|
||||
<a class="dropdown-item" href="/n/garden/30">Month</a>
|
||||
<a class="dropdown-item" href="/n/garden/91">Quarter</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<%- contentFor('head') %>
|
||||
<script>
|
||||
var current;
|
||||
@@ -52,7 +69,7 @@
|
||||
itemclick: toogleDataSeries
|
||||
},
|
||||
axisX: {
|
||||
valueFormatString: "HH:mm DD MMM",
|
||||
valueFormatString: <%=model.days?model.days:7%> > 2?"DD MMM":"HH:mm DD MMM",
|
||||
crosshair: {
|
||||
enabled: true,
|
||||
snapToDataPoint: true
|
||||
@@ -206,9 +223,9 @@
|
||||
}
|
||||
chart.render();
|
||||
}
|
||||
|
||||
$.getJSON("/n/device/A23_DHT/7", addData);
|
||||
$.getJSON("/n/device/A23_Garden_dht/7", addData);
|
||||
|
||||
$.getJSON("/n/device/A23_DHT/<%= model.days ? model.days : '7' %>", addData);
|
||||
$.getJSON("/n/device/A23_Garden_dht/<%= model.days ? model.days : '7' %>", addData);
|
||||
setTimeout(function(){
|
||||
$.getJSON("/n/dht?e=now", function(data){
|
||||
if(data && data.dht){
|
||||
|
||||
Reference in New Issue
Block a user