mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
show "no data" if there is no data and move help tooltip
This commit is contained in:
@@ -283,8 +283,6 @@ const Dashboard = memo(() => {
|
|||||||
</MessageBox>
|
</MessageBox>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{data.nodes.length > 0 && (
|
|
||||||
<>
|
|
||||||
<Box
|
<Box
|
||||||
display="flex"
|
display="flex"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
@@ -309,19 +307,9 @@ const Dashboard = memo(() => {
|
|||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</ButtonTooltip>
|
</ButtonTooltip>
|
||||||
</ToggleButtonGroup>
|
</ToggleButtonGroup>
|
||||||
<Tooltip title={LL.DASHBOARD_1()}>
|
|
||||||
<HelpOutlineIcon
|
|
||||||
sx={{
|
|
||||||
ml: 1,
|
|
||||||
mt: 1,
|
|
||||||
fontSize: 20,
|
|
||||||
verticalAlign: 'middle'
|
|
||||||
}}
|
|
||||||
color="primary"
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
{data.nodes.length > 0 ? (
|
||||||
<Box mt={1} justifyContent="center" flexDirection="column">
|
<Box mt={1} justifyContent="center" flexDirection="column">
|
||||||
<IconContext.Provider
|
<IconContext.Provider
|
||||||
value={{
|
value={{
|
||||||
@@ -358,10 +346,7 @@ const Dashboard = memo(() => {
|
|||||||
<Cell>
|
<Cell>
|
||||||
{me.admin &&
|
{me.admin &&
|
||||||
di.dv?.c &&
|
di.dv?.c &&
|
||||||
!hasMask(
|
!hasMask(di.dv.id, DeviceEntityMask.DV_READONLY) && (
|
||||||
di.dv.id,
|
|
||||||
DeviceEntityMask.DV_READONLY
|
|
||||||
) && (
|
|
||||||
<IconButton
|
<IconButton
|
||||||
size="small"
|
size="small"
|
||||||
aria-label={
|
aria-label={
|
||||||
@@ -391,7 +376,28 @@ const Dashboard = memo(() => {
|
|||||||
</Table>
|
</Table>
|
||||||
</IconContext.Provider>
|
</IconContext.Provider>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
) : (
|
||||||
|
<Box
|
||||||
|
display="flex"
|
||||||
|
// justifyContent="flex-end"
|
||||||
|
// flexWrap="nowrap"
|
||||||
|
// whiteSpace="nowrap"
|
||||||
|
>
|
||||||
|
<Typography mt={1} color="warning.main" variant="body1">
|
||||||
|
no data
|
||||||
|
</Typography>
|
||||||
|
<Tooltip title={LL.DASHBOARD_1()}>
|
||||||
|
<HelpOutlineIcon
|
||||||
|
sx={{
|
||||||
|
ml: 1,
|
||||||
|
mt: 1,
|
||||||
|
fontSize: 20,
|
||||||
|
verticalAlign: 'middle'
|
||||||
|
}}
|
||||||
|
color="primary"
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
|
</Box>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user