Projekt

Obecné

Profil

« Předchozí | Další » 

Revize fb12df6d

Přidáno uživatelem Jan Kohlíček před téměř 7 roky(ů)

refs #7014: přidané grafy denní průměry, optimalizace API, styly převedeny do SASS, zvětšený prostor pro grafy

Zobrazit rozdíly:

frontend/index.php
13 13

  
14 14
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
15 15
          integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
16
    <link rel="stylesheet" media="screen" href="./assets/css/main.css">
16
    <link rel="stylesheet" media="screen" href="./assets/css/styles.min.css">
17 17

  
18 18
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.10/angular.min.js"></script>
19 19
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.10/angular-route.min.js"></script>
......
21 21
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.10/angular-sanitize.min.js"></script>
22 22

  
23 23
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
24
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.min.js"></script>
24
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
25 25

  
26 26

  
27 27
    <script>
......
55 55
<div class="row h-100" ng-init="load()">
56 56

  
57 57
    <!--SEARCH section-->
58
    <section class="search col-12 col-sm-6 col-lg-3" id="search" ng-controller="searchController"
59
             ng-class="{ 'col-sm-12': $root.selectDevice==null, 'col-sm-6': $root.selectDevice!=null }">
58
    <section class="search col-12 col-lg-3" id="search" ng-controller="searchController">
60 59

  
61 60
        <div class="w-100 searchWrapper">
62 61
            <header class="mt-2">
......
76 75
                           ng-model-options="{debounce: 600}">
77 76
                </div>
78 77
                <div class="custom-control custom-checkbox mb-3">
79
                    <input type="checkbox" id="searchDirection" name="searchDirection" class="custom-control-input"
78
                    <input type="checkbox" id="searchIsDirection" name="searchIsDirection" class="custom-control-input"
80 79
                           checked required
81 80
                           ng-model="search.isDirection"
82 81
                           ng-change="searchLocations()"
83 82
                           ng-model-options="{debounce: 600}">
84
                    <label for="searchDirection" class="custom-control-label">Rozlišovat směr</label>
83
                    <label for="searchIsDirection" class="custom-control-label">Rozlišovat směr</label>
85 84
                </div>
86 85
            </form>
87 86

  
......
114 113
            </div>
115 114
        </div>
116 115
        <footer class="text-center mb-2 mt-2 w-100">
117
            <small class="text-muted">2018 © FAV, ZČU</small>
116
            <small class="text-muted">© 2018 FAV, ZČU • version: {{ config.APP_VERSION }}</small>
118 117
        </footer>
119 118
    </section>
120 119

  
121 120

  
122 121
    <!--INFO section-->
123
    <section class="info col-12 col-sm-6 col-lg-4" id="info" ng-show="$root.selectDevice!=null"
122
    <section class="info col-12 col-lg-5" id="info" ng-show="$root.selectDevice!=null"
124 123
             ng-controller="infoController">
125 124

  
126 125
        <header class="mt-2">
......
163 162
                </div>
164 163
            </div>
165 164

  
165

  
166 166
            <div class="form-row">
167 167
                <div class="form-group col">
168
                    <label for="rangehFromTime">Časové rozmezí dne</label>
168
                    <label for="rangeFromTime">
169
                        <div class="custom-control custom-checkbox">
170
                            <input type="checkbox" id="rangeIsTime" name="rangeIsTime" class="custom-control-input"
171
                                   checked required
172
                                   ng-model="range.isTime"
173
                                   ng-model-options="{debounce: 300}"
174
                                   ng-change="changeRange()">
175
                            <label for="rangeIsTime" class="custom-control-label">Zobrazit časové rozmezí dne</label>
176
                        </div>
177
                    </label>
169 178
                    <input type="time" id="rangeFromTime" class="form-control form-control-sm"
170 179
                           ng-model="range.fromTime" required
171 180
                           ng-class="{'is-invalid': range.fromTime>=range.toTime}"
172 181
                           ng-change="changeRange()"
173
                           ng-model-options="{debounce: 600}">
174
                    <div class="invalid-feedback">
182
                           ng-model-options="{debounce: 600}"
183
                           ng-show="range.isTime">
184
                    <div class="invalid-feedback" ng-show="range.isTime">
175 185
                        Tento čas musí být menší.
176 186
                    </div>
177 187
                </div>
......
182 192
                           ng-model="range.toTime" required
183 193
                           ng-class="{'is-invalid': range.fromTime>=range.toTime}"
184 194
                           ng-change="changeRange()"
185
                           ng-model-options="{debounce: 600}">
186
                    <div class="invalid-feedback">
195
                           ng-model-options="{debounce: 600}"
196
                           ng-show="range.isTime">
197
                    <div class="invalid-feedback" ng-show="range.isTime">
187 198
                        Tento čas musí být vetší.
188 199
                    </div>
189 200
                </div>
190 201
            </div>
191 202
        </div>
192 203

  
193

  
194 204
        <div class="loading" ng-show="showInfoLoading"></div>
195 205

  
196 206
        <div id="graphs" ng-show="$root.selectDevice!=null && $root.selectDevice.traffics.length>0 && !showInfoLoading">
197 207
            <h4 class="mt-4">Průměrná rychlost</h4>
198 208
            <canvas id="graphAverageSpeed"></canvas>
199 209

  
200

  
201 210
            <h4 class="mt-4">Počet vozidel</h4>
202
            <form>
203
                <div class="form-group">
204
                    <select id="typeVehicle" class="custom-select custom-select-sm"
205
                            ng-model="typeVehicle"
206
                            ng-change="renderGraphNumberVehicles()"
207
                            ng-options="vehicle.id as vehicle.name for vehicle in filterVehicles">
208
                        <option value="">Všechna vozidla</option>
209
                    </select>
210
                </div>
211
            </form>
212
            <canvas id="graphNumberVehicles"></canvas>
211
            <canvas id="graphNumberVehicles" class="mb-5"></canvas>
213 212

  
213
            <div class="text-center mb-2 mt-2 w-100">
214
                <small class="text-muted">zdroj dat: <a target="_blank" href="https://doprava.plzensky-kraj.cz">doprava.plzensky-kraj.cz</a>
215
                </small>
216
            </div>
214 217
        </div>
215 218

  
216 219
        <div ng-show="$root.selectDevice && $root.selectDevice.traffics.length==0 && !showInfoLoading">
217 220
            <small class="form-text text-muted text-center">Data nejsou k dispozici</small>
218 221
        </div>
219

  
220

  
221 222
    </section>
222 223

  
223

  
224 224
    <!--MAP section-->
225
    <section class="map col-12 col-sm-12 " id="map"
226
             ng-class="{ 'col-lg-9': $root.selectDevice==null, 'col-lg-5': $root.selectDevice!=null }"
225
    <section class="map col-12" id="map"
226
             ng-class="{ 'col-lg-9': $root.selectDevice==null, 'col-lg-4': $root.selectDevice!=null }"
227 227
             ng-controller="mapController">
228 228
    </section>
229 229
</div>
......
257 257
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCSx7hyAzQiG5uocJTeZgf1Z3lpDy4kpEk"
258 258
        type="text/javascript"></script>
259 259

  
260
<script type="text/javascript" src="./assets/libs/gmaps.min.js"></script>
261

  
262 260
</body>
263 261
</html>

Také k dispozici: Unified diff