From 90e0e46e7a395bca07eb3fc0049ae60ee15a9327 Mon Sep 17 00:00:00 2001 From: Belinda Marion Kobusingye <46527380+Codebmk@users.noreply.github.com> Date: Wed, 24 Jan 2024 20:07:45 +0300 Subject: [PATCH] remove scheduled downloads from export and sidebar, added error message --- .../views/layouts/common/Sidebar/Sidebar.js | 10 +- .../src/views/pages/ExportData/index.js | 131 +++++++++++------- 2 files changed, 83 insertions(+), 58 deletions(-) diff --git a/netmanager/src/views/layouts/common/Sidebar/Sidebar.js b/netmanager/src/views/layouts/common/Sidebar/Sidebar.js index 68536e3125..bf1a59adcf 100644 --- a/netmanager/src/views/layouts/common/Sidebar/Sidebar.js +++ b/netmanager/src/views/layouts/common/Sidebar/Sidebar.js @@ -105,12 +105,7 @@ const allMainPages = [ }, { title: 'Export data', - href: '/export-data', - nested: true, - nestItems: [ - { title: 'Export Options', href: '/export-data/options' }, - { title: 'Scheduled', href: '/export-data/scheduled' } - ], + href: '/export-data/options', icon: }, { @@ -366,7 +361,8 @@ const Sidebar = (props) => { classes={{ paper: classes.drawer }} onClose={onClose} open={open} - variant={variant}> + variant={variant} + >
diff --git a/netmanager/src/views/pages/ExportData/index.js b/netmanager/src/views/pages/ExportData/index.js index ce690624be..6eddd63a1e 100644 --- a/netmanager/src/views/pages/ExportData/index.js +++ b/netmanager/src/views/pages/ExportData/index.js @@ -246,7 +246,8 @@ const ExportData = (props) => { hidden={value !== index} id={`data-export-tabpanel-${index}`} aria-labelledby={`data-export-tab-${index}`} - {...other}> + {...other} + > {value === index &&
{children}
}
); @@ -626,9 +627,10 @@ const ExportData = (props) => { paddingBottom={'12px'} color={'grey.700'} fontSize={'14px'} - fontWeight={300}> - Customize the data you want to download. We recommend scheduling your downloads for bulky - data/time periods greater than a month to avoid timeouts. + fontWeight={300} + > + Customize the data you want to download. We recommend downloading data for shorter time + periods like a week or a month to avoid timeouts. @@ -638,7 +640,8 @@ const ExportData = (props) => { className={clsx(classes.root, className)} style={{ overflow: 'visible' - }}> + }} + > { classes={{ root: classes.tabs, // Apply custom styles to the root element indicator: classes.indicator // Apply custom styles to the indicator element - }}> + }} + > @@ -766,24 +770,30 @@ const ExportData = (props) => { - + - + {disableDownloadBtn('sites') && ( +

+ {`Please fill in all the required fields`} +

+ )}
@@ -904,24 +914,30 @@ const ExportData = (props) => { - + - + {disableDownloadBtn('devices') && ( +

+ {`Please fill in all the required fields`} +

+ )}
@@ -1041,24 +1057,30 @@ const ExportData = (props) => { - + - + {disableDownloadBtn('airqlouds') && ( +

+ {`Please fill in all the required fields`} +

+ )}
@@ -1178,24 +1200,30 @@ const ExportData = (props) => { - + - + {disableDownloadBtn('regions') && ( +

+ {`Please fill in all the required fields`} +

+ )}
@@ -1219,7 +1247,8 @@ const ExportData = (props) => { size="small" aria-label="close" color="inherit" - onClick={handleClickSnackbar}> + onClick={handleClickSnackbar} + >