1 |
0b27c108
|
Jan Kohlíček
|
<!doctype html>
|
2 |
|
|
<html ng-app="pvpk" class="no-js" lang="cs">
|
3 |
|
|
<head>
|
4 |
|
|
<meta charset="utf-8">
|
5 |
|
|
<title>Průjezd vozidel - Plzeňský kraj</title>
|
6 |
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
7 |
|
|
|
8 |
|
|
<meta name="description" content="Zobrazení dat o průjezdu vozidel pro Plzeňský kraj">
|
9 |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
10 |
|
|
|
11 |
|
|
<link rel="apple-touch-icon" href="./assets/img/favicon.png">
|
12 |
|
|
<link rel="icon" href="./assets/img/favicon.png">
|
13 |
|
|
|
14 |
|
|
<script>
|
15 |
|
|
document.documentElement.className = document.documentElement.className.replace("no-js", "js");
|
16 |
|
|
</script>
|
17 |
|
|
|
18 |
|
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
|
19 |
|
|
integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
20 |
|
|
<link rel="stylesheet" media="screen" href="./assets/css/main.css">
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
|
24 |
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.min.js"></script>
|
25 |
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-resource.min.js"></script>
|
26 |
|
|
|
27 |
|
|
<script>
|
28 |
|
|
<?php
|
29 |
|
|
/* JEN PRO TESTOVANI, POZDEJI SE ODSTRANIT, A NAHRADIT NASDILENOU KNIHOVNOU */
|
30 |
|
|
$base_url = 'http://localhost/pvpk/backend/public/api/v1';
|
31 |
|
|
|
32 |
|
|
include_once '../backend/lib/generateToken.php';
|
33 |
|
|
$token = generateToken();
|
34 |
|
|
?>
|
35 |
|
|
var API_URL = '<?=$base_url ?>';
|
36 |
|
|
var API_TOKEN = '<?=$token ?>';
|
37 |
|
|
</script>
|
38 |
|
|
|
39 |
|
|
<script src="./app.js"></script>
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
|
43 |
|
|
</head>
|
44 |
|
|
<body ng-controller="mainController" class="container-fluid">
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
<div id="loadingScreen" ng-show="showLoadingScreen">
|
50 |
|
|
<div class="loading"></div>
|
51 |
|
|
</div>
|
52 |
|
|
<div class="row h-100">
|
53 |
|
|
|
54 |
|
|
<section class="search col-12 col-sm-6 col-lg-3" id="search" ng-controller="searchController">
|
55 |
|
|
|
56 |
|
|
<div class="w-100 searchWrapper">
|
57 |
|
|
<header class="mt-2">
|
58 |
|
|
<h1>
|
59 |
|
|
<img src="./assets/img/favicon.png" alt="logo"> Průjezd vozidel
|
60 |
|
|
<small class="text-muted">Plzeňský kraj</small>
|
61 |
|
|
</h1>
|
62 |
|
|
</header>
|
63 |
|
|
|
64 |
|
|
<form class="mb-4 mt-4">
|
65 |
|
|
<div class="form-group">
|
66 |
|
|
<label for="searchLocation" class="h5">Hledání - lokalit</label>
|
67 |
|
|
<input type="search" id="searchLocation" name="location"
|
68 |
|
|
class="form-control form-control-sm" placeholder="Město, ulice, ..."
|
69 |
|
|
ng-model="search.location" required maxlength="255" autocomplete="off"
|
70 |
|
|
ng-change="search.location.length>2 && searchLocations(true)">
|
71 |
|
|
</div>
|
72 |
|
|
|
73 |
|
|
<div class="custom-control custom-checkbox mb-3">
|
74 |
|
|
<!-- ng-true-value="ofCourse" ng-false-value="iWish" -->
|
75 |
|
|
<input type="checkbox" id="searchDirection" name="searchDirection" class="custom-control-input"
|
76 |
|
|
checked ng-model="search.direction" required ng-change="searchLocations()">
|
77 |
|
|
<label for="searchDirection" class="custom-control-label">Rozlišovat směr</label>
|
78 |
|
|
</div>
|
79 |
|
|
|
80 |
|
|
<div class="form-row">
|
81 |
|
|
<div class="form-group col">
|
82 |
|
|
<label for="searchFromDate">Období</label>
|
83 |
|
|
<input type="date" id="searchFromDate" name="fromDate"
|
84 |
|
|
class="form-control form-control-sm" ng-model="search.fromDate" required
|
85 |
|
|
ng-class="{ 'is-invalid': search.fromDate>search.toDate}">
|
86 |
|
|
<div class="invalid-feedback">
|
87 |
|
|
Tento datum musí být menší.
|
88 |
|
|
</div>
|
89 |
|
|
</div>
|
90 |
|
|
|
91 |
|
|
<div class="form-group col">
|
92 |
|
|
<label for="searchToDate" class="invisible">Období</label>
|
93 |
|
|
<input type="date" id="searchToDate" name="toDateTime"
|
94 |
|
|
class="form-control form-control-sm" ng-model="search.toDate" required
|
95 |
|
|
ng-class="{ 'is-invalid': search.fromDate>search.toDate}">
|
96 |
|
|
<div class="invalid-feedback">
|
97 |
|
|
Tento datum musí být vetší.
|
98 |
|
|
</div>
|
99 |
|
|
</div>
|
100 |
|
|
</div>
|
101 |
|
|
|
102 |
|
|
<div class="form-row">
|
103 |
|
|
<div class="form-group col">
|
104 |
|
|
<label for="searchFromTime">Časové rozmezí dne</label>
|
105 |
|
|
<input type="time" id="searchFromTime" class="form-control form-control-sm"
|
106 |
|
|
ng-model="search.fromTime" required
|
107 |
|
|
ng-class="{'is-invalid': search.fromTime>search.toTime}">
|
108 |
|
|
<div class="invalid-feedback">
|
109 |
|
|
Tento čas musí být menší.
|
110 |
|
|
</div>
|
111 |
|
|
</div>
|
112 |
|
|
|
113 |
|
|
<div class="form-group col">
|
114 |
|
|
<label for="searchToTime" class="invisible">Časové rozmezí dne</label>
|
115 |
|
|
<input type="time" id="searchToTime" class="form-control form-control-sm"
|
116 |
|
|
ng-model="search.toTime" required
|
117 |
|
|
ng-class="{'is-invalid': search.fromTime>search.toTime}">
|
118 |
|
|
<div class="invalid-feedback">
|
119 |
|
|
Tento čas musí být vetší.
|
120 |
|
|
</div>
|
121 |
|
|
</div>
|
122 |
|
|
</div>
|
123 |
|
|
|
124 |
|
|
<!--<input type="submit" value="Vyhledat" class="btn btn-primary btn-block"-->
|
125 |
|
|
<!--ng-disabled="search.fromDate>search.toDate || search.fromTime>search.toTime">-->
|
126 |
|
|
</form>
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
<div class="result-locations mb-5 mt-5">
|
130 |
|
|
<h5>Lokality</h5>
|
131 |
|
|
|
132 |
|
|
<div class="list-group" ng-show="locations.length>0 && !showLocationsLoading">
|
133 |
|
|
<!-- class = active -->
|
134 |
|
|
<a href="" id="location-{{location.id}}"
|
135 |
|
|
class="list-group-item list-group-item-action flex-column align-items-start"
|
136 |
|
|
ng-repeat="location in locations"
|
137 |
|
|
ng-click="selectDevice(location.id)"
|
138 |
|
|
ng-class="{'active': deviceId == location.id}">
|
139 |
|
|
|
140 |
|
|
<div class="d-flex w-100 justify-content-between">
|
141 |
|
|
<h6 class="mb-1">{{location.name}}</h6>
|
142 |
|
|
<small ng-show="search.direction">{{location.direction ==1 ? 'po směru': 'proti směru' }}
|
143 |
|
|
</small>
|
144 |
|
|
</div>
|
145 |
|
|
<small>
|
146 |
|
|
<address>{{location.street}}, {{location.town}}</address>
|
147 |
|
|
</small>
|
148 |
|
|
</a>
|
149 |
|
|
</div>
|
150 |
|
|
|
151 |
|
|
<div ng-show="locations.length==0 && !showLocationsLoading">
|
152 |
|
|
<small class="form-text text-muted text-center">Žádná lokalita</small>
|
153 |
|
|
</div>
|
154 |
|
|
|
155 |
|
|
<div class="loading" ng-show="showLocationsLoading"></div>
|
156 |
|
|
|
157 |
|
|
</div>
|
158 |
|
|
|
159 |
|
|
</div>
|
160 |
|
|
<footer class="text-center mb-2 mt-2 w-100">
|
161 |
|
|
<small class="text-muted">2018 © FAV, ZČU</small>
|
162 |
|
|
</footer>
|
163 |
|
|
</section>
|
164 |
|
|
|
165 |
|
|
|
166 |
|
|
<!--graph section-->
|
167 |
|
|
<section class="graph col-12 col-sm-6 col-lg-3" id="graph" ng-show="$root.graphShow"
|
168 |
|
|
ng-controller="graphController">
|
169 |
|
|
|
170 |
|
|
<header class="mt-2">
|
171 |
|
|
|
172 |
|
|
<h4>Grafy
|
173 |
|
|
<button type="button" class="close" aria-label="Close" ng-click="$root.graphShow = !$root.graphShow">
|
174 |
|
|
<span aria-hidden="true">×</span>
|
175 |
|
|
</button>
|
176 |
|
|
</h4>
|
177 |
|
|
</header>
|
178 |
|
|
|
179 |
|
|
<form>
|
180 |
|
|
<div class="form-group">
|
181 |
|
|
<label for="searchVehicle">Vozidla</label>
|
182 |
|
|
<select id="searchVehicle" class="custom-select custom-select-sm" ng-model="search.vehicle">
|
183 |
|
|
<option value="">Všechna vozidla</option>
|
184 |
|
|
<option ng-repeat="vehicle in vehicles" value="{{vehicle.id}}">{{vehicle.name}}</option>
|
185 |
|
|
</select>
|
186 |
|
|
</div>
|
187 |
|
|
|
188 |
|
|
</form>
|
189 |
|
|
|
190 |
|
|
<div class="loading"></div>
|
191 |
|
|
|
192 |
|
|
<!--<canvas id="myChart" width="100%" height="60"></canvas>-->
|
193 |
|
|
<!--<script>-->
|
194 |
|
|
<!--var ctx = document.getElementById("myChart").getContext('2d');-->
|
195 |
|
|
<!--var myChart = new Chart(ctx, {-->
|
196 |
|
|
<!--type: 'bar',-->
|
197 |
|
|
<!--data: {-->
|
198 |
|
|
<!--labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],-->
|
199 |
|
|
<!--datasets: [{-->
|
200 |
|
|
<!--label: '# of Votes',-->
|
201 |
|
|
<!--data: [12, 19, 3, 5, 2, 3],-->
|
202 |
|
|
<!--backgroundColor: [-->
|
203 |
|
|
<!--'rgba(255, 99, 132, 0.2)',-->
|
204 |
|
|
<!--'rgba(54, 162, 235, 0.2)',-->
|
205 |
|
|
<!--'rgba(255, 206, 86, 0.2)',-->
|
206 |
|
|
<!--'rgba(75, 192, 192, 0.2)',-->
|
207 |
|
|
<!--'rgba(153, 102, 255, 0.2)',-->
|
208 |
|
|
<!--'rgba(255, 159, 64, 0.2)'-->
|
209 |
|
|
<!--],-->
|
210 |
|
|
<!--borderColor: [-->
|
211 |
|
|
<!--'rgba(255,99,132,1)',-->
|
212 |
|
|
<!--'rgba(54, 162, 235, 1)',-->
|
213 |
|
|
<!--'rgba(255, 206, 86, 1)',-->
|
214 |
|
|
<!--'rgba(75, 192, 192, 1)',-->
|
215 |
|
|
<!--'rgba(153, 102, 255, 1)',-->
|
216 |
|
|
<!--'rgba(255, 159, 64, 1)'-->
|
217 |
|
|
<!--],-->
|
218 |
|
|
<!--borderWidth: 1-->
|
219 |
|
|
<!--}]-->
|
220 |
|
|
<!--},-->
|
221 |
|
|
<!--options: {-->
|
222 |
|
|
<!--scales: {-->
|
223 |
|
|
<!--yAxes: [{-->
|
224 |
|
|
<!--ticks: {-->
|
225 |
|
|
<!--beginAtZero: true-->
|
226 |
|
|
<!--}-->
|
227 |
|
|
<!--}]-->
|
228 |
|
|
<!--}-->
|
229 |
|
|
<!--}-->
|
230 |
|
|
<!--});-->
|
231 |
|
|
<!--</script>-->
|
232 |
|
|
|
233 |
|
|
</section>
|
234 |
|
|
|
235 |
|
|
|
236 |
|
|
<!--map section-->
|
237 |
|
|
<!-- ng-class="textType" -->
|
238 |
|
|
<section class="map col-12 col-sm-12" id="map"
|
239 |
|
|
ng-class="{ 'col-lg-9': !$root.graphShow, 'col-lg-6': $root.graphShow }" ng-controller="mapController">
|
240 |
|
|
|
241 |
|
|
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1326226.1771813703!2d11.996870042985256!3d49.51688547407959!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x470abf4bb3db6569%3A0x100af0f6614a850!2zUGx6ZcWIc2vDvSBrcmFq!5e0!3m2!1scs!2scz!4v1523814169200"
|
242 |
|
|
width="100%" height="100%" frameborder="0" style="border:0" allowfullscreen></iframe>
|
243 |
|
|
</section>
|
244 |
|
|
|
245 |
|
|
|
246 |
|
|
</div>
|
247 |
|
|
|
248 |
|
|
<div class="modal fade" id="modalExpiredToken" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
249 |
|
|
aria-hidden="true">
|
250 |
|
|
<div class="modal-dialog" role="document">
|
251 |
|
|
<div class="modal-content">
|
252 |
|
|
<div class="modal-header">
|
253 |
|
|
<h5 class="modal-title" id="exampleModalLabel">Platnost webové aplikace vypršela</h5>
|
254 |
|
|
</div>
|
255 |
|
|
<div class="modal-body">
|
256 |
|
|
<p>Pro obnovení platnosti stačí stisknout tlačítko <strong>Obnovit</strong>.</p>
|
257 |
|
|
</div>
|
258 |
|
|
<div class="modal-footer">
|
259 |
|
|
<button type="button" class="btn btn-primary" ng-click="reloadApp()">Obnovit</button>
|
260 |
|
|
</div>
|
261 |
|
|
</div>
|
262 |
|
|
</div>
|
263 |
|
|
</div>
|
264 |
|
|
|
265 |
|
|
|
266 |
|
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
267 |
|
|
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
268 |
|
|
crossorigin="anonymous"></script>
|
269 |
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"
|
270 |
|
|
integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm"
|
271 |
|
|
crossorigin="anonymous"></script>
|
272 |
|
|
|
273 |
|
|
|
274 |
|
|
</body>
|
275 |
|
|
</html>
|