From 134473d78d26a2fbf97a71bffaf719324c1b185b Mon Sep 17 00:00:00 2001 From: Rudie Ekkelenkamp Date: Wed, 12 Jun 2024 10:09:37 +0200 Subject: [PATCH] Download timeseries from grid cell selection. (#900) * Download timeseries from grid cell selection. * Formatting --- .../download/TimeSeriesFileDownloadComponent.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/download/TimeSeriesFileDownloadComponent.vue b/src/components/download/TimeSeriesFileDownloadComponent.vue index 0b4475fd..491eb18e 100644 --- a/src/components/download/TimeSeriesFileDownloadComponent.vue +++ b/src/components/download/TimeSeriesFileDownloadComponent.vue @@ -210,8 +210,17 @@ const downloadFile = (downloadFormat: string) => { ) } if (isTimeSeriesGridActionsFilter(props.filter)) { - console.log('Not implemented') - return + props.filter.documentFormat = downloadFormat + const queryParameters = filterToParams(props.filter) + const url = new URL( + `${baseUrl}rest/fewspiservice/v1/timeseries/grid${queryParameters}&${viewPeriod}`, + ) + return downloadFileAttachment( + url.href, + fileName.value, + downloadFormat, + authenticationManager.getAccessToken(), + ) } }