Merge pull request #2588 from Jesulayomy/fe-monitor_config_pages
[Frontend]: Refactor PageSpeed monitor Create & Configure components
This commit is contained in:
7 files changed
+389
-539
No files matched your search
@@ -205,6 +205,10 @@ const useFetchStatsByMonitorId = ({
|
|||||||
const useFetchMonitorById = ({ monitorId, setMonitor, updateTrigger }) => {
|
const useFetchMonitorById = ({ monitorId, setMonitor, updateTrigger }) => {
|
||||||
const [isLoading, setIsLoading] = useState(true);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (typeof monitorId === "undefined") {
|
||||||
|
setIsLoading(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const fetchMonitor = async () => {
|
const fetchMonitor = async () => {
|
||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
.configure-pagespeed button {
|
|
||||||
height: var(--env-var-height-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.configure-pagespeed .field,
|
|
||||||
.configure-pagespeed .section-disabled,
|
|
||||||
.configure-pagespeed .select-wrapper {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
@@ -1,351 +0,0 @@
|
|||||||
// Components
|
|
||||||
import { Box, Stack, Tooltip, Typography, Button } from "@mui/material";
|
|
||||||
import ConfigBox from "../../../Components/ConfigBox";
|
|
||||||
import Select from "../../../Components/Inputs/Select";
|
|
||||||
import TextInput from "../../../Components/Inputs/TextInput";
|
|
||||||
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
|
||||||
import PulseDot from "../../../Components/Animated/PulseDot";
|
|
||||||
import PlayCircleOutlineRoundedIcon from "@mui/icons-material/PlayCircleOutlineRounded";
|
|
||||||
import SkeletonLayout from "./skeleton";
|
|
||||||
import NotificationsConfig from "../../../Components/NotificationConfig";
|
|
||||||
import Dialog from "../../../Components/Dialog";
|
|
||||||
|
|
||||||
// Utils
|
|
||||||
import { useState } from "react";
|
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import { useParams } from "react-router";
|
|
||||||
import { monitorValidation } from "../../../Validation/validation";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useMonitorUtils } from "../../../Hooks/useMonitorUtils";
|
|
||||||
import { useGetNotificationsByTeamId } from "../../../Hooks/useNotifications";
|
|
||||||
import {
|
|
||||||
useFetchMonitorById,
|
|
||||||
useDeleteMonitor,
|
|
||||||
useUpdateMonitor,
|
|
||||||
usePauseMonitor,
|
|
||||||
} from "../../../Hooks/monitorHooks";
|
|
||||||
const PageSpeedConfigure = () => {
|
|
||||||
// Redux state
|
|
||||||
|
|
||||||
// Local state
|
|
||||||
const [monitor, setMonitor] = useState({});
|
|
||||||
const [errors, setErrors] = useState({});
|
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
|
||||||
const [updateTrigger, setUpdateTrigger] = useState(false);
|
|
||||||
|
|
||||||
// Utils
|
|
||||||
const theme = useTheme();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const MS_PER_MINUTE = 60000;
|
|
||||||
const { monitorId } = useParams();
|
|
||||||
const { statusColor, pagespeedStatusMsg, determineState } = useMonitorUtils();
|
|
||||||
|
|
||||||
const [notifications, notificationsAreLoading, notificationsError] =
|
|
||||||
useGetNotificationsByTeamId();
|
|
||||||
|
|
||||||
const [isLoading] = useFetchMonitorById({ monitorId, setMonitor, updateTrigger });
|
|
||||||
const [deleteMonitor, isDeleting] = useDeleteMonitor();
|
|
||||||
const [updateMonitor, isUpdating] = useUpdateMonitor();
|
|
||||||
const [pauseMonitor, isPausing] = usePauseMonitor();
|
|
||||||
|
|
||||||
const frequencies = [
|
|
||||||
{ _id: 3, name: "3 minutes" },
|
|
||||||
{ _id: 5, name: "5 minutes" },
|
|
||||||
{ _id: 10, name: "10 minutes" },
|
|
||||||
{ _id: 20, name: "20 minutes" },
|
|
||||||
{ _id: 60, name: "1 hour" },
|
|
||||||
{ _id: 1440, name: "1 day" },
|
|
||||||
{ _id: 10080, name: "1 week" },
|
|
||||||
];
|
|
||||||
|
|
||||||
// Handlers
|
|
||||||
const triggerUpdate = () => {
|
|
||||||
setUpdateTrigger(!updateTrigger);
|
|
||||||
};
|
|
||||||
|
|
||||||
const onChange = (event) => {
|
|
||||||
let { value, name } = event.target;
|
|
||||||
|
|
||||||
if (name === "interval") {
|
|
||||||
value = value * MS_PER_MINUTE;
|
|
||||||
}
|
|
||||||
setMonitor((prev) => ({
|
|
||||||
...prev,
|
|
||||||
[name]: value,
|
|
||||||
}));
|
|
||||||
|
|
||||||
const validation = monitorValidation.validate(
|
|
||||||
{ [name]: value },
|
|
||||||
{ abortEarly: false }
|
|
||||||
);
|
|
||||||
|
|
||||||
setErrors((prev) => {
|
|
||||||
const updatedErrors = { ...prev };
|
|
||||||
|
|
||||||
if (validation.error) updatedErrors[name] = validation.error.details[0].message;
|
|
||||||
else delete updatedErrors[name];
|
|
||||||
return updatedErrors;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const handlePause = async () => {
|
|
||||||
await pauseMonitor({ monitorId, triggerUpdate });
|
|
||||||
};
|
|
||||||
|
|
||||||
const onSubmit = async (event) => {
|
|
||||||
event.preventDefault();
|
|
||||||
await updateMonitor({ monitor, redirect: "/pagespeed" });
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleRemove = async (event) => {
|
|
||||||
event.preventDefault();
|
|
||||||
await deleteMonitor({ monitor, redirect: "/pagespeed" });
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Stack
|
|
||||||
className="configure-pagespeed"
|
|
||||||
gap={theme.spacing(10)}
|
|
||||||
>
|
|
||||||
{Object.keys(monitor).length === 0 ? (
|
|
||||||
<SkeletonLayout />
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<Breadcrumbs
|
|
||||||
list={[
|
|
||||||
{ name: "pagespeed", path: "/pagespeed" },
|
|
||||||
{ name: "details", path: `/pagespeed/${monitorId}` },
|
|
||||||
{ name: "configure", path: `/pagespeed/configure/${monitorId}` },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<Stack
|
|
||||||
component="form"
|
|
||||||
noValidate
|
|
||||||
spellCheck="false"
|
|
||||||
onSubmit={onSubmit}
|
|
||||||
flex={1}
|
|
||||||
gap={theme.spacing(10)}
|
|
||||||
>
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
gap={theme.spacing(2)}
|
|
||||||
>
|
|
||||||
<Box>
|
|
||||||
<Typography
|
|
||||||
component="h1"
|
|
||||||
variant="monitorName"
|
|
||||||
>
|
|
||||||
{monitor.name}
|
|
||||||
</Typography>
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
alignItems="center"
|
|
||||||
height="fit-content"
|
|
||||||
gap={theme.spacing(2)}
|
|
||||||
>
|
|
||||||
<Tooltip
|
|
||||||
title={pagespeedStatusMsg[determineState(monitor)]}
|
|
||||||
disableInteractive
|
|
||||||
slotProps={{
|
|
||||||
popper: {
|
|
||||||
modifiers: [
|
|
||||||
{
|
|
||||||
name: "offset",
|
|
||||||
options: {
|
|
||||||
offset: [0, -8],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box>
|
|
||||||
<PulseDot color={statusColor[determineState(monitor)]} />
|
|
||||||
</Box>
|
|
||||||
</Tooltip>
|
|
||||||
<Typography
|
|
||||||
component="h2"
|
|
||||||
variant="monitorUrl"
|
|
||||||
>
|
|
||||||
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
|
||||||
position="relative"
|
|
||||||
variant="body2"
|
|
||||||
ml={theme.spacing(6)}
|
|
||||||
mt={theme.spacing(1)}
|
|
||||||
sx={{
|
|
||||||
"&:before": {
|
|
||||||
position: "absolute",
|
|
||||||
content: `""`,
|
|
||||||
width: 4,
|
|
||||||
height: 4,
|
|
||||||
borderRadius: "50%",
|
|
||||||
backgroundColor: theme.palette.primary.contrastTextTertiary,
|
|
||||||
opacity: 0.8,
|
|
||||||
left: -10,
|
|
||||||
top: "50%",
|
|
||||||
transform: "translateY(-50%)",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("editing")}
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Box>
|
|
||||||
<Box
|
|
||||||
alignSelf="flex-end"
|
|
||||||
ml="auto"
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
onClick={handlePause}
|
|
||||||
loading={isLoading}
|
|
||||||
variant="contained"
|
|
||||||
color="secondary"
|
|
||||||
sx={{
|
|
||||||
pl: theme.spacing(4),
|
|
||||||
pr: theme.spacing(6),
|
|
||||||
"& svg": {
|
|
||||||
mr: theme.spacing(2),
|
|
||||||
"& path": {
|
|
||||||
stroke: theme.palette.primary.contrastTextTertiary,
|
|
||||||
strokeWidth: 0.1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{monitor?.isActive ? (
|
|
||||||
<>
|
|
||||||
<PauseCircleOutlineIcon />
|
|
||||||
{t("pause")}
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<PlayCircleOutlineRoundedIcon />
|
|
||||||
{t("resume")}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
loading={isLoading}
|
|
||||||
variant="contained"
|
|
||||||
color="error"
|
|
||||||
onClick={() => setIsOpen(true)}
|
|
||||||
sx={{
|
|
||||||
ml: theme.spacing(6),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("remove")}
|
|
||||||
</Button>
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
|
||||||
<ConfigBox>
|
|
||||||
<Box>
|
|
||||||
<Typography
|
|
||||||
component="h2"
|
|
||||||
variant="h2"
|
|
||||||
>
|
|
||||||
{t("settingsGeneralSettings")}
|
|
||||||
</Typography>
|
|
||||||
<Typography component="p">
|
|
||||||
{t("pageSpeedConfigureSettingsDescription")}
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
<Stack
|
|
||||||
gap={theme.spacing(20)}
|
|
||||||
sx={{
|
|
||||||
".MuiInputBase-root:has(> .Mui-disabled)": {
|
|
||||||
backgroundColor: theme.palette.tertiary.main,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<TextInput
|
|
||||||
name="url"
|
|
||||||
type="url"
|
|
||||||
label={t("url")}
|
|
||||||
placeholder="random.website.com"
|
|
||||||
value={monitor?.url || ""}
|
|
||||||
onChange={onChange}
|
|
||||||
error={errors.url ? true : false}
|
|
||||||
helperText={errors.url}
|
|
||||||
disabled={true}
|
|
||||||
/>
|
|
||||||
<TextInput
|
|
||||||
name="name"
|
|
||||||
type="text"
|
|
||||||
label={t("monitorDisplayName")}
|
|
||||||
placeholder="Example monitor"
|
|
||||||
isOptional={true}
|
|
||||||
value={monitor?.name || ""}
|
|
||||||
onChange={onChange}
|
|
||||||
error={errors.name ? true : false}
|
|
||||||
helperText={errors.name}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
</ConfigBox>
|
|
||||||
<ConfigBox>
|
|
||||||
<Box>
|
|
||||||
<Typography component="h2">{t("notificationConfig.title")}</Typography>
|
|
||||||
<Typography component="p">
|
|
||||||
{t("notificationConfig.description")}
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
<NotificationsConfig
|
|
||||||
notifications={notifications}
|
|
||||||
setMonitor={setMonitor}
|
|
||||||
setNotifications={monitor.notifications}
|
|
||||||
/>
|
|
||||||
</ConfigBox>
|
|
||||||
<ConfigBox>
|
|
||||||
<Box>
|
|
||||||
<Typography
|
|
||||||
component="h2"
|
|
||||||
variant="h2"
|
|
||||||
>
|
|
||||||
{t("distributedUptimeCreateAdvancedSettings")}
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
<Stack gap={theme.spacing(20)}>
|
|
||||||
<Select
|
|
||||||
name="interval"
|
|
||||||
label={t("checkFrequency")}
|
|
||||||
items={frequencies}
|
|
||||||
value={monitor?.interval / MS_PER_MINUTE || 3}
|
|
||||||
onChange={onChange}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
</ConfigBox>
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
justifyContent="flex-end"
|
|
||||||
mt="auto"
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
loading={isLoading || isDeleting || isUpdating || isPausing}
|
|
||||||
type="submit"
|
|
||||||
variant="contained"
|
|
||||||
color="accent"
|
|
||||||
sx={{ px: theme.spacing(12) }}
|
|
||||||
>
|
|
||||||
{t("settingsSave")}
|
|
||||||
</Button>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<Dialog
|
|
||||||
open={isOpen}
|
|
||||||
theme={theme}
|
|
||||||
title={t("deleteDialogTitle")}
|
|
||||||
description={t("deleteDialogDescription")}
|
|
||||||
onCancel={() => setIsOpen(false)}
|
|
||||||
confirmationButtonLabel={t("delete")}
|
|
||||||
onConfirm={handleRemove}
|
|
||||||
isLoading={isLoading || isDeleting || isUpdating || isPausing}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default PageSpeedConfigure;
|
|
||||||
@@ -1,19 +1,20 @@
|
|||||||
//Components
|
// Components
|
||||||
import Box from "@mui/material/Box";
|
import { Box, Stack, Tooltip, Typography, Button, ButtonGroup } from "@mui/material";
|
||||||
import Stack from "@mui/material/Stack";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import Button from "@mui/material/Button";
|
|
||||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
|
||||||
import TextInput from "../../../Components/Inputs/TextInput";
|
|
||||||
import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments";
|
|
||||||
import ConfigBox from "../../../Components/ConfigBox";
|
import ConfigBox from "../../../Components/ConfigBox";
|
||||||
import Radio from "../../../Components/Inputs/Radio";
|
|
||||||
import Select from "../../../Components/Inputs/Select";
|
import Select from "../../../Components/Inputs/Select";
|
||||||
|
import TextInput from "../../../Components/Inputs/TextInput";
|
||||||
|
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
||||||
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
|
import PulseDot from "../../../Components/Animated/PulseDot";
|
||||||
|
import PlayCircleOutlineRoundedIcon from "@mui/icons-material/PlayCircleOutlineRounded";
|
||||||
|
import SkeletonLayout from "./skeleton";
|
||||||
import NotificationsConfig from "../../../Components/NotificationConfig";
|
import NotificationsConfig from "../../../Components/NotificationConfig";
|
||||||
|
import Dialog from "../../../Components/Dialog";
|
||||||
|
import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments";
|
||||||
|
import Radio from "../../../Components/Inputs/Radio";
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
import { useState } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { monitorValidation } from "../../../Validation/validation";
|
import { monitorValidation } from "../../../Validation/validation";
|
||||||
import { parseDomainName } from "../../../Utils/monitorUtils";
|
import { parseDomainName } from "../../../Utils/monitorUtils";
|
||||||
@@ -21,79 +22,130 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { useGetNotificationsByTeamId } from "../../../Hooks/useNotifications";
|
import { useGetNotificationsByTeamId } from "../../../Hooks/useNotifications";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import { useCreateMonitor } from "../../../Hooks/monitorHooks";
|
|
||||||
|
|
||||||
const MS_PER_MINUTE = 60000;
|
import { useParams } from "react-router";
|
||||||
|
import { useMonitorUtils } from "../../../Hooks/useMonitorUtils";
|
||||||
|
import {
|
||||||
|
useCreateMonitor,
|
||||||
|
useFetchMonitorById,
|
||||||
|
useDeleteMonitor,
|
||||||
|
useUpdateMonitor,
|
||||||
|
usePauseMonitor,
|
||||||
|
} from "../../../Hooks/monitorHooks";
|
||||||
|
|
||||||
const CRUMBS = [
|
const PageSpeedSetup = () => {
|
||||||
{ name: "pagespeed", path: "/pagespeed" },
|
const { monitorId } = useParams();
|
||||||
{ name: "create", path: `/pagespeed/create` },
|
const isCreate = typeof monitorId === "undefined";
|
||||||
];
|
const CRUMBS = [
|
||||||
|
{ name: "pagespeed", path: "/pagespeed" },
|
||||||
const SELECT_VALUES = [
|
...(isCreate
|
||||||
{ _id: 3, name: "3 minutes" },
|
? [{ name: "create", path: `/pagespeed/create` }]
|
||||||
{ _id: 5, name: "5 minutes" },
|
: [
|
||||||
{ _id: 10, name: "10 minutes" },
|
{ name: "details", path: `/pagespeed/${monitorId}` },
|
||||||
{ _id: 20, name: "20 minutes" },
|
{ name: "configure", path: `/pagespeed/configure/${monitorId}` },
|
||||||
{ _id: 60, name: "1 hour" },
|
]),
|
||||||
{ _id: 1440, name: "1 day" },
|
];
|
||||||
{ _id: 10080, name: "1 week" },
|
|
||||||
];
|
|
||||||
|
|
||||||
const CreatePageSpeed = () => {
|
|
||||||
// State
|
|
||||||
const [monitor, setMonitor] = useState({
|
|
||||||
url: "",
|
|
||||||
name: "",
|
|
||||||
type: "pagespeed",
|
|
||||||
notifications: [],
|
|
||||||
interval: 3,
|
|
||||||
});
|
|
||||||
|
|
||||||
|
// States
|
||||||
|
const [monitor, setMonitor] = useState(
|
||||||
|
isCreate
|
||||||
|
? {
|
||||||
|
url: "",
|
||||||
|
name: "",
|
||||||
|
type: "pagespeed",
|
||||||
|
notifications: [],
|
||||||
|
interval: 180000,
|
||||||
|
}
|
||||||
|
: {}
|
||||||
|
);
|
||||||
const [https, setHttps] = useState(true);
|
const [https, setHttps] = useState(true);
|
||||||
const [errors, setErrors] = useState({});
|
const [errors, setErrors] = useState({});
|
||||||
const { user } = useSelector((state) => state.auth);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const [notifications, notificationsAreLoading, error] = useGetNotificationsByTeamId();
|
const [updateTrigger, setUpdateTrigger] = useState(false);
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
|
const { t } = useTranslation();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
// Constants
|
||||||
|
const MS_PER_MINUTE = 60000;
|
||||||
|
const FREQUENCIES = [
|
||||||
|
{ _id: 3, name: t("time.threeMinutes") },
|
||||||
|
{ _id: 5, name: t("time.fiveMinutes") },
|
||||||
|
{ _id: 10, name: t("time.tenMinutes") },
|
||||||
|
{ _id: 20, name: t("time.twentyMinutes") },
|
||||||
|
{ _id: 60, name: t("time.oneHour") },
|
||||||
|
{ _id: 1440, name: t("time.oneDay") },
|
||||||
|
{ _id: 10080, name: t("time.oneWeek") },
|
||||||
|
];
|
||||||
|
|
||||||
|
const { user } = useSelector((state) => state.auth);
|
||||||
|
const { statusColor, pagespeedStatusMsg, determineState } = useMonitorUtils();
|
||||||
|
const [notifications, notificationsAreLoading, notificationsError] =
|
||||||
|
useGetNotificationsByTeamId();
|
||||||
|
|
||||||
|
// Hooks for API actions
|
||||||
|
const [isLoading] = useFetchMonitorById({ monitorId, setMonitor, updateTrigger });
|
||||||
const [createMonitor, isCreating] = useCreateMonitor();
|
const [createMonitor, isCreating] = useCreateMonitor();
|
||||||
|
const [deleteMonitor, isDeleting] = useDeleteMonitor();
|
||||||
|
const [updateMonitor, isUpdating] = useUpdateMonitor();
|
||||||
|
const [pauseMonitor, isPausing] = usePauseMonitor();
|
||||||
|
|
||||||
// Handlers
|
// Handlers
|
||||||
const onSubmit = async (event) => {
|
const onSubmit = async (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let form = {
|
if (isCreate) {
|
||||||
url: `http${https ? "s" : ""}://` + monitor.url,
|
let form = {
|
||||||
name: monitor.name === "" ? monitor.url : monitor.name,
|
url: `http${https ? "s" : ""}://` + monitor.url,
|
||||||
type: monitor.type,
|
name: monitor.name === "" ? monitor.url : monitor.name,
|
||||||
interval: monitor.interval * MS_PER_MINUTE,
|
type: monitor.type,
|
||||||
};
|
interval: monitor.interval,
|
||||||
|
};
|
||||||
|
|
||||||
const { error } = monitorValidation.validate(form, {
|
const { error } = monitorValidation.validate(form, { abortEarly: false });
|
||||||
abortEarly: false,
|
if (error) {
|
||||||
});
|
const newErrors = {};
|
||||||
|
error.details.forEach((err) => {
|
||||||
|
newErrors[err.path[0]] = err.message;
|
||||||
|
});
|
||||||
|
setErrors(newErrors);
|
||||||
|
createToast({ body: t("checkFormError") });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (error) {
|
form = {
|
||||||
const newErrors = {};
|
...form,
|
||||||
error.details.forEach((err) => {
|
description: form.name,
|
||||||
newErrors[err.path[0]] = err.message;
|
notifications: monitor.notifications,
|
||||||
});
|
};
|
||||||
setErrors(newErrors);
|
await createMonitor({ monitor: form, redirect: "/pagespeed" });
|
||||||
createToast({ body: "Please check the form for errors." });
|
} else {
|
||||||
return;
|
const monitorParams = {
|
||||||
|
url: monitor.url,
|
||||||
|
name: monitor.name === "" ? monitor.url : monitor.name,
|
||||||
|
type: monitor.type,
|
||||||
|
interval: monitor.interval,
|
||||||
|
};
|
||||||
|
const { error } = monitorValidation.validate(monitorParams, { abortEarly: false });
|
||||||
|
if (error) {
|
||||||
|
const newErrors = {};
|
||||||
|
error.details.forEach((err) => {
|
||||||
|
newErrors[err.path[0]] = err.message;
|
||||||
|
});
|
||||||
|
setErrors(newErrors);
|
||||||
|
createToast({ body: t("checkFormError") });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await updateMonitor({ monitor, redirect: "/pagespeed" });
|
||||||
}
|
}
|
||||||
|
|
||||||
form = {
|
|
||||||
...form,
|
|
||||||
description: form.name,
|
|
||||||
notifications: monitor.notifications,
|
|
||||||
};
|
|
||||||
|
|
||||||
await createMonitor({ monitor: form, redirect: "/pagespeed" });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleChange = (event) => {
|
const handleChange = (event) => {
|
||||||
const { value, name } = event.target;
|
let { value, name } = event.target;
|
||||||
|
|
||||||
|
if (name === "interval") {
|
||||||
|
value = value * MS_PER_MINUTE;
|
||||||
|
}
|
||||||
|
|
||||||
setMonitor({
|
setMonitor({
|
||||||
...monitor,
|
...monitor,
|
||||||
[name]: value,
|
[name]: value,
|
||||||
@@ -103,7 +155,6 @@ const CreatePageSpeed = () => {
|
|||||||
{ [name]: value },
|
{ [name]: value },
|
||||||
{ abortEarly: false }
|
{ abortEarly: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
setErrors((prev) => ({
|
setErrors((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
...(error ? { [name]: error.details[0].message } : { [name]: undefined }),
|
...(error ? { [name]: error.details[0].message } : { [name]: undefined }),
|
||||||
@@ -111,59 +162,179 @@ const CreatePageSpeed = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleBlur = (event) => {
|
const handleBlur = (event) => {
|
||||||
const { name } = event.target;
|
const { name, value } = event.target;
|
||||||
if (name === "url") {
|
if (name === "url" && monitor.name === "") {
|
||||||
const { value } = event.target;
|
setMonitor((prev) => ({ ...prev, name: parseDomainName(value) }));
|
||||||
if (monitor.name !== "") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setMonitor((prev) => ({
|
|
||||||
...prev,
|
|
||||||
name: parseDomainName(value),
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const triggerUpdate = () => {
|
||||||
|
setUpdateTrigger(!updateTrigger);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handlePause = async () => {
|
||||||
|
await pauseMonitor({ monitorId, triggerUpdate });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleRemove = async (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
await deleteMonitor({ monitor, redirect: "/pagespeed" });
|
||||||
|
};
|
||||||
|
|
||||||
|
const isBusy = isLoading || isCreating || isDeleting || isUpdating || isPausing;
|
||||||
|
|
||||||
|
if (Object.keys(monitor).length === 0) {
|
||||||
|
return <SkeletonLayout />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
className="create-monitor"
|
|
||||||
sx={{
|
sx={{
|
||||||
"& h1": {
|
"& h1": { color: theme.palette.primary.contrastText },
|
||||||
color: theme.palette.primary.contrastText,
|
|
||||||
},
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Breadcrumbs list={CRUMBS} />
|
<Breadcrumbs list={CRUMBS} />
|
||||||
<Stack
|
<Stack
|
||||||
component="form"
|
component="form"
|
||||||
className="create-monitor-form"
|
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
gap={theme.spacing(12)}
|
gap={theme.spacing(12)}
|
||||||
mt={theme.spacing(6)}
|
mt={theme.spacing(6)}
|
||||||
>
|
>
|
||||||
<Typography
|
<Stack
|
||||||
component="h1"
|
direction="row"
|
||||||
variant="h1"
|
gap={theme.spacing(2)}
|
||||||
>
|
>
|
||||||
<Typography
|
<Box>
|
||||||
component="span"
|
<Typography
|
||||||
fontSize="inherit"
|
component="h1"
|
||||||
>
|
variant="h1"
|
||||||
{t("createYour")}{" "}
|
>
|
||||||
</Typography>
|
<Typography
|
||||||
<Typography
|
component="span"
|
||||||
component="span"
|
fontSize="inherit"
|
||||||
fontSize="inherit"
|
color={
|
||||||
fontWeight="inherit"
|
!isCreate ? theme.palette.primary.contrastTextSecondary : undefined
|
||||||
color={theme.palette.primary.contrastTextSecondary}
|
}
|
||||||
>
|
>
|
||||||
{t("pageSpeedMonitor")}
|
{!isCreate ? monitor.name : t("createYour") + " "}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Typography>
|
{isCreate ? (
|
||||||
|
<Typography
|
||||||
|
component="span"
|
||||||
|
fontSize="inherit"
|
||||||
|
fontWeight="inherit"
|
||||||
|
color={theme.palette.primary.contrastTextSecondary}
|
||||||
|
>
|
||||||
|
{t("pageSpeedMonitor")}
|
||||||
|
</Typography>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
{!isCreate && (
|
||||||
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
alignItems="center"
|
||||||
|
height="fit-content"
|
||||||
|
gap={theme.spacing(2)}
|
||||||
|
>
|
||||||
|
<Tooltip
|
||||||
|
title={pagespeedStatusMsg[determineState(monitor)]}
|
||||||
|
disableInteractive
|
||||||
|
slotProps={{
|
||||||
|
popper: {
|
||||||
|
modifiers: [
|
||||||
|
{
|
||||||
|
name: "offset",
|
||||||
|
options: { offset: [0, -8] },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box>
|
||||||
|
<PulseDot color={statusColor[determineState(monitor)]} />
|
||||||
|
</Box>
|
||||||
|
</Tooltip>
|
||||||
|
<Typography
|
||||||
|
component="h2"
|
||||||
|
variant="monitorUrl"
|
||||||
|
>
|
||||||
|
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
position="relative"
|
||||||
|
variant="body2"
|
||||||
|
ml={theme.spacing(6)}
|
||||||
|
mt={theme.spacing(1)}
|
||||||
|
sx={{
|
||||||
|
"&:before": {
|
||||||
|
position: "absolute",
|
||||||
|
content: `""`,
|
||||||
|
width: theme.spacing(2),
|
||||||
|
height: theme.spacing(2),
|
||||||
|
borderRadius: "50%",
|
||||||
|
backgroundColor: theme.palette.primary.contrastTextTertiary,
|
||||||
|
opacity: 0.8,
|
||||||
|
left: theme.spacing(-5),
|
||||||
|
top: "50%",
|
||||||
|
transform: "translateY(-50%)",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("editing")}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
{!isCreate && (
|
||||||
|
<Box
|
||||||
|
alignSelf="flex-end"
|
||||||
|
ml="auto"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
onClick={handlePause}
|
||||||
|
loading={isBusy}
|
||||||
|
variant="contained"
|
||||||
|
color="secondary"
|
||||||
|
sx={{
|
||||||
|
pl: theme.spacing(4),
|
||||||
|
pr: theme.spacing(6),
|
||||||
|
"& svg": {
|
||||||
|
mr: theme.spacing(2),
|
||||||
|
"& path": {
|
||||||
|
stroke: theme.palette.primary.contrastTextTertiary,
|
||||||
|
strokeWidth: 0.1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{monitor?.isActive ? (
|
||||||
|
<>
|
||||||
|
<PauseCircleOutlineIcon />
|
||||||
|
{t("pause")}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<PlayCircleOutlineRoundedIcon />
|
||||||
|
{t("resume")}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
loading={isBusy}
|
||||||
|
variant="contained"
|
||||||
|
color="error"
|
||||||
|
onClick={() => setIsOpen(true)}
|
||||||
|
sx={{ ml: theme.spacing(6) }}
|
||||||
|
>
|
||||||
|
{t("remove")}
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -172,90 +343,101 @@ const CreatePageSpeed = () => {
|
|||||||
>
|
>
|
||||||
{t("settingsGeneralSettings")}
|
{t("settingsGeneralSettings")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography component="p">{t("distributedUptimeCreateSelectURL")}</Typography>
|
<Typography component="p">
|
||||||
|
{t("pageSpeedConfigureSettingsDescription")}
|
||||||
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.spacing(15)}>
|
<Stack
|
||||||
|
gap={!isCreate ? theme.spacing(20) : theme.spacing(15)}
|
||||||
|
sx={{
|
||||||
|
".MuiInputBase-root:has(> .Mui-disabled)": {
|
||||||
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
<TextInput
|
<TextInput
|
||||||
type={"url"}
|
type={"url"}
|
||||||
name="url"
|
name="url"
|
||||||
id="monitor-url"
|
id="monitor-url"
|
||||||
label="URL to monitor"
|
label={!isCreate ? t("url") : t("urlMonitor")}
|
||||||
startAdornment={<HttpAdornment https={https} />}
|
startAdornment={isCreate ? <HttpAdornment https={https} /> : undefined}
|
||||||
placeholder="google.com"
|
placeholder="random.website.com"
|
||||||
value={monitor.url}
|
value={monitor.url || ""}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
onBlur={handleBlur}
|
onBlur={isCreate ? handleBlur : undefined}
|
||||||
error={errors["url"] ? true : false}
|
error={!!errors["url"]}
|
||||||
helperText={errors["url"]}
|
helperText={errors["url"]}
|
||||||
|
disabled={!isCreate}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
type="text"
|
type="text"
|
||||||
id="monitor-name"
|
id="monitor-name"
|
||||||
name="name"
|
name="name"
|
||||||
label="Display name"
|
label={t("monitorDisplayName")}
|
||||||
isOptional={true}
|
isOptional={true}
|
||||||
placeholder="Google"
|
placeholder="Google"
|
||||||
value={monitor.name}
|
value={monitor.name || ""}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
error={errors["name"] ? true : false}
|
error={!!errors["name"]}
|
||||||
helperText={errors["name"]}
|
helperText={errors["name"]}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
<ConfigBox>
|
{isCreate && (
|
||||||
<Box>
|
<ConfigBox>
|
||||||
<Typography
|
<Box>
|
||||||
component="h2"
|
<Typography
|
||||||
variant="h2"
|
component="h2"
|
||||||
>
|
variant="h2"
|
||||||
{t("distributedUptimeCreateChecks")}
|
>
|
||||||
</Typography>
|
{t("distributedUptimeCreateChecks")}
|
||||||
<Typography component="p">
|
</Typography>
|
||||||
{t("distributedUptimeCreateChecksDescription")}
|
<Typography component="p">
|
||||||
</Typography>
|
{t("distributedUptimeCreateChecksDescription")}
|
||||||
</Box>
|
</Typography>
|
||||||
<Stack gap={theme.spacing(12)}>
|
</Box>
|
||||||
<Stack gap={theme.spacing(6)}>
|
<Stack gap={theme.spacing(12)}>
|
||||||
<Radio
|
<Stack gap={theme.spacing(6)}>
|
||||||
id="monitor-checks-http"
|
<Radio
|
||||||
title="PageSpeed"
|
id="monitor-checks-http"
|
||||||
desc="Use the Lighthouse PageSpeed API to monitor your website"
|
title="PageSpeed"
|
||||||
size="small"
|
desc={t("pageSpeedLighthouseAPI")}
|
||||||
value="http"
|
size="small"
|
||||||
checked={monitor.type === "pagespeed"}
|
value="http"
|
||||||
/>
|
checked={monitor.type === "pagespeed"}
|
||||||
<ButtonGroup sx={{ ml: "32px" }}>
|
/>
|
||||||
<Button
|
<ButtonGroup sx={{ ml: "32px" }}>
|
||||||
variant="group"
|
<Button
|
||||||
filled={https.toString()}
|
variant="group"
|
||||||
onClick={() => setHttps(true)}
|
filled={https.toString()}
|
||||||
>
|
onClick={() => setHttps(true)}
|
||||||
{t("https")}
|
>
|
||||||
</Button>
|
{t("https")}
|
||||||
<Button
|
</Button>
|
||||||
variant="group" // Why does this work?
|
<Button
|
||||||
filled={(!https).toString()} // There's nothing in the docs about this either
|
variant="group" // Why does this work?
|
||||||
onClick={() => setHttps(false)}
|
filled={(!https).toString()} // There's nothing in the docs about this either
|
||||||
>
|
onClick={() => setHttps(false)}
|
||||||
{t("http")}
|
>
|
||||||
</Button>
|
{t("http")}
|
||||||
</ButtonGroup>
|
</Button>
|
||||||
|
</ButtonGroup>
|
||||||
|
</Stack>
|
||||||
|
{errors["type"] ? (
|
||||||
|
<Box>
|
||||||
|
<Typography
|
||||||
|
component="p"
|
||||||
|
color={theme.palette.error.contrastText}
|
||||||
|
>
|
||||||
|
{errors["type"]}
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
{errors["type"] ? (
|
</ConfigBox>
|
||||||
<Box className="error-container">
|
)}
|
||||||
<Typography
|
|
||||||
component="p"
|
|
||||||
className="input-error"
|
|
||||||
color={theme.palette.error.contrastText}
|
|
||||||
>
|
|
||||||
{errors["type"]}
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
</ConfigBox>
|
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -269,6 +451,7 @@ const CreatePageSpeed = () => {
|
|||||||
<NotificationsConfig
|
<NotificationsConfig
|
||||||
notifications={notifications}
|
notifications={notifications}
|
||||||
setMonitor={setMonitor}
|
setMonitor={setMonitor}
|
||||||
|
setNotifications={isCreate ? undefined : monitor.notifications}
|
||||||
/>
|
/>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
@@ -280,33 +463,47 @@ const CreatePageSpeed = () => {
|
|||||||
{t("distributedUptimeCreateAdvancedSettings")}
|
{t("distributedUptimeCreateAdvancedSettings")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.spacing(12)}>
|
<Stack gap={theme.spacing(isCreate ? 12 : 20)}>
|
||||||
<Select
|
<Select
|
||||||
id="monitor-interval"
|
id="monitor-interval"
|
||||||
name="interval"
|
name="interval"
|
||||||
label="Check frequency"
|
label={t("checkFrequency")}
|
||||||
value={monitor.interval || 3}
|
value={monitor?.interval / MS_PER_MINUTE || 3}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
items={SELECT_VALUES}
|
items={FREQUENCIES}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
|
mt={isCreate ? undefined : "auto"}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
|
loading={isBusy}
|
||||||
disabled={!Object.values(errors).every((value) => value === undefined)}
|
disabled={!Object.values(errors).every((value) => value === undefined)}
|
||||||
loading={isCreating}
|
sx={isCreate ? undefined : { px: theme.spacing(12) }}
|
||||||
>
|
>
|
||||||
{t("createMonitor")}
|
{isCreate ? t("createMonitor") : t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
{!isCreate && (
|
||||||
|
<Dialog
|
||||||
|
open={isOpen}
|
||||||
|
theme={theme}
|
||||||
|
title={t("deleteDialogTitle")}
|
||||||
|
description={t("deleteDialogDescription")}
|
||||||
|
onCancel={() => setIsOpen(false)}
|
||||||
|
confirmationButtonLabel={t("delete")}
|
||||||
|
onConfirm={handleRemove}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default CreatePageSpeed;
|
|
||||||
|
export default PageSpeedSetup;
|
||||||
File renamed without changes.
@@ -18,9 +18,8 @@ import UptimeConfigure from "../Pages/Uptime/Configure";
|
|||||||
|
|
||||||
// PageSpeed
|
// PageSpeed
|
||||||
import PageSpeed from "../Pages/PageSpeed/Monitors";
|
import PageSpeed from "../Pages/PageSpeed/Monitors";
|
||||||
import PageSpeedCreate from "../Pages/PageSpeed/Create";
|
|
||||||
import PageSpeedDetails from "../Pages/PageSpeed/Details";
|
import PageSpeedDetails from "../Pages/PageSpeed/Details";
|
||||||
import PageSpeedConfigure from "../Pages/PageSpeed/Configure";
|
import PageSpeedCreate from "../Pages/PageSpeed/Create";
|
||||||
|
|
||||||
// Infrastructure
|
// Infrastructure
|
||||||
import Infrastructure from "../Pages/Infrastructure/Monitors";
|
import Infrastructure from "../Pages/Infrastructure/Monitors";
|
||||||
@@ -107,7 +106,7 @@ const Routes = () => {
|
|||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="pagespeed/configure/:monitorId"
|
path="pagespeed/configure/:monitorId"
|
||||||
element={<PageSpeedConfigure />}
|
element={<PageSpeedCreate />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="infrastructure"
|
path="infrastructure"
|
||||||
|
|||||||
@@ -209,7 +209,12 @@
|
|||||||
"validationFailed": "Validation failed"
|
"validationFailed": "Validation failed"
|
||||||
},
|
},
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
|
"checkFormError": "Please check the form for errors.",
|
||||||
"checkFrequency": "Check frequency",
|
"checkFrequency": "Check frequency",
|
||||||
|
"checkHooks": {
|
||||||
|
"failureResolveOne": "Failed to resolve incident.",
|
||||||
|
"failureResolveAll": "Failed to resolve all incidents."
|
||||||
|
},
|
||||||
"checkingEvery": "Checking every",
|
"checkingEvery": "Checking every",
|
||||||
"city": "CITY",
|
"city": "CITY",
|
||||||
"common": {
|
"common": {
|
||||||
@@ -505,7 +510,6 @@
|
|||||||
"failureAddDemoMonitors": "Failed to add demo monitors",
|
"failureAddDemoMonitors": "Failed to add demo monitors",
|
||||||
"successAddDemoMonitors": "Successfully added demo monitors"
|
"successAddDemoMonitors": "Successfully added demo monitors"
|
||||||
},
|
},
|
||||||
|
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"active": "Active",
|
"active": "Active",
|
||||||
"paused": "Paused",
|
"paused": "Paused",
|
||||||
@@ -522,10 +526,6 @@
|
|||||||
"monitorStatusUp": "Monitor {name} ({url}) is now UP and responding",
|
"monitorStatusUp": "Monitor {name} ({url}) is now UP and responding",
|
||||||
"monitors": "monitors",
|
"monitors": "monitors",
|
||||||
"monitorsToApply": "Monitors to apply maintenance window to",
|
"monitorsToApply": "Monitors to apply maintenance window to",
|
||||||
"checkHooks": {
|
|
||||||
"failureResolveOne": "Failed to resolve incident.",
|
|
||||||
"failureResolveAll": "Failed to resolve all incidents."
|
|
||||||
},
|
|
||||||
"ms": "ms",
|
"ms": "ms",
|
||||||
"navControls": "Controls",
|
"navControls": "Controls",
|
||||||
"nextWindow": "Next window",
|
"nextWindow": "Next window",
|
||||||
@@ -614,6 +614,7 @@
|
|||||||
"pageSpeedDetailsPerformanceReport": "Values are estimated and may vary.",
|
"pageSpeedDetailsPerformanceReport": "Values are estimated and may vary.",
|
||||||
"pageSpeedDetailsPerformanceReportCalculator": "See calculator",
|
"pageSpeedDetailsPerformanceReportCalculator": "See calculator",
|
||||||
"pageSpeedLearnMoreLink": "Click here",
|
"pageSpeedLearnMoreLink": "Click here",
|
||||||
|
"pageSpeedLighthouseAPI": "Use the Lighthouse PageSpeed API to monitor your website",
|
||||||
"pageSpeedMonitor": "PageSpeed monitor",
|
"pageSpeedMonitor": "PageSpeed monitor",
|
||||||
"pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key yet. Without it, the PageSpeed monitor won't function.",
|
"pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key yet. Without it, the PageSpeed monitor won't function.",
|
||||||
"passwordPanel": {
|
"passwordPanel": {
|
||||||
@@ -849,6 +850,15 @@
|
|||||||
},
|
},
|
||||||
"testLocale": "testLocale",
|
"testLocale": "testLocale",
|
||||||
"testNotificationsDisabled": "There are no notifications setup for this monitor. You need to add one by clicking 'Configure' button",
|
"testNotificationsDisabled": "There are no notifications setup for this monitor. You need to add one by clicking 'Configure' button",
|
||||||
|
"time": {
|
||||||
|
"threeMinutes": "3 minutes",
|
||||||
|
"fiveMinutes": "5 minutes",
|
||||||
|
"tenMinutes": "10 minutes",
|
||||||
|
"twentyMinutes": "20 minutes",
|
||||||
|
"oneHour": "1 hour",
|
||||||
|
"oneDay": "1 day",
|
||||||
|
"oneWeek": "1 week"
|
||||||
|
},
|
||||||
"timeZoneInfo": "All dates and times are in GMT+0 time zone.",
|
"timeZoneInfo": "All dates and times are in GMT+0 time zone.",
|
||||||
"timezone": "Timezone",
|
"timezone": "Timezone",
|
||||||
"title": "Title",
|
"title": "Title",
|
||||||
|
|||||||
Reference in new issue
Block a user