This commit is contained in:
Alex Holliday committed 2025-12-09 21:15:27 +00:00
1 parent bda3a7e91c
commit b4e4ec1110
6 files changed
+12 -18

No files matched your search

+2 -3
View File
@@ -7,7 +7,6 @@ import { useAppSelector } from "./hooks/AppHooks";
import { BrowserRouter } from "react-router-dom";
import { AuthVerifier } from "@/components/auth-verifier";
import { ToastContainer } from "react-toastify";
import { colors } from "@/theme/palette";
function App() {
const mode = useAppSelector((state) => state.ui.mode);
@@ -26,8 +25,8 @@ function App() {
theme={mode}
style={
{
"--toastify-color-progress-light": colors.blueGray450,
"--toastify-color-progress-dark": colors.blueGray450,
"--toastify-color-progress-light": "#7C8BA1",
"--toastify-color-progress-dark": "#7C8BA1",
} as React.CSSProperties
}
/>
@@ -2,7 +2,7 @@ import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import { useTheme } from "@mui/material/styles";
import { lighten, darken } from "@mui/material/styles";
import { lighten } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
import type { PaletteKey } from "@/theme/theme";
import { BaseBox, TooltipWithInfo } from "@/components/design-elements";
@@ -5,7 +5,6 @@ import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
import type { ButtonGroupProps } from "@mui/material/ButtonGroup";
import { ChevronDown } from "lucide-react";
import { useTheme } from "@mui/material/styles";
export const ButtonGroupInput: React.FC<ButtonGroupProps> = ({
orientation,
@@ -14,7 +13,6 @@ export const ButtonGroupInput: React.FC<ButtonGroupProps> = ({
...props
}) => {
const isVertical = orientation === "vertical";
const theme = useTheme();
if (!isVertical) {
return (
@@ -10,6 +10,7 @@ import { useMemo, useState } from "react";
import { useTheme } from "@mui/material/styles";
import { Tooltip } from "@/components/design-elements";
import { config } from "@/config/index";
const ENV_VAR = import.meta.env.VITE_APP_DEPLOYMENT_MODE;
const DEPLOYMENT_MODE = config.DEPLOYMENT_MODE;
const IS_SAAS = DEPLOYMENT_MODE === "saas";
@@ -32,12 +33,13 @@ export const SettingsSwitch = () => {
handleClose();
};
const user = useAppSelector((state) => state.auth.user);
const user = useAppSelector((state: any) => state.auth.user);
const orgPermissions = user?.org?.permissions || [];
// Normalize and memoize permissions for robust checks
const perms = useMemo(
() => orgPermissions.map((p) => (p ?? "").toString().trim().toLowerCase()),
() =>
orgPermissions.map((p: any) => (p ?? "").toString().trim().toLowerCase()),
[orgPermissions]
);
const hasTeamEdit =
@@ -64,6 +66,8 @@ export const SettingsSwitch = () => {
[perms]
);
console.log("ENV VAR: ", ENV_VAR);
console.log("DEPLOYMENT_MODE: ", DEPLOYMENT_MODE);
console.log("Show billing: ", showBilling);
console.log(JSON.stringify(perms, null, 2));
console.log("IS_SAAS: ", IS_SAAS);
+2 -8
View File
@@ -39,7 +39,7 @@ export const ChecksTable = ({
const headers: Header<CheckWithMonitor>[] = [
{
id: "monitorName",
content: "Monitor name",
content: t("incidentsTableMonitorName"),
render: (row) => {
return row.metadata?.monitorId?.name || "N/A";
},
@@ -102,13 +102,7 @@ export const ChecksTable = ({
return (
<Box>
<Table
headers={headers}
data={checks}
onRowClick={(row) => {
alert("not yet");
}}
/>
<Table headers={headers} data={checks} />
<Pagination
component="div"
count={count}
+1 -2
View File
@@ -4,7 +4,6 @@ import {
DownStatusBox,
PausedStatusBox,
InfoBox,
LoadingSpinner,
} from "@/components/design-elements";
import { HeaderFilter } from "@/components/monitors";
import { HeaderCreate } from "@/components/common";
@@ -138,7 +137,7 @@ const UptimeMonitors = () => {
entitlement="monitorsMax"
entitlementCount={count}
/>
<Stack direction={isSmall ? "column" : "row"} gap={theme.spacing(8)}>
<UpStatusBox n={upCount} />
<DownStatusBox n={downCount} />