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
+4 -3

No files matched your search

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