Mercurial > gemma
annotate client/src/store/gauges.js @ 2920:c1f2b9148cc8
client: removed more unnecessary closing tags and opzimized imports
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Wed, 03 Apr 2019 16:23:25 +0200 |
parents | 0632d543a427 |
children | 1b8bb4f89227 |
rev | line source |
---|---|
2590
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
1 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
2 * without warranty, see README.md and license for details. |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
3 * |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
4 * SPDX-License-Identifier: AGPL-3.0-or-later |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
5 * License-Filename: LICENSES/AGPL-3.0.txt |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
6 * |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
7 * Copyright (C) 2018 by via donau |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
8 * – Österreichische Wasserstraßen-Gesellschaft mbH |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
9 * Software engineering by Intevation GmbH |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
10 * |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
11 * Author(s): |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
12 * Markus Kottländer <markus@intevation.de> |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
13 */ |
2596
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
14 import { HTTP } from "@/lib/http"; |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
15 import { WFS } from "ol/format.js"; |
2764
f0846d200ce4
client: waterlevel diagram: remove past predictions from waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2761
diff
changeset
|
16 import { isPast } from "date-fns"; |
2590
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
17 |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
18 let dateFrom = new Date(); |
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
19 dateFrom.setDate(dateFrom.getDate() - 30); |
2775
2feb9f8f6c66
client: waterlevel diagram: implemented display of forecast data
Markus Kottlaender <markus@intevation.de>
parents:
2764
diff
changeset
|
20 let dateTo = new Date(); |
2feb9f8f6c66
client: waterlevel diagram: implemented display of forecast data
Markus Kottlaender <markus@intevation.de>
parents:
2764
diff
changeset
|
21 dateTo.setDate(dateTo.getDate() + 3); |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
22 |
2590
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
23 const init = () => { |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
24 return { |
2596
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
25 gauges: [], |
2643
27933e66e848
client: gauges: use isrs_code as unique id for gauges
Markus Kottlaender <markus@intevation.de>
parents:
2604
diff
changeset
|
26 selectedGaugeISRS: null, |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
27 waterlevels: [], |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
28 longtermWaterlevels: [], |
2830
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
29 longtermInterval: [], |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
30 yearWaterlevels: [], |
2751
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
31 nashSutcliffe: null, |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
32 dateFrom: dateFrom, |
2829
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
33 dateTo: dateTo, |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
34 yearCompare: new Date().getFullYear() |
2590
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
35 }; |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
36 }; |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
37 |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
38 export default { |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
39 init, |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
40 namespaced: true, |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
41 state: init(), |
2604
85f9bf4a6eba
client: gauge waterlevel diagram: draw reference waterlevels
Markus Kottlaender <markus@intevation.de>
parents:
2596
diff
changeset
|
42 getters: { |
85f9bf4a6eba
client: gauge waterlevel diagram: draw reference waterlevels
Markus Kottlaender <markus@intevation.de>
parents:
2596
diff
changeset
|
43 selectedGauge: state => { |
85f9bf4a6eba
client: gauge waterlevel diagram: draw reference waterlevels
Markus Kottlaender <markus@intevation.de>
parents:
2596
diff
changeset
|
44 return state.gauges.find( |
2643
27933e66e848
client: gauges: use isrs_code as unique id for gauges
Markus Kottlaender <markus@intevation.de>
parents:
2604
diff
changeset
|
45 g => g.properties.isrs_code === state.selectedGaugeISRS |
2604
85f9bf4a6eba
client: gauge waterlevel diagram: draw reference waterlevels
Markus Kottlaender <markus@intevation.de>
parents:
2596
diff
changeset
|
46 ); |
85f9bf4a6eba
client: gauge waterlevel diagram: draw reference waterlevels
Markus Kottlaender <markus@intevation.de>
parents:
2596
diff
changeset
|
47 } |
85f9bf4a6eba
client: gauge waterlevel diagram: draw reference waterlevels
Markus Kottlaender <markus@intevation.de>
parents:
2596
diff
changeset
|
48 }, |
2590
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
49 mutations: { |
2596
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
50 gauges: (state, gauges) => { |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
51 state.gauges = gauges; |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
52 }, |
2643
27933e66e848
client: gauges: use isrs_code as unique id for gauges
Markus Kottlaender <markus@intevation.de>
parents:
2604
diff
changeset
|
53 selectedGaugeISRS: (state, isrs) => { |
27933e66e848
client: gauges: use isrs_code as unique id for gauges
Markus Kottlaender <markus@intevation.de>
parents:
2604
diff
changeset
|
54 state.selectedGaugeISRS = isrs; |
2596
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
55 }, |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
56 waterlevels: (state, data) => { |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
57 state.waterlevels = data; |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
58 }, |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
59 longtermWaterlevels: (state, data) => { |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
60 state.longtermWaterlevels = data; |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
61 }, |
2830
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
62 longtermInterval: (state, interval) => { |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
63 state.longtermInterval = interval; |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
64 }, |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
65 yearWaterlevels: (state, data) => { |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
66 state.yearWaterlevels = data; |
2761
71e7237110ba
client: spuc8: prepared diagram
Markus Kottlaender <markus@intevation.de>
parents:
2751
diff
changeset
|
67 }, |
2751
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
68 nashSutcliffe: (state, data) => { |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
69 state.nashSutcliffe = data; |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
70 }, |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
71 dateFrom: (state, dateFrom) => { |
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
72 state.dateFrom = dateFrom; |
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
73 }, |
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
74 dateTo: (state, dateTo) => { |
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
75 state.dateTo = dateTo; |
2829
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
76 }, |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
77 yearCompare: (state, year) => { |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
78 state.yearCompare = year; |
2590
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
79 } |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
80 }, |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
81 actions: { |
2643
27933e66e848
client: gauges: use isrs_code as unique id for gauges
Markus Kottlaender <markus@intevation.de>
parents:
2604
diff
changeset
|
82 selectedGaugeISRS: ({ commit }, isrs) => { |
27933e66e848
client: gauges: use isrs_code as unique id for gauges
Markus Kottlaender <markus@intevation.de>
parents:
2604
diff
changeset
|
83 commit("selectedGaugeISRS", isrs); |
2596
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
84 commit("application/showGauges", true, { root: true }); |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
85 }, |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
86 loadGauges: ({ commit }) => { |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
87 return new Promise((resolve, reject) => { |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
88 var gaugesFeatureCollectionRequest = new WFS().writeGetFeature({ |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
89 srsName: "EPSG:4326", |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
90 featureNS: "gemma", |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
91 featurePrefix: "gemma", |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
92 featureTypes: ["gauges_geoserver"], |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
93 outputFormat: "application/json" |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
94 }); |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
95 HTTP.post( |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
96 "/internal/wfs", |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
97 new XMLSerializer().serializeToString(gaugesFeatureCollectionRequest), |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
98 { |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
99 headers: { |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
100 "X-Gemma-Auth": localStorage.getItem("token"), |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
101 "Content-type": "text/xml; charset=UTF-8" |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
102 } |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
103 } |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
104 ) |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
105 .then(response => { |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
106 commit("gauges", response.data.features); |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
107 resolve(response); |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
108 }) |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
109 .catch(error => { |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
110 reject(error); |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
111 }); |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
112 }); |
8774054959a7
client: added Gauges dialog/tool to show waterlevel diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2590
diff
changeset
|
113 }, |
2744
7dcca9649a61
client: waterlevel diagram: use selectedGaugeISRS to load waterlevels
Markus Kottlaender <markus@intevation.de>
parents:
2716
diff
changeset
|
114 loadWaterlevels({ state, commit }) { |
2701
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
115 // include the last day |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
116 let dateTo = new Date(state.dateTo.getTime() + 86400); |
2657
b6865a08c905
client: waterlevel diagram: use real test data
Markus Kottlaender <markus@intevation.de>
parents:
2643
diff
changeset
|
117 |
2701
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
118 return new Promise((resolve, reject) => { |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
119 HTTP.get( |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
120 `/data/waterlevels/${ |
2744
7dcca9649a61
client: waterlevel diagram: use selectedGaugeISRS to load waterlevels
Markus Kottlaender <markus@intevation.de>
parents:
2716
diff
changeset
|
121 state.selectedGaugeISRS |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
122 }?from=${state.dateFrom |
2701
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
123 .toISOString() |
2710
f393fabfdd35
client: waterlevel diagram: chart extent based on selected dates instead of data
Markus Kottlaender <markus@intevation.de>
parents:
2701
diff
changeset
|
124 .substr(0, 23)}&to=${dateTo.toISOString().substr(0, 23)}`, |
2701
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
125 { |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
126 headers: { "X-Gemma-Auth": localStorage.getItem("token") } |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
127 } |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
128 ) |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
129 .then(response => { |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
130 let data = response.data |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
131 .split("\n") |
2828
c2b90cb426ed
client: waterlevels: better filtering of comment lines in API results
Markus Kottlaender <markus@intevation.de>
parents:
2815
diff
changeset
|
132 // remove empty rows and rows starting with # |
c2b90cb426ed
client: waterlevels: better filtering of comment lines in API results
Markus Kottlaender <markus@intevation.de>
parents:
2815
diff
changeset
|
133 .filter(wl => wl && wl[0] !== "#") |
2701
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
134 .map(wl => { |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
135 wl = wl.split(","); |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
136 return { |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
137 date: new Date(wl[0]), |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
138 waterlevel: Number(wl[1]), |
2793
16d08532c420
client: waterlevel diagram: added prediction's min max values to parsing of waterlevel csv
Markus Kottlaender <markus@intevation.de>
parents:
2791
diff
changeset
|
139 min: Number(wl[2]), |
16d08532c420
client: waterlevel diagram: added prediction's min max values to parsing of waterlevel csv
Markus Kottlaender <markus@intevation.de>
parents:
2791
diff
changeset
|
140 max: Number(wl[3]), |
16d08532c420
client: waterlevel diagram: added prediction's min max values to parsing of waterlevel csv
Markus Kottlaender <markus@intevation.de>
parents:
2791
diff
changeset
|
141 predicted: wl[4] === "f" ? false : true |
2701
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
142 }; |
2764
f0846d200ce4
client: waterlevel diagram: remove past predictions from waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2761
diff
changeset
|
143 }) |
f0846d200ce4
client: waterlevel diagram: remove past predictions from waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2761
diff
changeset
|
144 .filter(wl => !(wl.predicted && isPast(wl.date))); |
2701
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
145 data = data.sort((a, b) => a.date - b.date); |
2692
966c94e699fa
client: waterlevel diagram: simulate loading time and removed old demo code
Markus Kottlaender <markus@intevation.de>
parents:
2657
diff
changeset
|
146 commit("waterlevels", data); |
966c94e699fa
client: waterlevel diagram: simulate loading time and removed old demo code
Markus Kottlaender <markus@intevation.de>
parents:
2657
diff
changeset
|
147 resolve(data); |
2701
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
148 }) |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
149 .catch(error => { |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
150 commit("waterlevels", []); |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
151 reject(error); |
e622689d73bd
client: waterlevel diagram: use endpoint
Markus Kottlaender <markus@intevation.de>
parents:
2692
diff
changeset
|
152 }); |
2590
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
153 }); |
2751
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
154 }, |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
155 loadLongtermWaterlevels({ state, commit }) { |
2791
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
156 return new Promise((resolve, reject) => { |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
157 HTTP.get(`/data/longterm-waterlevels/${state.selectedGaugeISRS}`, { |
2791
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
158 headers: { "X-Gemma-Auth": localStorage.getItem("token") } |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
159 }) |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
160 .then(response => { |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
161 const now = new Date(); |
2830
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
162 let data = response.data.split("\n"); |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
163 // get result interval from first line |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
164 commit( |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
165 "longtermInterval", |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
166 data[0] |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
167 .split(",")[0] |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
168 .split(" ")[1] |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
169 .split("-") |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
170 .map(y => Number(y)) |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
171 ); |
0632d543a427
client: spuc7/8: show time periods in diagram titles
Markus Kottlaender <markus@intevation.de>
parents:
2829
diff
changeset
|
172 data = data |
2828
c2b90cb426ed
client: waterlevels: better filtering of comment lines in API results
Markus Kottlaender <markus@intevation.de>
parents:
2815
diff
changeset
|
173 // remove empty rows and rows starting with # |
c2b90cb426ed
client: waterlevels: better filtering of comment lines in API results
Markus Kottlaender <markus@intevation.de>
parents:
2815
diff
changeset
|
174 .filter(wl => wl && wl[0] !== "#") |
2791
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
175 .map(wl => { |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
176 wl = wl.split(","); |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
177 let dayAndMonth = wl[0].split("-").map(n => Number(n)); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
178 let date = new Date( |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
179 now.getFullYear(), |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
180 dayAndMonth[1] - 1, |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
181 dayAndMonth[0] |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
182 ); |
2791
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
183 return { |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
184 date: date, |
2791
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
185 min: Number(wl[1]), |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
186 max: Number(wl[2]), |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
187 mean: Number(wl[3]), |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
188 median: Number(wl[4]), |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
189 q25: Number(wl[5]), |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
190 q75: Number(wl[6]) |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
191 }; |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
192 }); |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
193 data = data.sort((a, b) => a.date - b.date); |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
194 commit("longtermWaterlevels", data); |
2791
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
195 resolve(data); |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
196 }) |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
197 .catch(error => { |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
198 commit("longtermWaterlevels", []); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
199 reject(error); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
200 }); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
201 }); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
202 }, |
2829
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
203 loadYearWaterlevels({ state, commit }) { |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
204 return new Promise((resolve, reject) => { |
2829
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
205 HTTP.get( |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
206 `/data/year-waterlevels/${state.selectedGaugeISRS}/${ |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
207 state.yearCompare |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
208 }`, |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
209 { |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
210 headers: { "X-Gemma-Auth": localStorage.getItem("token") } |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
211 } |
4a1211727d5f
client: spuc8: implemented year controls
Markus Kottlaender <markus@intevation.de>
parents:
2828
diff
changeset
|
212 ) |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
213 .then(response => { |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
214 const now = new Date(); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
215 let data = response.data |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
216 .split("\n") |
2828
c2b90cb426ed
client: waterlevels: better filtering of comment lines in API results
Markus Kottlaender <markus@intevation.de>
parents:
2815
diff
changeset
|
217 // remove empty rows and rows starting with # |
c2b90cb426ed
client: waterlevels: better filtering of comment lines in API results
Markus Kottlaender <markus@intevation.de>
parents:
2815
diff
changeset
|
218 .filter(wl => wl && wl[0] !== "#") |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
219 .map(wl => { |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
220 wl = wl.split(","); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
221 let dayAndMonth = wl[0].split("-").map(n => Number(n)); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
222 let date = new Date( |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
223 now.getFullYear(), |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
224 dayAndMonth[1] - 1, |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
225 dayAndMonth[0] |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
226 ); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
227 return { |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
228 date: date, |
2815
12f053763be2
client: spuc8: finished drawing charts, optimized code
Markus Kottlaender <markus@intevation.de>
parents:
2813
diff
changeset
|
229 mean: Number(wl[1]) |
2813
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
230 }; |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
231 }); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
232 data = data.sort((a, b) => a.date - b.date); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
233 commit("yearWaterlevels", data); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
234 resolve(data); |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
235 }) |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
236 .catch(error => { |
49c1570919ae
client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
Markus Kottlaender <markus@intevation.de>
parents:
2793
diff
changeset
|
237 commit("yearWaterlevels", []); |
2791
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
238 reject(error); |
2b79c0871138
client: spuc8: draw diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2775
diff
changeset
|
239 }); |
2761
71e7237110ba
client: spuc8: prepared diagram
Markus Kottlaender <markus@intevation.de>
parents:
2751
diff
changeset
|
240 }); |
71e7237110ba
client: spuc8: prepared diagram
Markus Kottlaender <markus@intevation.de>
parents:
2751
diff
changeset
|
241 }, |
2751
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
242 loadNashSutcliffe({ state, commit }) { |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
243 return new Promise((resolve, reject) => { |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
244 HTTP.get(`/data/nash-sutcliffe/${state.selectedGaugeISRS}`, { |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
245 headers: { "X-Gemma-Auth": localStorage.getItem("token") } |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
246 }) |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
247 .then(response => { |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
248 commit("nashSutcliffe", response.data); |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
249 resolve(response.data); |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
250 }) |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
251 .catch(error => { |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
252 commit("nashSutcliffe", null); |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
253 reject(error); |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
254 }); |
5da81634bdc4
client: waterlevel diagram: implemented nash-sutcliffe
Markus Kottlaender <markus@intevation.de>
parents:
2744
diff
changeset
|
255 }); |
2590
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
256 } |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
257 } |
1686ec185155
client: added gauge waterlevel example diagram
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
258 }; |