From 139024b3597bba0ac7391fb8c25ecd3457bd3f82 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 3 Feb 2024 00:42:51 +0300 Subject: [PATCH 1/2] Update analytics platform production image tag to prod-c02ba194-1706909988 --- k8s/platform/values-prod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/platform/values-prod.yaml b/k8s/platform/values-prod.yaml index f729719e7f..cd61efbd69 100644 --- a/k8s/platform/values-prod.yaml +++ b/k8s/platform/values-prod.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: eu.gcr.io/airqo-250220/airqo-next-platform pullPolicy: Always - tag: prod-4d4813a7-1706019137 + tag: prod-c02ba194-1706909988 imagePullSecrets: [] nameOverride: '' fullnameOverride: '' From d50832895196c5be767eae35ed4321ac30b89baa Mon Sep 17 00:00:00 2001 From: Belinda Marion Kobusingye <46527380+Codebmk@users.noreply.github.com> Date: Sat, 3 Feb 2024 08:21:36 +0300 Subject: [PATCH 2/2] fix data download ux --- .../src/views/pages/ExportData/index.js | 89 +++++++++++++------ 1 file changed, 62 insertions(+), 27 deletions(-) diff --git a/netmanager/src/views/pages/ExportData/index.js b/netmanager/src/views/pages/ExportData/index.js index 6eddd63a1e..108c85eb3a 100644 --- a/netmanager/src/views/pages/ExportData/index.js +++ b/netmanager/src/views/pages/ExportData/index.js @@ -429,7 +429,7 @@ const ExportData = (props) => { const csvData = Papa.unparse(resData); exportData(csvData, filename, 'text/csv;charset=utf-8;'); } - clearExportData(); + setLoading(false); dispatch( updateMainAlert({ @@ -458,7 +458,6 @@ const ExportData = (props) => { ); } - clearExportData(); setLoading(false); }); }; @@ -494,7 +493,7 @@ const ExportData = (props) => { if (Difference_In_Days > 28) { setSnackbarMessage( - 'For time periods greater than a month, please use scheduling to avoid timeouts!' + 'For time periods greater than a month, please reduce the time difference to a week to avoid timeouts!' ); handleClickSnackbar(); } @@ -787,15 +786,24 @@ const ExportData = (props) => { disabled={disableDownloadBtn('sites')} > {' '} - Download Data + {loading ? 'Downloading Data...' : 'Download Data'} + + - {disableDownloadBtn('sites') && ( -
- {`Please fill in all the required fields`} -
- )} + {!loading && disableDownloadBtn('sites') && ( ++ {`Please fill in all the required fields`} +
+ )} @@ -931,15 +939,24 @@ const ExportData = (props) => { disabled={disableDownloadBtn('devices')} > {' '} - Download Data + {loading ? 'Downloading Data...' : 'Download Data'} + + - {disableDownloadBtn('devices') && ( -- {`Please fill in all the required fields`} -
- )} + {!loading && disableDownloadBtn('devices') && ( ++ {`Please fill in all the required fields`} +
+ )} @@ -1074,15 +1091,24 @@ const ExportData = (props) => { disabled={disableDownloadBtn('airqlouds')} > {' '} - Download Data + {loading ? 'Downloading Data...' : 'Download Data'} + + - {disableDownloadBtn('airqlouds') && ( -- {`Please fill in all the required fields`} -
- )} + {!loading && disableDownloadBtn('airqlouds') && ( ++ {`Please fill in all the required fields`} +
+ )} @@ -1217,15 +1243,24 @@ const ExportData = (props) => { disabled={disableDownloadBtn('regions')} > {' '} - Download Data + {loading ? 'Downloading Data...' : 'Download Data'} + + - {disableDownloadBtn('regions') && ( -- {`Please fill in all the required fields`} -
- )} + {!loading && disableDownloadBtn('regions') && ( ++ {`Please fill in all the required fields`} +
+ )}