Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
waterdataui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Water Mission Area
Internet of Water
waterdataui
Commits
17c8d649
Commit
17c8d649
authored
2 years ago
by
Briggs, Aaron Shane
Browse files
Options
Downloads
Patches
Plain Diff
url working
parent
efd277d8
No related branches found
No related tags found
1 merge request
!372
WDFN-734 Plot Secondary Time Series - add data retrieve option
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
assets/src/scripts/monitoring-location/components/hydrograph/vue-components/download-data.vue
+17
-5
17 additions, 5 deletions
...on/components/hydrograph/vue-components/download-data.vue
with
17 additions
and
5 deletions
assets/src/scripts/monitoring-location/components/hydrograph/vue-components/download-data.vue
+
17
−
5
View file @
17c8d649
...
...
@@ -181,6 +181,7 @@ import {getIVServiceURL, getSiteMetaDataServiceURL} from 'ui/web-services/instan
import
{
getStatisticsServiceURL
}
from
'
ui/web-services/statistics-data
'
;
import
{
getGroundwaterServiceURL
}
from
'
ui/web-services/groundwater-levels
'
;
import
{
getPrimaryParameter
}
from
'
ml/components/hydrograph/selectors/time-series-data
'
;
import
{
getIVParameter
}
from
'
ml/selectors/hydrograph-data-selector
'
;
import
{
isCalculatedTemperature
}
from
'
ml/parameter-code-utils
'
;
import
{
...
...
@@ -189,6 +190,7 @@ import {
hasVisibleMedianStatisticsData
}
from
'
../selectors/time-series-data
'
;
export
default
{
name
:
'
DownloadData
'
,
components
:
{
...
...
@@ -208,7 +210,8 @@ export default {
hasVisibleCompareIVData
:
hasVisibleIVData
(
'
compare
'
),
hasVisibleMedianData
:
hasVisibleMedianStatisticsData
,
hasVisibleGroundwaterLevels
:
hasVisibleGroundwaterLevels
,
primaryParameter
:
getPrimaryParameter
primaryParameter
:
getPrimaryParameter
,
secondaryParameter
:
getIVParameter
(
'
secondary
'
)
});
const
reduxStore
=
inject
(
'
store
'
);
...
...
@@ -226,13 +229,19 @@ export default {
return
DateTime
.
fromMillis
(
inMillis
,
{
zone
:
config
.
locationTimeZone
}).
toISO
();
};
const
getIVDataURL
=
function
(
reduxStore
,
siteno
,
timeRangeKind
)
{
const
getIVDataURL
=
function
(
reduxStore
,
siteno
,
dataKind
)
{
const
timeRangePrefix
=
{
primary
:
'
current
'
,
secondary
:
'
current
'
,
prioryear
:
'
compare
'
};
const
currentState
=
reduxStore
.
getState
();
const
timeRange
=
getTimeRange
(
timeRangeKind
)(
currentState
);
const
timeRange
=
getTimeRange
(
timeRange
Prefix
[
data
Kind
]
)(
currentState
);
return
getIVServiceURL
({
siteno
,
parameterCode
:
getPrimaryParameter
(
currentState
)
.
parameterCode
,
parameterCode
:
dataKind
===
'
secondary
'
?
state
.
secondaryParameter
.
value
.
parameterCode
:
state
.
primaryParameter
.
value
.
parameterCode
,
startTime
:
toISO
(
timeRange
.
start
),
endTime
:
toISO
(
timeRange
.
end
),
format
:
'
rdb
'
...
...
@@ -267,7 +276,10 @@ export default {
showErrorMessage
.
value
=
false
;
switch
(
buttonSelected
)
{
case
'
primary
'
:
downloadUrl
.
value
=
getIVDataURL
(
reduxStore
,
siteno
,
'
current
'
);
downloadUrl
.
value
=
getIVDataURL
(
reduxStore
,
siteno
,
'
primary
'
);
break
;
case
'
secondary
'
:
downloadUrl
.
value
=
getIVDataURL
(
reduxStore
,
siteno
,
'
secondary
'
);
break
;
case
'
compare
'
:
downloadUrl
.
value
=
getIVDataURL
(
reduxStore
,
siteno
,
'
prioryear
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment