Mercurial > gemma
changeset 3203:cb67ee72485b
available_fairway_depth: use real data
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 08 May 2019 16:19:31 +0200 |
parents | 7c59955fbcca |
children | 1253fe15e3e3 |
files | client/src/store/diagram.js |
diffstat | 1 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/store/diagram.js Wed May 08 16:02:25 2019 +0200 +++ b/client/src/store/diagram.js Wed May 08 16:19:31 2019 +0200 @@ -14,13 +14,6 @@ import { HTTP } from "@/lib/http"; -const MOCKDATA = `#label,# >= LDC [h],# < 200.00 [h],# >= 200.00 [h],# >= 230.00 [h],# >= 250.00 [h] -01-2019, 22.000,1.000, 4.000,6.000, 20.000 -02-2019, 24.000,0.000,0.000,0.000, 23.000 -03-2019, 30.000,0.000,0.000,0.000, 30.000 -04-2019, 30.000,0.000,0.000,0.000, 30.000 -05-2019, 30.000,0.000,0.000,0.000, 30.000`; - const init = () => { return { selectedFairwayAvailabilityFeature: null, @@ -68,8 +61,8 @@ loadAvailableFairwayDepth: ({ commit }, options) => { return new Promise((resolve, reject) => { const { feature, from, to, frequency, LOS } = options; - const start = encodeURIComponent("00:00:00+07:00"); - const end = encodeURIComponent("23:59:59+07:00"); + const start = encodeURIComponent("00:00:00+00:00"); + const end = encodeURIComponent("23:59:59+00:00"); const URL = `/data/bottleneck/fairway-depth/${encodeURIComponent( feature.properties.name )}?from=${from}T${start}&to=${to}T${end}&mode=${frequency}&los=${LOS}`; @@ -77,7 +70,7 @@ headers: { "X-Gemma-Auth": localStorage.getItem("token") } }) .then(response => { - const data = MOCKDATA; + const { data } = response; const csv = data.split("\n"); commit("setLegend", csv.shift()); let transformed = csv.map(e => {