Fix Dashboard UI issues.

This commit is contained in:
Khushboo Vashi 2024-07-25 12:43:02 +05:30
parent 9544ce1d18
commit 1fcb1f0228
2 changed files with 10 additions and 7 deletions

View File

@ -66,6 +66,13 @@ const Root = styled('div')(({theme}) => ({
width: '100%', width: '100%',
minHeight: '400px', minHeight: '400px',
padding: '4px', padding: '4px',
'& .serverLog .TabPanel-content': {
height: '94%',
},
'& .systemStorage .TabPanel-content': {
overflowY: 'auto',
overflowX: 'hidden',
},
'& .Dashboard-cardHeader': { '& .Dashboard-cardHeader': {
padding: '8px', padding: '8px',
}, },
@ -83,9 +90,6 @@ const Root = styled('div')(({theme}) => ({
height:'30px !important', height:'30px !important',
}, },
}, },
'& .Dashboard-textArea': {
height: '88%',
},
'& .RefreshButtons': { '& .RefreshButtons': {
display: 'flex', display: 'flex',
}, },
@ -255,7 +259,6 @@ function ActiveOnlyHeader({activeOnly, setActiveOnly}) {
labelPlacement="end" labelPlacement="end"
className='Dashboard-searchInput' className='Dashboard-searchInput'
onChange={(e) => { onChange={(e) => {
e.preventDefault();
setActiveOnly(e.target.checked); setActiveOnly(e.target.checked);
}} }}
value={activeOnly} value={activeOnly}
@ -1119,7 +1122,7 @@ function Dashboard({
></PgTable> ></PgTable>
</TabPanel> </TabPanel>
{/* Server Logs */} {/* Server Logs */}
<TabPanel value={mainTabVal} index={3} classNameRoot='Dashboard-tabPanel'> <TabPanel value={mainTabVal} index={3} classNameRoot='Dashboard-tabPanel serverLog'>
{dashData && dashData.length != 0 && {dashData && dashData.length != 0 &&
<CustomLogHeader/>} <CustomLogHeader/>}
{dashData.length == 0 && <div className='Dashboard-emptyPanel'> {dashData.length == 0 && <div className='Dashboard-emptyPanel'>
@ -1148,7 +1151,7 @@ function Dashboard({
></PgTable>} ></PgTable>}
</TabPanel> </TabPanel>
{/* System Statistics */} {/* System Statistics */}
<TabPanel value={mainTabVal} index={4} classNameRoot='Dashboard-tabPanel'> <TabPanel value={mainTabVal} index={4} classNameRoot='Dashboard-tabPanel systemStorage'>
<Box height="100%" display="flex" flexDirection="column"> <Box height="100%" display="flex" flexDirection="column">
{ssMsg === 'installed' && did === ldid ? {ssMsg === 'installed' && did === ldid ?
<ErrorBoundary> <ErrorBoundary>

View File

@ -197,7 +197,7 @@ export function Table({ columns, data, hasSelectRow, schema, sortOptions, tableP
<PgReactTable ref={tableRef} table={table} onScrollFunc={loadNextPage?fetchMoreOnBottomReached: null }> <PgReactTable ref={tableRef} table={table} onScrollFunc={loadNextPage?fetchMoreOnBottomReached: null }>
<PgReactTableHeader table={table} /> <PgReactTableHeader table={table} />
{rows.length == 0 ? {rows.length == 0 ?
<EmptyPanelMessage text={gettext('No rows found')} /> : <EmptyPanelMessage text={gettext('No rows found')} style={{height:'auto'}} /> :
<PgReactTableBody style={{ height: virtualizer.getTotalSize() + 'px'}}> <PgReactTableBody style={{ height: virtualizer.getTotalSize() + 'px'}}>
{virtualizer.getVirtualItems().map((virtualRow) => { {virtualizer.getVirtualItems().map((virtualRow) => {
const row = rows[virtualRow.index]; const row = rows[virtualRow.index];