Pridanie statistik v grafe po 1 dni a zvacsenie ikon
This commit is contained in:
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -44,7 +44,11 @@ export default {
|
|||||||
if (that.range) {
|
if (that.range) {
|
||||||
for (var i = 0; i < response.data.length; i++) {
|
for (var i = 0; i < response.data.length; i++) {
|
||||||
var row = response.data[i];
|
var row = response.data[i];
|
||||||
let time = moment(row.time).format('LLL');
|
if (response.config.params.range == '1d')
|
||||||
|
var fmt = 'LL';
|
||||||
|
else
|
||||||
|
var fmt = 'LLL';
|
||||||
|
let time = moment(row.time).format(fmt);
|
||||||
let mean = null;
|
let mean = null;
|
||||||
if (row.mean != null) {
|
if (row.mean != null) {
|
||||||
mean = row.mean.toFixed(2);
|
mean = row.mean.toFixed(2);
|
||||||
|
|||||||
@@ -121,12 +121,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<b-card no-body>
|
<b-card no-body>
|
||||||
<b-tabs v-model="ti" small card lazy>
|
<b-tabs v-model="ti" card lazy>
|
||||||
<b-tab title="Teplota" @click="resizeGraph(0)">
|
<b-tab title="Teplota" @click="resizeGraph(0)">
|
||||||
<dygraphs ref="dg[0]" :graph-data="series['temperature']" :graph-options="options['temperature']"></dygraphs>
|
<dygraphs ref="dg[0]" :graph-data="series['temperature']" :graph-options="options['temperature']"></dygraphs>
|
||||||
|
<br/>
|
||||||
<!-- Tabs with card integration -->
|
<!-- Tabs with card integration -->
|
||||||
<b-card no-body>
|
<b-card no-body>
|
||||||
<b-tabs small card>
|
<b-tabs card>
|
||||||
<b-tab title="Celá doba">
|
<b-tab title="Celá doba">
|
||||||
<div>Štatistika za celú dobu v grafe</div>
|
<div>Štatistika za celú dobu v grafe</div>
|
||||||
<stats-table :fromdate="startdate" :todate="enddate" :type="'temperature'" :key="componentKey"></stats-table>
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'temperature'" :key="componentKey"></stats-table>
|
||||||
@@ -134,13 +135,16 @@
|
|||||||
<b-tab title="Hodina">
|
<b-tab title="Hodina">
|
||||||
<stats-table :fromdate="startdate" :todate="enddate" :type="'temperature'" :range="'1h'" :key="componentKey"></stats-table>
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'temperature'" :range="'1h'" :key="componentKey"></stats-table>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
|
<b-tab title="Deň" v-if="startdate">
|
||||||
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'temperature'" :range="'1d'" :key="componentKey"></stats-table>
|
||||||
|
</b-tab>
|
||||||
</b-tabs>
|
</b-tabs>
|
||||||
</b-card>
|
</b-card>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
<b-tab title="Vlhkosť" @click="resizeGraph(1)">
|
<b-tab title="Vlhkosť" @click="resizeGraph(1)">
|
||||||
<dygraphs ref="dg[1]" :graph-data="series['humidity']" :graph-options="options['humidity']"></dygraphs>
|
<dygraphs ref="dg[1]" :graph-data="series['humidity']" :graph-options="options['humidity']"></dygraphs>
|
||||||
<b-card no-body>
|
<b-card no-body>
|
||||||
<b-tabs small card>
|
<b-tabs card>
|
||||||
<b-tab title="Celá doba">
|
<b-tab title="Celá doba">
|
||||||
<div>Štatistika za celú dobu v grafe</div>
|
<div>Štatistika za celú dobu v grafe</div>
|
||||||
<stats-table :fromdate="startdate" :todate="enddate" :type="'humidity'" :key="componentKey"></stats-table>
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'humidity'" :key="componentKey"></stats-table>
|
||||||
@@ -148,13 +152,16 @@
|
|||||||
<b-tab title="Hodina">
|
<b-tab title="Hodina">
|
||||||
<stats-table :fromdate="startdate" :todate="enddate" :type="'humidity'" :range="'1h'" :key="componentKey"></stats-table>
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'humidity'" :range="'1h'" :key="componentKey"></stats-table>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
|
<b-tab title="Deň" v-if="startdate">
|
||||||
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'humidity'" :range="'1d'" :key="componentKey"></stats-table>
|
||||||
|
</b-tab>
|
||||||
</b-tabs>
|
</b-tabs>
|
||||||
</b-card>
|
</b-card>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
<b-tab title="Tlak" @click="resizeGraph(2)">
|
<b-tab title="Tlak" @click="resizeGraph(2)">
|
||||||
<dygraphs ref="dg[2]" :graph-data="series['pressure']" :graph-options="options['pressure']"></dygraphs>
|
<dygraphs ref="dg[2]" :graph-data="series['pressure']" :graph-options="options['pressure']"></dygraphs>
|
||||||
<b-card no-body>
|
<b-card no-body>
|
||||||
<b-tabs small card>
|
<b-tabs card>
|
||||||
<b-tab title="Celá doba">
|
<b-tab title="Celá doba">
|
||||||
<div>Štatistika za celú dobu v grafe</div>
|
<div>Štatistika za celú dobu v grafe</div>
|
||||||
<stats-table :fromdate="startdate" :todate="enddate" :type="'pressure'" :key="componentKey"></stats-table>
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'pressure'" :key="componentKey"></stats-table>
|
||||||
@@ -162,6 +169,9 @@
|
|||||||
<b-tab title="Hodina">
|
<b-tab title="Hodina">
|
||||||
<stats-table :fromdate="startdate" :todate="enddate" :type="'pressure'" :range="'1h'" :key="componentKey"></stats-table>
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'pressure'" :range="'1h'" :key="componentKey"></stats-table>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
|
<b-tab title="Deň" v-if="startdate">
|
||||||
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'pressure'" :range="'1d'" :key="componentKey"></stats-table>
|
||||||
|
</b-tab>
|
||||||
</b-tabs>
|
</b-tabs>
|
||||||
</b-card>
|
</b-card>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
|
|||||||
Reference in New Issue
Block a user