# HG changeset patch # User Thomas Junk # Date 1557325171 -7200 # Node ID cb67ee72485b9a0e7937e5df6f568acf9d42e3e4 # Parent 7c59955fbcca26902eac4509926ae43e15f181cf available_fairway_depth: use real data diff -r 7c59955fbcca -r cb67ee72485b client/src/store/diagram.js --- 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 => {