Mercurial > gemma
diff client/src/store/diagram.js @ 3198:b0328646e34f
statistics: include los selection
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 08 May 2019 15:26:59 +0200 |
parents | 0d76a0476a5b |
children | cb67ee72485b |
line wrap: on
line diff
--- a/client/src/store/diagram.js Wed May 08 15:08:27 2019 +0200 +++ b/client/src/store/diagram.js Wed May 08 15:26:59 2019 +0200 @@ -28,7 +28,8 @@ to: null, frequency: null, fwData: null, - legend: null + legend: null, + LOS: null }; }; @@ -37,6 +38,9 @@ namespaced: true, state: init(), mutations: { + setLOS: (state, LOS) => { + state.LOS = LOS; + }, setFrequency: (state, frequency) => { state.frequency = frequency; }, @@ -63,12 +67,12 @@ actions: { loadAvailableFairwayDepth: ({ commit }, options) => { return new Promise((resolve, reject) => { - const { feature, from, to, frequency } = options; + const { feature, from, to, frequency, LOS } = options; const start = encodeURIComponent("00:00:00+07:00"); const end = encodeURIComponent("23:59:59+07:00"); const URL = `/data/bottleneck/fairway-depth/${encodeURIComponent( feature.properties.name - )}?from=${from}T${start}&to=${to}T${end}&mode=${frequency}`; + )}?from=${from}T${start}&to=${to}T${end}&mode=${frequency}&los=${LOS}`; HTTP.get(URL, { headers: { "X-Gemma-Auth": localStorage.getItem("token") } })