Merge pull request #1761 from bluewave-labs/fix/fe/loading-buttons
fix: fe/loading buttons
This commit is contained in:
15 files changed
+63
-73
No files matched your search
@@ -1,8 +1,7 @@
|
|||||||
import TabPanel from "@mui/lab/TabPanel";
|
import TabPanel from "@mui/lab/TabPanel";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography, Button } from "@mui/material";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import { PasswordEndAdornment } from "../../Inputs/TextInput/Adornments";
|
import { PasswordEndAdornment } from "../../Inputs/TextInput/Adornments";
|
||||||
import TextInput from "../../Inputs/TextInput";
|
import TextInput from "../../Inputs/TextInput";
|
||||||
import { credentials } from "../../../Validation/validation";
|
import { credentials } from "../../../Validation/validation";
|
||||||
@@ -226,7 +225,7 @@ const PasswordPanel = () => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
type="submit"
|
type="submit"
|
||||||
@@ -242,7 +241,7 @@ const PasswordPanel = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { formatBytes } from "../../../Utils/fileUtils";
|
|||||||
import { clearUptimeMonitorState } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
import { clearUptimeMonitorState } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import { logger } from "../../../Utils/Logger";
|
import { logger } from "../../../Utils/Logger";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import { GenericDialog } from "../../Dialog/genericDialog";
|
import { GenericDialog } from "../../Dialog/genericDialog";
|
||||||
import Dialog from "../../Dialog";
|
import Dialog from "../../Dialog";
|
||||||
|
|
||||||
@@ -344,7 +343,7 @@ const ProfilePanel = () => {
|
|||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
>
|
>
|
||||||
<Box width="fit-content">
|
<Box width="fit-content">
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
onClick={handleSaveProfile}
|
onClick={handleSaveProfile}
|
||||||
@@ -354,7 +353,7 @@ const ProfilePanel = () => {
|
|||||||
sx={{ px: theme.spacing(12) }}
|
sx={{ px: theme.spacing(12) }}
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { networkService } from "../../../main";
|
|||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import Select from "../../Inputs/Select";
|
import Select from "../../Inputs/Select";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import { GenericDialog } from "../../Dialog/genericDialog";
|
import { GenericDialog } from "../../Dialog/genericDialog";
|
||||||
import DataTable from "../../Table/";
|
import DataTable from "../../Table/";
|
||||||
/**
|
/**
|
||||||
@@ -229,14 +228,13 @@ const TeamPanel = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</Stack>
|
</Stack>
|
||||||
<LoadingButton
|
<Button
|
||||||
loading={isSendingInvite}
|
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
onClick={() => setIsOpen(true)}
|
onClick={() => setIsOpen(true)}
|
||||||
>
|
>
|
||||||
Invite a team member
|
Invite a team member
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<DataTable
|
<DataTable
|
||||||
@@ -287,15 +285,15 @@ const TeamPanel = () => {
|
|||||||
mt={theme.spacing(8)}
|
mt={theme.spacing(8)}
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
loading={isSendingInvite}
|
loading={isSendingInvite}
|
||||||
variant="contained" // CAIO_REVIEW
|
variant="contained" // CAIO_REVIEW
|
||||||
color="error"
|
color="error"
|
||||||
onClick={closeInviteModal}
|
onClick={closeInviteModal}
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</LoadingButton>
|
</Button>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
onClick={handleInviteMember}
|
onClick={handleInviteMember}
|
||||||
@@ -303,7 +301,7 @@ const TeamPanel = () => {
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
>
|
>
|
||||||
Send invite
|
Send invite
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</GenericDialog>
|
</GenericDialog>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography, Button } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { createToast } from "../../Utils/toastUtils";
|
import { createToast } from "../../Utils/toastUtils";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
@@ -10,7 +10,6 @@ import TextInput from "../../Components/Inputs/TextInput";
|
|||||||
import Logo from "../../assets/icons/checkmate-icon.svg?react";
|
import Logo from "../../assets/icons/checkmate-icon.svg?react";
|
||||||
import Key from "../../assets/icons/key.svg?react";
|
import Key from "../../assets/icons/key.svg?react";
|
||||||
import Background from "../../assets/Images/background-grid.svg?react";
|
import Background from "../../assets/Images/background-grid.svg?react";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import IconBox from "../../Components/IconBox";
|
import IconBox from "../../Components/IconBox";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
@@ -185,7 +184,7 @@ const ForgotPassword = () => {
|
|||||||
error={errors.email ? true : false}
|
error={errors.email ? true : false}
|
||||||
helperText={errors.email}
|
helperText={errors.email}
|
||||||
/>
|
/>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
@@ -197,7 +196,7 @@ const ForgotPassword = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Send instructions
|
Send instructions
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { useRef, useEffect } from "react";
|
import { useRef, useEffect } from "react";
|
||||||
import { Box, Button, Stack, Typography } from "@mui/material";
|
import { Box, Button, Stack, Typography } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import TextInput from "../../../../Components/Inputs/TextInput";
|
import TextInput from "../../../../Components/Inputs/TextInput";
|
||||||
import { PasswordEndAdornment } from "../../../../Components/Inputs/TextInput/Adornments";
|
import { PasswordEndAdornment } from "../../../../Components/Inputs/TextInput/Adornments";
|
||||||
@@ -90,7 +89,7 @@ const PasswordStep = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
<ArrowBackRoundedIcon />
|
<ArrowBackRoundedIcon />
|
||||||
{t("commonBack")}{" "}
|
{t("commonBack")}{" "}
|
||||||
</Button>
|
</Button>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
type="submit"
|
type="submit"
|
||||||
@@ -106,7 +105,7 @@ const PasswordStep = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("continue")}
|
{t("continue")}
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ import { useDispatch, useSelector } from "react-redux";
|
|||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography, Button } from "@mui/material";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import { setNewPassword } from "../../Features/Auth/authSlice";
|
import { setNewPassword } from "../../Features/Auth/authSlice";
|
||||||
import { createToast } from "../../Utils/toastUtils";
|
import { createToast } from "../../Utils/toastUtils";
|
||||||
import { credentials } from "../../Validation/validation";
|
import { credentials } from "../../Validation/validation";
|
||||||
@@ -232,7 +231,7 @@ const SetNewPassword = () => {
|
|||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
@@ -245,7 +244,7 @@ const SetNewPassword = () => {
|
|||||||
sx={{ width: "100%", maxWidth: 400 }}
|
sx={{ width: "100%", maxWidth: 400 }}
|
||||||
>
|
>
|
||||||
{t("authSetNewPasswordResetPassword")}
|
{t("authSetNewPasswordResetPassword")}
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Box
|
<Box
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// Components
|
// Components
|
||||||
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
|
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
import ConfigBox from "../../../Components/ConfigBox";
|
import ConfigBox from "../../../Components/ConfigBox";
|
||||||
@@ -328,15 +327,15 @@ const CreateDistributedUptime = () => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="accent"
|
||||||
onClick={() => handleCreateMonitor()}
|
onClick={() => handleCreateMonitor()}
|
||||||
disabled={!Object.values(errors).every((value) => value === undefined)}
|
disabled={!Object.values(errors).every((value) => value === undefined)}
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
>
|
>
|
||||||
{isCreate ? "Create monitor" : "Configure monitor"}
|
{isCreate ? "Create monitor" : "Configure monitor"}
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { capitalizeFirstLetter } from "../../../Utils/stringUtils";
|
|||||||
|
|
||||||
// MUI
|
// MUI
|
||||||
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
|
|
||||||
//Components
|
//Components
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
@@ -405,14 +404,14 @@ const CreateInfrastructureMonitor = () => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
onClick={handleCreateInfrastructureMonitor}
|
onClick={handleCreateInfrastructureMonitor}
|
||||||
loading={monitorState?.isLoading}
|
loading={monitorState?.isLoading}
|
||||||
>
|
>
|
||||||
Create infrastructure monitor
|
Create infrastructure monitor
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|||||||
import { MobileTimePicker } from "@mui/x-date-pickers/MobileTimePicker";
|
import { MobileTimePicker } from "@mui/x-date-pickers/MobileTimePicker";
|
||||||
import { maintenanceWindowValidation } from "../../../Validation/validation";
|
import { maintenanceWindowValidation } from "../../../Validation/validation";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import Select from "../../../Components/Inputs/Select";
|
import Select from "../../../Components/Inputs/Select";
|
||||||
@@ -552,7 +551,7 @@ const CreateMaintenance = () => {
|
|||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
<LoadingButton
|
<Button
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
@@ -564,7 +563,7 @@ const CreateMaintenance = () => {
|
|||||||
? "Create maintenance"
|
? "Create maintenance"
|
||||||
: "Edit maintenance"
|
: "Edit maintenance"
|
||||||
}`}
|
}`}
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
import { Box, Stack, Tooltip, Typography, Button } from "@mui/material";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { useNavigate, useParams } from "react-router";
|
import { useNavigate, useParams } from "react-router";
|
||||||
import {
|
import {
|
||||||
@@ -20,7 +20,6 @@ import Checkbox from "../../../Components/Inputs/Checkbox";
|
|||||||
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
import PulseDot from "../../../Components/Animated/PulseDot";
|
import PulseDot from "../../../Components/Animated/PulseDot";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import PlayCircleOutlineRoundedIcon from "@mui/icons-material/PlayCircleOutlineRounded";
|
import PlayCircleOutlineRoundedIcon from "@mui/icons-material/PlayCircleOutlineRounded";
|
||||||
import SkeletonLayout from "./skeleton";
|
import SkeletonLayout from "./skeleton";
|
||||||
import useUtils from "../../Uptime/Monitors/Hooks/useUtils";
|
import useUtils from "../../Uptime/Monitors/Hooks/useUtils";
|
||||||
@@ -265,7 +264,7 @@ const PageSpeedConfigure = () => {
|
|||||||
alignSelf="flex-end"
|
alignSelf="flex-end"
|
||||||
ml="auto"
|
ml="auto"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
onClick={handlePause}
|
onClick={handlePause}
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
@@ -293,8 +292,8 @@ const PageSpeedConfigure = () => {
|
|||||||
Resume
|
Resume
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</LoadingButton>
|
</Button>
|
||||||
<LoadingButton
|
<Button
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="error"
|
color="error"
|
||||||
@@ -304,7 +303,7 @@ const PageSpeedConfigure = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Remove
|
Remove
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
@@ -422,7 +421,7 @@ const PageSpeedConfigure = () => {
|
|||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
mt="auto"
|
mt="auto"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
@@ -431,7 +430,7 @@ const PageSpeedConfigure = () => {
|
|||||||
sx={{ px: theme.spacing(12) }}
|
sx={{ px: theme.spacing(12) }}
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { parseDomainName } from "../../../Utils/monitorUtils";
|
|||||||
// MUI
|
// MUI
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
|
|
||||||
//Components
|
//Components
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
@@ -335,7 +334,7 @@ const CreatePageSpeed = () => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
onClick={handleCreateMonitor}
|
onClick={handleCreateMonitor}
|
||||||
@@ -343,7 +342,7 @@ const CreatePageSpeed = () => {
|
|||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
>
|
>
|
||||||
Create monitor
|
Create monitor
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Box, Stack, Typography, Button, Switch } from "@mui/material";
|
|||||||
import TextInput from "../../Components/Inputs/TextInput";
|
import TextInput from "../../Components/Inputs/TextInput";
|
||||||
import Link from "../../Components/Link";
|
import Link from "../../Components/Link";
|
||||||
import Select from "../../Components/Inputs/Select";
|
import Select from "../../Components/Inputs/Select";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import { useIsAdmin } from "../../Hooks/useIsAdmin";
|
import { useIsAdmin } from "../../Hooks/useIsAdmin";
|
||||||
import Dialog from "../../Components/Dialog";
|
import Dialog from "../../Components/Dialog";
|
||||||
import ConfigBox from "../../Components/ConfigBox";
|
import ConfigBox from "../../Components/ConfigBox";
|
||||||
@@ -328,7 +327,7 @@ const Settings = () => {
|
|||||||
<Stack gap={theme.spacing(20)}>
|
<Stack gap={theme.spacing(20)}>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography>Add demo monitors</Typography>
|
<Typography>Add demo monitors</Typography>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
loading={isLoading || authIsLoading || checksIsLoading}
|
loading={isLoading || authIsLoading || checksIsLoading}
|
||||||
@@ -336,11 +335,11 @@ const Settings = () => {
|
|||||||
sx={{ mt: theme.spacing(4) }}
|
sx={{ mt: theme.spacing(4) }}
|
||||||
>
|
>
|
||||||
Add demo monitors
|
Add demo monitors
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography>Remove all monitors</Typography>
|
<Typography>Remove all monitors</Typography>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="error"
|
color="error"
|
||||||
loading={isLoading || authIsLoading || checksIsLoading}
|
loading={isLoading || authIsLoading || checksIsLoading}
|
||||||
@@ -350,7 +349,7 @@ const Settings = () => {
|
|||||||
sx={{ mt: theme.spacing(4) }}
|
sx={{ mt: theme.spacing(4) }}
|
||||||
>
|
>
|
||||||
Remove all monitors
|
Remove all monitors
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Dialog
|
<Dialog
|
||||||
@@ -404,7 +403,7 @@ const Settings = () => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
loading={isLoading || authIsLoading || checksIsLoading}
|
loading={isLoading || authIsLoading || checksIsLoading}
|
||||||
disabled={Object.keys(errors).length > 0}
|
disabled={Object.keys(errors).length > 0}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
@@ -413,7 +412,7 @@ const Settings = () => {
|
|||||||
onClick={handleSave}
|
onClick={handleSave}
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useNavigate, useParams } from "react-router";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
import { Box, Stack, Tooltip, Typography, Button } from "@mui/material";
|
||||||
import { monitorValidation } from "../../../Validation/validation";
|
import { monitorValidation } from "../../../Validation/validation";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import { logger } from "../../../Utils/Logger";
|
import { logger } from "../../../Utils/Logger";
|
||||||
@@ -22,7 +22,6 @@ import Checkbox from "../../../Components/Inputs/Checkbox";
|
|||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
import PulseDot from "../../../Components/Animated/PulseDot";
|
import PulseDot from "../../../Components/Animated/PulseDot";
|
||||||
import SkeletonLayout from "./skeleton";
|
import SkeletonLayout from "./skeleton";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import Dialog from "../../../Components/Dialog";
|
import Dialog from "../../../Components/Dialog";
|
||||||
|
|
||||||
@@ -292,7 +291,7 @@ const Configure = () => {
|
|||||||
ml: "auto",
|
ml: "auto",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
@@ -323,8 +322,8 @@ const Configure = () => {
|
|||||||
Resume
|
Resume
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</LoadingButton>
|
</Button>
|
||||||
<LoadingButton
|
<Button
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="error"
|
color="error"
|
||||||
@@ -332,7 +331,7 @@ const Configure = () => {
|
|||||||
onClick={() => setIsOpen(true)}
|
onClick={() => setIsOpen(true)}
|
||||||
>
|
>
|
||||||
Remove
|
Remove
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
@@ -347,7 +346,11 @@ const Configure = () => {
|
|||||||
<TextInput
|
<TextInput
|
||||||
type={monitor?.type === "http" ? "url" : "text"}
|
type={monitor?.type === "http" ? "url" : "text"}
|
||||||
https={protocol === "https"}
|
https={protocol === "https"}
|
||||||
startAdornment={monitor?.type === "http" && <HttpAdornment https={protocol === "https"} />}
|
startAdornment={
|
||||||
|
monitor?.type === "http" && (
|
||||||
|
<HttpAdornment https={protocol === "https"} />
|
||||||
|
)
|
||||||
|
}
|
||||||
id="monitor-url"
|
id="monitor-url"
|
||||||
label="URL to monitor"
|
label="URL to monitor"
|
||||||
placeholder="google.com"
|
placeholder="google.com"
|
||||||
@@ -443,7 +446,7 @@ const Configure = () => {
|
|||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
mt="auto"
|
mt="auto"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
@@ -451,7 +454,7 @@ const Configure = () => {
|
|||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { createUptimeMonitor } from "../../../Features/UptimeMonitors/uptimeMoni
|
|||||||
|
|
||||||
// MUI
|
// MUI
|
||||||
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
|
|
||||||
//Components
|
//Components
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
@@ -143,8 +142,8 @@ const CreateMonitor = () => {
|
|||||||
...monitor,
|
...monitor,
|
||||||
[formName]: value,
|
[formName]: value,
|
||||||
};
|
};
|
||||||
if (formName === 'type') {
|
if (formName === "type") {
|
||||||
newMonitor.url = '';
|
newMonitor.url = "";
|
||||||
}
|
}
|
||||||
setMonitor(newMonitor);
|
setMonitor(newMonitor);
|
||||||
|
|
||||||
@@ -405,7 +404,7 @@ const CreateMonitor = () => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
>
|
>
|
||||||
<LoadingButton
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
onClick={handleCreateMonitor}
|
onClick={handleCreateMonitor}
|
||||||
@@ -413,7 +412,7 @@ const CreateMonitor = () => {
|
|||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
>
|
>
|
||||||
Create monitor
|
Create monitor
|
||||||
</LoadingButton>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ const baseTheme = (palette) => ({
|
|||||||
backgroundColor: theme.palette.secondary.main,
|
backgroundColor: theme.palette.secondary.main,
|
||||||
color: theme.palette.primary.contrastText,
|
color: theme.palette.primary.contrastText,
|
||||||
},
|
},
|
||||||
"&.MuiLoadingButton-root": {
|
"&.MuiButton-root": {
|
||||||
"&:disabled": {
|
"&:disabled": {
|
||||||
backgroundColor: theme.palette.secondary.main,
|
backgroundColor: theme.palette.secondary.main,
|
||||||
color: theme.palette.primary.contrastText,
|
color: theme.palette.primary.contrastText,
|
||||||
@@ -141,12 +141,13 @@ const baseTheme = (palette) => ({
|
|||||||
boxShadow: `0 0 0 1px ${theme.palette.accent.main}`, // CAIO_REVIEW, this should really have a solid BG color
|
boxShadow: `0 0 0 1px ${theme.palette.accent.main}`, // CAIO_REVIEW, this should really have a solid BG color
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"&.MuiLoadingButton-loading": {
|
"&.MuiButton-loading": {
|
||||||
"& .MuiLoadingButton-label": {
|
"&:disabled": {
|
||||||
color: "transparent",
|
color: "transparent",
|
||||||
},
|
},
|
||||||
"& .MuiLoadingButton-loadingIndicator": {
|
|
||||||
color: "inherit",
|
"& .MuiButton-loadingIndicator": {
|
||||||
|
color: theme.palette.primary.contrastText,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in new issue
Block a user