log shows only temperatures
This commit is contained in:
@@ -45,9 +45,3 @@ Template.alarm_settings.events({
|
|||||||
Meteor.call('saveAlarmSettings', controller_id, minTemperature, maxTemperature, timeoutBox, timeoutPhone, [sms1, sms2, sms3, sms4]);
|
Meteor.call('saveAlarmSettings', controller_id, minTemperature, maxTemperature, timeoutBox, timeoutPhone, [sms1, sms2, sms3, sms4]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.sensorData.helpers({
|
|
||||||
created_at_formatted: function() {
|
|
||||||
return moment(this.created_at).format("DD.MM.YYYY, HH:mm")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -10,6 +10,10 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-bullets {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
.huge_text {
|
.huge_text {
|
||||||
font-size: 2.5em;
|
font-size: 2.5em;
|
||||||
}
|
}
|
||||||
@@ -47,3 +51,10 @@
|
|||||||
.clickable {
|
.clickable {
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sensorData {
|
||||||
|
color: #101010;
|
||||||
|
font-family: 'PT Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
<template name="log">
|
<template name="log">
|
||||||
|
|
||||||
<div class="hello">
|
<div class="hello">
|
||||||
<h1> Podaci sa senzora: </h1>
|
|
||||||
<button id="clear_log">Očisti</button>
|
<ul class="no-bullets">
|
||||||
<ul>
|
|
||||||
{{#each sensorDataCollection}}
|
{{#each sensorDataCollection}}
|
||||||
{{> sensorData}}
|
{{> sensorData}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ Template.log.events({
|
|||||||
|
|
||||||
Template.sensorData.helpers({
|
Template.sensorData.helpers({
|
||||||
created_at_formatted: function() {
|
created_at_formatted: function() {
|
||||||
return moment(this.created_at).format("DD.MM.YYYY, HH:mm")
|
return moment(this.created_at).format(/*"DD.MM.YYYY, */ " (HH:mm)")
|
||||||
},
|
},
|
||||||
all_temperatures: function(temperatures) {
|
all_temperatures: function(temperatures) {
|
||||||
var result = '';
|
var result = '';
|
||||||
if (temperatures.length > 0) {
|
if (temperatures.length > 0) {
|
||||||
for (var i in temperatures) {
|
for (var i in temperatures) {
|
||||||
result += '' + parseFloat(temperatures[i]).toFixed(1) + ' °C ';
|
result += '' + parseFloat(temperatures[i]).toFixed(1) + ' °C ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
<template name="sensorData">
|
<template name="sensorData">
|
||||||
<li>{{owner}} / <strong>{{temperatureValue}}°C {{all_temperatures temperatures}}</strong> / <strong>{{humidityValue}}%</strong> / Bačva puna: <strong>{{tankFull}}</strong> (L0:{{tankLevel0}}-L1:{{tankLevel1}}-L2:{{tankLevel2}}-L3:{{tankLevel3}}-L4:{{tankLevel4}}-full:{{tankFull}}) / {{created_at_formatted}}</li>
|
<!--<li>{{owner}} / <strong>{{temperatureValue}}°C {{all_temperatures temperatures}}</strong> / <strong>{{humidityValue}}%</strong> / Bačva puna: <strong>{{tankFull}}</strong> (L0:{{tankLevel0}}-L1:{{tankLevel1}}-L2:{{tankLevel2}}-L3:{{tankLevel3}}-L4:{{tankLevel4}}-full:{{tankFull}}) / {{created_at_formatted}}</li> -->
|
||||||
|
<li class="sensorData"><strong>{{all_temperatures temperatures}}</strong> {{created_at_formatted}}</li>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -35,9 +35,3 @@ Template.settings.events({
|
|||||||
Meteor.call('saveControllerConfig', controller_id, selectedTime, selectedDays, manualInflow);
|
Meteor.call('saveControllerConfig', controller_id, selectedTime, selectedDays, manualInflow);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.sensorData.helpers({
|
|
||||||
created_at_formatted: function() {
|
|
||||||
return moment(this.created_at).format("DD.MM.YYYY, HH:mm")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if accessible 'log'}}
|
{{#if accessible 'log'}}
|
||||||
<li role="presentation" class="{{ class_for 'log' }}"><a class="clickable">Novosti</a></li>
|
<li role="presentation" class="{{ class_for 'log' }}"><a class="clickable">Danas</a></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if accessible 'surveillance'}}
|
{{#if accessible 'surveillance'}}
|
||||||
|
|||||||
Reference in New Issue
Block a user