Skip to content

Commit

Permalink
Merge pull request #1837 from airqo-platform/staging
Browse files Browse the repository at this point in the history
move to production
  • Loading branch information
Baalmart authored Feb 3, 2024
2 parents c02ba19 + fed92fd commit 3ca645e
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 28 deletions.
2 changes: 1 addition & 1 deletion k8s/platform/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
Expand Down
89 changes: 62 additions & 27 deletions netmanager/src/views/pages/ExportData/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -458,7 +458,6 @@ const ExportData = (props) => {
);
}

clearExportData();
setLoading(false);
});
};
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -787,15 +786,24 @@ const ExportData = (props) => {
disabled={disableDownloadBtn('sites')}
>
{' '}
Download Data
{loading ? 'Downloading Data...' : 'Download Data'}
</Button>
<Button
color="primary"
variant="outlined"
onClick={clearExportData}
style={{ marginRight: '15px' }}
>
{' '}
Reset
</Button>
{disableDownloadBtn('sites') && (
<p style={{ marginTop: '10px', color: 'red' }}>
{`Please fill in all the required fields`}
</p>
)}
</Box>
</CardActions>
{!loading && disableDownloadBtn('sites') && (
<p style={{ marginTop: '10px', color: 'red' }}>
{`Please fill in all the required fields`}
</p>
)}
</form>
</TabPanel>

Expand Down Expand Up @@ -931,15 +939,24 @@ const ExportData = (props) => {
disabled={disableDownloadBtn('devices')}
>
{' '}
Download Data
{loading ? 'Downloading Data...' : 'Download Data'}
</Button>
<Button
color="primary"
variant="outlined"
onClick={clearExportData}
style={{ marginRight: '15px' }}
>
{' '}
Reset
</Button>
{disableDownloadBtn('devices') && (
<p style={{ marginTop: '10px', color: 'red' }}>
{`Please fill in all the required fields`}
</p>
)}
</Box>
</CardActions>
{!loading && disableDownloadBtn('devices') && (
<p style={{ marginTop: '10px', color: 'red' }}>
{`Please fill in all the required fields`}
</p>
)}
</form>
</TabPanel>

Expand Down Expand Up @@ -1074,15 +1091,24 @@ const ExportData = (props) => {
disabled={disableDownloadBtn('airqlouds')}
>
{' '}
Download Data
{loading ? 'Downloading Data...' : 'Download Data'}
</Button>
<Button
color="primary"
variant="outlined"
onClick={clearExportData}
style={{ marginRight: '15px' }}
>
{' '}
Reset
</Button>
{disableDownloadBtn('airqlouds') && (
<p style={{ marginTop: '10px', color: 'red' }}>
{`Please fill in all the required fields`}
</p>
)}
</Box>
</CardActions>
{!loading && disableDownloadBtn('airqlouds') && (
<p style={{ marginTop: '10px', color: 'red' }}>
{`Please fill in all the required fields`}
</p>
)}
</form>
</TabPanel>

Expand Down Expand Up @@ -1217,15 +1243,24 @@ const ExportData = (props) => {
disabled={disableDownloadBtn('regions')}
>
{' '}
Download Data
{loading ? 'Downloading Data...' : 'Download Data'}
</Button>
<Button
color="primary"
variant="outlined"
onClick={clearExportData}
style={{ marginRight: '15px' }}
>
{' '}
Reset
</Button>
{disableDownloadBtn('regions') && (
<p style={{ marginTop: '10px', color: 'red' }}>
{`Please fill in all the required fields`}
</p>
)}
</Box>
</CardActions>
{!loading && disableDownloadBtn('regions') && (
<p style={{ marginTop: '10px', color: 'red' }}>
{`Please fill in all the required fields`}
</p>
)}
</form>
</TabPanel>
</Card>
Expand Down

0 comments on commit 3ca645e

Please sign in to comment.