Merge branch 'develop' into feat/incidents-clear

This commit is contained in:
Alex Holliday committed 2025-06-25 09:03:00 +08:00
commit 95b832c1c6
93 files changed
+3104 -2182

No files matched your search

@@ -2,16 +2,17 @@ import Box from "@mui/material/Box";
import PropTypes from "prop-types";
import { useTheme } from "@emotion/react";
import BackgroundSVG from "../../../assets/Images/background.svg";
import { useSelector } from "react-redux";
const AppLayout = ({ children }) => {
const theme = useTheme();
const ui = useSelector((state) => state.ui);
return (
<Box
sx={{
minHeight: "100vh",
backgroundColor: theme.palette.primaryBackground.main,
backgroundImage: `url("${BackgroundSVG}")`,
backgroundImage: ui?.mode === "dark" ? `url("${BackgroundSVG}")` : "none",
backgroundSize: "100% 100%",
backgroundPosition: "center",
backgroundRepeat: "no-repeat",
+8 -4
View File
@@ -1,4 +1,6 @@
import { Link as MuiLink, useTheme } from "@mui/material";
import { Link as RouterLink } from "react-router-dom";
import PropTypes from "prop-types";
/**
@@ -10,7 +12,7 @@ import PropTypes from "prop-types";
* @returns {JSX.Element}
*/
const Link = ({ level, label, url }) => {
const Link = ({ level, label, url, external = true }) => {
const theme = useTheme();
const levelConfig = {
@@ -49,11 +51,12 @@ const Link = ({ level, label, url }) => {
const { sx, color } = levelConfig[level];
return (
<MuiLink
href={url}
component={external ? "a" : RouterLink}
to={external ? undefined : url}
href={external ? url : undefined}
sx={{ width: "fit-content", ...sx }}
color={color}
target="_blank"
rel="noreferrer"
{...(external && { target: "_blank", rel: "noreferrer" })}
>
{label}
</MuiLink>
@@ -64,6 +67,7 @@ Link.propTypes = {
url: PropTypes.string.isRequired,
level: PropTypes.oneOf(["primary", "secondary", "tertiary", "error"]),
label: PropTypes.string.isRequired,
external: PropTypes.bool,
};
export default Link;
@@ -0,0 +1,116 @@
import * as React from "react";
import Button from "@mui/material/Button";
import ButtonGroup from "@mui/material/ButtonGroup";
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
import ClickAwayListener from "@mui/material/ClickAwayListener";
import Grow from "@mui/material/Grow";
import Paper from "@mui/material/Paper";
import Popper from "@mui/material/Popper";
import MenuItem from "@mui/material/MenuItem";
import MenuList from "@mui/material/MenuList";
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { createToast } from "../../Utils/toastUtils";
import { useExportMonitors } from "../../Hooks/monitorHooks";
const MonitorActions = ({ isLoading }) => {
const [open, setOpen] = React.useState(false);
const anchorRef = React.useRef(null);
const [selectedIndex, setSelectedIndex] = React.useState(0);
const navigate = useNavigate();
const { t } = useTranslation();
const [exportMonitors, isExporting] = useExportMonitors();
const options = [t("monitorActions.import"), t("monitorActions.export")];
const handleClick = async () => {
if (selectedIndex === 0) {
// Import
navigate("/uptime/bulk-import");
} else {
// Export
const [success, error] = await exportMonitors();
if (!success) {
createToast({ body: error || t("export.failed") });
}
}
};
const handleMenuItemClick = (event, index) => {
setSelectedIndex(index);
setOpen(false);
};
const handleToggle = () => {
setOpen((prevOpen) => !prevOpen);
};
const handleClose = (event) => {
if (anchorRef.current && anchorRef.current.contains(event.target)) {
return;
}
setOpen(false);
};
return (
<React.Fragment>
<ButtonGroup
variant="contained"
color="accent"
ref={anchorRef}
aria-label="Monitor actions"
disabled={isLoading || isExporting}
>
<Button onClick={handleClick}>{options[selectedIndex]}</Button>
<Button
size="small"
aria-controls={open ? "split-button-menu" : undefined}
aria-expanded={open ? "true" : undefined}
aria-label="select monitor action"
aria-haspopup="menu"
onClick={handleToggle}
>
<ArrowDropDownIcon />
</Button>
</ButtonGroup>
<Popper
sx={{ zIndex: 1 }}
open={open}
anchorEl={anchorRef.current}
role={undefined}
transition
disablePortal
>
{({ TransitionProps, placement }) => (
<Grow
{...TransitionProps}
style={{
transformOrigin: placement === "bottom" ? "center top" : "center bottom",
}}
>
<Paper>
<ClickAwayListener onClickAway={handleClose}>
<MenuList
id="split-button-menu"
autoFocusItem
>
{options.map((option, index) => (
<MenuItem
key={option}
selected={index === selectedIndex}
onClick={(event) => handleMenuItemClick(event, index)}
>
{option}
</MenuItem>
))}
</MenuList>
</ClickAwayListener>
</Paper>
</Grow>
)}
</Popper>
</React.Fragment>
);
};
export default MonitorActions;
@@ -3,6 +3,7 @@ import { useNavigate } from "react-router-dom";
import PropTypes from "prop-types";
import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react";
import MonitorActions from "../MonitorActions";
const CreateMonitorHeader = ({ isAdmin, label, isLoading = true, path, bulkPath }) => {
const navigate = useNavigate();
@@ -28,18 +29,7 @@ const CreateMonitorHeader = ({ isAdmin, label, isLoading = true, path, bulkPath
>
{label || t("createNew")}
</Button>
{bulkPath && (
<Button
loading={isLoading}
variant="contained"
color="accent"
onClick={() => {
navigate(`${bulkPath}`);
}}
>
{t("bulkImport.title")}
</Button>
)}
{/* {bulkPath && <MonitorActions isLoading={isLoading} />} */}
</Stack>
);
};
+2 -1
View File
@@ -8,7 +8,6 @@ import {
ListItemButton,
ListItemIcon,
ListItemText,
ListSubheader,
Menu,
MenuItem,
Stack,
@@ -39,6 +38,7 @@ import Docs from "../../assets/icons/docs.svg?react";
import StatusPages from "../../assets/icons/status-pages.svg?react";
import Discussions from "../../assets/icons/discussions.svg?react";
import Notifications from "../../assets/icons/notifications.svg?react";
import Logs from "../../assets/icons/logs.svg?react";
import "./index.css";
@@ -64,6 +64,7 @@ const getMenu = (t) => [
{ name: t("menu.statusPages"), path: "status", icon: <StatusPages /> },
{ name: t("menu.maintenance"), path: "maintenance", icon: <Maintenance /> },
{ name: t("menu.logs"), path: "logs", icon: <Logs /> },
{
name: t("menu.settings"),
+1 -1
View File
@@ -4,7 +4,7 @@ import SkeletonLayout from "./skeleton";
// Utils
import { useTheme } from "@mui/material/styles";
import PropTypes from "prop-types";
const StatusBoxes = ({ shouldRender, flexWrap = "nowrap", children }) => {
const StatusBoxes = ({ shouldRender = true, flexWrap = "nowrap", children }) => {
const theme = useTheme();
if (!shouldRender) {
return (
+11
View File
@@ -0,0 +1,11 @@
export const createHeaderFactory = (getCellSx = () => {}) => {
return ({ id, content, onClick = () => {}, render = () => {} }) => {
return {
id,
content,
onClick,
getCellSx,
render,
};
};
};
+3 -1
View File
@@ -5,7 +5,7 @@ import PropTypes from "prop-types";
import { useTheme } from "@emotion/react";
import { Link as RouterLink } from "react-router-dom";
const TextLink = ({ text, linkText, href }) => {
const TextLink = ({ text, linkText, href, target = "_self" }) => {
const theme = useTheme();
return (
@@ -18,6 +18,7 @@ const TextLink = ({ text, linkText, href }) => {
color="accent"
to={href}
component={RouterLink}
target={target}
>
{linkText}
</Link>
@@ -29,6 +30,7 @@ TextLink.propTypes = {
text: PropTypes.string,
linkText: PropTypes.string,
href: PropTypes.string,
target: PropTypes.string,
};
export default TextLink;
+35
View File
@@ -0,0 +1,35 @@
import { useState, useEffect } from "react";
import { networkService } from "../main";
import { createToast } from "../Utils/toastUtils";
import { useTranslation } from "react-i18next";
const useFetchLogs = () => {
const { t } = useTranslation();
const [logs, setLogs] = useState(undefined);
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(undefined);
useEffect(() => {
const fetchLogs = async () => {
try {
setIsLoading(true);
const response = await networkService.getLogs();
setLogs(response.data.data);
createToast({
body: t("logsPage.toast.fetchLogsSuccess"),
});
} catch (error) {
setError(error);
createToast({
message: error.message,
});
} finally {
setIsLoading(false);
}
};
fetchLogs();
}, [t]);
return [logs, isLoading, error];
};
export { useFetchLogs };
+34
View File
@@ -453,6 +453,39 @@ const useCreateBulkMonitors = () => {
return [createBulkMonitors, isLoading];
};
const useExportMonitors = () => {
const [isLoading, setIsLoading] = useState(false);
const { t } = useTranslation();
const exportMonitors = async () => {
setIsLoading(true);
try {
const response = await networkService.exportMonitors();
// Create a download link
const url = window.URL.createObjectURL(response.data);
const link = document.createElement("a");
link.href = url;
link.setAttribute("download", "monitors.csv");
document.body.appendChild(link);
link.click();
link.remove();
window.URL.revokeObjectURL(url);
createToast({ body: t("export.success") });
return [true, null];
} catch (err) {
const errorMessage = err?.response?.data?.msg || err.message;
createToast({ body: errorMessage || t("export.failed") });
return [false, errorMessage];
} finally {
setIsLoading(false);
}
};
return [exportMonitors, isLoading];
};
export {
useFetchMonitorsWithSummary,
useFetchMonitorsWithChecks,
@@ -469,4 +502,5 @@ export {
useDeleteAllMonitors,
useDeleteMonitorStats,
useCreateBulkMonitors,
useExportMonitors,
};
+57
View File
@@ -0,0 +1,57 @@
import { useState, useEffect } from "react";
import { networkService } from "../main";
import { createToast } from "../Utils/toastUtils";
const useFetchQueueData = (trigger) => {
const [jobs, setJobs] = useState(undefined);
const [metrics, setMetrics] = useState(undefined);
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(undefined);
useEffect(() => {
const fetchJobs = async () => {
try {
setIsLoading(true);
const response = await networkService.getQueueData();
if (response.status === 200) {
setJobs(response.data.data.jobs);
setMetrics(response.data.data.metrics);
}
} catch (error) {
setError(error);
} finally {
setIsLoading(false);
}
};
fetchJobs();
}, [trigger]);
return [jobs, metrics, isLoading, error];
};
const useFlushQueue = () => {
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(undefined);
const flushQueue = async (trigger, setTrigger) => {
try {
setIsLoading(true);
await networkService.flushQueue();
createToast({
body: "Queue flushed",
});
} catch (error) {
setError(error);
createToast({
body: error.message,
});
} finally {
setIsLoading(false);
setTrigger(!trigger);
}
};
return [flushQueue, isLoading, error];
};
export { useFetchQueueData, useFlushQueue };
+1 -4
View File
@@ -98,12 +98,9 @@ const useGetNotificationById = (id, setNotification) => {
const notification = response?.data?.data ?? null;
const notificationData = {
userId: notification?.userId,
teamId: notification?.teamId,
address: notification?.address,
notificationName: notification?.notificationName,
type: NOTIFICATION_TYPES.find((type) => type.value === notification?.type)?._id,
config: notification?.config,
};
setNotification(notificationData);
@@ -164,7 +161,7 @@ const useTestNotification = () => {
} catch (error) {
setError(error);
createToast({
body: t("notifications.test.failed"),
body: error?.response?.data?.msg || t("notifications.test.failed"),
});
} finally {
setIsLoading(false);
+97
View File
@@ -0,0 +1,97 @@
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import Select from "../../../Components/Inputs/Select";
import Typography from "@mui/material/Typography";
import { useFetchLogs } from "../../../Hooks/logHooks";
import { useTheme } from "@emotion/react";
import { useState } from "react";
import { useTranslation } from "react-i18next";
const formatLog = (theme, log, idx) => {
const levelColors = {
info: theme.palette.success.main,
warn: theme.palette.warning.main,
error: theme.palette.error.main,
debug: theme.palette.accent.main,
};
const color = levelColors[log.level] || theme.palette.primary.contrastText;
return (
<span key={idx}>
<span>[{log.timestamp}]</span>{" "}
<span style={{ color, fontWeight: "bold" }}>{log.level.toUpperCase()}</span>
{": "}
{`(${log.service})`}
{`(${log.method})`}
{": "}
{log.message}
<br />
</span>
);
};
const Logs = () => {
// Local state
const [logLevel, setLogLevel] = useState("all");
// Hooks
const theme = useTheme();
const { t } = useTranslation();
const [logs, isLoading, error] = useFetchLogs();
// Setup
const LOG_LEVELS = [
{ _id: "all", name: t("logsPage.logLevelSelect.values.all") },
{ _id: "info", name: t("logsPage.logLevelSelect.values.info") },
{ _id: "warn", name: t("logsPage.logLevelSelect.values.warn") },
{ _id: "error", name: t("logsPage.logLevelSelect.values.error") },
{ _id: "debug", name: t("logsPage.logLevelSelect.values.debug") },
];
return (
<Stack gap={theme.spacing(4)}>
<Box>
<Typography variant="body">{t("logsPage.description")}</Typography>
</Box>
<Stack
direction="row"
alignItems="center"
gap={theme.spacing(4)}
>
<Typography>{t("logsPage.logLevelSelect.title")}</Typography>
<Select
items={LOG_LEVELS}
value={logLevel}
onChange={(e) => {
setLogLevel(e.target.value);
}}
/>
</Stack>
<Box
component="pre"
sx={{
fontFamily: "monospace",
color: theme.palette.primary.contrastText,
padding: 2,
borderRadius: 1,
overflowX: "auto",
whiteSpace: "pre-wrap",
wordWrap: "break-word",
}}
>
<code>
{logs
?.filter((log) => {
if (logLevel === "all") return true;
return log.level === logLevel;
})
.reverse()
.map((log, idx) => formatLog(theme, log, idx))}
</code>
</Box>
</Stack>
);
};
export default Logs;
@@ -0,0 +1,82 @@
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import DataTable from "../../../../../Components/Table";
import { useNavigate } from "react-router-dom";
import { useTheme } from "@emotion/react";
import { TypeToPathMap } from "../../../../../Utils/monitorUtils";
import PropTypes from "prop-types";
import { useTranslation } from "react-i18next";
const FailedJobTable = ({ metrics = {} }) => {
const { t } = useTranslation();
const theme = useTheme();
const jobsWithFailures = metrics?.jobsWithFailures;
const navigate = useNavigate();
const headers = [
{
id: "monitorId",
content: t("queuePage.failedJobTable.monitorIdHeader"),
render: (row) => {
return row.monitorId;
},
},
{
id: "monitorUrl",
content: t("queuePage.failedJobTable.monitorUrlHeader"),
render: (row) => {
return row.monitorUrl;
},
},
{
id: "failCount",
content: t("queuePage.failedJobTable.failCountHeader"),
render: (row) => {
return row.failCount;
},
},
{
id: "failedAt",
content: t("queuePage.failedJobTable.failedAtHeader"),
render: (row) => {
return row.failedAt;
},
},
{
id: "failReason",
content: t("queuePage.failedJobTable.failReasonHeader"),
render: (row) => {
return row.failReason;
},
},
];
return (
<Stack gap={theme.spacing(2)}>
<Typography variant="h2">{t("queuePage.failedJobTable.title")}</Typography>
<DataTable
headers={headers}
data={jobsWithFailures}
config={{
onRowClick: (row) => {
const path = TypeToPathMap[row.monitorType];
navigate(`/${path}/${row.monitorId}`);
},
rowSX: {
cursor: "pointer",
"&:hover td": {
backgroundColor: theme.palette.tertiary.main,
transition: "background-color .3s ease",
},
},
}}
/>
</Stack>
);
};
FailedJobTable.propTypes = {
metrics: PropTypes.object,
};
export default FailedJobTable;
@@ -0,0 +1,125 @@
import Stack from "@mui/material/Stack";
import DataTable from "../../../../../Components/Table";
import Typography from "@mui/material/Typography";
// Utils
import PropTypes from "prop-types";
import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom";
import { TypeToPathMap } from "../../../../../Utils/monitorUtils";
import { useTranslation } from "react-i18next";
import { createHeaderFactory } from "../../../../../Components/Table/TableUtils";
const JobTable = ({ jobs = [] }) => {
const theme = useTheme();
const { t } = useTranslation();
const navigate = useNavigate();
const buildSx = (row) => {
if (row.lockedAt) {
return {
color: `${theme.palette.success.main} !important`,
};
}
if (!row.active) {
return {
color: `${theme.palette.warning.main} !important`,
};
}
if (row.failCount > 0 && row.lastFailedAt >= row.lastFinishedAt) {
return {
color: `${theme.palette.error.main} !important`,
};
}
return {};
};
const createHeader = createHeaderFactory(buildSx);
const headersData = [
{
id: "id",
content: t("queuePage.jobTable.idHeader"),
render: (row) => row.monitorId,
},
{
id: "url",
content: t("queuePage.jobTable.urlHeader"),
render: (row) => row.monitorUrl,
},
{
id: "type",
content: t("queuePage.jobTable.typeHeader"),
render: (row) => row.monitorType,
},
{
id: "active",
content: t("queuePage.jobTable.activeHeader"),
render: (row) => row.active.toString(),
},
{
id: "runCount",
content: t("queuePage.jobTable.runCountHeader"),
render: (row) => row.runCount,
},
{
id: "failCount",
content: t("queuePage.jobTable.failCountHeader"),
render: (row) => row.failCount,
},
{
id: "lastRun",
content: t("queuePage.jobTable.lastRunHeader"),
render: (row) => row.lastRunAt || "-",
},
{
id: "lockedAt",
content: t("queuePage.jobTable.lockedAtHeader"),
render: (row) => row.lockedAt || "-",
},
{
id: "lastFinish",
content: t("queuePage.jobTable.lastFinishedAtHeader"),
render: (row) => row.lastFinishedAt || "-",
},
{
id: "lastRunTook",
content: t("queuePage.jobTable.lastRunTookHeader"),
render: (row) => {
const value = row.lastRunTook ? row.lastRunTook + " ms" : "-";
return value;
},
},
];
const headers = headersData.map((header) => createHeader(header));
return (
<Stack gap={theme.spacing(2)}>
<Typography variant="h2">{t("queuePage.jobTable.title")}</Typography>
<DataTable
headers={headers}
data={jobs}
config={{
onRowClick: (row) => {
const path = TypeToPathMap[row.monitorType];
navigate(`/${path}/${row.monitorId}`);
},
rowSX: {
cursor: "pointer",
"&:hover td": {
backgroundColor: theme.palette.tertiary.main,
transition: "background-color .3s ease",
},
},
}}
/>
</Stack>
);
};
JobTable.propTypes = {
jobs: PropTypes.array,
};
export default JobTable;
@@ -0,0 +1,43 @@
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import StatBox from "../../../../../Components/StatBox";
import StatusBoxes from "../../../../../Components/StatusBoxes";
import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react";
const camelToTitle = (str) => {
return str
.replace(/([A-Z])/g, " $1")
.toLowerCase()
.replace(/^./, (m) => m.toUpperCase());
};
const Metrics = ({ metrics = {} }) => {
const { t } = useTranslation();
const theme = useTheme();
const data = Object.keys(metrics)
.filter((key) => key !== "jobsWithFailures")
.map((key) => {
return { key, title: camelToTitle(key), value: metrics[key] };
});
return (
<Stack gap={theme.spacing(2)}>
<Typography variant="h2">{t("queuePage.metricsTable.title")}</Typography>
<StatusBoxes flexWrap="wrap">
{data.map((metric) => {
return (
<StatBox
key={metric.key}
heading={metric.title}
subHeading={metric.value}
/>
);
})}
</StatusBoxes>
</Stack>
);
};
export default Metrics;
@@ -0,0 +1,60 @@
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import DataTable from "../../../../../Components/Table";
// Utils
import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react";
import PropTypes from "prop-types";
const camelToTitle = (str) => {
return str
.replace(/([A-Z])/g, " $1")
.toLowerCase()
.replace(/^./, (m) => m.toUpperCase());
};
const Metrics = ({ metrics = {} }) => {
const { t } = useTranslation();
const theme = useTheme();
const keys = Object.keys(metrics);
const headers = [
{
id: "metric",
content: t("queuePage.metricsTable.metricHeader"),
render: (row) => {
return <Typography>{row.key}</Typography>;
},
},
{
id: "value",
content: t("queuePage.metricsTable.valueHeader"),
render: (row) => {
return <Typography>{row.value}</Typography>;
},
},
];
const data = keys
.filter((key) => key !== "jobsWithFailures")
.map((key) => {
return { key: camelToTitle(key), value: metrics[key] };
});
return (
<Stack gap={theme.spacing(2)}>
<Typography variant="h2">{t("queuePage.metricsTable.title")}</Typography>
<DataTable
headers={headers}
data={data}
/>
</Stack>
);
};
Metrics.propTypes = {
metrics: PropTypes.object,
};
export default Metrics;
+66
View File
@@ -0,0 +1,66 @@
// Components
import Stack from "@mui/material/Stack";
import JobTable from "./components/JobTable";
import Metrics from "./components/Metrics";
import FailedJobTable from "./components/FailedJobTable";
import ButtonGroup from "@mui/material/ButtonGroup";
import Button from "@mui/material/Button";
// Utils
import { useState } from "react";
import { useFetchQueueData, useFlushQueue } from "../../../Hooks/queueHooks";
import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react";
const QueueDetails = () => {
// Local state
const [trigger, setTrigger] = useState(false);
// Hooks
const { t } = useTranslation();
const theme = useTheme();
const [jobs, metrics, isLoading, error] = useFetchQueueData(trigger);
const [flushQueue, isFlushing, flushError] = useFlushQueue();
if (isLoading) return <div>Loading...</div>;
if (error || flushError) return <div>Error: {error.message}</div>;
return (
<Stack gap={theme.spacing(20)}>
<Metrics metrics={metrics} />
<JobTable jobs={jobs} />
<FailedJobTable metrics={metrics} />
<ButtonGroup
variant="contained"
color="accent"
sx={{
position: "sticky",
bottom: 0,
zIndex: 1000,
backgroundColor: theme.palette.primary.main,
p: theme.spacing(4),
border: `1px solid ${theme.palette.primary.lowContrast}`,
borderRadius: theme.spacing(2),
}}
>
<Button
onClick={() => {
setTrigger(!trigger);
}}
loading={isLoading}
>
{t("queuePage.refreshButton")}
</Button>
<Button
onClick={() => flushQueue(trigger, setTrigger)}
loading={isFlushing}
>
{t("queuePage.flushButton")}
</Button>
</ButtonGroup>
</Stack>
);
};
export default QueueDetails;
+41
View File
@@ -0,0 +1,41 @@
import Stack from "@mui/material/Stack";
import Breadcrumbs from "../../Components/Breadcrumbs";
import Tabs from "@mui/material/Tabs";
import Tab from "@mui/material/Tab";
import Queue from "./Queue";
import LogsComponent from "./Logs";
import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next";
import { useState } from "react";
const Logs = () => {
const { t } = useTranslation();
const theme = useTheme();
// Local state
const [value, setValue] = useState(0);
// Handlers
const handleChange = (event, newValue) => {
setValue(newValue);
};
const BREADCRUMBS = [{ name: t("logsPage.title"), path: "/logs" }];
return (
<Stack gap={theme.spacing(20)}>
<Breadcrumbs list={BREADCRUMBS} />
<Tabs
value={value}
onChange={handleChange}
>
<Tab label={t("logsPage.tabs.logs")} />
<Tab label={t("logsPage.tabs.queue")} />
</Tabs>
{value === 0 && <LogsComponent />}
{value === 1 && <Queue />}
</Stack>
);
};
export default Logs;
@@ -11,6 +11,8 @@ import { formatDurationRounded } from "../../../Utils/timeUtils";
import { StatusLabel } from "../../../Components/Label";
import { setRowsPerPage } from "../../../Features/UI/uiSlice";
import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom";
import dayjs from "dayjs";
/**
* Component for pagination actions (first, previous, next, last).
@@ -36,7 +38,8 @@ const MaintenanceTable = ({
}) => {
const rowsPerPage = useSelector((state) => state?.ui?.maintenance?.rowsPerPage ?? 5);
const dispatch = useDispatch();
const theme = useTheme();
const navigate = useNavigate();
const handleChangePage = (event, newPage) => {
setPage(newPage);
};
@@ -180,6 +183,18 @@ const MaintenanceTable = ({
return (
<>
<DataTable
config={{
rowSX: {
cursor: "pointer",
"&:hover td": {
backgroundColor: theme.palette.tertiary.main,
transition: "background-color .3s ease",
},
},
onRowClick: (row) => {
navigate(`/maintenance/create/${row._id}`);
},
}}
headers={headers}
data={maintenanceWindows}
/>
+33 -280
View File
@@ -17,15 +17,17 @@ import {
useEditNotification,
useTestNotification,
} from "../../../Hooks/useNotifications";
import {
notificationEmailValidation,
notificationWebhookValidation,
notificationPagerDutyValidation,
} from "../../../Validation/validation";
import { notificationValidation } from "../../../Validation/validation";
import { createToast } from "../../../Utils/toastUtils";
import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom";
import { NOTIFICATION_TYPES } from "../utils";
import {
NOTIFICATION_TYPES,
TITLE_MAP,
DESCRIPTION_MAP,
LABEL_MAP,
PLACEHOLDER_MAP,
} from "../utils";
// Setup
@@ -49,11 +51,6 @@ const CreateNotifications = () => {
notificationName: "",
address: "",
type: NOTIFICATION_TYPES[0]._id,
config: {
webhookUrl: "",
platform: "",
routingKey: "",
},
});
const [errors, setErrors] = useState({});
const { t } = useTranslation();
@@ -71,42 +68,17 @@ const CreateNotifications = () => {
type: NOTIFICATION_TYPES.find((type) => type._id === notification.type).value,
};
if (form.type === "slack" || form.type === "discord") {
form.type = "webhook";
}
let error = null;
if (form.type === "email") {
error = notificationEmailValidation.validate(
{ notificationName: form.notificationName, address: form.address },
{ abortEarly: false }
).error;
} else if (form.type === "webhook") {
form.config = {
platform: form.config.platform,
webhookUrl: form.config.webhookUrl,
};
error = notificationWebhookValidation.validate(
{ notificationName: form.notificationName, config: form.config },
{ abortEarly: false }
).error;
} else if (form.type === "pager_duty") {
form.config = {
platform: form.config.platform,
routingKey: form.config.routingKey,
};
error = notificationPagerDutyValidation.validate(
{ notificationName: form.notificationName, config: form.config },
{ abortEarly: false }
).error;
}
error = notificationValidation.validate(form, { abortEarly: false }).error;
if (error) {
const newErrors = {};
error.details.forEach((err) => {
newErrors[err.path[0]] = err.message;
});
console.log(JSON.stringify(newErrors));
console.log(JSON.stringify(form, null, 2));
createToast({ body: "Please check the form for errors." });
setErrors(newErrors);
return;
@@ -124,63 +96,10 @@ const CreateNotifications = () => {
const newNotification = { ...notification, [name]: value };
// Handle config/platform initialization if type is webhook
const type = NOTIFICATION_TYPES.find(
(type) => type._id === newNotification.type
).value;
if (type === "email") {
newNotification.config = null;
} else if (type === "slack" || type === "webhook" || type === "discord") {
newNotification.address = "";
newNotification.config = newNotification.config || {};
if (name === "config") {
newNotification.config = value;
}
if (type === "webhook") {
newNotification.config.platform = "webhook";
}
if (type === "slack") {
newNotification.config.platform = "slack";
}
if (type === "discord") {
newNotification.config.platform = "discord";
}
} else if (type === "pager_duty") {
newNotification.config = newNotification.config || {};
if (name === "config") {
newNotification.config = value;
}
newNotification.config.platform = "pager_duty";
}
// Field-level validation
let fieldError;
if (name === "notificationName") {
const { error } = notificationEmailValidation.extract(name).validate(value);
fieldError = error?.message;
}
if (type === "email" && name === "address") {
const { error } = notificationEmailValidation.extract(name).validate(value);
fieldError = error?.message;
}
if (
(type === "slack" || type === "webhook" || type === "discord") &&
name === "config"
) {
// Validate only webhookUrl inside config
const { error } = notificationWebhookValidation.extract("config").validate(value);
fieldError = error?.message;
}
// Set field-level error
const { error } = notificationValidation.extract(name).validate(value);
setErrors((prev) => ({
...prev,
[name]: fieldError,
[name]: error?.message,
}));
setNotification(newNotification);
@@ -192,36 +111,9 @@ const CreateNotifications = () => {
type: NOTIFICATION_TYPES.find((type) => type._id === notification.type).value,
};
if (form.type === "slack" || form.type === "discord") {
form.type = "webhook";
}
let error = null;
if (form.type === "email") {
error = notificationEmailValidation.validate(
{ notificationName: form.notificationName, address: form.address },
{ abortEarly: false }
).error;
} else if (form.type === "webhook") {
form.config = {
platform: form.config.platform,
webhookUrl: form.config.webhookUrl,
};
error = notificationWebhookValidation.validate(
{ notificationName: form.notificationName, config: form.config },
{ abortEarly: false }
).error;
} else if (form.type === "pager_duty") {
form.config = {
platform: form.config.platform,
routingKey: form.config.routingKey,
};
error = notificationPagerDutyValidation.validate(
{ notificationName: form.notificationName, config: form.config },
{ abortEarly: false }
).error;
}
error = notificationValidation.validate(form, { abortEarly: false }).error;
if (error) {
const newErrors = {};
@@ -236,6 +128,7 @@ const CreateNotifications = () => {
testNotification(form);
};
const type = NOTIFICATION_TYPES.find((type) => type._id === notification.type).value;
return (
<Stack gap={theme.spacing(10)}>
<Breadcrumbs list={BREADCRUMBS} />
@@ -287,171 +180,31 @@ const CreateNotifications = () => {
/>
</Stack>
</ConfigBox>
{notification.type === 1 && (
<ConfigBox>
<Box>
<Typography component="h2">
{t("createNotifications.emailSettings.title")}
</Typography>
<Typography component="p">
{t("createNotifications.emailSettings.description")}
</Typography>
</Box>
<Stack gap={theme.spacing(12)}>
<TextInput
label={t("createNotifications.emailSettings.emailLabel")}
name="address"
placeholder={t("createNotifications.emailSettings.emailPlaceholder")}
value={notification.address}
onChange={onChange}
error={Boolean(errors.address)}
helperText={errors["address"]}
/>
</Stack>
</ConfigBox>
)}
{notification.type === 2 && (
<ConfigBox>
<Box>
<Typography component="h2">
{t("createNotifications.slackSettings.title")}
</Typography>
<Typography component="p">
{t("createNotifications.slackSettings.description")}
</Typography>
</Box>
<Stack gap={theme.spacing(12)}>
<TextInput
label={t("createNotifications.slackSettings.webhookLabel")}
value={notification.config.webhookUrl || ""}
error={Boolean(errors.config)}
helperText={errors["config"]}
onChange={(e) => {
const updatedConfig = {
...notification.config,
webhookUrl: e.target.value,
};
<ConfigBox>
<Box>
<Typography component="h2">{t(TITLE_MAP[type])}</Typography>
<Typography component="p">{t(DESCRIPTION_MAP[type])}</Typography>
</Box>
<Stack gap={theme.spacing(12)}>
<TextInput
label={t(LABEL_MAP[type])}
name="address"
placeholder={t(PLACEHOLDER_MAP[type])}
value={notification.address}
onChange={onChange}
error={Boolean(errors.address)}
helperText={errors["address"]}
/>
</Stack>
</ConfigBox>
onChange({
target: {
name: "config",
value: updatedConfig,
},
});
}}
/>
</Stack>
</ConfigBox>
)}
{notification.type === 3 && (
<ConfigBox>
<Box>
<Typography component="h2">
{t("createNotifications.pagerdutySettings.title")}
</Typography>
<Typography component="p">
{t("createNotifications.pagerdutySettings.description")}
</Typography>
</Box>
<Stack gap={theme.spacing(12)}>
<TextInput
label={t("createNotifications.pagerdutySettings.integrationKeyLabel")}
placeholder={t(
"createNotifications.pagerdutySettings.integrationKeyPlaceholder"
)}
value={notification.config.routingKey || ""}
error={Boolean(errors.config)}
helperText={errors["config"]}
onChange={(e) => {
const updatedConfig = {
...notification.config,
routingKey: e.target.value,
};
onChange({
target: {
name: "config",
value: updatedConfig,
},
});
}}
/>
</Stack>
</ConfigBox>
)}
{notification.type === 4 && (
<ConfigBox>
<Box>
<Typography component="h2">
{t("createNotifications.genericWebhookSettings.title")}
</Typography>
<Typography component="p">
{t("createNotifications.genericWebhookSettings.description")}
</Typography>
</Box>
<Stack gap={theme.spacing(12)}>
<TextInput
label={t("createNotifications.genericWebhookSettings.webhookLabel")}
value={notification.config.webhookUrl || ""}
error={Boolean(errors.config)}
helperText={errors["config"]}
onChange={(e) => {
const updatedConfig = {
...notification.config,
webhookUrl: e.target.value,
};
onChange({
target: {
name: "config",
value: updatedConfig,
},
});
}}
/>
</Stack>
</ConfigBox>
)}
{notification.type === 5 && (
<ConfigBox>
<Box>
<Typography component="h2">
{t("createNotifications.discordSettings.title")}
</Typography>
<Typography component="p">
{t("createNotifications.discordSettings.description")}
</Typography>
</Box>
<Stack gap={theme.spacing(12)}>
<TextInput
label={t("createNotifications.discordSettings.webhookLabel")}
value={notification.config.webhookUrl || ""}
error={Boolean(errors.config)}
helperText={errors["config"]}
onChange={(e) => {
const updatedConfig = {
...notification.config,
webhookUrl: e.target.value,
};
onChange({
target: {
name: "config",
value: updatedConfig,
},
});
}}
/>
</Stack>
</ConfigBox>
)}
<Stack
direction="row"
justifyContent="flex-end"
spacing={theme.spacing(2)}
>
<Button
loading={isCreating || isEditing || notificationIsLoading}
loading={isTesting}
variant="contained"
color="secondary"
onClick={onTestNotification}
+1 -17
View File
@@ -44,27 +44,11 @@ const Notifications = () => {
return row.notificationName;
},
},
{
id: "type",
content: "Type",
render: (row) => {
return row.type;
},
},
{
id: "target",
content: "Target",
render: (row) => {
const type = row.type;
if (type === "email") {
return row.address;
}
if (type === "webhook") {
return row.config?.webhookUrl;
}
if (type === "pager_duty") {
return row.config?.routingKey;
}
return row.address;
},
},
{
+32
View File
@@ -5,3 +5,35 @@ export const NOTIFICATION_TYPES = [
{ _id: 4, name: "Webhook", value: "webhook" },
{ _id: 5, name: "Discord", value: "discord" },
];
export const TITLE_MAP = {
email: "createNotifications.emailSettings.title",
slack: "createNotifications.slackSettings.title",
pager_duty: "createNotifications.pagerDutySettings.title",
webhook: "createNotifications.webhookSettings.title",
discord: "createNotifications.discordSettings.title",
};
export const DESCRIPTION_MAP = {
email: "createNotifications.emailSettings.description",
slack: "createNotifications.slackSettings.description",
pager_duty: "createNotifications.pagerDutySettings.description",
webhook: "createNotifications.webhookSettings.description",
discord: "createNotifications.discordSettings.description",
};
export const LABEL_MAP = {
email: "createNotifications.emailSettings.emailLabel",
slack: "createNotifications.slackSettings.webhookLabel",
pager_duty: "createNotifications.pagerDutySettings.integrationKeyLabel",
webhook: "createNotifications.webhookSettings.webhookLabel",
discord: "createNotifications.discordSettings.webhookLabel",
};
export const PLACEHOLDER_MAP = {
email: "createNotifications.emailSettings.emailPlaceholder",
slack: "createNotifications.slackSettings.webhookPlaceholder",
pager_duty: "createNotifications.pagerDutySettings.integrationKeyPlaceholder",
webhook: "createNotifications.webhookSettings.webhookPlaceholder",
discord: "createNotifications.discordSettings.webhookPlaceholder",
};
+3 -3
View File
@@ -16,15 +16,15 @@ const SettingsAbout = () => {
component="h1"
variant="h2"
>
{t("settingsAbout")}
{t("settingsPage.aboutSettings.title")}
</Typography>
</Box>
<Box>
<Typography component="h2">
{t("common.appName")} {2.1}
{t("common.appName")} {__APP_VERSION__}
</Typography>
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(6), opacity: 0.6 }}>
{t("settingsDevelopedBy")}
{t("settingsPage.aboutSettings.labelDevelopedBy")}
</Typography>
<Link
level="secondary"
@@ -27,12 +27,13 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, handleChange, isLoading }) =
component="h1"
variant="h2"
>
{t("settingsDemoMonitors")}
{t("settingsPage.demoMonitorsSettings.title")}
</Typography>
<Typography sx={HEADER_SX}>
{t("settingsPage.demoMonitorsSettings.description")}
</Typography>
<Typography sx={HEADER_SX}>{t("settingsDemoMonitorsDescription")}</Typography>
</Box>
<Box>
<Typography>{t("settingsAddDemoMonitors")}</Typography>
<Button
variant="contained"
color="accent"
@@ -47,7 +48,7 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, handleChange, isLoading }) =
}}
sx={{ mt: theme.spacing(4) }}
>
{t("settingsAddDemoMonitorsButton")}
{t("settingsPage.demoMonitorsSettings.buttonAddMonitors")}
</Button>
</Box>
</ConfigBox>
@@ -57,14 +58,13 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, handleChange, isLoading }) =
component="h1"
variant="h2"
>
{t("settingsSystemReset")}
{t("settingsPage.systemResetSettings.title")}
</Typography>
<Typography sx={{ mt: theme.spacing(2) }}>
{t("settingsSystemResetDescription")}
{t("settingsPage.systemResetSettings.description")}
</Typography>
</Box>
<Box>
<Typography>{t("settingsRemoveAllMonitors")}</Typography>
<Button
variant="contained"
color="error"
@@ -72,15 +72,15 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, handleChange, isLoading }) =
onClick={() => setIsOpen(true)}
sx={{ mt: theme.spacing(4) }}
>
{t("settingsRemoveAllMonitorsButton")}
{t("settingsPage.systemResetSettings.buttonRemoveAllMonitors")}
</Button>
</Box>
<Dialog
open={isOpen}
theme={theme}
title={t("settingsRemoveAllMonitorsDialogTitle")}
title={t("settingsPage.systemResetSettings.dialogTitle")}
onCancel={() => setIsOpen(false)}
confirmationButtonLabel={t("settingsRemoveAllMonitorsDialogConfirm")}
confirmationButtonLabel={t("settingsPage.systemResetSettings.dialogConfirm")}
onConfirm={() => {
const syntheticEvent = {
target: {
+100 -43
View File
@@ -4,15 +4,16 @@ import ConfigBox from "../../Components/ConfigBox";
import TextInput from "../../Components/Inputs/TextInput";
import Button from "@mui/material/Button";
import Stack from "@mui/material/Stack";
import { Switch } from "@mui/material";
import TextLink from "../../Components/TextLink";
// Utils
import { useTheme } from "@emotion/react";
import { PropTypes } from "prop-types";
import { useState, useEffect } from "react";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments";
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
import { createToast } from "../../Utils/toastUtils";
import { Switch } from "@mui/material";
const SettingsEmail = ({
isAdmin,
@@ -110,14 +111,16 @@ const SettingsEmail = ({
component="h1"
variant="h2"
>
{t("settingsEmail")}
{t("settingsPage.emailSettings.title")}
</Typography>
<Typography sx={HEADER_SX}>
{t("settingsPage.emailSettings.description")}
</Typography>
<Typography sx={HEADER_SX}>{t("settingsEmailDescription")}</Typography>
</Box>
<Box>
<Stack gap={theme.spacing(10)}>
<Box>
<Typography>{t("settingsEmailHost")}</Typography>
<Typography>{t("settingsPage.emailSettings.labelHost")}</Typography>
<TextInput
name="systemEmailHost"
placeholder="smtp.gmail.com"
@@ -126,7 +129,7 @@ const SettingsEmail = ({
/>
</Box>
<Box>
<Typography>{t("settingsEmailPort")}</Typography>
<Typography>{t("settingsPage.emailSettings.labelPort")}</Typography>
<TextInput
name="systemEmailPort"
placeholder="425"
@@ -136,16 +139,16 @@ const SettingsEmail = ({
/>
</Box>
<Box>
<Typography>{t("settingsEmailUser")}</Typography>
<Typography>{t("settingsPage.emailSettings.labelUser")}</Typography>
<TextInput
name="systemEmailUser"
placeholder="Leave empty if not required"
placeholder={t("settingsPage.emailSettings.placeholderUser")}
value={systemEmailUser}
onChange={handleChange}
/>
</Box>
<Box>
<Typography>{t("settingsEmailAddress")}</Typography>
<Typography>{t("settingsPage.emailSettings.labelAddress")}</Typography>
<TextInput
name="systemEmailAddress"
placeholder="uptime@bluewavelabs.ca"
@@ -155,7 +158,7 @@ const SettingsEmail = ({
</Box>
{(isEmailPasswordSet === false || emailPasswordHasBeenReset === true) && (
<Box>
<Typography>{t("settingsEmailPassword")}</Typography>
<Typography>{t("settingsPage.emailSettings.labelPassword")}</Typography>
<TextInput
name="systemEmailPassword"
type="password"
@@ -169,7 +172,7 @@ const SettingsEmail = ({
{isEmailPasswordSet === true && emailPasswordHasBeenReset === false && (
<Box>
<Typography>{t("settingsEmailFieldResetLabel")}</Typography>
<Typography>{t("settingsPage.emailSettings.labelPasswordSet")}</Typography>
<Button
onClick={() => {
setPassword("");
@@ -188,7 +191,7 @@ const SettingsEmail = ({
</Box>
)}
<Box>
<Typography>{t("settingsEmailTLSServername")}</Typography>
<Typography>{t("settingsPage.emailSettings.labelTLSServername")}</Typography>
<TextInput
name="systemEmailTLSServername"
placeholder="bluewavelabs.ca"
@@ -197,7 +200,7 @@ const SettingsEmail = ({
/>
</Box>
<Box>
<Typography>{t("settingsEmailConnectionHost")}</Typography>
<Typography>{t("settingsPage.emailSettings.labelConnectionHost")}</Typography>
<TextInput
name="systemEmailConnectionHost"
placeholder="bluewavelabs.ca"
@@ -212,37 +215,91 @@ const SettingsEmail = ({
gap: theme.spacing(4),
}}
>
<Typography>{t("settingsEmailSecure")}</Typography>
<Switch
name="systemEmailSecure"
checked={systemEmailSecure}
onChange={handleChange}
/>
<Typography>{t("settingsEmailPool")}</Typography>
<Switch
name="systemEmailPool"
checked={systemEmailPool}
onChange={handleChange}
/>
<Typography>{t("settingsEmailIgnoreTLS")}</Typography>
<Switch
name="systemEmailIgnoreTLS"
checked={systemEmailIgnoreTLS}
onChange={handleChange}
/>
<Typography>{t("settingsEmailRequireTLS")}</Typography>
<Switch
name="systemEmailRequireTLS"
checked={systemEmailRequireTLS}
onChange={handleChange}
/>
<Typography>{t("settingsEmailRejectUnauthorized")}</Typography>
<Switch
name="systemEmailRejectUnauthorized"
checked={systemEmailRejectUnauthorized}
onChange={handleChange}
{[
[
"settingsPage.emailSettings.labelSecure",
"systemEmailSecure",
systemEmailSecure,
],
[
"settingsPage.emailSettings.labelPool",
"systemEmailPool",
systemEmailPool,
],
[
"settingsPage.emailSettings.labelIgnoreTLS",
"systemEmailIgnoreTLS",
systemEmailIgnoreTLS,
],
[
"settingsPage.emailSettings.labelRequireTLS",
"systemEmailRequireTLS",
systemEmailRequireTLS,
],
[
"settingsPage.emailSettings.labelRejectUnauthorized",
"systemEmailRejectUnauthorized",
systemEmailRejectUnauthorized,
],
].map(([labelKey, name, value]) => (
<Box
key={name}
sx={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
}}
>
<Typography>{t(labelKey)}</Typography>
<Switch
name={name}
checked={value}
onChange={handleChange}
/>
</Box>
))}
<TextLink
text={t("settingsPage.emailSettings.descriptionTransport")}
linkText={t("settingsPage.emailSettings.linkTransport")}
href="https://nodemailer.com/smtp"
target="_blank"
/>
<Box
component={"pre"}
sx={{
fontFamily: "monospace",
p: 2,
borderRadius: 1,
overflow: "auto",
}}
>
<code>
{JSON.stringify(
{
host: systemEmailHost,
port: systemEmailPort,
secure: systemEmailSecure,
auth: {
user: systemEmailUser || systemEmailAddress,
pass: "<your_password>",
},
name: systemEmailConnectionHost || "localhost",
pool: systemEmailPool,
tls: {
rejectUnauthorized: systemEmailRejectUnauthorized,
ignoreTLS: systemEmailIgnoreTLS,
requireTLS: systemEmailRequireTLS,
servername: systemEmailTLSServername,
},
},
null,
2
)}
</code>
</Box>
</Box>
<Box>
{systemEmailHost &&
systemEmailPort &&
@@ -254,7 +311,7 @@ const SettingsEmail = ({
loading={isSending}
onClick={handleSendTestEmail}
>
{t("settingsTestEmail", "Send test e-mail")}
{t("settingsPage.emailSettings.buttonSendTestEmail")}
</Button>
)}
</Box>
@@ -8,7 +8,7 @@ import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornmen
// Utils
import { useTheme } from "@emotion/react";
import { PropTypes } from "prop-types";
import { useState, useEffect } from "react";
import { useState } from "react";
import { useTranslation } from "react-i18next";
const SettingsPagespeed = ({
@@ -46,15 +46,17 @@ const SettingsPagespeed = ({
component="h1"
variant="h2"
>
{t("pageSpeedApiKeyFieldTitle")}
{t("settingsPage.pageSpeedSettings.title")}
</Typography>
<Typography sx={HEADING_SX}>
{t("settingsPage.pageSpeedSettings.description")}
</Typography>
<Typography sx={HEADING_SX}>{t("pageSpeedApiKeyFieldDescription")}</Typography>
</Box>
<Stack gap={theme.spacing(20)}>
{(isApiKeySet === false || apiKeyHasBeenReset === true) && (
<TextInput
name="pagespeedApiKey"
label={t("pageSpeedApiKeyFieldLabel")}
label={t("settingsPage.pageSpeedSettings.labelApiKey")}
value={apiKey}
type={"password"}
onChange={handleChange}
@@ -65,7 +67,7 @@ const SettingsPagespeed = ({
{isApiKeySet === true && apiKeyHasBeenReset === false && (
<Box>
<Typography>{t("pageSpeedApiKeyFieldResetLabel")}</Typography>
<Typography>{t("settingsPage.pageSpeedSettings.labelApiKeySet")}</Typography>
<Button
onClick={() => {
setApiKey("");
+13 -9
View File
@@ -29,17 +29,17 @@ const SettingsStats = ({ isAdmin, HEADING_SX, handleChange, settingsData, errors
variant="h2"
sx={HEADING_SX}
>
{t("settingsHistoryAndMonitoring")}
{t("settingsPage.statsSettings.title")}
</Typography>
<Typography sx={{ mt: theme.spacing(2) }}>
{t("settingsHistoryAndMonitoringDescription")}
{t("settingsPage.statsSettings.description")}
</Typography>
</Box>
<Stack gap={theme.spacing(20)}>
<TextInput
name="checkTTL"
label={t("settingsTTLLabel")}
optionalLabel={t("settingsTTLOptionalLabel")}
label={t("settingsPage.statsSettings.labelTTL")}
optionalLabel={t("settingsPage.statsSettings.labelTTLOptional")}
value={settingsData?.settings?.checkTTL ?? ""}
onChange={handleChange}
type="number"
@@ -47,24 +47,28 @@ const SettingsStats = ({ isAdmin, HEADING_SX, handleChange, settingsData, errors
helperText={errors.checkTTL}
/>
<Box>
<Typography>{t("settingsClearAllStats")}</Typography>
<Typography>
{t("settingsPage.statsSettings.clearAllStatsDescription")}
</Typography>
<Button
variant="contained"
color="error"
onClick={() => setIsOpen(true)}
sx={{ mt: theme.spacing(4) }}
>
{t("settingsClearAllStatsButton")}
{t("settingsPage.statsSettings.clearAllStatsButton")}
</Button>
</Box>
</Stack>
<Dialog
open={isOpen}
theme={theme}
title={t("settingsClearAllStatsDialogTitle")}
description={t("settingsClearAllStatsDialogDescription")}
title={t("settingsPage.statsSettings.clearAllStatsDialogTitle")}
description={t("settingsPage.statsSettings.clearAllStatsDialogDescription")}
onCancel={() => setIsOpen(false)}
confirmationButtonLabel={t("settingsClearAllStatsDialogConfirm")}
confirmationButtonLabel={t(
"settingsPage.statsSettings.clearAllStatsDialogConfirm"
)}
onConfirm={() => {
const syntheticEvent = {
target: {
@@ -19,16 +19,17 @@ const SettingsTimeZone = ({ HEADING_SX, handleChange, timezone }) => {
component="h1"
variant="h2"
>
{t("settingsGeneralSettings")}
{t("settingsPage.timezoneSettings.title")}
</Typography>
<Typography sx={HEADING_SX}>
<Typography component="span">{t("settingsDisplayTimezone")}</Typography>-{" "}
{t("settingsDisplayTimezoneDescription")}
<Typography component="span">
{t("settingsPage.timezoneSettings.description")}
</Typography>
</Typography>
</Box>
<Stack gap={theme.spacing(20)}>
<Select
label={t("settingsDisplayTimezone")}
label={t("settingsPage.timezoneSettings.label")}
name="timezone"
value={timezone}
onChange={handleChange}
+6 -4
View File
@@ -20,14 +20,16 @@ const SettingsUI = ({ HEADING_SX, handleChange, mode, language }) => {
component="h1"
variant="h2"
>
{t("settingsAppearance")}
{t("settingsPage.uiSettings.title")}
</Typography>
<Typography sx={HEADING_SX}>
{t("settingsPage.uiSettings.description")}
</Typography>
<Typography sx={HEADING_SX}>{t("settingsAppearanceDescription")}</Typography>
</Box>
<Stack gap={theme.spacing(20)}>
<Select
name="mode"
label={t("settingsThemeMode")}
label={t("settingsPage.uiSettings.labelTheme")}
value={mode}
onChange={handleChange}
items={[
@@ -37,7 +39,7 @@ const SettingsUI = ({ HEADING_SX, handleChange, mode, language }) => {
></Select>
<Select
name="language"
label={t("settingsLanguage")}
label={t("settingsPage.uiSettings.labelLanguage")}
value={language}
onChange={handleChange}
items={languages.map((lang) => ({ _id: lang, name: lang.toUpperCase() }))}
+7 -5
View File
@@ -15,18 +15,20 @@ const SettingsURL = ({ HEADING_SX, handleChange, showURL = false }) => {
return (
<ConfigBox>
<Box>
<Typography component="h1">{t("settingsURLTitle")}</Typography>
<Typography sx={HEADING_SX}>{t("settingsURLDescription")}</Typography>
<Typography component="h1">{t("settingsPage.urlSettings.title")}</Typography>
<Typography sx={HEADING_SX}>
{t("settingsPage.urlSettings.description")}
</Typography>
</Box>
<Stack gap={theme.spacing(20)}>
<Select
name="showURL"
label={t("settingsURLSelectTitle")}
label={t("settingsPage.urlSettings.label")}
value={showURL || ""}
onChange={handleChange}
items={[
{ _id: true, name: t("settingsURLEnabled") },
{ _id: false, name: t("settingURLDisabled") },
{ _id: true, name: t("settingsPage.urlSettings.selectEnabled") },
{ _id: false, name: t("settingsPage.urlSettings.selectDisabled") },
]}
></Select>
</Stack>
+3 -2
View File
@@ -157,7 +157,7 @@ const Settings = () => {
return (
<Stack gap={theme.spacing(10)}>
<Breadcrumbs list={BREADCRUMBS} />
<Typography variant="h1">Settings</Typography>
<Typography variant="h1">{t("settingsPage.title")}</Typography>
<SettingsTimeZone
HEADING_SX={HEADING_SX}
handleChange={handleChange}
@@ -208,6 +208,7 @@ const Settings = () => {
emailPasswordHasBeenReset={emailPasswordHasBeenReset}
setEmailPasswordHasBeenReset={setEmailPasswordHasBeenReset}
/>
<SettingsAbout />
<Stack
direction="row"
@@ -241,7 +242,7 @@ const Settings = () => {
sx={{ px: theme.spacing(12), py: theme.spacing(8) }}
onClick={handleSave}
>
{t("settingsSave")}
{t("settingsPage.saveButtonLabel")}
</Button>
</Stack>
</Stack>
@@ -90,6 +90,13 @@ const Content = ({
isChecked={form.showUptimePercentage}
onChange={handleFormChange}
/>
<Checkbox
id="showAdminLoginLink"
name="showAdminLoginLink"
label={t("showAdminLoginLink")}
isChecked={form.showAdminLoginLink}
onChange={handleFormChange}
/>
</Stack>
</ConfigStack>
</Stack>
+3 -1
View File
@@ -20,7 +20,7 @@ const TAB_LIST = ["General settings", "Contents"];
const ERROR_TAB_MAPPING = [
["companyName", "url", "timezone", "color", "isPublished", "logo"],
["monitors", "showUptimePercentage", "showCharts"],
["monitors", "showUptimePercentage", "showCharts", "showAdminLoginLink"],
];
const CreateStatusPage = () => {
@@ -39,6 +39,7 @@ const CreateStatusPage = () => {
monitors: [],
showCharts: true,
showUptimePercentage: true,
showAdminLoginLink: false,
});
const [errors, setErrors] = useState({});
const [selectedMonitors, setSelectedMonitors] = useState([]);
@@ -195,6 +196,7 @@ const CreateStatusPage = () => {
logo: newLogo,
showCharts: statusPage?.showCharts ?? true,
showUptimePercentage: statusPage?.showUptimePercentage ?? true,
showAdminLoginLink: statusPage?.showAdminLoginLink ?? false,
};
});
setSelectedMonitors(statusPageMonitors);
+1 -1
View File
@@ -48,7 +48,7 @@ const PublicStatus = () => {
let link = undefined;
const isPublic = location.pathname.startsWith("/status/uptime/public");
// Public status page
if (isPublic) {
if (isPublic && statusPage && statusPage.showAdminLoginLink === true) {
sx = {
paddingTop: theme.spacing(20),
paddingLeft: "20vw",
+14
View File
@@ -111,6 +111,7 @@ const UptimeDetails = () => {
return (
<Stack gap={theme.spacing(10)}>
<Breadcrumbs list={BREADCRUMBS} />
<MonitorDetailsControlHeader
path={"uptime"}
isAdmin={isAdmin}
@@ -118,6 +119,19 @@ const UptimeDetails = () => {
monitor={monitor}
triggerUpdate={triggerUpdate}
/>
<UptimeStatusBoxes
isLoading={monitorIsLoading}
monitor={monitor}
monitorStats={monitorStats}
certificateExpiry={certificateExpiry}
/>
<MonitorTimeFrameHeader
isLoading={monitorIsLoading}
hasDateRange={true}
dateRange={dateRange}
setDateRange={setDateRange}
/>
<GenericFallback>
<Typography>{t("distributedUptimeDetailsNoMonitorHistory")}</Typography>
</GenericFallback>
+6
View File
@@ -51,6 +51,7 @@ import ProtectedRoute from "../Components/ProtectedRoute";
import CreateNewMaintenanceWindow from "../Pages/Maintenance/CreateMaintenance";
import withAdminCheck from "../Components/HOC/withAdminCheck";
import BulkImport from "../Pages/Uptime/BulkImport";
import Logs from "../Pages/Logs";
const Routes = () => {
const AdminCheckedRegister = withAdminCheck(AuthRegister);
@@ -186,6 +187,11 @@ const Routes = () => {
path="account/team"
element={<Account open={"team"} />}
/>
<Route
path="logs"
element={<Logs />}
/>
</Route>
<Route
+30
View File
@@ -893,6 +893,9 @@ class NetworkService {
if (form.showUptimePercentage !== undefined) {
fd.append("showUptimePercentage", String(form.showUptimePercentage));
}
if (form.showAdminLoginLink !== undefined) {
fd.append("showAdminLoginLink", String(form.showAdminLoginLink));
}
form.monitors &&
form.monitors.forEach((monitorId) => {
fd.append("monitors[]", monitorId);
@@ -1044,6 +1047,33 @@ class NetworkService {
const { id, notification } = config;
return this.axiosInstance.put(`/notifications/${id}`, notification);
}
async getQueueData() {
return this.axiosInstance.get(`/queue/all-metrics`, {
headers: {
"Content-Type": "application/json",
},
});
}
async flushQueue() {
return this.axiosInstance.post(`/queue/flush`);
}
async exportMonitors() {
const response = await this.axiosInstance.get("/monitors/export", {
responseType: "blob",
});
return response;
}
async getLogs() {
return this.axiosInstance.get(`/logs`, {
headers: {
"Content-Type": "application/json",
},
});
}
}
export default NetworkService;
+2 -1
View File
@@ -85,6 +85,7 @@ const semanticColors = {
const newColors = {
offWhite: "#FEFEFE",
offBlack: "#131315",
gray0: "#FDFDFD",
gray10: "#F4F4FF",
gray100: "#F3F3F3",
gray200: "#EFEFEF",
@@ -178,7 +179,7 @@ const newSemanticColors = {
},
primaryBackground: {
main: {
light: newColors.gray10,
light: newColors.gray0,
dark: "#000000",
},
},
+8
View File
@@ -36,6 +36,11 @@ const baseTheme = (palette) => ({
color: palette.primary.contrastTextTertiary,
fontWeight: 400,
},
label: {
fontSize: "var(--env-var-font-size-medium)",
color: palette.primary.contrastTextSecondary,
fontWeight: 500,
},
},
/* TODO change to 4 */
spacing: 2,
@@ -407,6 +412,7 @@ const baseTheme = (palette) => ({
}),
},
},
MuiTab: {
styleOverrides: {
root: ({ theme }) => ({
@@ -475,6 +481,8 @@ const baseTheme = (palette) => ({
MuiTabs: {
styleOverrides: {
root: ({ theme }) => ({
height: "34px",
minHeight: "34px",
display: "inline-flex",
borderRadius: 0,
"& .MuiTabs-indicator": {
+1
View File
@@ -24,6 +24,7 @@ i18n.use(initReactI18next).init({
interpolation: {
escapeValue: false,
},
returnEmptyString: false,
});
export default i18n;
+9
View File
@@ -36,3 +36,12 @@ export const parseDomainName = (url) => {
return url;
};
export const TypeToPathMap = {
http: "uptime",
port: "uptime",
docker: "uptime",
ping: "uptime",
hardware: "infrastructure",
pagespeed: "pagespeed",
};
+10 -49
View File
@@ -277,6 +277,7 @@ const statusPageValidation = joi.object({
logo: logoImageValidation,
showUptimePercentage: joi.boolean(),
showCharts: joi.boolean(),
showAdminLoginLink: joi.boolean(),
});
const settingsValidation = joi.object({
@@ -404,57 +405,19 @@ const infrastructureMonitorValidation = joi.object({
notifications: joi.array().items(joi.string()),
});
const notificationEmailValidation = joi.object({
const notificationValidation = joi.object({
notificationName: joi.string().required().messages({
"string.empty": "Notification name is required",
"any.required": "Notification name is required",
}),
address: joi
.string()
.email({ tlds: { allow: false } })
.required()
.messages({
"string.empty": "E-mail address cannot be empty",
"string.email": "Please enter a valid e-mail address",
"string.base": "E-mail address must be a string",
"any.required": "E-mail address is required",
}),
});
const notificationWebhookValidation = joi.object({
notificationName: joi.string().required().messages({
"string.empty": "Notification name is required",
"any.required": "Notification name is required",
address: joi.string().required().messages({
"string.empty": "This field cannot be empty",
"string.base": "This field must be a string",
"any.required": "This field is required",
}),
config: joi
.object({
webhookUrl: joi.string().uri().required().messages({
"string.empty": "Webhook URL is required",
"string.uri": "Webhook URL must be a valid URI",
"any.required": "Webhook URL is required",
}),
platform: joi.string().required().messages({
"string.base": "Platform must be a string",
"any.required": "Platform is required",
}),
})
.unknown(true),
});
const notificationPagerDutyValidation = joi.object({
notificationName: joi.string().required().messages({
"string.empty": "Notification name is required",
"any.required": "Notification name is required",
}),
config: joi.object({
platform: joi.string().required().messages({
"string.base": "Platform must be a string",
"any.required": "Platform is required",
}),
routingKey: joi.string().required().messages({
"string.empty": "Routing key is required",
"any.required": "Routing key is required",
}),
type: joi.string().required().messages({
"string.empty": "This field is required",
"any.required": "This field is required",
}),
});
@@ -469,7 +432,5 @@ export {
infrastructureMonitorValidation,
statusPageValidation,
logoImageValidation,
notificationEmailValidation,
notificationWebhookValidation,
notificationPagerDutyValidation,
notificationValidation,
};
+5
View File
@@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M21 5C21 6.65685 16.9706 8 12 8C7.02944 8 3 6.65685 3 5M21 5C21 3.34315 16.9706 2 12 2C7.02944 2 3 3.34315 3 5M21 5V19C21 20.66 17 22 12 22C7 22 3 20.66 3 19V5M21 12C21 13.66 17 15 12 15C7 15 3 13.66 3 12"
stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>

After

Width:  |  Height:  |  Size: 421 B

+11 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "",
"settingsDemoMonitors": "",
"settingsDemoMonitorsDescription": "",
"settingsAddDemoMonitors": "",
"settingsAddDemoMonitorsButton": "",
"settingsRemoveAllMonitors": "",
"settingsRemoveAllMonitorsButton": "",
"settingsRemoveAllMonitorsDialogTitle": "",
"settingsRemoveAllMonitorsDialogConfirm": "",
@@ -583,6 +581,13 @@
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +714,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +745,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}
+11 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "",
"settingsDemoMonitors": "",
"settingsDemoMonitorsDescription": "",
"settingsAddDemoMonitors": "",
"settingsAddDemoMonitorsButton": "",
"settingsRemoveAllMonitors": "",
"settingsRemoveAllMonitorsButton": "",
"settingsRemoveAllMonitorsDialogTitle": "",
"settingsRemoveAllMonitorsDialogConfirm": "",
@@ -583,6 +581,13 @@
},
"errors": {
"validation": "Nastala chyba při ověřování dat."
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +714,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +745,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}
+11 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "",
"settingsDemoMonitors": "",
"settingsDemoMonitorsDescription": "",
"settingsAddDemoMonitors": "",
"settingsAddDemoMonitorsButton": "",
"settingsRemoveAllMonitors": "",
"settingsRemoveAllMonitorsButton": "",
"settingsRemoveAllMonitorsDialogTitle": "",
"settingsRemoveAllMonitorsDialogConfirm": "",
@@ -583,6 +581,13 @@
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +714,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +745,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}
+757 -667
View File
File diff suppressed because it is too large. Load diff
+11 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "",
"settingsDemoMonitors": "",
"settingsDemoMonitorsDescription": "",
"settingsAddDemoMonitors": "",
"settingsAddDemoMonitorsButton": "",
"settingsRemoveAllMonitors": "",
"settingsRemoveAllMonitorsButton": "",
"settingsRemoveAllMonitorsDialogTitle": "",
"settingsRemoveAllMonitorsDialogConfirm": "",
@@ -583,6 +581,13 @@
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +714,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +745,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}
+11 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "",
"settingsDemoMonitors": "",
"settingsDemoMonitorsDescription": "",
"settingsAddDemoMonitors": "",
"settingsAddDemoMonitorsButton": "",
"settingsRemoveAllMonitors": "",
"settingsRemoveAllMonitorsButton": "",
"settingsRemoveAllMonitorsDialogTitle": "",
"settingsRemoveAllMonitorsDialogConfirm": "",
@@ -583,6 +581,13 @@
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +714,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +745,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}
+11 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "Oui, effacer les stats",
"settingsDemoMonitors": "",
"settingsDemoMonitorsDescription": "",
"settingsAddDemoMonitors": "",
"settingsAddDemoMonitorsButton": "",
"settingsRemoveAllMonitors": "",
"settingsRemoveAllMonitorsButton": "",
"settingsRemoveAllMonitorsDialogTitle": "",
"settingsRemoveAllMonitorsDialogConfirm": "",
@@ -583,6 +581,13 @@
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +714,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +745,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}
+12 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "Sim, limpar todas as estatísticas",
"settingsDemoMonitors": "Monitores de demonstração",
"settingsDemoMonitorsDescription": "Adicione monitores de genéricos para fins de demonstração.",
"settingsAddDemoMonitors": "Adicionando monitores de demonstração",
"settingsAddDemoMonitorsButton": "Adicionar monitores de demonstração",
"settingsRemoveAllMonitors": "Removendo todos os monitores",
"settingsRemoveAllMonitorsButton": "Remover todos os monitores",
"settingsRemoveAllMonitorsDialogTitle": "Você deseja remover todos os monitores?",
"settingsRemoveAllMonitorsDialogConfirm": "Sim, remova todos os monitores",
@@ -312,6 +310,7 @@
"statusPageCreateTabsContentFeaturesDescription": "Mostrar mais detalhes na página de status",
"showCharts": "Mostrar gráficos",
"showUptimePercentage": "Mostrar porcentagem de Uptime",
"showAdminLoginLink": "Mostrar o link \"Administrador? Efetue login aqui\" na página de status",
"removeLogo": "Remover logo",
"statusPageStatus": "Uma página de status pública não está configurada.",
"statusPageStatusContactAdmin": "Entre em contato com seu administrador",
@@ -583,6 +582,13 @@
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +715,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +746,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}
+11 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "Да, очистить всю статистику",
"settingsDemoMonitors": "Демо мониторы",
"settingsDemoMonitorsDescription": "Здесь вы можете добавлять и удалять демонстрационные мониторы.",
"settingsAddDemoMonitors": "Добавьте демонстрационные мониторы",
"settingsAddDemoMonitorsButton": "Добавьте демонстрационные мониторы",
"settingsRemoveAllMonitors": "Удалить все демонстрационные мониторы",
"settingsRemoveAllMonitorsButton": "Удалить все демонстрационные мониторы",
"settingsRemoveAllMonitorsDialogTitle": "Хотите удалить все мониторы?",
"settingsRemoveAllMonitorsDialogConfirm": "Да, очистить все мониторы",
@@ -583,6 +581,13 @@
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +714,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +745,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}
+131 -125
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "Evet, tüm istatistikleri temizle",
"settingsDemoMonitors": "Demo monitörler",
"settingsDemoMonitorsDescription": "Burada demo monitörler ekleyebilir ve kaldırabilirsiniz.",
"settingsAddDemoMonitors": "Demo monitörler ekle",
"settingsAddDemoMonitorsButton": "Demo monitörler ekle",
"settingsRemoveAllMonitors": "Tüm monitörleri kaldır",
"settingsRemoveAllMonitorsButton": "Tüm monitörleri kaldır",
"settingsRemoveAllMonitorsDialogTitle": "Tüm monitörleri kaldırmak istiyor musunuz?",
"settingsRemoveAllMonitorsDialogConfirm": "Evet, tüm monitörleri temizle",
@@ -117,11 +115,11 @@
"title": "",
"checks": [""]
},
"createButton": "",
"createTitle": "",
"createButton": "Bildirim kanalı oluştur",
"createTitle": "Bildirim kanalı",
"create": {
"success": "",
"failed": ""
"failed": "Bildirim kanalı oluşturulamadı"
},
"fetch": {
"success": "",
@@ -136,7 +134,7 @@
"failed": ""
},
"test": {
"success": "",
"success": "Test bildirimi başarıyla gönderildi",
"failed": ""
}
},
@@ -373,33 +371,33 @@
"pageSpeedApiKeyFieldDescription": "Sayfa hızı izlemeyi etkinleştirmek için Google PageSpeed API anahtarınızı girin. Anahtarı güncellemek için Sıfırla'ya tıklayın.",
"pageSpeedApiKeyFieldResetLabel": "API anahtarı ayarlandı. Değiştirmek için Sıfırla'ya tıklayın.",
"reset": "Sıfırla",
"ignoreTLSError": "",
"tlsErrorIgnored": "",
"ignoreTLSError": "TLS/SSL hatalarını gözardı et",
"tlsErrorIgnored": "TLS/SSL hataları gözardı ediliyor",
"ignoreTLSErrorDescription": "",
"createNew": "",
"createNew": "Yeni oluştur",
"greeting": {
"prepend": "",
"prepend": "Merhaba",
"append": "",
"overview": ""
},
"roles": {
"superAdmin": "",
"admin": "",
"teamMember": "",
"demoUser": ""
"superAdmin": "Süper yönetici",
"admin": "Yönetici",
"teamMember": "Ekip elemanı",
"demoUser": "Demo kullanıcısı"
},
"teamPanel": {
"teamMembers": "",
"teamMembers": "Ekip elemanları",
"filter": {
"all": "",
"member": ""
"all": "Tümü",
"member": "Eleman"
},
"inviteTeamMember": "",
"inviteNewTeamMember": "",
"inviteTeamMember": "Ekip elemanı davet et",
"inviteNewTeamMember": "Yeni ekip elemanı davet et",
"inviteDescription": "",
"email": "",
"selectRole": "",
"inviteLink": "",
"email": "Eposta",
"selectRole": "Rolü seçin",
"inviteLink": "Davet linki",
"cancel": "",
"noMembers": "",
"getToken": "",
@@ -422,21 +420,21 @@
"infrastructure": "",
"incidents": "",
"statusPages": "",
"maintenance": "",
"integrations": "",
"settings": "",
"support": "",
"discussions": "",
"docs": "",
"changelog": "",
"profile": "",
"password": "",
"team": "",
"maintenance": "Bakım",
"integrations": "Entegrasyonlar",
"settings": "Ayarlar",
"support": "Destek",
"discussions": "Soru-cevap",
"docs": "Dokümanlar",
"changelog": "Değişiklik günlüğü",
"profile": "Profil",
"password": "Parola",
"team": "Ekip",
"logOut": "Çıkış yap",
"notifications": ""
"notifications": "Bildirimler"
},
"settingsEmail": "",
"settingsEmailDescription": "",
"settingsEmail": "Eposta",
"settingsEmailDescription": "Sistem için eposta ayarlarını düzenleyin. Bu işlem eposta üzerinden bildirim ve alarm almak için gereklidir.",
"settingsEmailHost": "",
"settingsEmailPort": "",
"settingsEmailAddress": "",
@@ -490,73 +488,73 @@
"port": ""
},
"common": {
"appName": "",
"appName": "Checkmate",
"monitoringAgentName": "",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "",
"checkConnection": "",
"unknownError": ""
"checkConnection": "Lütfen bağlantınızı kontrol edin",
"unknownError": "Bilinmeyen hata"
}
},
"auth": {
"common": {
"navigation": {
"continue": "",
"back": ""
"continue": "Devam et",
"back": "Geri"
},
"inputs": {
"email": {
"label": "",
"label": "Eposta",
"placeholder": "",
"errors": {
"empty": "",
"empty": "Devam etmek için eposta adresinizi girin",
"invalid": ""
}
},
"password": {
"label": "",
"label": "Parola",
"rules": {
"length": {
"beginning": "",
"highlighted": ""
"highlighted": "8 karakter uzunluğunda"
},
"special": {
"beginning": "",
"highlighted": ""
"beginning": "En az içermelidir: ",
"highlighted": "bir özel karakter"
},
"number": {
"beginning": "",
"highlighted": ""
"beginning": "En az içermelidir: ",
"highlighted": "bir sayı"
},
"uppercase": {
"beginning": "",
"highlighted": ""
"beginning": "En az içermelidir: ",
"highlighted": "Bir büyük harf"
},
"lowercase": {
"beginning": "",
"highlighted": ""
"beginning": "En az içermelidir: ",
"highlighted": "Bir küçük harf"
},
"match": {
"beginning": "",
"highlighted": ""
"highlighted": "eşleşmelidir"
}
},
"errors": {
"empty": "",
"length": "",
"uppercase": "",
"lowercase": "",
"number": "",
"special": "",
"incorrect": ""
"empty": "Lütfen parolanızı girin",
"length": "Parolanız en az 8 karakter uzunluğunda olmalıdır",
"uppercase": "Parola en az 1 büyük harf içermelidir",
"lowercase": "Parola en az 1 küçük harf içermelidir",
"number": "Parola en az 1 sayı içermelidir",
"special": "Parola en az 1 özel karakter içermelidir",
"incorrect": "Parolanız sistemdeki ile uyuşmuyor"
}
},
"passwordConfirm": {
"label": "",
"placeholder": "",
"label": "Parolayı onayla",
"placeholder": "Onaylamak için parolayı yeniden gir",
"errors": {
"empty": "",
"different": ""
@@ -572,78 +570,85 @@
}
},
"lastName": {
"label": "",
"placeholder": "",
"label": "Soyadı",
"placeholder": "Ellis",
"errors": {
"empty": "",
"length": "",
"empty": "Lütfen soyadınızı girin",
"length": "Soyadı en çok 50 karakter olmalıdır",
"pattern": ""
}
}
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
"heading": "",
"subheadings": {
"stepOne": "",
"stepTwo": ""
"stepOne": "Eposta adresinizi girin",
"stepTwo": "Parolanızı girin"
},
"links": {
"forgotPassword": "",
"register": "",
"forgotPasswordLink": "",
"registerLink": ""
"forgotPassword": "Parolanızı mı unuttunuz?",
"register": "Hesabınız yok mu?",
"forgotPasswordLink": "Parolayı sıfırla",
"registerLink": "Buradan kayıt olun"
},
"toasts": {
"success": "",
"incorrectPassword": ""
"success": "Tekrar hoşgeldiniz! Başarıyla sisteme giriş yaptınız.",
"incorrectPassword": "Hatalı parola"
},
"errors": {
"password": {
"incorrect": ""
"incorrect": "Giriş yaptığınız parola sistemdekiyle uyuşmuyor"
}
}
},
"registration": {
"heading": {
"superAdmin": "",
"user": ""
"superAdmin": "Süper yönetici oluştur",
"user": "Kayıt ol"
},
"subheadings": {
"stepOne": "",
"stepTwo": "",
"stepThree": ""
"stepOne": "Kişisel bilgilerinizi girin",
"stepTwo": "Eposta adresinizi girin",
"stepThree": "Parolanızı oluturun"
},
"description": {
"superAdmin": "",
"superAdmin": "Başlamak için süper yönetici hesabı oluşturun",
"user": ""
},
"gettingStartedButton": {
"superAdmin": "",
"superAdmin": "Süper yönetici hesabı oluşturun",
"user": ""
},
"termsAndPolicies": "",
"links": {
"login": ""
"login": "Bir hesabınız mı var? <a>Giriş yapın</a>"
},
"toasts": {
"success": ""
"success": "Hoşgeldiniz! Hesabınız başarıyla oluşturuldu."
}
},
"forgotPassword": {
"heading": "",
"heading": "Parolanızı mı kaybettiniz?",
"subheadings": {
"stepOne": "",
"stepTwo": "",
"stepOne": "Endişelenmeyin, sıfırlamak için gerekli bilgileri göndereceğiz.",
"stepTwo": "Parola sıfırlama için gerekli bilgileri <email/> hesabına ilettik.",
"stepThree": "",
"stepFour": ""
},
"buttons": {
"openEmail": "",
"resetPassword": ""
"openEmail": "Eposta uygulamasını aç",
"resetPassword": "Parolayı sıfırla"
},
"imageAlts": {
"passwordKey": "",
@@ -670,75 +675,76 @@
"reconnected": "",
"stillUnreachable": ""
},
"alertBox": "",
"alertBox": "Sunucu bağlantı hatası",
"description": "",
"retryButton": {
"default": "",
"processing": ""
"default": "Bağlantıyı tekrarla",
"processing": "Bağlanıyor..."
}
}
},
"createNotifications": {
"title": "",
"title": "Bildirim kanalları oluştur",
"nameSettings": {
"title": "",
"description": "",
"nameLabel": "",
"namePlaceholder": ""
"title": "İsim",
"description": "Entegrasyon için açıklama",
"nameLabel": "İsim",
"namePlaceholder": "örn. Slack bildirimleri"
},
"typeSettings": {
"title": "",
"title": "Tür",
"description": "",
"typeLabel": ""
"typeLabel": "Tür"
},
"emailSettings": {
"title": "",
"description": "",
"emailLabel": "",
"emailPlaceholder": ""
"title": "Eposta",
"description": "Hedef eposta adresi",
"emailLabel": "Eposta adresi",
"emailPlaceholder": "örn. john@example.com"
},
"slackSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
"title": "Slack",
"description": "Slack webhook'u burada tanımlayın",
"webhookLabel": "Slack webhook adresi",
"webhookPlaceholder": "https://hooks.slack.com/services/...\n"
},
"pagerdutySettings": {
"title": "",
"description": "",
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
"title": "PagerDuty",
"description": "PagerDuty entegrasyonunu burada yapın",
"integrationKeyLabel": "Entegrasyon anahtarı",
"integrationKeyPlaceholder": "1234567890"
},
"discordSettings": {
"title": "",
"title": "Discord",
"description": "Discord webhook'u buradan ayarlayın",
"webhookLabel": "Discord Webhook adresi",
"webhookPlaceholder": "https://sunucu-adı.com/webhook\n"
},
"webhookSettings": {
"title": "Webhook",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
"webhookPlaceholder": "https://sunucu-adı.com/webhook\n"
}
},
"notificationConfig": {
"title": "",
"title": "Bildirimler",
"description": ""
},
"monitorStatus": {
"checkingEvery": "",
"withCaptureAgent": "",
"up": "",
"down": "",
"paused": ""
"up": "ayakta",
"down": "çalışmıyor",
"paused": "beklemede"
},
"advancedMatching": "",
"settingsEmailTLSServername": "",
"settingsEmailIgnoreTLS": "",
"settingsEmailRequireTLS": "",
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailSecure": "Güvenli - SSL kullan",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "Bildirimleri dene",
"selectAll": "Tümünü seç"
}
+11 -5
View File
@@ -23,9 +23,7 @@
"settingsClearAllStatsDialogConfirm": "",
"settingsDemoMonitors": "",
"settingsDemoMonitorsDescription": "",
"settingsAddDemoMonitors": "",
"settingsAddDemoMonitorsButton": "",
"settingsRemoveAllMonitors": "",
"settingsRemoveAllMonitorsButton": "",
"settingsRemoveAllMonitorsDialogTitle": "",
"settingsRemoveAllMonitorsDialogConfirm": "",
@@ -583,6 +581,13 @@
},
"errors": {
"validation": ""
},
"fields": {
"password": {
"errors": {
"incorrect": ""
}
}
}
},
"login": {
@@ -709,13 +714,13 @@
"integrationKeyLabel": "",
"integrationKeyPlaceholder": ""
},
"genericWebhookSettings": {
"discordSettings": {
"title": "",
"description": "",
"webhookLabel": "",
"webhookPlaceholder": ""
},
"discordSettings": {
"webhookSettings": {
"title": "",
"description": "",
"webhookLabel": "",
@@ -740,5 +745,6 @@
"settingsEmailRejectUnauthorized": "",
"settingsEmailSecure": "",
"settingsEmailPool": "",
"sendTestNotifications": ""
"sendTestNotifications": "",
"selectAll": ""
}