226 lines
11 KiB
PHP
226 lines
11 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<title>Teplomer balkon</title>
|
|
|
|
<!-- Fonts -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@200;600&display=swap" rel="stylesheet">
|
|
|
|
<!-- Styles -->
|
|
<style>
|
|
html, body {
|
|
background-color: #fff;
|
|
color: #636b6f;
|
|
font-family: 'Nunito', sans-serif;
|
|
font-weight: 200;
|
|
margin: 0;
|
|
}
|
|
|
|
.full-height {
|
|
}
|
|
|
|
.flex-center {
|
|
align-items: center;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.position-ref {
|
|
position: relative;
|
|
}
|
|
|
|
.top-right {
|
|
position: absolute;
|
|
right: 10px;
|
|
top: 18px;
|
|
}
|
|
|
|
.content {
|
|
text-align: center;
|
|
width: 90%;
|
|
}
|
|
|
|
.title {
|
|
font-size: 84px;
|
|
}
|
|
|
|
.links > a {
|
|
color: #636b6f;
|
|
padding: 0 25px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
letter-spacing: .1rem;
|
|
text-decoration: none;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.m-b-md {
|
|
margin-bottom: 30px;
|
|
}
|
|
</style>
|
|
|
|
|
|
<script src="{{ asset('js/app.js') }}" defer></script>
|
|
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
|
|
|
</head>
|
|
<body>
|
|
<div class="flex-center position-ref full-height">
|
|
@if (Route::has('login'))
|
|
<div class="top-right links">
|
|
@auth
|
|
<a href="{{ url('/home') }}">Home</a>
|
|
@else
|
|
<a href="{{ route('login') }}">Login</a>
|
|
|
|
@if (Route::has('register'))
|
|
<a href="{{ route('register') }}">Register</a>
|
|
@endif
|
|
@endauth
|
|
</div>
|
|
@endif
|
|
|
|
<div class="content" id="app">
|
|
<div class="title m-b-md">
|
|
Teplomer @{{ names[host] }}
|
|
</div>
|
|
|
|
<div>
|
|
<div class="row">
|
|
<vue-thermometer class="justify-content-center col-sm-3" :value="temperature" :min="tmin" :max="tmax"></vue-thermometer>
|
|
<div class="col-sm-9" id="values">
|
|
<div>
|
|
<b-button variant="primary" v-on:click="sethost('balkon')">Balkón</b-button>
|
|
<b-button variant="secondary" v-on:click="sethost('decka')">Decká</b-button>
|
|
<b-button variant="success" v-on:click="sethost('strecha')">Strecha</b-button>
|
|
</div>
|
|
|
|
<vue-table-dynamic :params="params" :key="host"></vue-table-dynamic>
|
|
<ul>
|
|
<li>Čas: @{{time}}</li>
|
|
</ul>
|
|
<div class="row justify-content-center">
|
|
<div class="form-group col-sm-6">
|
|
<div class='input-group time' id='datetimepicker1'>
|
|
<datetime type="datetime" input-class="form-control" placeholder="Od" v-model="startdate"></datetime>
|
|
<span class="input-group-append">
|
|
<span class="input-group-text"><i class="fa fa-calendar"></i></span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group col-sm-6">
|
|
<div class='input-group time' id='datetimepicker2'>
|
|
<datetime type="datetime" input-class="form-control" placeholder="Do" v-model="enddate"></datetime>
|
|
<span class="input-group-append">
|
|
<span class="input-group-text"><i class="fa fa-calendar"></i></span>
|
|
</span>
|
|
<span class="input-group-append">
|
|
<button v-on:click="displayResults()" type="button" class="btn btn-secondary">Zobraz</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<b-card no-body>
|
|
<b-tabs v-model="ti" card lazy>
|
|
<b-tab title="Teplota" @click="resizeGraph(0)">
|
|
<dygraphs ref="dg[0]" :graph-data="series['temperature']" :graph-options="options['temperature']"></dygraphs>
|
|
<br/>
|
|
<!-- Tabs with card integration -->
|
|
<b-card no-body>
|
|
<b-tabs card>
|
|
<b-tab title="Celá doba">
|
|
<div>Štatistika za celú dobu v grafe</div>
|
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'temperature'" :key="componentKey"></stats-table>
|
|
</b-tab>
|
|
<b-tab title="Hodina">
|
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'temperature'" :range="'1h'" :key="componentKey"></stats-table>
|
|
</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-card>
|
|
</b-tab>
|
|
<b-tab title="Vlhkosť" @click="resizeGraph(1)">
|
|
<dygraphs ref="dg[1]" :graph-data="series['humidity']" :graph-options="options['humidity']"></dygraphs>
|
|
<b-card no-body>
|
|
<b-tabs card>
|
|
<b-tab title="Celá doba">
|
|
<div>Štatistika za celú dobu v grafe</div>
|
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'humidity'" :key="componentKey"></stats-table>
|
|
</b-tab>
|
|
<b-tab title="Hodina">
|
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'humidity'" :range="'1h'" :key="componentKey"></stats-table>
|
|
</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-card>
|
|
</b-tab>
|
|
<b-tab title="Tlak" @click="resizeGraph(2)">
|
|
<dygraphs ref="dg[2]" :graph-data="series['pressure']" :graph-options="options['pressure']"></dygraphs>
|
|
<b-card no-body>
|
|
<b-tabs card>
|
|
<b-tab title="Celá doba">
|
|
<div>Štatistika za celú dobu v grafe</div>
|
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'pressure'" :key="componentKey"></stats-table>
|
|
</b-tab>
|
|
<b-tab title="Hodina">
|
|
<stats-table :fromdate="startdate" :todate="enddate" :type="'pressure'" :range="'1h'" :key="componentKey"></stats-table>
|
|
</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-card>
|
|
</b-tab>
|
|
</b-tabs>
|
|
</b-card>
|
|
<div v-if="host == 'strecha'">
|
|
<div class="h4 mt-3 bg-info">Aktuálny obrázok z kamery</div>
|
|
<img class="img-fluid" src="{{ url('upload/images/camera.jpg') }}" alt="" title="" />
|
|
<div class="h4 mt-3 bg-info">Galeria</div>
|
|
<b-tabs card lazy>
|
|
<b-tab title="Dnešok">
|
|
<vue-picture-swipe ref="ps" :items="images['0']"></vue-picture-swipe>
|
|
</b-tab>
|
|
<b-tab title="Včerajšok">
|
|
<vue-picture-swipe :items="images['-1']"></vue-picture-swipe>
|
|
</b-tab>
|
|
<b-tab title="Predvčerajšok">
|
|
<vue-picture-swipe :items="images['-2']"></vue-picture-swipe>
|
|
</b-tab>
|
|
<b-tab title="Zvoľ">
|
|
<div class="form-group col-sm-6">
|
|
<div class='input-group time' id='datetimepicker3'>
|
|
<datetime type="date" input-class="form-control" placeholder="Dátum" v-model="date4search"></datetime>
|
|
<span class="input-group-append">
|
|
<span class="input-group-text"><i class="fa fa-calendar"></i></span>
|
|
</span>
|
|
<span class="input-group-append">
|
|
<button v-on:click="getImagesForDate()" type="button" class="btn btn-secondary">Zobraz</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<vue-picture-swipe :items="images['selected']"></vue-picture-swipe>
|
|
</b-tab>
|
|
</b-tabs>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|