log shows only temperatures

This commit is contained in:
Senad Uka
2016-12-30 17:14:08 +01:00
parent f52bcbeb14
commit c51755b96a
7 changed files with 18 additions and 19 deletions

View File

@@ -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")
}
});

View File

@@ -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;
}

View File

@@ -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}}

View File

@@ -22,7 +22,7 @@ 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 = '';

View File

@@ -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>

View File

@@ -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")
}
});

View File

@@ -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'}}