Add typescript config, move to v1 dir

This commit is contained in:
Alex Holliday committed 2025-09-25 10:11:41 -07:00
1 parent 879cbb8886
commit 4d89213e1c
187 files changed
+708 -637

No files matched your search

+2 -2
View File
@@ -5,8 +5,8 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "tsc -b && vite build",
"build-dev": "vite build --mode development", "build-dev": "tsc -b && vite build --mode development",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview", "preview": "vite preview",
"format": "prettier --write .", "format": "prettier --write .",
+1 -1
View File
@@ -12,7 +12,7 @@ import { useNavigate } from "react-router-dom";
import { createToast } from "../../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { usePauseMonitor, useDeleteMonitor } from "../../Hooks/monitorHooks"; import { usePauseMonitor, useDeleteMonitor } from "../../Hooks/v1/monitorHooks.js";
const ActionsMenu = ({ const ActionsMenu = ({
monitor, monitor,
@@ -11,7 +11,7 @@ import MenuList from "@mui/material/MenuList";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { createToast } from "../../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils";
import { useExportMonitors } from "../../Hooks/monitorHooks"; import { useExportMonitors } from "../../Hooks/v1/monitorHooks.js";
const MonitorActions = ({ isLoading }) => { const MonitorActions = ({ isLoading }) => {
const [open, setOpen] = React.useState(false); const [open, setOpen] = React.useState(false);
@@ -12,10 +12,10 @@ import EmailIcon from "@mui/icons-material/Email";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import { usePauseMonitor } from "../../Hooks/monitorHooks"; import { usePauseMonitor } from "../../Hooks/v1/monitorHooks.js";
import { useSendTestEmail } from "../../Hooks/useSendTestEmail"; import { useSendTestEmail } from "../../Hooks/v1/useSendTestEmail.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useTestAllNotifications } from "../../Hooks/useNotifications"; import { useTestAllNotifications } from "../../Hooks/v1/useNotifications.js";
/** /**
* MonitorDetailsControlHeader component displays the control header for monitor details. * MonitorDetailsControlHeader component displays the control header for monitor details.
* It includes status display, pause/resume button, and a configure button for admins. * It includes status display, pause/resume button, and a configure button for admins.
@@ -7,7 +7,7 @@ import Dot from "../../Components/Dot";
import { formatDurationRounded } from "../../Utils/timeUtils"; import { formatDurationRounded } from "../../Utils/timeUtils";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "../../Hooks/useMonitorUtils"; import { useMonitorUtils } from "../../Hooks/v1/useMonitorUtils.js";
import { formatMonitorUrl } from "../../Utils/utils"; import { formatMonitorUrl } from "../../Utils/utils";
/** /**
* Status component displays the status information of a monitor. * Status component displays the status information of a monitor.
@@ -3,7 +3,7 @@ import Fallback from "../Fallback";
import { Typography } from "@mui/material"; import { Typography } from "@mui/material";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useIsAdmin } from "../../Hooks/useIsAdmin"; import { useIsAdmin } from "../../Hooks/v1/useIsAdmin.js";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const PageStateWrapper = ({ const PageStateWrapper = ({
networkError, networkError,
+1 -1
View File
@@ -2,7 +2,7 @@ import { Stack, Typography } from "@mui/material";
import Image from "../Image"; import Image from "../Image";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useMonitorUtils } from "../../Hooks/useMonitorUtils"; import { useMonitorUtils } from "../../Hooks/v1/useMonitorUtils.js";
/** /**
* StatBox Component * StatBox Component
@@ -1,6 +1,6 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { networkService } from "../main"; import { networkService } from "../../main.jsx";
import { createToast } from "../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useFetchChecksTeam = ({ const useFetchChecksTeam = ({
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { networkService } from "../main"; import { networkService } from "../../main.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST; const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST;
@@ -1,6 +1,6 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { networkService } from "../main"; import { networkService } from "../../main.jsx";
import { createToast } from "../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useFetchLogs = () => { const useFetchLogs = () => {
@@ -1,8 +1,8 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { networkService } from "../main"; import { networkService } from "../../main.jsx";
import { createToast } from "../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "./useMonitorUtils"; import { useMonitorUtils } from "./useMonitorUtils.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -1,6 +1,6 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { networkService } from "../main"; import { networkService } from "../../main.jsx";
import { createToast } from "../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useFetchSettings = ({ setSettingsData, setIsApiKeySet, setIsEmailPasswordSet }) => { const useFetchSettings = ({ setSettingsData, setIsApiKeySet, setIsEmailPasswordSet }) => {
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,9 @@
import { useState, useEffect, useCallback } from "react"; import { useState, useEffect, useCallback } from "react";
import { createToast } from "../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils.jsx";
import { networkService } from "../main"; import { networkService } from "../../main.jsx";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { NOTIFICATION_TYPES } from "../Pages/Notifications/utils"; import { NOTIFICATION_TYPES } from "../../Pages/v1/Notifications/utils.js";
const useCreateNotification = () => { const useCreateNotification = () => {
const navigate = useNavigate(); const navigate = useNavigate();
@@ -1,7 +1,7 @@
import { useState } from "react"; import { useState } from "react";
import { networkService } from "../main"; import { networkService } from "../../main.jsx";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { createToast } from "../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useSendTestEmail = () => { const useSendTestEmail = () => {
@@ -1,6 +1,6 @@
import { useEffect, useState, useCallback } from "react"; import { useEffect, useState, useCallback } from "react";
import { networkService } from "../main"; import { networkService } from "../../main.jsx";
import { createToast } from "../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
export const useGetUser = (userId) => { export const useGetUser = (userId) => {
@@ -1,6 +1,6 @@
import React from "react"; import React from "react";
import AppBar from "../../Components/Common/AppBar"; import AppBar from "../../../Components/Common/AppBar.jsx";
import Footer from "../../Components/Common/Footer"; import Footer from "../../../Components/Common/Footer.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const AboutUs = () => { const AboutUs = () => {
@@ -1,8 +1,8 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { ROLES } from "../../../../Utils/roleUtils"; import { ROLES } from "../../../../../Utils/roleUtils.js";
import { editUserValidation } from "../../../../Validation/validation"; import { editUserValidation } from "../../../../../Validation/validation.js";
import Joi from "joi"; import Joi from "joi";
import { createToast } from "../../../../Utils/toastUtils"; import { createToast } from "../../../../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
export const useEditUserForm = (user) => { export const useEditUserForm = (user) => {
const [searchInput, setSearchInput] = useState(""); const [searchInput, setSearchInput] = useState("");
@@ -2,19 +2,19 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import Breadcrumbs from "../../../Components/Breadcrumbs"; import Breadcrumbs from "../../../../Components/Breadcrumbs/index.jsx";
import TextInput from "../../../Components/Inputs/TextInput"; import TextInput from "../../../../Components/Inputs/TextInput/index.jsx";
import Search from "../../../Components/Inputs/Search"; import Search from "../../../../Components/Inputs/Search/index.jsx";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import RoleTable from "../components/RoleTable"; import RoleTable from "../components/RoleTable/index.jsx";
// Utils // Utils
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useGetUser, useEditUser } from "../../../Hooks/userHooks"; import { useGetUser, useEditUser } from "../../../../Hooks/v1/userHooks.js";
import { EDITABLE_ROLES, ROLES } from "../../../Utils/roleUtils"; import { EDITABLE_ROLES, ROLES } from "../../../../Utils/roleUtils.js";
import { useEditUserForm, useValidateEditUserForm } from "./hooks/editUser"; import { useEditUserForm, useValidateEditUserForm } from "./hooks/editUser.js";
const EditUser = () => { const EditUser = () => {
const { userId } = useParams(); const { userId } = useParams();
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { newOrChangedCredentials } from "../../../../../Validation/validation"; import { newOrChangedCredentials } from "../../../../../../Validation/validation.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useAddTeamMember = () => { const useAddTeamMember = () => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -1,16 +1,16 @@
import { Button, Stack } from "@mui/material"; import { Button, Stack } from "@mui/material";
import { GenericDialog } from "../../../../Components/Dialog/genericDialog"; import { GenericDialog } from "../../../../../Components/Dialog/genericDialog.jsx";
import TextInput from "../../../../Components/Inputs/TextInput"; import TextInput from "../../../../../Components/Inputs/TextInput/index.jsx";
import Select from "../../../../Components/Inputs/Select"; import Select from "../../../../../Components/Inputs/Select/index.jsx";
import { useGetInviteToken } from "../../../../Hooks/inviteHooks"; import { useGetInviteToken } from "../../../../../Hooks/v1/inviteHooks.js";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { createToast } from "../../../../Utils/toastUtils"; import { createToast } from "../../../../../Utils/toastUtils.jsx";
import { useState } from "react"; import { useState } from "react";
import PasswordTooltip from "../../../Auth/components/PasswordTooltip"; import PasswordTooltip from "../../../Auth/components/PasswordTooltip.jsx";
import useAddTeamMember from "./hooks/useAddTeamMember"; import useAddTeamMember from "./hooks/useAddTeamMember.jsx";
import usePasswordFeedback from "../../../Auth/hooks/usePasswordFeedback"; import usePasswordFeedback from "../../../Auth/hooks/usePasswordFeedback.jsx";
import { PasswordEndAdornment } from "../../../../Components/Inputs/TextInput/Adornments"; import { PasswordEndAdornment } from "../../../../../Components/Inputs/TextInput/Adornments/index.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const INITIAL_FORM_STATE = { const INITIAL_FORM_STATE = {
@@ -2,14 +2,14 @@ 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, Button } from "@mui/material"; import { Box, Stack, Typography, Button } from "@mui/material";
import { PasswordEndAdornment } from "../../../Components/Inputs/TextInput/Adornments"; import { PasswordEndAdornment } from "../../../../Components/Inputs/TextInput/Adornments/index.jsx";
import TextInput from "../../../Components/Inputs/TextInput"; import TextInput from "../../../../Components/Inputs/TextInput/index.jsx";
import { newOrChangedCredentials } from "../../../Validation/validation"; import { newOrChangedCredentials } from "../../../../Validation/validation.js";
import Alert from "../../../Components/Alert"; import Alert from "../../../../Components/Alert/index.jsx";
import { update } from "../../../Features/Auth/authSlice"; import { update } from "../../../../Features/Auth/authSlice.js";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { createToast } from "../../../Utils/toastUtils"; import { createToast } from "../../../../Utils/toastUtils.jsx";
import { getTouchedFieldErrors } from "../../../Validation/error"; import { getTouchedFieldErrors } from "../../../../Validation/error.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const defaultPasswordsState = { const defaultPasswordsState = {
@@ -2,16 +2,16 @@ import { useTheme } from "@emotion/react";
import { useState } from "react"; import { useState } from "react";
import TabPanel from "@mui/lab/TabPanel"; import TabPanel from "@mui/lab/TabPanel";
import { Box, Button, Divider, Stack, Typography } from "@mui/material"; import { Box, Button, Divider, Stack, Typography } from "@mui/material";
import Avatar from "../../../Components/Avatar"; import Avatar from "../../../../Components/Avatar/index.jsx";
import TextInput from "../../../Components/Inputs/TextInput"; import TextInput from "../../../../Components/Inputs/TextInput/index.jsx";
import ImageUpload from "../../../Components/Inputs/ImageUpload"; import ImageUpload from "../../../../Components/Inputs/ImageUpload/index.jsx";
import { newOrChangedCredentials } from "../../../Validation/validation"; import { newOrChangedCredentials } from "../../../../Validation/validation.js";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { clearAuthState, deleteUser, update } from "../../../Features/Auth/authSlice"; import { clearAuthState, deleteUser, update } from "../../../../Features/Auth/authSlice.js";
import { createToast } from "../../../Utils/toastUtils"; import { createToast } from "../../../../Utils/toastUtils.jsx";
import { logger } from "../../../Utils/Logger"; import { logger } from "../../../../Utils/Logger.js";
import { GenericDialog } from "../../../Components/Dialog/genericDialog"; import { GenericDialog } from "../../../../Components/Dialog/genericDialog.jsx";
import Dialog from "../../../Components/Dialog"; import Dialog from "../../../../Components/Dialog/index.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
/** /**
@@ -1,9 +1,9 @@
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import DataTable from "../../../../Components/Table"; import DataTable from "../../../../../Components/Table/index.jsx";
import DeleteOutlineRoundedIcon from "@mui/icons-material/DeleteOutlineRounded"; import DeleteOutlineRoundedIcon from "@mui/icons-material/DeleteOutlineRounded";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ROLES } from "../../../../Utils/roleUtils"; import { ROLES } from "../../../../../Utils/roleUtils.js";
const RoleTable = ({ roles, handleDeleteRole }) => { const RoleTable = ({ roles, handleDeleteRole }) => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -3,18 +3,18 @@ import TabPanel from "@mui/lab/TabPanel";
import { Button, ButtonGroup, Stack, Typography } from "@mui/material"; import { Button, ButtonGroup, Stack, Typography } from "@mui/material";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import TextInput from "../../../Components/Inputs/TextInput"; import TextInput from "../../../../Components/Inputs/TextInput/index.jsx";
import { newOrChangedCredentials } from "../../../Validation/validation"; import { newOrChangedCredentials } from "../../../../Validation/validation.js";
import { networkService } from "../../../main"; import { networkService } from "../../../../main.jsx";
import { createToast } from "../../../Utils/toastUtils"; import { createToast } from "../../../../Utils/toastUtils.jsx";
import Select from "../../../Components/Inputs/Select"; import Select from "../../../../Components/Inputs/Select/index.jsx";
import { GenericDialog } from "../../../Components/Dialog/genericDialog"; import { GenericDialog } from "../../../../Components/Dialog/genericDialog.jsx";
import AddTeamMember from "../components/AddTeamMember"; import AddTeamMember from "./AddTeamMember/index.jsx";
import DataTable from "../../../Components/Table"; import DataTable from "../../../../Components/Table/index.jsx";
import { useGetInviteToken } from "../../../Hooks/inviteHooks"; import { useGetInviteToken } from "../../../../Hooks/v1/inviteHooks.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useIsSuperAdmin } from "../../../Hooks/useIsAdmin"; import { useIsSuperAdmin } from "../../../../Hooks/v1/useIsAdmin.js";
import AddMemberMenu from "./AddMemberMenu"; import AddMemberMenu from "./AddMemberMenu/index.jsx";
/** /**
* TeamPanel component manages the organization and team members, * TeamPanel component manages the organization and team members,
* providing functionalities like renaming the organization, managing team members, * providing functionalities like renaming the organization, managing team members,
@@ -3,11 +3,11 @@ import PropTypes from "prop-types";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { Box, Tab, useTheme } from "@mui/material"; import { Box, Tab, useTheme } from "@mui/material";
import CustomTabList from "../../Components/Tab"; import CustomTabList from "../../../Components/Tab/index.jsx";
import TabContext from "@mui/lab/TabContext"; import TabContext from "@mui/lab/TabContext";
import ProfilePanel from "./components/ProfilePanel"; import ProfilePanel from "./components/ProfilePanel.jsx";
import PasswordPanel from "./components/PasswordPanel"; import PasswordPanel from "./components/PasswordPanel.jsx";
import TeamPanel from "./components/TeamPanel"; import TeamPanel from "./components/TeamPanel.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
/** /**
@@ -3,13 +3,13 @@ import { useEffect, useState } from "react";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { createToast } from "../../Utils/toastUtils"; import { createToast } from "../../../Utils/toastUtils.jsx";
import { forgotPassword } from "../../Features/Auth/authSlice"; import { forgotPassword } from "../../../Features/Auth/authSlice.js";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import Background from "../../assets/Images/background-grid.svg?react"; import Background from "../../../assets/Images/background-grid.svg?react";
import EmailIcon from "../../assets/icons/email.svg?react"; import EmailIcon from "../../../assets/icons/email.svg?react";
import Logo from "../../assets/icons/checkmate-icon.svg?react"; import Logo from "../../../assets/icons/checkmate-icon.svg?react";
import IconBox from "../../Components/IconBox"; import IconBox from "../../../Components/IconBox/index.jsx";
import "./index.css"; import "./index.css";
const CheckEmail = () => { const CheckEmail = () => {
@@ -1,16 +1,16 @@
import { Box, Stack, Typography, Button } 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.jsx";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { forgotPassword } from "../../Features/Auth/authSlice"; import { forgotPassword } from "../../../Features/Auth/authSlice.js";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { newOrChangedCredentials } from "../../Validation/validation"; import { newOrChangedCredentials } from "../../../Validation/validation.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import TextInput from "../../Components/Inputs/TextInput"; import TextInput from "../../../Components/Inputs/TextInput/index.jsx";
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 IconBox from "../../Components/IconBox"; import IconBox from "../../../Components/IconBox/index.jsx";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import "./index.css"; import "./index.css";
@@ -1,7 +1,7 @@
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { login } from "../../../../Features/Auth/authSlice"; import { login } from "../../../../../Features/Auth/authSlice.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { createToast } from "../../../../Utils/toastUtils"; import { createToast } from "../../../../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useLoginSubmit = () => { const useLoginSubmit = () => {
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { loginCredentials } from "../../../../Validation/validation"; import { loginCredentials } from "../../../../../Validation/validation.js";
const useValidateLoginForm = () => { const useValidateLoginForm = () => {
const [errors, setErrors] = useState({ const [errors, setErrors] = useState({
@@ -1,17 +1,17 @@
// Components // Components
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import TextInput from "../../../Components/Inputs/TextInput"; import TextInput from "../../../../Components/Inputs/TextInput/index.jsx";
import { PasswordEndAdornment } from "../../../Components/Inputs/TextInput/Adornments"; import { PasswordEndAdornment } from "../../../../Components/Inputs/TextInput/Adornments/index.jsx";
import TextLink from "../../../Components/TextLink"; import TextLink from "../../../../Components/TextLink/index.jsx";
import AuthPageWrapper from "../components/AuthPageWrapper"; import AuthPageWrapper from "../components/AuthPageWrapper.jsx";
// Utils // Utils
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import useLoginForm from "./hooks/useLoginForm"; import useLoginForm from "./hooks/useLoginForm.jsx";
import useValidateLoginForm from "./hooks/useValidateLoginForm"; import useValidateLoginForm from "./hooks/useValidateLoginForm.jsx";
import useLoginSubmit from "./hooks/useLoginSubmit"; import useLoginSubmit from "./hooks/useLoginSubmit.jsx";
import useLoadingSubmit from "./hooks/useLoadingSubmit"; import useLoadingSubmit from "./hooks/useLoadingSubmit.jsx";
const Login = () => { const Login = () => {
// Hooks // Hooks
@@ -2,11 +2,11 @@ import { Box, Button, Stack, Typography } from "@mui/material";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { clearAuthState } from "../../Features/Auth/authSlice"; import { clearAuthState } from "../../../Features/Auth/authSlice.js";
import Background from "../../assets/Images/background-grid.svg?react"; import Background from "../../../assets/Images/background-grid.svg?react";
import ConfirmIcon from "../../assets/icons/check-outlined.svg?react"; import ConfirmIcon from "../../../assets/icons/check-outlined.svg?react";
import Logo from "../../assets/icons/checkmate-icon.svg?react"; import Logo from "../../../assets/icons/checkmate-icon.svg?react";
import IconBox from "../../Components/IconBox"; import IconBox from "../../../Components/IconBox/index.jsx";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import "./index.css"; import "./index.css";
@@ -1,10 +1,10 @@
// Components // Components
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import TextInput from "../../../Components/Inputs/TextInput"; import TextInput from "../../../../Components/Inputs/TextInput/index.jsx";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import PasswordTooltip from "../components/PasswordTooltip"; import PasswordTooltip from "../components/PasswordTooltip.jsx";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
@@ -13,11 +13,11 @@ import { useState, useEffect } from "react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { networkService } from "../../../main"; import { networkService } from "../../../../main.jsx";
import { newOrChangedCredentials } from "../../../Validation/validation"; import { newOrChangedCredentials } from "../../../../Validation/validation.js";
import { register } from "../../../Features/Auth/authSlice"; import { register } from "../../../../Features/Auth/authSlice.js";
import AuthPageWrapper from "../components/AuthPageWrapper"; import AuthPageWrapper from "../components/AuthPageWrapper.jsx";
import { createToast } from "../../../Utils/toastUtils"; import { createToast } from "../../../../Utils/toastUtils.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const getFeedbackStatus = (form, errors, field, criteria) => { const getFeedbackStatus = (form, errors, field, criteria) => {
@@ -4,18 +4,18 @@ 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, Button } from "@mui/material"; import { Box, Stack, Typography, Button } from "@mui/material";
import { setNewPassword } from "../../Features/Auth/authSlice"; import { setNewPassword } from "../../../Features/Auth/authSlice.js";
import { createToast } from "../../Utils/toastUtils"; import { createToast } from "../../../Utils/toastUtils.jsx";
import { newOrChangedCredentials } from "../../Validation/validation"; import { newOrChangedCredentials } from "../../../Validation/validation.js";
import Check from "../../Components/Check/Check"; import Check from "../../../Components/Check/Check.jsx";
import TextInput from "../../Components/Inputs/TextInput"; import TextInput from "../../../Components/Inputs/TextInput/index.jsx";
import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments"; import { PasswordEndAdornment } from "../../../Components/Inputs/TextInput/Adornments/index.jsx";
import IconBox from "../../Components/IconBox"; import IconBox from "../../../Components/IconBox/index.jsx";
import LockIcon from "../../assets/icons/lock.svg?react"; import LockIcon from "../../../assets/icons/lock.svg?react";
import Logo from "../../assets/icons/checkmate-icon.svg?react"; import Logo from "../../../assets/icons/checkmate-icon.svg?react";
import Background from "../../assets/Images/background-grid.svg?react"; import Background from "../../../assets/Images/background-grid.svg?react";
import "./index.css"; import "./index.css";
import { useValidatePassword } from "./hooks/useValidatePassword"; import { useValidatePassword } from "./hooks/useValidatePassword.jsx";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
const SetNewPassword = () => { const SetNewPassword = () => {
@@ -1,9 +1,9 @@
// Components // Components
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import Logo from "../../../assets/icons/checkmate-icon.svg?react"; import Logo from "../../../../assets/icons/checkmate-icon.svg?react";
import LanguageSelector from "../../../Components/LanguageSelector"; import LanguageSelector from "../../../../Components/LanguageSelector.jsx";
import ThemeSwitch from "../../../Components/ThemeSwitch"; import ThemeSwitch from "../../../../Components/ThemeSwitch/index.jsx";
// Utils // Utils
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
@@ -1,10 +1,10 @@
import Background from "../../../assets/Images/background-grid.svg?react"; import Background from "../../../../assets/Images/background-grid.svg?react";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import AuthHeader from "../components/AuthHeader"; import AuthHeader from "./AuthHeader.jsx";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import Logo from "../../../assets/icons/checkmate-icon.svg?react"; import Logo from "../../../../assets/icons/checkmate-icon.svg?react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const AuthPageWrapper = ({ children, heading, welcome }) => { const AuthPageWrapper = ({ children, heading, welcome }) => {
@@ -1,4 +1,4 @@
import Check from "../../../Components/Check/Check"; import Check from "../../../../Components/Check/Check.jsx";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import { Tooltip, useTheme } from "@mui/material"; import { Tooltip, useTheme } from "@mui/material";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { newOrChangedCredentials } from "../../../Validation/validation"; import { newOrChangedCredentials } from "../../../../Validation/validation.js";
const usePasswordFeedback = () => { const usePasswordFeedback = () => {
const [feedback, setFeedback] = useState({}); const [feedback, setFeedback] = useState({});
@@ -1,5 +1,5 @@
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { newOrChangedCredentials } from "../../../Validation/validation"; import { newOrChangedCredentials } from "../../../../Validation/validation.js";
const getFeedbackStatus = (form, errors, field, criteria) => { const getFeedbackStatus = (form, errors, field, criteria) => {
const fieldErrors = errors[field]; const fieldErrors = errors[field];
File renamed without changes.
@@ -1,26 +1,26 @@
//Components //Components
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import DataTable from "../../../../Components/Table"; import DataTable from "../../../../../Components/Table/index.jsx";
import Table from "@mui/material/Table"; import Table from "@mui/material/Table";
import TableBody from "@mui/material/TableBody"; import TableBody from "@mui/material/TableBody";
import TableRow from "@mui/material/TableRow"; import TableRow from "@mui/material/TableRow";
import TableCell from "@mui/material/TableCell"; import TableCell from "@mui/material/TableCell";
import TableSkeleton from "../../../../Components/Table/skeleton"; import TableSkeleton from "../../../../../Components/Table/skeleton.jsx";
import Pagination from "../../../../Components/Table/TablePagination"; import Pagination from "../../../../../Components/Table/TablePagination/index.jsx";
import { StatusLabel } from "../../../../Components/Label"; import { StatusLabel } from "../../../../../Components/Label/index.jsx";
import { HttpStatusLabel } from "../../../../Components/HttpStatusLabel"; import { HttpStatusLabel } from "../../../../../Components/HttpStatusLabel/index.jsx";
import GenericFallback from "../../../../Components/GenericFallback"; import GenericFallback from "../../../../../Components/GenericFallback/index.jsx";
import NetworkError from "../../../../Components/GenericFallback/NetworkError"; import NetworkError from "../../../../../Components/GenericFallback/NetworkError.jsx";
//Utils //Utils
import { formatDateWithTz } from "../../../../Utils/timeUtils"; import { formatDateWithTz } from "../../../../../Utils/timeUtils.js";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { useState } from "react"; import { useState } from "react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useFetchChecksTeam } from "../../../../Hooks/checkHooks"; import { useFetchChecksTeam } from "../../../../../Hooks/v1/checkHooks.js";
import { useFetchChecksByMonitor } from "../../../../Hooks/checkHooks"; import { useFetchChecksByMonitor } from "../../../../../Hooks/v1/checkHooks.js";
import { useResolveIncident } from "../../../../Hooks/checkHooks"; import { useResolveIncident } from "../../../../../Hooks/v1/checkHooks.js";
import { Button, Typography, useTheme } from "@mui/material"; import { Button, Typography, useTheme } from "@mui/material";
import { lighten } from "@mui/material/styles"; import { lighten } from "@mui/material/styles";
@@ -1,11 +1,11 @@
// Components // Components
import { Stack, Typography, Button, ButtonGroup } from "@mui/material"; import { Stack, Typography, Button, ButtonGroup } from "@mui/material";
import Select from "../../../../Components/Inputs/Select"; import Select from "../../../../../Components/Inputs/Select/index.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
//Utils //Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import SkeletonLayout from "./skeleton"; import SkeletonLayout from "./skeleton.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const OptionsHeader = ({ const OptionsHeader = ({
@@ -1,11 +1,11 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { Box, Stack, Typography } from "@mui/material"; import { Box, Stack, Typography } from "@mui/material";
import Background from "../../../../assets/Images/background-grid.svg?react"; import Background from "../../../../../assets/Images/background-grid.svg?react";
import AlertIcon from "../../../../assets/icons/alert-icon.svg?react"; import AlertIcon from "../../../../../assets/icons/alert-icon.svg?react";
import CheckIcon from "../../../../assets/icons/check-icon.svg?react"; import CheckIcon from "../../../../../assets/icons/check-icon.svg?react";
import CloseIcon from "../../../../assets/icons/close-icon.svg?react"; import CloseIcon from "../../../../../assets/icons/close-icon.svg?react";
import WarningIcon from "../../../../assets/icons/warning-icon.svg?react"; import WarningIcon from "../../../../../assets/icons/warning-icon.svg?react";
const StatusBox = ({ title, value, status }) => { const StatusBox = ({ title, value, status }) => {
const theme = useTheme(); const theme = useTheme();
@@ -1,9 +1,9 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Stack } from "@mui/material"; import { Stack } from "@mui/material";
import StatusBox from "./StatusBox"; import StatusBox from "./StatusBox.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import SkeletonLayout from "./skeleton"; import SkeletonLayout from "./skeleton.jsx";
const StatusBoxes = ({ isLoading, summary }) => { const StatusBoxes = ({ isLoading, summary }) => {
const theme = useTheme(); const theme = useTheme();
@@ -1,19 +1,19 @@
// Components // Components
import { Stack } from "@mui/material"; import { Stack } from "@mui/material";
import Breadcrumbs from "../../Components/Breadcrumbs"; import Breadcrumbs from "../../../Components/Breadcrumbs/index.jsx";
import GenericFallback from "../../Components/GenericFallback"; import GenericFallback from "../../../Components/GenericFallback/index.jsx";
import IncidentTable from "./Components/IncidentTable"; import IncidentTable from "./Components/IncidentTable/index.jsx";
import OptionsHeader from "./Components/OptionsHeader"; import OptionsHeader from "./Components/OptionsHeader/index.jsx";
import StatusBoxes from "./Components/StatusBoxes"; import StatusBoxes from "./Components/StatusBoxes/index.jsx";
import { Box, Button } from "@mui/material"; import { Box, Button } from "@mui/material";
//Utils //Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useFetchMonitorsByTeamId } from "../../Hooks/monitorHooks"; import { useFetchMonitorsByTeamId } from "../../../Hooks/v1/monitorHooks.js";
import { useFetchChecksSummaryByTeamId } from "../../Hooks/checkHooks"; import { useFetchChecksSummaryByTeamId } from "../../../Hooks/v1/checkHooks.js";
import { useAcknowledgeChecks } from "../../Hooks/checkHooks"; import { useAcknowledgeChecks } from "../../../Hooks/v1/checkHooks.js";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import NetworkError from "../../Components/GenericFallback/NetworkError"; import NetworkError from "../../../Components/GenericFallback/NetworkError.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
@@ -1,7 +1,7 @@
import ConfigBox from "../../../../Components/ConfigBox"; import ConfigBox from "../../../../../Components/ConfigBox/index.jsx";
import { Box, Stack, Typography } from "@mui/material"; import { Box, Stack, Typography } from "@mui/material";
import { CustomThreshold } from "../Components/CustomThreshold"; import { CustomThreshold } from "./CustomThreshold/index.jsx";
import { capitalizeFirstLetter } from "../../../../Utils/stringUtils"; import { capitalizeFirstLetter } from "../../../../../Utils/stringUtils.js";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
@@ -1,6 +1,6 @@
import { Box, Stack, Typography } from "@mui/material"; import { Box, Stack, Typography } from "@mui/material";
import TextInput from "../../../../../Components/Inputs/TextInput"; import TextInput from "../../../../../../Components/Inputs/TextInput/index.jsx";
import Checkbox from "../../../../../Components/Inputs/Checkbox"; import Checkbox from "../../../../../../Components/Inputs/Checkbox/index.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
@@ -4,7 +4,7 @@ import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline"; import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
import PlayCircleOutlineRoundedIcon from "@mui/icons-material/PlayCircleOutlineRounded"; import PlayCircleOutlineRoundedIcon from "@mui/icons-material/PlayCircleOutlineRounded";
import Dialog from "../../../../Components/Dialog"; import Dialog from "../../../../../Components/Dialog/index.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const MonitorActionButtons = ({ monitor, isBusy, handlePause, handleRemove }) => { const MonitorActionButtons = ({ monitor, isBusy, handlePause, handleRemove }) => {
@@ -1,8 +1,8 @@
import { Box, Stack, Tooltip, Typography } from "@mui/material"; import { Box, Stack, Tooltip, Typography } from "@mui/material";
import { useMonitorUtils } from "../../../../Hooks/useMonitorUtils"; import { useMonitorUtils } from "../../../../../Hooks/v1/useMonitorUtils.js";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import PulseDot from "../../../../Components/Animated/PulseDot"; import PulseDot from "../../../../../Components/Animated/PulseDot.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const MonitorStatusHeader = ({ monitor, infrastructureMonitor }) => { const MonitorStatusHeader = ({ monitor, infrastructureMonitor }) => {
const theme = useTheme(); const theme = useTheme();
@@ -1,4 +1,4 @@
import { useCreateMonitor, useUpdateMonitor } from "../../../../Hooks/monitorHooks"; import { useCreateMonitor, useUpdateMonitor } from "../../../../../Hooks/v1/monitorHooks.js";
const useInfrastructureSubmit = () => { const useInfrastructureSubmit = () => {
const [createMonitor, isCreating] = useCreateMonitor(); const [createMonitor, isCreating] = useCreateMonitor();
const [updateMonitor, isUpdating] = useUpdateMonitor(); const [updateMonitor, isUpdating] = useUpdateMonitor();
@@ -1,6 +1,6 @@
import { useState } from "react"; import { useState } from "react";
import { infrastructureMonitorValidation } from "../../../../Validation/validation"; import { infrastructureMonitorValidation } from "../../../../../Validation/validation.js";
import { createToast } from "../../../../Utils/toastUtils"; import { createToast } from "../../../../../Utils/toastUtils.jsx";
const useValidateInfrastructureForm = () => { const useValidateInfrastructureForm = () => {
const [errors, setErrors] = useState({}); const [errors, setErrors] = useState({});
@@ -1,18 +1,18 @@
//Components //Components
import Breadcrumbs from "../../../Components/Breadcrumbs"; import Breadcrumbs from "../../../../Components/Breadcrumbs/index.jsx";
import ConfigBox from "../../../Components/ConfigBox"; import ConfigBox from "../../../../Components/ConfigBox/index.jsx";
import FieldWrapper from "../../../Components/Inputs/FieldWrapper"; import FieldWrapper from "../../../../Components/Inputs/FieldWrapper/index.jsx";
import Link from "../../../Components/Link"; import Link from "../../../../Components/Link/index.jsx";
import Select from "../../../Components/Inputs/Select"; import Select from "../../../../Components/Inputs/Select/index.jsx";
import TextInput from "../../../Components/Inputs/TextInput"; import TextInput from "../../../../Components/Inputs/TextInput/index.jsx";
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material"; import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments"; import { HttpAdornment } from "../../../../Components/Inputs/TextInput/Adornments/index.jsx";
import MonitorStatusHeader from "./Components/MonitorStatusHeader"; import MonitorStatusHeader from "./Components/MonitorStatusHeader.jsx";
import MonitorActionButtons from "./Components/MonitorActionButtons"; import MonitorActionButtons from "./Components/MonitorActionButtons.jsx";
import CustomAlertsSection from "./Components/CustomAlertsSection"; import CustomAlertsSection from "./Components/CustomAlertsSection.jsx";
// Utils // Utils
import NotificationsConfig from "../../../Components/NotificationConfig"; import NotificationsConfig from "../../../../Components/NotificationConfig/index.jsx";
import { useGetNotificationsByTeamId } from "../../../Hooks/useNotifications"; import { useGetNotificationsByTeamId } from "../../../../Hooks/v1/useNotifications.js";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
@@ -22,10 +22,10 @@ import {
useFetchGlobalSettings, useFetchGlobalSettings,
useFetchHardwareMonitorById, useFetchHardwareMonitorById,
usePauseMonitor, usePauseMonitor,
} from "../../../Hooks/monitorHooks"; } from "../../../../Hooks/v1/monitorHooks.js";
import useInfrastructureMonitorForm from "./hooks/useInfrastructureMonitorForm"; import useInfrastructureMonitorForm from "./hooks/useInfrastructureMonitorForm.jsx";
import useValidateInfrastructureForm from "./hooks/useValidateInfrastructureForm"; import useValidateInfrastructureForm from "./hooks/useValidateInfrastructureForm.jsx";
import useInfrastructureSubmit from "./hooks/useInfrastructureSubmit"; import useInfrastructureSubmit from "./hooks/useInfrastructureSubmit.jsx";
const CreateInfrastructureMonitor = () => { const CreateInfrastructureMonitor = () => {
const { monitorId } = useParams(); const { monitorId } = useParams();
@@ -1,10 +1,10 @@
// Components // Components
import { Typography } from "@mui/material"; import { Typography } from "@mui/material";
import BaseContainer from "../BaseContainer"; import BaseContainer from "../BaseContainer/index.jsx";
import AreaChart from "../../../../../Components/Charts/AreaChart"; import AreaChart from "../../../../../../Components/Charts/AreaChart/index.jsx";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useHardwareUtils } from "../../Hooks/useHardwareUtils"; import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx";
const InfraAreaChart = ({ config }) => { const InfraAreaChart = ({ config }) => {
const theme = useTheme(); const theme = useTheme();
const { getDimensions } = useHardwareUtils(); const { getDimensions } = useHardwareUtils();
@@ -1,7 +1,7 @@
// Components // Components
import { Stack } from "@mui/material"; import { Stack } from "@mui/material";
import InfraAreaChart from "./InfraAreaChart"; import InfraAreaChart from "./InfraAreaChart.jsx";
import SkeletonLayout from "./skeleton"; import SkeletonLayout from "./skeleton.jsx";
// Utils // Utils
import { import {
@@ -9,9 +9,9 @@ import {
TzTick, TzTick,
InfrastructureTooltip, InfrastructureTooltip,
TemperatureTooltip, TemperatureTooltip,
} from "../../../../../Components/Charts/Utils/chartUtils"; } from "../../../../../../Components/Charts/Utils/chartUtils.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useHardwareUtils } from "../../Hooks/useHardwareUtils"; import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const AreaChartBoxes = ({ shouldRender, monitor, dateRange }) => { const AreaChartBoxes = ({ shouldRender, monitor, dateRange }) => {
const theme = useTheme(); const theme = useTheme();
@@ -11,7 +11,7 @@ import { Box } from "@mui/material";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useHardwareUtils } from "../../Hooks/useHardwareUtils"; import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const BaseContainer = ({ children, sx = {} }) => { const BaseContainer = ({ children, sx = {} }) => {
@@ -1,6 +1,6 @@
// Components // Components
import CustomGauge from "../../../../../Components/Charts/CustomGauge"; import CustomGauge from "../../../../../../Components/Charts/CustomGauge/index.jsx";
import BaseContainer from "../BaseContainer"; import BaseContainer from "../BaseContainer/index.jsx";
import { Stack, Typography, Box } from "@mui/material"; import { Stack, Typography, Box } from "@mui/material";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
@@ -1,11 +1,11 @@
// Components // Components
import { Stack } from "@mui/material"; import { Stack } from "@mui/material";
import Gauge from "./Gauge"; import Gauge from "./Gauge.jsx";
import SkeletonLayout from "./skeleton"; import SkeletonLayout from "./skeleton.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
// Utils // Utils
import { useHardwareUtils } from "../../Hooks/useHardwareUtils"; import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -1,15 +1,15 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Stack, Typography } from "@mui/material"; import { Stack, Typography } from "@mui/material";
import InfraAreaChart from "../../../../../Pages/Infrastructure/Details/Components/AreaChartBoxes/InfraAreaChart"; import InfraAreaChart from "../AreaChartBoxes/InfraAreaChart.jsx";
import { import {
TzTick, TzTick,
InfrastructureTooltip, InfrastructureTooltip,
NetworkTick, NetworkTick,
} from "../../../../../Components/Charts/Utils/chartUtils"; } from "../../../../../../Components/Charts/Utils/chartUtils.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useHardwareUtils } from "../../Hooks/useHardwareUtils"; import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx";
const NetworkCharts = ({ ethernetData, dateRange }) => { const NetworkCharts = ({ ethernetData, dateRange }) => {
const theme = useTheme(); const theme = useTheme();
@@ -1,9 +1,9 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import StatusBoxes from "../../../../../Components/StatusBoxes"; import StatusBoxes from "../../../../../../Components/StatusBoxes/index.jsx";
import StatBox from "../../../../../Components/StatBox"; import StatBox from "../../../../../../Components/StatBox/index.jsx";
import { Typography } from "@mui/material"; import { Typography } from "@mui/material";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useHardwareUtils } from "../../Hooks/useHardwareUtils"; import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx";
function formatNumber(num) { function formatNumber(num) {
return num != null ? num.toLocaleString() : "0"; return num != null ? num.toLocaleString() : "0";
@@ -3,10 +3,10 @@ import { useState, useEffect } from "react";
import { Box } from "@mui/material"; import { Box } from "@mui/material";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import Select from "../../../../../Components/Inputs/Select"; import Select from "../../../../../../Components/Inputs/Select/index.jsx";
import NetworkStatBoxes from "./NetworkStatBoxes"; import NetworkStatBoxes from "./NetworkStatBoxes.jsx";
import NetworkCharts from "./NetworkCharts"; import NetworkCharts from "./NetworkCharts.jsx";
import MonitorTimeFrameHeader from "../../../../../Components/MonitorTimeFrameHeader"; import MonitorTimeFrameHeader from "../../../../../../Components/MonitorTimeFrameHeader/index.jsx";
const getAvailableInterfaces = (net) => { const getAvailableInterfaces = (net) => {
return (net || []).map((iface) => iface.name).filter(Boolean); return (net || []).map((iface) => iface.name).filter(Boolean);
@@ -1,11 +1,11 @@
// Components // Components
import { Stack, Typography } from "@mui/material"; import { Stack, Typography } from "@mui/material";
import StatusBoxes from "../../../../../Components/StatusBoxes"; import StatusBoxes from "../../../../../../Components/StatusBoxes/index.jsx";
import StatBox from "../../../../../Components/StatBox"; import StatBox from "../../../../../../Components/StatBox/index.jsx";
//Utils //Utils
import { useMonitorUtils } from "../../../../../Hooks/useMonitorUtils"; import { useMonitorUtils } from "../../../../../../Hooks/v1/useMonitorUtils.js";
import { useHardwareUtils } from "../../Hooks/useHardwareUtils"; import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const InfraStatBoxes = ({ shouldRender, monitor }) => { const InfraStatBoxes = ({ shouldRender, monitor }) => {
@@ -1,20 +1,20 @@
// Components // Components
import { Stack, Typography, Tab } from "@mui/material"; import { Stack, Typography, Tab } from "@mui/material";
import Breadcrumbs from "../../../Components/Breadcrumbs"; import Breadcrumbs from "../../../../Components/Breadcrumbs/index.jsx";
import MonitorDetailsControlHeader from "../../../Components/MonitorDetailsControlHeader"; import MonitorDetailsControlHeader from "../../../../Components/MonitorDetailsControlHeader/index.jsx";
import MonitorTimeFrameHeader from "../../../Components/MonitorTimeFrameHeader"; import MonitorTimeFrameHeader from "../../../../Components/MonitorTimeFrameHeader/index.jsx";
import StatusBoxes from "./Components/StatusBoxes"; import StatusBoxes from "./Components/StatusBoxes/index.jsx";
import GaugeBoxes from "./Components/GaugeBoxes"; import GaugeBoxes from "./Components/GaugeBoxes/index.jsx";
import AreaChartBoxes from "./Components/AreaChartBoxes"; import AreaChartBoxes from "./Components/AreaChartBoxes/index.jsx";
import GenericFallback from "../../../Components/GenericFallback"; import GenericFallback from "../../../../Components/GenericFallback/index.jsx";
import NetworkStats from "./Components/NetworkStats"; import NetworkStats from "./Components/NetworkStats/index.jsx";
import CustomTabList from "../../../Components/Tab"; import CustomTabList from "../../../../Components/Tab/index.jsx";
import TabContext from "@mui/lab/TabContext"; import TabContext from "@mui/lab/TabContext";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useIsAdmin } from "../../../Hooks/useIsAdmin"; import { useIsAdmin } from "../../../../Hooks/v1/useIsAdmin.js";
import { useFetchHardwareMonitorById } from "../../../Hooks/monitorHooks"; import { useFetchHardwareMonitorById } from "../../../../Hooks/v1/monitorHooks.js";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
@@ -1,6 +1,6 @@
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import FilterHeader from "../../../../../Components/FilterHeader"; import FilterHeader from "../../../../../../Components/FilterHeader/index.jsx";
import { useMemo } from "react"; import { useMemo } from "react";
import { Box, Button } from "@mui/material"; import { Box, Button } from "@mui/material";
import ClearIcon from "@mui/icons-material/Clear"; import ClearIcon from "@mui/icons-material/Clear";
@@ -1,18 +1,18 @@
// Components // Components
import { Box } from "@mui/material"; import { Box } from "@mui/material";
import DataTable from "../../../../../Components/Table"; import DataTable from "../../../../../../Components/Table/index.jsx";
import Host from "../../../../../Components/Host"; import Host from "../../../../../../Components/Host/index.jsx";
import { StatusLabel } from "../../../../../Components/Label"; import { StatusLabel } from "../../../../../../Components/Label/index.jsx";
import { Stack } from "@mui/material"; import { Stack } from "@mui/material";
import { InfrastructureMenu } from "../MonitorsTableMenu"; import { InfrastructureMenu } from "../MonitorsTableMenu/index.jsx";
import LoadingSpinner from "../../../../Uptime/Monitors/Components/LoadingSpinner"; import LoadingSpinner from "../../../../Uptime/Monitors/Components/LoadingSpinner/index.jsx";
// Assets // Assets
import CPUChipIcon from "../../../../../assets/icons/cpu-chip.svg?react"; import CPUChipIcon from "../../../../../../assets/icons/cpu-chip.svg?react";
import CustomGauge from "../../../../../Components/Charts/CustomGauge"; import CustomGauge from "../../../../../../Components/Charts/CustomGauge/index.jsx";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "../../../../../Hooks/useMonitorUtils"; import { useMonitorUtils } from "../../../../../../Hooks/v1/useMonitorUtils.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -3,13 +3,13 @@
import { useRef, useState } from "react"; import { useRef, useState } from "react";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { createToast } from "../../../../../Utils/toastUtils"; import { createToast } from "../../../../../../Utils/toastUtils.jsx";
import { IconButton, Menu, MenuItem } from "@mui/material"; import { IconButton, Menu, MenuItem } from "@mui/material";
import Settings from "../../../../../assets/icons/settings-bold.svg?react"; import Settings from "../../../../../../assets/icons/settings-bold.svg?react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import Dialog from "../../../../../Components/Dialog"; import Dialog from "../../../../../../Components/Dialog/index.jsx";
import { networkService } from "../../../../../Utils/NetworkService.js"; import { networkService } from "../../../../../../Utils/NetworkService.js";
import { usePauseMonitor } from "../../../../../Hooks/monitorHooks"; import { usePauseMonitor } from "../../../../../../Hooks/v1/monitorHooks.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
/** /**
@@ -1,21 +1,21 @@
// Components // Components
import { Stack } from "@mui/material"; import { Stack } from "@mui/material";
import Breadcrumbs from "../../../Components/Breadcrumbs"; import Breadcrumbs from "../../../../Components/Breadcrumbs/index.jsx";
import MonitorCountHeader from "../../../Components/MonitorCountHeader"; import MonitorCountHeader from "../../../../Components/MonitorCountHeader/index.jsx";
import MonitorCreateHeader from "../../../Components/MonitorCreateHeader"; import MonitorCreateHeader from "../../../../Components/MonitorCreateHeader/index.jsx";
import MonitorsTable from "./Components/MonitorsTable"; import MonitorsTable from "./Components/MonitorsTable/index.jsx";
import Pagination from "../../..//Components/Table/TablePagination"; import Pagination from "../../../../Components/Table/TablePagination/index.jsx";
import PageStateWrapper from "../../../Components/PageStateWrapper"; import PageStateWrapper from "../../../../Components/PageStateWrapper/index.jsx";
import Filter from "./Components/Filters"; import Filter from "./Components/Filters/index.jsx";
import SearchComponent from "../../Uptime/Monitors/Components/SearchComponent"; import SearchComponent from "../../Uptime/Monitors/Components/SearchComponent/index.jsx";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useIsAdmin } from "../../../Hooks/useIsAdmin"; import { useIsAdmin } from "../../../../Hooks/v1/useIsAdmin.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useFetchMonitorsByTeamId } from "../../../Hooks/monitorHooks"; import { useFetchMonitorsByTeamId } from "../../../../Hooks/v1/monitorHooks.js";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { setRowsPerPage } from "../../../Features/UI/uiSlice"; import { setRowsPerPage } from "../../../../Features/UI/uiSlice.js";
// Constants // Constants
const TYPES = ["hardware"]; const TYPES = ["hardware"];
const BREADCRUMBS = [{ name: `infrastructure`, path: "/infrastructure" }]; const BREADCRUMBS = [{ name: `infrastructure`, path: "/infrastructure" }];
@@ -1,9 +1,9 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Stack, Typography, Grid, Button } from "@mui/material"; import { Stack, Typography, Grid, Button } from "@mui/material";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import Discord from "../../assets/icons/discord-icon.svg?react"; import Discord from "../../../assets/icons/discord-icon.svg?react";
import Slack from "../../assets/icons/slack-icon.svg?react"; import Slack from "../../../assets/icons/slack-icon.svg?react";
import Zapier from "../../assets/icons/zapier-icon.svg?react"; import Zapier from "../../../assets/icons/zapier-icon.svg?react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import "./index.css"; import "./index.css";
@@ -1,11 +1,11 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import CustomGauge from "../../../../../Components/Charts/CustomGauge"; import CustomGauge from "../../../../../../Components/Charts/CustomGauge/index.jsx";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { getPercentage, formatBytes } from "../../utils/utils"; import { getPercentage, formatBytes } from "../../utils/utils.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Box } from "@mui/material"; import { Box } from "@mui/material";
@@ -7,8 +7,8 @@ import CircularProgress from "@mui/material/CircularProgress";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { getHumanReadableDuration } from "../../../../../Utils/timeUtils"; import { getHumanReadableDuration } from "../../../../../../Utils/timeUtils.js";
import { formatBytes } from "../../utils/utils"; import { formatBytes } from "../../utils/utils.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const StatsCard = ({ title, value, unit = "", isLoading }) => { const StatsCard = ({ title, value, unit = "", isLoading }) => {
@@ -1,14 +1,14 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Gauges from "./components/gauges"; import Gauges from "./components/gauges/index.jsx";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import StatBox from "../../../Components/StatBox"; import StatBox from "../../../../Components/StatBox/index.jsx";
import StatusBoxes from "../../../Components/StatusBoxes"; import StatusBoxes from "../../../../Components/StatusBoxes/index.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useFetchDiagnostics } from "../../../Hooks/logHooks"; import { useFetchDiagnostics } from "../../../../Hooks/v1/logHooks.js";
import { getHumanReadableDuration } from "../../../Utils/timeUtils"; import { getHumanReadableDuration } from "../../../../Utils/timeUtils.js";
import { formatBytes, getPercentage } from "./utils/utils"; import { formatBytes, getPercentage } from "./utils/utils.js";
const Diagnostics = () => { const Diagnostics = () => {
// Local state // Local state
@@ -1,10 +1,10 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Select from "../../../Components/Inputs/Select"; import Select from "../../../../Components/Inputs/Select/index.jsx";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import Divider from "@mui/material/Divider"; import Divider from "@mui/material/Divider";
import { useFetchLogs } from "../../../Hooks/logHooks"; import { useFetchLogs } from "../../../../Hooks/v1/logHooks.js";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -1,10 +1,10 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import DataTable from "../../../../../Components/Table"; import DataTable from "../../../../../../Components/Table/index.jsx";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { TypeToPathMap } from "../../../../../Utils/monitorUtils"; import { TypeToPathMap } from "../../../../../../Utils/monitorUtils.js";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -1,13 +1,13 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import DataTable from "../../../../../Components/Table"; import DataTable from "../../../../../../Components/Table/index.jsx";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
// Utils // Utils
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { TypeToPathMap } from "../../../../../Utils/monitorUtils"; import { TypeToPathMap } from "../../../../../../Utils/monitorUtils.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { createHeaderFactory } from "../../../../../Components/Table/TableUtils"; import { createHeaderFactory } from "../../../../../../Components/Table/TableUtils.js";
const JobTable = ({ jobs = [] }) => { const JobTable = ({ jobs = [] }) => {
const theme = useTheme(); const theme = useTheme();
@@ -1,6 +1,6 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import StatBox from "../../../../../Components/StatBox"; import StatBox from "../../../../../../Components/StatBox/index.jsx";
import StatusBoxes from "../../../../../Components/StatusBoxes"; import StatusBoxes from "../../../../../../Components/StatusBoxes/index.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
@@ -1,6 +1,6 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import DataTable from "../../../../../Components/Table"; import DataTable from "../../../../../../Components/Table/index.jsx";
// Utils // Utils
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -1,8 +1,8 @@
// Components // Components
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import JobTable from "./components/JobTable"; import JobTable from "./components/JobTable/index.jsx";
import Metrics from "./components/Metrics"; import Metrics from "./components/Metrics/index.jsx";
import FailedJobTable from "./components/FailedJobTable"; import FailedJobTable from "./components/FailedJobTable/index.jsx";
import ButtonGroup from "@mui/material/ButtonGroup"; import ButtonGroup from "@mui/material/ButtonGroup";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
@@ -10,7 +10,7 @@ import Divider from "@mui/material/Divider";
// Utils // Utils
import { useState } from "react"; import { useState } from "react";
import { useFetchQueueData, useFlushQueue } from "../../../Hooks/logHooks"; import { useFetchQueueData, useFlushQueue } from "../../../../Hooks/v1/logHooks.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
@@ -1,10 +1,10 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Breadcrumbs from "../../Components/Breadcrumbs"; import Breadcrumbs from "../../../Components/Breadcrumbs/index.jsx";
import Tabs from "@mui/material/Tabs"; import Tabs from "@mui/material/Tabs";
import Tab from "@mui/material/Tab"; import Tab from "@mui/material/Tab";
import Queue from "./Queue"; import Queue from "./Queue/index.jsx";
import LogsComponent from "./Logs"; import LogsComponent from "./Logs/index.jsx";
import Diagnostics from "./Diagnostics"; import Diagnostics from "./Diagnostics/index.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -1,4 +1,4 @@
import Select from "../../../../../Components/Inputs/Select"; import Select from "../../../../../../Components/Inputs/Select/index.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const ConfigSelect = ({ configSelection, valueSelect, onChange, ...props }) => { const ConfigSelect = ({ configSelection, valueSelect, onChange, ...props }) => {
const getValueById = (config, id) => { const getValueById = (config, id) => {
@@ -1,7 +1,7 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import Search from "../../../../../Components/Inputs/Search"; import Search from "../../../../../../Components/Inputs/Search/index.jsx";
import { useState } from "react"; import { useState } from "react";
import ConfigRow from "../../../../../Components/ConfigRow"; import ConfigRow from "../../../../../../Components/ConfigRow/index.jsx";
/** /**
* MonitorsConfig is a component that allows users to select and apply a maintenance window to a list of monitors. * MonitorsConfig is a component that allows users to select and apply a maintenance window to a list of monitors.
@@ -1,4 +1,4 @@
import { networkService } from "../../../../main"; import { networkService } from "../../../../../main.jsx";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { import {
MS_PER_SECOND, MS_PER_SECOND,
@@ -6,7 +6,7 @@ import {
MS_PER_HOUR, MS_PER_HOUR,
MS_PER_DAY, MS_PER_DAY,
MS_PER_WEEK, MS_PER_WEEK,
} from "../../../../Utils/timeUtils"; } from "../../../../../Utils/timeUtils.js";
const useMaintenanceActions = () => { const useMaintenanceActions = () => {
const MS_LOOKUP = { const MS_LOOKUP = {
@@ -1,4 +1,4 @@
import { networkService } from "../../../../main"; import { networkService } from "../../../../../main.jsx";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { import {
MS_PER_SECOND, MS_PER_SECOND,
@@ -6,7 +6,7 @@ import {
MS_PER_HOUR, MS_PER_HOUR,
MS_PER_DAY, MS_PER_DAY,
MS_PER_WEEK, MS_PER_WEEK,
} from "../../../../Utils/timeUtils"; } from "../../../../../Utils/timeUtils.js";
const useMaintenanceData = () => { const useMaintenanceData = () => {
const REVERSE_REPEAT_LOOKUP = { const REVERSE_REPEAT_LOOKUP = {
0: "none", 0: "none",
@@ -2,27 +2,27 @@ import { Box, Button, Stack, Typography } from "@mui/material";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import ConfigBox from "../../../Components/ConfigBox"; import ConfigBox from "../../../../Components/ConfigBox/index.jsx";
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
import { LocalizationProvider } from "@mui/x-date-pickers"; import { LocalizationProvider } from "@mui/x-date-pickers";
import { DatePicker } from "@mui/x-date-pickers/DatePicker"; 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.js";
import { createToast } from "../../../Utils/toastUtils"; import { createToast } from "../../../../Utils/toastUtils.jsx";
import MonitorList from "./Components/MonitorList"; import MonitorList from "./Components/MonitorList/index.jsx";
import ConfigSelect from "./Components/ConfigSelect"; import ConfigSelect from "./Components/ConfigSelect/index.jsx";
import useMaintenanceData from "./hooks/useMaintenanceData"; import useMaintenanceData from "./hooks/useMaintenanceData.jsx";
import useMaintenanceActions from "./hooks/useMaintenanceActions"; import useMaintenanceActions from "./hooks/useMaintenanceActions.jsx";
import TextInput from "../../../Components/Inputs/TextInput"; import TextInput from "../../../../Components/Inputs/TextInput/index.jsx";
import Breadcrumbs from "../../../Components/Breadcrumbs"; import Breadcrumbs from "../../../../Components/Breadcrumbs/index.jsx";
import CalendarIcon from "../../../assets/icons/calendar.svg?react"; import CalendarIcon from "../../../../assets/icons/calendar.svg?react";
import "./index.css"; import "./index.css";
import Search from "../../../Components/Inputs/Search"; import Search from "../../../../Components/Inputs/Search/index.jsx";
import { logger } from "../../../Utils/Logger"; import { logger } from "../../../../Utils/Logger.js";
import { useNavigate, useParams } from "react-router-dom"; import { useNavigate, useParams } from "react-router-dom";
import { buildErrors, hasValidationErrors } from "../../../Validation/error"; import { buildErrors, hasValidationErrors } from "../../../../Validation/error.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import dayjs from "dayjs"; import dayjs from "dayjs";
@@ -3,14 +3,14 @@ import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { IconButton, Menu, MenuItem } from "@mui/material"; import { IconButton, Menu, MenuItem } from "@mui/material";
import { logger } from "../../../../Utils/Logger"; import { logger } from "../../../../../Utils/Logger.js";
import Settings from "../../../../assets/icons/settings-bold.svg?react"; import Settings from "../../../../../assets/icons/settings-bold.svg?react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { networkService } from "../../../../main"; import { networkService } from "../../../../../main.jsx";
import { createToast } from "../../../../Utils/toastUtils"; import { createToast } from "../../../../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import Dialog from "../../../../Components/Dialog"; import Dialog from "../../../../../Components/Dialog/index.jsx";
const ActionsMenu = ({ /* isAdmin, */ maintenanceWindow, updateCallback }) => { const ActionsMenu = ({ /* isAdmin, */ maintenanceWindow, updateCallback }) => {
maintenanceWindow; maintenanceWindow;
@@ -1,15 +1,15 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Box } from "@mui/material"; import { Box } from "@mui/material";
import DataTable from "../../../Components/Table"; import DataTable from "../../../../Components/Table/index.jsx";
import Pagination from "../../../Components/Table/TablePagination"; import Pagination from "../../../../Components/Table/TablePagination/index.jsx";
import ArrowDownwardRoundedIcon from "@mui/icons-material/ArrowDownwardRounded"; import ArrowDownwardRoundedIcon from "@mui/icons-material/ArrowDownwardRounded";
import ArrowUpwardRoundedIcon from "@mui/icons-material/ArrowUpwardRounded"; import ArrowUpwardRoundedIcon from "@mui/icons-material/ArrowUpwardRounded";
import ActionsMenu from "./ActionsMenu"; import ActionsMenu from "./ActionsMenu/index.jsx";
import { memo } from "react"; import { memo } from "react";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { formatDurationRounded } from "../../../Utils/timeUtils"; import { formatDurationRounded } from "../../../../Utils/timeUtils.js";
import { StatusLabel } from "../../../Components/Label"; import { StatusLabel } from "../../../../Components/Label/index.jsx";
import { setRowsPerPage } from "../../../Features/UI/uiSlice"; import { setRowsPerPage } from "../../../../Features/UI/uiSlice.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
Loaded 100 of 187 files, more files were not shown because too many files have changed in this diff. Show more