Allow demo user to create maintenance windows

This commit is contained in:
Alex Holliday committed 2024-10-11 10:04:20 +08:00
1 parent 7a8d909d50
commit 34e2ecd194
2 files changed
+15 -14

No files matched your search

+2 -2
View File
@@ -93,7 +93,7 @@ const Maintenance = ({ isAdmin }) => {
/> />
</Stack> </Stack>
)} )}
{isAdmin && maintenanceWindows.length === 0 && ( {maintenanceWindows.length === 0 && (
<Fallback <Fallback
title="maintenance window" title="maintenance window"
checks={[ checks={[
@@ -102,7 +102,7 @@ const Maintenance = ({ isAdmin }) => {
"Stop sending alerts in maintenance windows", "Stop sending alerts in maintenance windows",
]} ]}
link="/maintenance/create" link="/maintenance/create"
isAdmin={isAdmin} isAdmin={true}
/> />
)} )}
</Box> </Box>
+13 -12
View File
@@ -59,18 +59,19 @@ const Monitors = ({ isAdmin }) => {
mt={theme.spacing(5)} mt={theme.spacing(5)}
> >
<Greeting type="uptime" /> <Greeting type="uptime" />
{monitorState?.monitorsSummary?.monitors?.length !== 0 && ( {isAdmin &&
<Button monitorState?.monitorsSummary?.monitors?.length !== 0 && (
variant="contained" <Button
color="primary" variant="contained"
onClick={() => { color="primary"
navigate("/monitors/create"); onClick={() => {
}} navigate("/monitors/create");
sx={{ fontWeight: 500 }} }}
> sx={{ fontWeight: 500 }}
Create monitor >
</Button> Create monitor
)} </Button>
)}
</Stack> </Stack>
</Box> </Box>
{isAdmin && monitorState?.monitorsSummary?.monitors?.length === 0 && ( {isAdmin && monitorState?.monitorsSummary?.monitors?.length === 0 && (