mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui.git
synced 2025-11-02 03:37:50 +00:00
[WIFI-11223] Migrating to prov-ui style
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
@@ -2,10 +2,10 @@ import React, { Suspense } from 'react';
|
|||||||
import { Spinner } from '@chakra-ui/react';
|
import { Spinner } from '@chakra-ui/react';
|
||||||
import { QueryClientProvider, QueryClient } from 'react-query';
|
import { QueryClientProvider, QueryClient } from 'react-query';
|
||||||
import { HashRouter } from 'react-router-dom';
|
import { HashRouter } from 'react-router-dom';
|
||||||
import Router from 'router';
|
|
||||||
import { AuthProvider } from 'contexts/AuthProvider';
|
import { AuthProvider } from 'contexts/AuthProvider';
|
||||||
import { ProvisioningSocketProvider } from 'contexts/ProvisioningSocketProvider';
|
|
||||||
import { ControllerSocketProvider } from 'contexts/ControllerSocketProvider';
|
import { ControllerSocketProvider } from 'contexts/ControllerSocketProvider';
|
||||||
|
import { ProvisioningSocketProvider } from 'contexts/ProvisioningSocketProvider';
|
||||||
|
import Router from 'router';
|
||||||
|
|
||||||
const queryClient = new QueryClient({
|
const queryClient = new QueryClient({
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import * as React from 'react';
|
|||||||
import { MenuItem, useToast } from '@chakra-ui/react';
|
import { MenuItem, useToast } from '@chakra-ui/react';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { GatewayDevice } from 'models/Device';
|
|
||||||
import { useControllerStore } from 'contexts/ControllerSocketProvider/useStore';
|
import { useControllerStore } from 'contexts/ControllerSocketProvider/useStore';
|
||||||
import { useRebootDevice } from 'hooks/Network/Devices';
|
import { useRebootDevice } from 'hooks/Network/Devices';
|
||||||
import { useMutationResult } from 'hooks/useMutationResult';
|
import { useMutationResult } from 'hooks/useMutationResult';
|
||||||
|
import { GatewayDevice } from 'models/Device';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
device: GatewayDevice;
|
device: GatewayDevice;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ThemeProps } from 'models/Theme';
|
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
||||||
import { Warning } from 'phosphor-react';
|
import { Warning } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { ThemeProps } from 'models/Theme';
|
||||||
|
|
||||||
export interface WarningButtonProps extends ThemeProps {
|
export interface WarningButtonProps extends ThemeProps {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { Box, Heading, IconButton, Spacer, Tooltip, useDisclosure } from '@chakr
|
|||||||
import { ArrowsOut, Info } from 'phosphor-react';
|
import { ArrowsOut, Info } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Card } from '../Card';
|
import { Card } from '../Card';
|
||||||
import { CardHeader } from '../Card/CardHeader';
|
|
||||||
import { CardBody } from '../Card/CardBody';
|
import { CardBody } from '../Card/CardBody';
|
||||||
|
import { CardHeader } from '../Card/CardHeader';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ import {
|
|||||||
TableInstance,
|
TableInstance,
|
||||||
} from 'react-table';
|
} from 'react-table';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { LoadingOverlay } from 'components/LoadingOverlay';
|
|
||||||
import SortIcon from './SortIcon';
|
import SortIcon from './SortIcon';
|
||||||
import { isColumnSorted, isSortedDesc, onSortClick } from './utils';
|
import { isColumnSorted, isSortedDesc, onSortClick } from './utils';
|
||||||
|
import { LoadingOverlay } from 'components/LoadingOverlay';
|
||||||
import { Column, PageInfo, SortInfo } from 'models/Table';
|
import { Column, PageInfo, SortInfo } from 'models/Table';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useFastField } from 'hooks/useFastField';
|
|
||||||
import { FieldProps } from 'models/Form';
|
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import Field from './NumberInput';
|
import Field from './NumberInput';
|
||||||
|
import { useFastField } from 'hooks/useFastField';
|
||||||
|
import { FieldProps } from 'models/Form';
|
||||||
|
|
||||||
const parseToInt = (val: string, acceptEmptyValue: boolean) => {
|
const parseToInt = (val: string, acceptEmptyValue: boolean) => {
|
||||||
if (acceptEmptyValue && val === '') return undefined;
|
if (acceptEmptyValue && val === '') return undefined;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useCallback, useMemo } from 'react';
|
import React, { useCallback, useMemo } from 'react';
|
||||||
import { LayoutProps } from '@chakra-ui/react';
|
import { LayoutProps } from '@chakra-ui/react';
|
||||||
import Input from './Input';
|
import Input from './Input';
|
||||||
import { FieldProps } from 'models/Form';
|
|
||||||
import { useFastField } from 'hooks/useFastField';
|
import { useFastField } from 'hooks/useFastField';
|
||||||
|
import { FieldProps } from 'models/Form';
|
||||||
|
|
||||||
const parseToInt = (val: string, acceptEmptyValue: boolean) => {
|
const parseToInt = (val: string, acceptEmptyValue: boolean) => {
|
||||||
if (acceptEmptyValue && val === '') return undefined;
|
if (acceptEmptyValue && val === '') return undefined;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useField } from 'formik';
|
|
||||||
import { SelectInput } from './FastSelectInput';
|
import { SelectInput } from './FastSelectInput';
|
||||||
import { FormFieldProps } from 'models/FormField';
|
|
||||||
import { useFastField } from 'hooks/useFastField';
|
import { useFastField } from 'hooks/useFastField';
|
||||||
|
import { FormFieldProps } from 'models/FormField';
|
||||||
|
|
||||||
export interface SelectFieldProps extends FormFieldProps {
|
export interface SelectFieldProps extends FormFieldProps {
|
||||||
options: { label: string; value: string | number }[];
|
options: { label: string; value: string | number }[];
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { LayoutProps } from '@chakra-ui/react';
|
import { LayoutProps } from '@chakra-ui/react';
|
||||||
import { StringInput } from './StringInput';
|
import { StringInput } from './StringInput';
|
||||||
import { FieldProps } from 'models/Form';
|
|
||||||
import { useFastField } from 'hooks/useFastField';
|
import { useFastField } from 'hooks/useFastField';
|
||||||
|
import { FieldProps } from 'models/Form';
|
||||||
|
|
||||||
export interface StringFieldProps extends FieldProps, LayoutProps {
|
export interface StringFieldProps extends FieldProps, LayoutProps {
|
||||||
hideButton?: boolean;
|
hideButton?: boolean;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { FormControl, FormErrorMessage, FormLabel, Switch } from '@chakra-ui/react';
|
||||||
import { ConfigurationFieldExplanation } from '../../ConfigurationFieldExplanation';
|
import { ConfigurationFieldExplanation } from '../../ConfigurationFieldExplanation';
|
||||||
import { FieldInputProps } from 'models/Form';
|
import { FieldInputProps } from 'models/Form';
|
||||||
import { FormControl, FormErrorMessage, FormLabel, Switch } from '@chakra-ui/react';
|
|
||||||
|
|
||||||
interface Props extends FieldInputProps<boolean> {
|
interface Props extends FieldInputProps<boolean> {
|
||||||
element?: React.ReactNode;
|
element?: React.ReactNode;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import Field from './FastToggleInput';
|
import Field from './FastToggleInput';
|
||||||
import { FieldProps } from 'models/Form';
|
|
||||||
import { useFastField } from 'hooks/useFastField';
|
import { useFastField } from 'hooks/useFastField';
|
||||||
|
import { FieldProps } from 'models/Form';
|
||||||
|
|
||||||
export interface ToggleFieldProps extends FieldProps {
|
export interface ToggleFieldProps extends FieldProps {
|
||||||
falseIsUndefined?: boolean;
|
falseIsUndefined?: boolean;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useBoolean, Center, Spinner, Alert, FormControl, FormLabel, Switch, Button } from '@chakra-ui/react';
|
import { useBoolean, Center, Spinner, Alert, FormControl, FormLabel, Switch, Button } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useFactoryReset } from 'hooks/Network/Devices';
|
|
||||||
import { Modal } from '../Modal';
|
import { Modal } from '../Modal';
|
||||||
|
import { useFactoryReset } from 'hooks/Network/Devices';
|
||||||
import { ModalProps } from 'models/Modal';
|
import { ModalProps } from 'models/Modal';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import React, { useMemo } from 'react';
|
|||||||
import { Box, Button, Table, Tbody, Td, Th, Thead, Tr } from '@chakra-ui/react';
|
import { Box, Button, Table, Tbody, Td, Th, Thead, Tr } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { Firmware } from 'models/Firmware';
|
|
||||||
import { compactDate } from 'helpers/dateFormatting';
|
import { compactDate } from 'helpers/dateFormatting';
|
||||||
import { bytesString } from 'helpers/stringHelper';
|
import { bytesString } from 'helpers/stringHelper';
|
||||||
|
import { Firmware } from 'models/Firmware';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
firmware: Firmware[];
|
firmware: Firmware[];
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ import {
|
|||||||
Heading,
|
Heading,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { CloseButton } from 'components/Buttons/CloseButton';
|
|
||||||
import { ModalHeader } from 'components/Containers/Modal/ModalHeader';
|
|
||||||
import ConfirmIgnoreCommand from '../ConfirmIgnoreCommand';
|
import ConfirmIgnoreCommand from '../ConfirmIgnoreCommand';
|
||||||
import FirmwareList from './FirmwareList';
|
import FirmwareList from './FirmwareList';
|
||||||
import { ModalProps } from 'models/Modal';
|
import { CloseButton } from 'components/Buttons/CloseButton';
|
||||||
|
import { ModalHeader } from 'components/Containers/Modal/ModalHeader';
|
||||||
import { useGetDevice } from 'hooks/Network/Devices';
|
import { useGetDevice } from 'hooks/Network/Devices';
|
||||||
import { useGetAvailableFirmware, useUpdateDeviceFirmware } from 'hooks/Network/Firmware';
|
import { useGetAvailableFirmware, useUpdateDeviceFirmware } from 'hooks/Network/Firmware';
|
||||||
import useCommandModal from 'hooks/useCommandModal';
|
import useCommandModal from 'hooks/useCommandModal';
|
||||||
|
import { ModalProps } from 'models/Modal';
|
||||||
|
|
||||||
export type FirmwareUpgradeModalProps = {
|
export type FirmwareUpgradeModalProps = {
|
||||||
modalProps: ModalProps;
|
modalProps: ModalProps;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { HStack, Modal as ChakraModal, ModalBody, ModalContent, ModalOverlay } from '@chakra-ui/react';
|
import { HStack, Modal as ChakraModal, ModalBody, ModalContent, ModalOverlay } from '@chakra-ui/react';
|
||||||
import { CloseButton } from 'components/Buttons/CloseButton';
|
|
||||||
import { ModalHeader } from '../GenericModal/ModalHeader';
|
import { ModalHeader } from '../GenericModal/ModalHeader';
|
||||||
|
import { CloseButton } from 'components/Buttons/CloseButton';
|
||||||
|
|
||||||
export type ModalProps = {
|
export type ModalProps = {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ import {
|
|||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Modal } from '../Modal';
|
import { Modal } from '../Modal';
|
||||||
import { useTelemetry } from 'hooks/Network/Telemetry';
|
|
||||||
import { lowercaseFirstLetter } from 'helpers/stringHelper';
|
import { lowercaseFirstLetter } from 'helpers/stringHelper';
|
||||||
|
import { useTelemetry } from 'hooks/Network/Telemetry';
|
||||||
|
|
||||||
export type TelemetryModalProps = {
|
export type TelemetryModalProps = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { SelectField } from '../../Form/Fields/SelectField';
|
import { SelectField } from '../../Form/Fields/SelectField';
|
||||||
import { ToggleField } from '../../Form/Fields/ToggleField';
|
import { ToggleField } from '../../Form/Fields/ToggleField';
|
||||||
import { ModalProps } from 'models/Modal';
|
|
||||||
import { WifiScanCommand } from 'models/Device';
|
import { WifiScanCommand } from 'models/Device';
|
||||||
|
import { ModalProps } from 'models/Modal';
|
||||||
|
|
||||||
const defaultValues: WifiScanCommand = {
|
const defaultValues: WifiScanCommand = {
|
||||||
activeScan: false,
|
activeScan: false,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { Alert, Heading, SimpleGrid } from '@chakra-ui/react';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import ResultCard from './ResultCard';
|
import ResultCard from './ResultCard';
|
||||||
import { DeviceScanResult, ScanChannel, WifiScanResult } from 'models/Device';
|
|
||||||
import { parseDbm } from 'helpers/stringHelper';
|
import { parseDbm } from 'helpers/stringHelper';
|
||||||
|
import { DeviceScanResult, ScanChannel, WifiScanResult } from 'models/Device';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
results: WifiScanResult;
|
results: WifiScanResult;
|
||||||
|
|||||||
@@ -3,18 +3,18 @@ import { Modal, ModalOverlay, ModalContent, ModalBody, Center, Spinner } from '@
|
|||||||
import { ArrowLeft, Download, Gauge } from 'phosphor-react';
|
import { ArrowLeft, Download, Gauge } from 'phosphor-react';
|
||||||
import { CSVLink } from 'react-csv';
|
import { CSVLink } from 'react-csv';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { CloseButton } from 'components/Buttons/CloseButton';
|
|
||||||
import { ResponsiveButton } from 'components/Buttons/ResponsiveButton';
|
|
||||||
import { ModalHeader } from 'components/Containers/Modal/ModalHeader';
|
|
||||||
import ConfirmIgnoreCommand from '../ConfirmIgnoreCommand';
|
import ConfirmIgnoreCommand from '../ConfirmIgnoreCommand';
|
||||||
import WifiScanForm from './Form';
|
import WifiScanForm from './Form';
|
||||||
import WifiScanResultDisplay from './ResultDisplay';
|
import WifiScanResultDisplay from './ResultDisplay';
|
||||||
import { DeviceScanResult, WifiScanCommand } from 'models/Device';
|
import { CloseButton } from 'components/Buttons/CloseButton';
|
||||||
|
import { ResponsiveButton } from 'components/Buttons/ResponsiveButton';
|
||||||
|
import { ModalHeader } from 'components/Containers/Modal/ModalHeader';
|
||||||
|
import { dateForFilename } from 'helpers/dateFormatting';
|
||||||
import { useWifiScanDevice } from 'hooks/Network/Devices';
|
import { useWifiScanDevice } from 'hooks/Network/Devices';
|
||||||
import useCommandModal from 'hooks/useCommandModal';
|
import useCommandModal from 'hooks/useCommandModal';
|
||||||
import { useFormRef } from 'hooks/useFormRef';
|
import { useFormRef } from 'hooks/useFormRef';
|
||||||
|
import { DeviceScanResult, WifiScanCommand } from 'models/Device';
|
||||||
import { ModalProps } from 'models/Modal';
|
import { ModalProps } from 'models/Modal';
|
||||||
import { dateForFilename } from 'helpers/dateFormatting';
|
|
||||||
|
|
||||||
export type WifiScanModalProps = {
|
export type WifiScanModalProps = {
|
||||||
modalProps: ModalProps;
|
modalProps: ModalProps;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { bytesString } from 'helpers/stringHelper';
|
|
||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
|
import { bytesString } from 'helpers/stringHelper';
|
||||||
|
|
||||||
const DataCell: React.FC<{ bytes?: number }> = ({ bytes }) => {
|
const DataCell: React.FC<{ bytes?: number }> = ({ bytes }) => {
|
||||||
const data = useMemo(() => {
|
const data = useMemo(() => {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useState, useMemo, useEffect, useRef } from 'react';
|
import React, { useState, useMemo, useEffect, useRef } from 'react';
|
||||||
|
import { AuthProviderProps, AuthProviderReturn, useGetConfigurationDescriptions } from './utils';
|
||||||
import {
|
import {
|
||||||
axiosAnalytics,
|
axiosAnalytics,
|
||||||
axiosFms,
|
axiosFms,
|
||||||
@@ -20,7 +21,6 @@ import {
|
|||||||
import { useGetEndpoints } from 'hooks/Network/Endpoints';
|
import { useGetEndpoints } from 'hooks/Network/Endpoints';
|
||||||
import { Endpoint } from 'models/Endpoint';
|
import { Endpoint } from 'models/Endpoint';
|
||||||
import { Preference } from 'models/Preference';
|
import { Preference } from 'models/Preference';
|
||||||
import { AuthProviderProps, AuthProviderReturn, useGetConfigurationDescriptions } from './utils';
|
|
||||||
|
|
||||||
const AuthContext = React.createContext({} as AuthProviderReturn);
|
const AuthContext = React.createContext({} as AuthProviderReturn);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import debounce from 'helpers/debounce';
|
|
||||||
import useWebSocketCommand from './useWebSocketCommand';
|
import useWebSocketCommand from './useWebSocketCommand';
|
||||||
import { ProviderCommandResponse } from 'contexts/ProvisioningSocketProvider/utils';
|
import { ProviderCommandResponse } from 'contexts/ProvisioningSocketProvider/utils';
|
||||||
|
import debounce from 'helpers/debounce';
|
||||||
|
|
||||||
export type UseDeviceSearchProps = {
|
export type UseDeviceSearchProps = {
|
||||||
minLength?: number;
|
minLength?: number;
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import { AxiosError } from 'axios';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useMutation, useQuery, useQueryClient } from 'react-query';
|
import { useMutation, useQuery, useQueryClient } from 'react-query';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { axiosSec } from 'constants/axiosInstances';
|
|
||||||
import { Preference } from 'models/Preference';
|
|
||||||
import { User } from '../../models/User';
|
import { User } from '../../models/User';
|
||||||
|
import { axiosSec } from 'constants/axiosInstances';
|
||||||
import { Note } from 'models/Note';
|
import { Note } from 'models/Note';
|
||||||
|
import { Preference } from 'models/Preference';
|
||||||
|
|
||||||
export const useUpdatePreferences = () => {
|
export const useUpdatePreferences = () => {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { axiosFms } from 'constants/axiosInstances';
|
|
||||||
import { useQuery } from 'react-query';
|
import { useQuery } from 'react-query';
|
||||||
|
import { axiosFms } from 'constants/axiosInstances';
|
||||||
|
|
||||||
const useGetDeviceTypes = () =>
|
const useGetDeviceTypes = () =>
|
||||||
useQuery(['get-device-types'], () => axiosFms.get('/firmwares?deviceSet=true').then(({ data }) => data.deviceTypes), {
|
useQuery(['get-device-types'], () => axiosFms.get('/firmwares?deviceSet=true').then(({ data }) => data.deviceTypes), {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { useMutation, useQuery, useQueryClient } from 'react-query';
|
import { useMutation, useQuery, useQueryClient } from 'react-query';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { axiosGw } from 'constants/axiosInstances';
|
import { axiosGw } from 'constants/axiosInstances';
|
||||||
import { DeviceRttyApiResponse, GatewayDevice, WifiScanCommand, WifiScanResult } from 'models/Device';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
import { useEndpointStatus } from 'hooks/useEndpointStatus';
|
import { useEndpointStatus } from 'hooks/useEndpointStatus';
|
||||||
|
import { DeviceRttyApiResponse, GatewayDevice, WifiScanCommand, WifiScanResult } from 'models/Device';
|
||||||
import { Note } from 'models/Note';
|
import { Note } from 'models/Note';
|
||||||
import { PageInfo } from 'models/Table';
|
import { PageInfo } from 'models/Table';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
|
import { useQuery } from 'react-query';
|
||||||
import { axiosProv } from 'constants/axiosInstances';
|
import { axiosProv } from 'constants/axiosInstances';
|
||||||
import { Note } from 'models/Note';
|
import { Note } from 'models/Note';
|
||||||
import { useQuery } from 'react-query';
|
|
||||||
|
|
||||||
export type InventoryTag = {
|
export type InventoryTag = {
|
||||||
contact: string;
|
contact: string;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { useToast } from '@chakra-ui/react';
|
|||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useMutation, useQuery } from 'react-query';
|
import { useMutation, useQuery } from 'react-query';
|
||||||
import { User } from 'models/User';
|
|
||||||
import { axiosSec } from 'constants/axiosInstances';
|
import { axiosSec } from 'constants/axiosInstances';
|
||||||
|
import { User } from 'models/User';
|
||||||
|
|
||||||
const getAvatarPromises = (userList: User[]) => {
|
const getAvatarPromises = (userList: User[]) => {
|
||||||
const promises = userList.map(async (user) => {
|
const promises = userList.map(async (user) => {
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ import {
|
|||||||
import { ArrowCircleLeft } from 'phosphor-react';
|
import { ArrowCircleLeft } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
import routes from 'router/routes';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import LanguageSwitcher from 'components/LanguageSwitcher';
|
import LanguageSwitcher from 'components/LanguageSwitcher';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import routes from 'router/routes';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
secondary: boolean;
|
secondary: boolean;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Flex, Heading, Tooltip, VStack } from '@chakra-ui/react';
|
import { Flex, Heading, Tooltip, VStack } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useGetDevicesStats } from 'hooks/Network/Devices';
|
|
||||||
import { compactSecondsToDetailed, minimalSecondsToDetailed } from 'helpers/dateFormatting';
|
import { compactSecondsToDetailed, minimalSecondsToDetailed } from 'helpers/dateFormatting';
|
||||||
|
import { useGetDevicesStats } from 'hooks/Network/Devices';
|
||||||
|
|
||||||
const SidebarDevices = () => {
|
const SidebarDevices = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { Button, Flex, Text, useColorModeValue } from '@chakra-ui/react';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { Route } from 'models/Routes';
|
|
||||||
import IconBox from 'components/Containers/IconBox';
|
import IconBox from 'components/Containers/IconBox';
|
||||||
|
import { Route } from 'models/Routes';
|
||||||
|
|
||||||
const variantChange = '0.2s linear';
|
const variantChange = '0.2s linear';
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import createLinks from './CreateLinks';
|
|||||||
import SidebarDevices from './Devices';
|
import SidebarDevices from './Devices';
|
||||||
import darkLogo from 'assets/Logo_Dark_Mode.svg';
|
import darkLogo from 'assets/Logo_Dark_Mode.svg';
|
||||||
import lightLogo from 'assets/Logo_Light_Mode.svg';
|
import lightLogo from 'assets/Logo_Light_Mode.svg';
|
||||||
import { Route } from 'models/Routes';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { Route } from 'models/Routes';
|
||||||
|
|
||||||
const variantChange = '0.2s linear';
|
const variantChange = '0.2s linear';
|
||||||
|
|
||||||
|
|||||||
@@ -5,17 +5,17 @@ import { Formik, FormikProps } from 'formik';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { DefaultConfigurationSchema } from '../utils';
|
import { DefaultConfigurationSchema } from '../utils';
|
||||||
|
import { CreateButton } from 'components/Buttons/CreateButton';
|
||||||
|
import { EditButton } from 'components/Buttons/EditButton';
|
||||||
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
|
import { StringField } from 'components/Form/Fields/StringField';
|
||||||
import MultiSelectField from 'components/Form/MultiSelectField';
|
import MultiSelectField from 'components/Form/MultiSelectField';
|
||||||
|
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
||||||
|
import { Modal } from 'components/Modals/Modal';
|
||||||
import { DefaultConfigurationResponse, useCreateDefaultConfig } from 'hooks/Network/DefaultConfigurations';
|
import { DefaultConfigurationResponse, useCreateDefaultConfig } from 'hooks/Network/DefaultConfigurations';
|
||||||
import { useGetDeviceTypes } from 'hooks/Network/Firmware';
|
import { useGetDeviceTypes } from 'hooks/Network/Firmware';
|
||||||
import { useFormRef } from 'hooks/useFormRef';
|
|
||||||
import { useFormModal } from 'hooks/useFormModal';
|
import { useFormModal } from 'hooks/useFormModal';
|
||||||
import { CreateButton } from 'components/Buttons/CreateButton';
|
import { useFormRef } from 'hooks/useFormRef';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
|
||||||
import { SaveButton } from 'components/Buttons/SaveButton';
|
|
||||||
import { EditButton } from 'components/Buttons/EditButton';
|
|
||||||
import { StringField } from 'components/Form/Fields/StringField';
|
|
||||||
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
|
||||||
|
|
||||||
const CreateDefaultConfigurationModal = () => {
|
const CreateDefaultConfigurationModal = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ import { Formik, FormikProps } from 'formik';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { DefaultConfigurationSchema } from '../utils';
|
import { DefaultConfigurationSchema } from '../utils';
|
||||||
|
import { EditButton } from 'components/Buttons/EditButton';
|
||||||
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
|
import { StringField } from 'components/Form/Fields/StringField';
|
||||||
import MultiSelectField from 'components/Form/MultiSelectField';
|
import MultiSelectField from 'components/Form/MultiSelectField';
|
||||||
|
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
||||||
|
import { Modal } from 'components/Modals/Modal';
|
||||||
import { DefaultConfigurationResponse, useUpdateDefaultConfig } from 'hooks/Network/DefaultConfigurations';
|
import { DefaultConfigurationResponse, useUpdateDefaultConfig } from 'hooks/Network/DefaultConfigurations';
|
||||||
import { useGetDeviceTypes } from 'hooks/Network/Firmware';
|
import { useGetDeviceTypes } from 'hooks/Network/Firmware';
|
||||||
import { useFormRef } from 'hooks/useFormRef';
|
|
||||||
import { useFormModal } from 'hooks/useFormModal';
|
import { useFormModal } from 'hooks/useFormModal';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
import { useFormRef } from 'hooks/useFormRef';
|
||||||
import { SaveButton } from 'components/Buttons/SaveButton';
|
|
||||||
import { EditButton } from 'components/Buttons/EditButton';
|
|
||||||
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
|
||||||
import { StringField } from 'components/Form/Fields/StringField';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
modalProps: UseDisclosureReturn;
|
modalProps: UseDisclosureReturn;
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import Actions from './Actions';
|
import Actions from './Actions';
|
||||||
import CreateDefaultConfigurationModal from './CreateModal';
|
import CreateDefaultConfigurationModal from './CreateModal';
|
||||||
import EditDefaultConfiguration from './EditModal';
|
import EditDefaultConfiguration from './EditModal';
|
||||||
import { DefaultConfigurationResponse, useGetDefaultConfigurations } from 'hooks/Network/DefaultConfigurations';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
|
||||||
import { Column } from 'models/Table';
|
|
||||||
import { Card } from 'components/Containers/Card';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
|
import { Card } from 'components/Containers/Card';
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
import { LoadingOverlay } from 'components/LoadingOverlay';
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { LoadingOverlay } from 'components/LoadingOverlay';
|
||||||
|
import { DefaultConfigurationResponse, useGetDefaultConfigurations } from 'hooks/Network/DefaultConfigurations';
|
||||||
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
const DefaultConfigurationsList = () => {
|
const DefaultConfigurationsList = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import { testJson } from 'helpers/formTests';
|
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
|
import { testJson } from 'helpers/formTests';
|
||||||
|
|
||||||
export const DefaultConfigurationSchema = (t: (str: string) => string) =>
|
export const DefaultConfigurationSchema = (t: (str: string) => string) =>
|
||||||
Yup.object()
|
Yup.object()
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import ViewCapabilitiesModal from './ViewCapabilitiesModal';
|
import ViewCapabilitiesModal from './ViewCapabilitiesModal';
|
||||||
import ViewConfigurationModal from './ViewConfigurationModal';
|
import ViewConfigurationModal from './ViewConfigurationModal';
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import { compactDate } from 'helpers/dateFormatting';
|
||||||
import { useGetDevice } from 'hooks/Network/Devices';
|
import { useGetDevice } from 'hooks/Network/Devices';
|
||||||
import { useGetProvUi } from 'hooks/Network/Endpoints';
|
import { useGetProvUi } from 'hooks/Network/Endpoints';
|
||||||
import { DeviceConfiguration } from 'models/Device';
|
|
||||||
import { compactDate } from 'helpers/dateFormatting';
|
|
||||||
import { useGetTag } from 'hooks/Network/Inventory';
|
import { useGetTag } from 'hooks/Network/Inventory';
|
||||||
|
import { DeviceConfiguration } from 'models/Device';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -13,17 +13,18 @@ import {
|
|||||||
Tabs,
|
Tabs,
|
||||||
useColorMode,
|
useColorMode,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
|
import { JsonViewer } from '@textea/json-viewer';
|
||||||
import { Download } from 'phosphor-react';
|
import { Download } from 'phosphor-react';
|
||||||
import { CSVLink } from 'react-csv';
|
import { CSVLink } from 'react-csv';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { JsonViewer } from '@textea/json-viewer';
|
import { ResponsiveButton } from 'components/Buttons/ResponsiveButton';
|
||||||
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
import WifiScanResultDisplay from 'components/Modals/WifiScanModal/ResultDisplay';
|
||||||
|
import { compactDate, dateForFilename } from 'helpers/dateFormatting';
|
||||||
|
import { uppercaseFirstLetter } from 'helpers/stringHelper';
|
||||||
|
import { DeviceCommandHistory } from 'hooks/Network/Commands';
|
||||||
import { useDownloadTrace } from 'hooks/Network/Trace';
|
import { useDownloadTrace } from 'hooks/Network/Trace';
|
||||||
import { DeviceScanResult } from 'models/Device';
|
import { DeviceScanResult } from 'models/Device';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
|
||||||
import { uppercaseFirstLetter } from 'helpers/stringHelper';
|
|
||||||
import { compactDate, dateForFilename } from 'helpers/dateFormatting';
|
|
||||||
import { ResponsiveButton } from 'components/Buttons/ResponsiveButton';
|
|
||||||
import { DeviceCommandHistory } from 'hooks/Network/Commands';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
modalProps: {
|
modalProps: {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
|
||||||
import { Column } from 'models/Table';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
|
||||||
import { Box, Button, Center, Heading } from '@chakra-ui/react';
|
import { Box, Button, Center, Heading } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import CommandDetailsModal from './Modal';
|
import CommandDetailsModal from './Modal';
|
||||||
import useCommandHistoryTable from './useCommandHistoryTable';
|
import useCommandHistoryTable from './useCommandHistoryTable';
|
||||||
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
|
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
||||||
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import { Badge, Box, HStack, IconButton, Tooltip, useDisclosure, useToast } from
|
|||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { MagnifyingGlass, Trash } from 'phosphor-react';
|
import { MagnifyingGlass, Trash } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { DeviceCommandHistory, useDeleteCommand, useGetCommandHistory } from 'hooks/Network/Commands';
|
|
||||||
import { uppercaseFirstLetter } from 'helpers/stringHelper';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { uppercaseFirstLetter } from 'helpers/stringHelper';
|
||||||
|
import { DeviceCommandHistory, useDeleteCommand, useGetCommandHistory } from 'hooks/Network/Commands';
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { DeleteButton } from 'components/Buttons/DeleteButton';
|
|
||||||
import { Modal } from 'components/Modals/Modal';
|
|
||||||
import { Alert, AlertIcon, Box, Button, Center, useDisclosure, useToast } from '@chakra-ui/react';
|
import { Alert, AlertIcon, Box, Button, Center, useDisclosure, useToast } from '@chakra-ui/react';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import ReactDatePicker from 'react-datepicker';
|
import ReactDatePicker from 'react-datepicker';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { DeleteButton } from 'components/Buttons/DeleteButton';
|
||||||
|
import { Modal } from 'components/Modals/Modal';
|
||||||
import 'react-datepicker/dist/react-datepicker.css';
|
import 'react-datepicker/dist/react-datepicker.css';
|
||||||
import { useDeleteHealthChecks } from 'hooks/Network/HealthChecks';
|
import { useDeleteHealthChecks } from 'hooks/Network/HealthChecks';
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
|
||||||
import { Column } from 'models/Table';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
|
||||||
import { Box, Button, Center, Flex, Heading, HStack, Spacer } from '@chakra-ui/react';
|
import { Box, Button, Center, Flex, Heading, HStack, Spacer } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import DeleteHealthChecksModal from './DeleteModal';
|
import DeleteHealthChecksModal from './DeleteModal';
|
||||||
import useHealthCheckTable from './useHealthCheckTable';
|
import useHealthCheckTable from './useHealthCheckTable';
|
||||||
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
|
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
||||||
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import { AxiosError } from 'axios';
|
|||||||
import ReactDatePicker from 'react-datepicker';
|
import ReactDatePicker from 'react-datepicker';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import 'react-datepicker/dist/react-datepicker.css';
|
import 'react-datepicker/dist/react-datepicker.css';
|
||||||
import { useDeleteLogs } from 'hooks/Network/DeviceLogs';
|
|
||||||
import { DeleteButton } from 'components/Buttons/DeleteButton';
|
import { DeleteButton } from 'components/Buttons/DeleteButton';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
import { useDeleteLogs } from 'hooks/Network/DeviceLogs';
|
||||||
|
|
||||||
const CustomInputButton = React.forwardRef(
|
const CustomInputButton = React.forwardRef(
|
||||||
({ value, onClick }: { value: string; onClick: () => void }, ref: React.LegacyRef<HTMLButtonElement>) => (
|
({ value, onClick }: { value: string; onClick: () => void }, ref: React.LegacyRef<HTMLButtonElement>) => (
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import { Box, Button, Center, Flex, Heading, HStack, Spacer } from '@chakra-ui/r
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import DeleteLogModal from './DeleteModal';
|
import DeleteLogModal from './DeleteModal';
|
||||||
import useDeviceLogsTable from './useDeviceLogsTable';
|
import useDeviceLogsTable from './useDeviceLogsTable';
|
||||||
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
|
||||||
import { Column } from 'models/Table';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
|
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Box } from '@chakra-ui/react';
|
import { Box } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
import { DeviceLog, useGetDeviceLogs } from 'hooks/Network/DeviceLogs';
|
import { DeviceLog, useGetDeviceLogs } from 'hooks/Network/DeviceLogs';
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Card } from 'components/Containers/Card';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
@@ -23,11 +20,14 @@ import {
|
|||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { Plus } from 'phosphor-react';
|
import { Plus } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useGetDevice, useUpdateDevice } from 'hooks/Network/Devices';
|
import { Card } from 'components/Containers/Card';
|
||||||
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
import { Column } from 'models/Table';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { useGetDevice, useUpdateDevice } from 'hooks/Network/Devices';
|
||||||
import { Note } from 'models/Note';
|
import { Note } from 'models/Note';
|
||||||
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import {
|
|||||||
import { Clock, Prohibit } from 'phosphor-react';
|
import { Clock, Prohibit } from 'phosphor-react';
|
||||||
import ReactDatePicker from 'react-datepicker';
|
import ReactDatePicker from 'react-datepicker';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { SaveButton } from 'components/Buttons/SaveButton';
|
|
||||||
import { CloseButton } from 'components/Buttons/CloseButton';
|
import { CloseButton } from 'components/Buttons/CloseButton';
|
||||||
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
|
|
||||||
const CustomInputButton = React.forwardRef(
|
const CustomInputButton = React.forwardRef(
|
||||||
({ value, onClick }: { value: string; onClick: () => void }, ref: React.LegacyRef<HTMLButtonElement>) => (
|
({ value, onClick }: { value: string; onClick: () => void }, ref: React.LegacyRef<HTMLButtonElement>) => (
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ import {
|
|||||||
useColorMode,
|
useColorMode,
|
||||||
useDisclosure,
|
useDisclosure,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
|
import { JsonViewer } from '@textea/json-viewer';
|
||||||
import { ClockCounterClockwise } from 'phosphor-react';
|
import { ClockCounterClockwise } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useGetDeviceLastStats } from 'hooks/Network/Statistics';
|
|
||||||
import { Modal } from 'components/Modals/Modal';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
import { LoadingOverlay } from 'components/LoadingOverlay';
|
import { LoadingOverlay } from 'components/LoadingOverlay';
|
||||||
import { JsonViewer } from '@textea/json-viewer';
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
import { useGetDeviceLastStats } from 'hooks/Network/Statistics';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ import StatisticsCardDatePickers from './DatePickers';
|
|||||||
import InterfaceChart from './InterfaceChart';
|
import InterfaceChart from './InterfaceChart';
|
||||||
import DeviceMemoryChart from './MemoryChart';
|
import DeviceMemoryChart from './MemoryChart';
|
||||||
import ViewLastStatsModal from './ViewLastStatsModal';
|
import ViewLastStatsModal from './ViewLastStatsModal';
|
||||||
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
|
import { Card } from 'components/Containers/Card';
|
||||||
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import { LoadingOverlay } from 'components/LoadingOverlay';
|
||||||
import {
|
import {
|
||||||
DeviceStatistics,
|
DeviceStatistics,
|
||||||
useGetDeviceStatsLatestHour,
|
useGetDeviceStatsLatestHour,
|
||||||
useGetDeviceStatsWithTimestamps,
|
useGetDeviceStatsWithTimestamps,
|
||||||
} from 'hooks/Network/Statistics';
|
} from 'hooks/Network/Statistics';
|
||||||
import { Card } from 'components/Containers/Card';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
|
||||||
import { LoadingOverlay } from 'components/LoadingOverlay';
|
|
||||||
|
|
||||||
const extractMemory = (stat: DeviceStatistics) => {
|
const extractMemory = (stat: DeviceStatistics) => {
|
||||||
let used: number | undefined;
|
let used: number | undefined;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Card } from 'components/Containers/Card';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
|
||||||
import { Flex, Grid, GridItem, Heading, Image, Tag } from '@chakra-ui/react';
|
import { Flex, Grid, GridItem, Heading, Image, Tag } from '@chakra-ui/react';
|
||||||
import ReactCountryFlag from 'react-country-flag';
|
import ReactCountryFlag from 'react-country-flag';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { bytesString, getRevision } from 'helpers/stringHelper';
|
import { Card } from 'components/Containers/Card';
|
||||||
import COUNTRY_LIST from 'constants/countryList';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import COUNTRY_LIST from 'constants/countryList';
|
||||||
import { compactDate, compactSecondsToDetailed } from 'helpers/dateFormatting';
|
import { compactDate, compactSecondsToDetailed } from 'helpers/dateFormatting';
|
||||||
|
import { bytesString, getRevision } from 'helpers/stringHelper';
|
||||||
import { useGetDevice, useGetDeviceStatus } from 'hooks/Network/Devices';
|
import { useGetDevice, useGetDeviceStatus } from 'hooks/Network/Devices';
|
||||||
import { useGetDeviceLastStats } from 'hooks/Network/Statistics';
|
import { useGetDeviceLastStats } from 'hooks/Network/Statistics';
|
||||||
|
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import {
|
|||||||
useColorMode,
|
useColorMode,
|
||||||
useDisclosure,
|
useDisclosure,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { JsonViewer } from '@textea/json-viewer';
|
import { JsonViewer } from '@textea/json-viewer';
|
||||||
import { useGetDeviceCapabilities } from 'hooks/Network/Devices';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
import { LoadingOverlay } from 'components/LoadingOverlay';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { LoadingOverlay } from 'components/LoadingOverlay';
|
||||||
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
import { useGetDeviceCapabilities } from 'hooks/Network/Devices';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import {
|
|||||||
useColorMode,
|
useColorMode,
|
||||||
useDisclosure,
|
useDisclosure,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { JsonViewer } from '@textea/json-viewer';
|
import { JsonViewer } from '@textea/json-viewer';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
import { Modal } from 'components/Modals/Modal';
|
||||||
import { DeviceConfiguration } from 'models/Device';
|
import { DeviceConfiguration } from 'models/Device';
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import * as React from 'react';
|
|||||||
import { Box, Flex, Heading, Spacer } from '@chakra-ui/react';
|
import { Box, Flex, Heading, Spacer } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { ParsedRadio } from './RadiosTable';
|
import { ParsedRadio } from './RadiosTable';
|
||||||
import { Column } from 'models/Table';
|
|
||||||
import DataCell from 'components/TableCells/DataCell';
|
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
|
||||||
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
||||||
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import DataCell from 'components/TableCells/DataCell';
|
||||||
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
export type ParsedAssociation = {
|
export type ParsedAssociation = {
|
||||||
radio?: ParsedRadio;
|
radio?: ParsedRadio;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Box, Flex, Heading, Spacer } from '@chakra-ui/react';
|
import { Box, Flex, Heading, Spacer } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Column } from 'models/Table';
|
|
||||||
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
export type ParsedRadio = {
|
export type ParsedRadio = {
|
||||||
recorded: number;
|
recorded: number;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
|
||||||
import { Card } from 'components/Containers/Card';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { Box, Flex, Heading, Slider, SliderFilledTrack, SliderThumb, SliderTrack } from '@chakra-ui/react';
|
import { Box, Flex, Heading, Slider, SliderFilledTrack, SliderThumb, SliderTrack } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import WifiAnalysisAssocationsTable, { ParsedAssociation } from './AssocationsTable';
|
import WifiAnalysisAssocationsTable, { ParsedAssociation } from './AssocationsTable';
|
||||||
import WifiAnalysisRadioTable, { ParsedRadio } from './RadiosTable';
|
import WifiAnalysisRadioTable, { ParsedRadio } from './RadiosTable';
|
||||||
import { DeviceStatistics, useGetDeviceNewestStats, useGetMacOuis } from 'hooks/Network/Statistics';
|
import { Card } from 'components/Containers/Card';
|
||||||
import { parseDbm } from 'helpers/stringHelper';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
import { compactSecondsToDetailed } from 'helpers/dateFormatting';
|
import { compactSecondsToDetailed } from 'helpers/dateFormatting';
|
||||||
|
import { parseDbm } from 'helpers/stringHelper';
|
||||||
|
import { DeviceStatistics, useGetDeviceNewestStats, useGetMacOuis } from 'hooks/Network/Statistics';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -10,18 +10,18 @@ import DeviceStatisticsCard from './StatisticsCard';
|
|||||||
import DeviceSummary from './Summary';
|
import DeviceSummary from './Summary';
|
||||||
import WifiAnalysisCard from './WifiAnalysis';
|
import WifiAnalysisCard from './WifiAnalysis';
|
||||||
import DeviceActionDropdown from 'components/Buttons/DeviceActionDropdown';
|
import DeviceActionDropdown from 'components/Buttons/DeviceActionDropdown';
|
||||||
import FactoryResetModal from 'components/Modals/FactoryResetModal';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
import { useGetDevice, useGetDeviceHealthChecks, useGetDeviceStatus } from 'hooks/Network/Devices';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
import { WifiScanModal } from 'components/Modals/WifiScanModal';
|
|
||||||
import { FirmwareUpgradeModal } from 'components/Modals/FirmwareUpgradeModal';
|
|
||||||
import { TraceModal } from 'components/Modals/TraceModal';
|
|
||||||
import { EventQueueModal } from 'components/Modals/EventQueueModal';
|
|
||||||
import { ConfigureModal } from 'components/Modals/ConfigureModal';
|
import { ConfigureModal } from 'components/Modals/ConfigureModal';
|
||||||
|
import { EventQueueModal } from 'components/Modals/EventQueueModal';
|
||||||
|
import FactoryResetModal from 'components/Modals/FactoryResetModal';
|
||||||
|
import { FirmwareUpgradeModal } from 'components/Modals/FirmwareUpgradeModal';
|
||||||
import { TelemetryModal } from 'components/Modals/TelemetryModal';
|
import { TelemetryModal } from 'components/Modals/TelemetryModal';
|
||||||
|
import { TraceModal } from 'components/Modals/TraceModal';
|
||||||
|
import { WifiScanModal } from 'components/Modals/WifiScanModal';
|
||||||
|
import { useGetDevice, useGetDeviceHealthChecks, useGetDeviceStatus } from 'hooks/Network/Devices';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ import {
|
|||||||
useToast,
|
useToast,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useCreateBlacklist } from 'hooks/Network/Blacklist';
|
|
||||||
import { CreateButton } from 'components/Buttons/CreateButton';
|
import { CreateButton } from 'components/Buttons/CreateButton';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
|
||||||
import { SaveButton } from 'components/Buttons/SaveButton';
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
import { useCreateBlacklist } from 'hooks/Network/Blacklist';
|
||||||
|
|
||||||
const CreateBlacklistModal = () => {
|
const CreateBlacklistModal = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import {
|
|||||||
useToast,
|
useToast,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { BlacklistDevice, useUpdateBlacklist } from 'hooks/Network/Blacklist';
|
|
||||||
import { SaveButton } from 'components/Buttons/SaveButton';
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
import { Modal } from 'components/Modals/Modal';
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
import { BlacklistDevice, useUpdateBlacklist } from 'hooks/Network/Blacklist';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
modalProps: {
|
modalProps: {
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ import { useNavigate } from 'react-router-dom';
|
|||||||
import Actions from './Actions';
|
import Actions from './Actions';
|
||||||
import CreateBlacklistModal from './CreateModal';
|
import CreateBlacklistModal from './CreateModal';
|
||||||
import EditBlacklistModal from './EditModal';
|
import EditBlacklistModal from './EditModal';
|
||||||
import { Column, PageInfo } from 'models/Table';
|
|
||||||
import { BlacklistDevice, useGetBlacklistCount, useGetBlacklistDevices } from 'hooks/Network/Blacklist';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { BlacklistDevice, useGetBlacklistCount, useGetBlacklistDevices } from 'hooks/Network/Blacklist';
|
||||||
|
import { Column, PageInfo } from 'models/Table';
|
||||||
|
|
||||||
const DeviceListCard = () => {
|
const DeviceListCard = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ import OverallHealthSimple from './OverallHealth';
|
|||||||
import OverallHealthPieChart from './OverallHealthPieChart';
|
import OverallHealthPieChart from './OverallHealthPieChart';
|
||||||
import UptimesBarChart from './UptimesBarChart';
|
import UptimesBarChart from './UptimesBarChart';
|
||||||
import VendorBarChart from './VendorBarChart';
|
import VendorBarChart from './VendorBarChart';
|
||||||
import SimpleIconStatDisplay from 'components/Containers/SimpleIconStatDisplay';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
import { useGetControllerDashboard } from 'hooks/Network/Controller';
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import SimpleIconStatDisplay from 'components/Containers/SimpleIconStatDisplay';
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { useGetControllerDashboard } from 'hooks/Network/Controller';
|
||||||
|
|
||||||
const DevicesDashboard = () => {
|
const DevicesDashboard = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -10,24 +10,24 @@ import AP from './icons/AP.png';
|
|||||||
import IOT from './icons/IOT.png';
|
import IOT from './icons/IOT.png';
|
||||||
import MESH from './icons/MESH.png';
|
import MESH from './icons/MESH.png';
|
||||||
import SWITCH from './icons/SWITCH.png';
|
import SWITCH from './icons/SWITCH.png';
|
||||||
import FactoryResetModal from 'components/Modals/FactoryResetModal';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
import { DeviceWithStatus, useGetDeviceCount, useGetDevices } from 'hooks/Network/Devices';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
import { useGetFirmwareAges } from 'hooks/Network/Firmware';
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
||||||
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { ConfigureModal } from 'components/Modals/ConfigureModal';
|
||||||
|
import { EventQueueModal } from 'components/Modals/EventQueueModal';
|
||||||
|
import FactoryResetModal from 'components/Modals/FactoryResetModal';
|
||||||
|
import { FirmwareUpgradeModal } from 'components/Modals/FirmwareUpgradeModal';
|
||||||
|
import { TelemetryModal } from 'components/Modals/TelemetryModal';
|
||||||
|
import { TraceModal } from 'components/Modals/TraceModal';
|
||||||
|
import { WifiScanModal } from 'components/Modals/WifiScanModal';
|
||||||
import DataCell from 'components/TableCells/DataCell';
|
import DataCell from 'components/TableCells/DataCell';
|
||||||
import NumberCell from 'components/TableCells/NumberCell';
|
import NumberCell from 'components/TableCells/NumberCell';
|
||||||
|
import { DeviceWithStatus, useGetDeviceCount, useGetDevices } from 'hooks/Network/Devices';
|
||||||
|
import { useGetFirmwareAges } from 'hooks/Network/Firmware';
|
||||||
import { Column, PageInfo } from 'models/Table';
|
import { Column, PageInfo } from 'models/Table';
|
||||||
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
|
||||||
import { WifiScanModal } from 'components/Modals/WifiScanModal';
|
|
||||||
import { FirmwareUpgradeModal } from 'components/Modals/FirmwareUpgradeModal';
|
|
||||||
import { TraceModal } from 'components/Modals/TraceModal';
|
|
||||||
import { EventQueueModal } from 'components/Modals/EventQueueModal';
|
|
||||||
import { ConfigureModal } from 'components/Modals/ConfigureModal';
|
|
||||||
import { TelemetryModal } from 'components/Modals/TelemetryModal';
|
|
||||||
|
|
||||||
const ICON_STYLE = { width: '24px', height: '24px', borderRadius: '20px' };
|
const ICON_STYLE = { width: '24px', height: '24px', borderRadius: '20px' };
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import Blacklist from './Blacklist';
|
import Blacklist from './Blacklist';
|
||||||
import DevicesDashboard from './Dashboard';
|
import DevicesDashboard from './Dashboard';
|
||||||
import DeviceListCard from './ListCard';
|
import DeviceListCard from './ListCard';
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
|
||||||
const getDefaultTabIndex = () => {
|
const getDefaultTabIndex = () => {
|
||||||
const index = localStorage.getItem('devices-tab-index') || '0';
|
const index = localStorage.getItem('devices-tab-index') || '0';
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import { Heading, Table, Tbody, Td, Th, Thead, Tooltip, Tr } from '@chakra-ui/re
|
|||||||
import { Info } from 'phosphor-react';
|
import { Info } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
import { FirmwareDashboardEndpoint } from 'hooks/Network/Firmware';
|
import { FirmwareDashboardEndpoint } from 'hooks/Network/Firmware';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ import FirmwareLatestPieChart from './LatestPieChart';
|
|||||||
import OuisBarChart from './OuisBarChart';
|
import OuisBarChart from './OuisBarChart';
|
||||||
import UnknownFirmwareBarChart from './UnknownFirmwareBarChart';
|
import UnknownFirmwareBarChart from './UnknownFirmwareBarChart';
|
||||||
import UpToDateDevicesSimple from './UpToDateDevices';
|
import UpToDateDevicesSimple from './UpToDateDevices';
|
||||||
import SimpleIconStatDisplay from 'components/Containers/SimpleIconStatDisplay';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { useGetFirmwareDashboard } from 'hooks/Network/Firmware';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import SimpleIconStatDisplay from 'components/Containers/SimpleIconStatDisplay';
|
||||||
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { useGetFirmwareDashboard } from 'hooks/Network/Firmware';
|
||||||
|
|
||||||
const FirmwareDashboard = () => {
|
const FirmwareDashboard = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -24,15 +24,16 @@ import {
|
|||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { Pen, Plus, X } from 'phosphor-react';
|
import { Pen, Plus, X } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { getRevision } from 'helpers/stringHelper';
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
import { Firmware } from 'models/Firmware';
|
|
||||||
import { useUpdateUpdateFirmware } from 'hooks/Network/Firmware';
|
|
||||||
import { Column } from 'models/Table';
|
|
||||||
import { Note } from 'models/Note';
|
|
||||||
import { Modal } from 'components/Modals/Modal';
|
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
import DataCell from 'components/TableCells/DataCell';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
import DataCell from 'components/TableCells/DataCell';
|
||||||
|
import { getRevision } from 'helpers/stringHelper';
|
||||||
|
import { useUpdateUpdateFirmware } from 'hooks/Network/Firmware';
|
||||||
|
import { Firmware } from 'models/Firmware';
|
||||||
|
import { Note } from 'models/Note';
|
||||||
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
modalProps: UseDisclosureReturn;
|
modalProps: UseDisclosureReturn;
|
||||||
@@ -190,7 +191,6 @@ const FirmwareDetailsModal = ({ modalProps, firmware }: Props) => {
|
|||||||
ml={2}
|
ml={2}
|
||||||
/>
|
/>
|
||||||
{isEditingDescription && (
|
{isEditingDescription && (
|
||||||
// @ts-ignore
|
|
||||||
<SaveButton onClick={onSaveDescription} ml={2} isCompact size="sm" isLoading={updateFirmware.isLoading} />
|
<SaveButton onClick={onSaveDescription} ml={2} isCompact size="sm" isLoading={updateFirmware.isLoading} />
|
||||||
)}
|
)}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
|||||||
@@ -17,17 +17,17 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import FirmwareDetailsModal from './Modal';
|
import FirmwareDetailsModal from './Modal';
|
||||||
import UriCell from './UriCell';
|
import UriCell from './UriCell';
|
||||||
|
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
||||||
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { LoadingOverlay } from 'components/LoadingOverlay';
|
||||||
|
import DataCell from 'components/TableCells/DataCell';
|
||||||
import { getRevision } from 'helpers/stringHelper';
|
import { getRevision } from 'helpers/stringHelper';
|
||||||
import { useGetDeviceTypes, useGetFirmwareDeviceType } from 'hooks/Network/Firmware';
|
import { useGetDeviceTypes, useGetFirmwareDeviceType } from 'hooks/Network/Firmware';
|
||||||
import { Firmware } from 'models/Firmware';
|
import { Firmware } from 'models/Firmware';
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
|
||||||
import DataCell from 'components/TableCells/DataCell';
|
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
|
||||||
import { LoadingOverlay } from 'components/LoadingOverlay';
|
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
|
||||||
import { RefreshButton } from 'components/Buttons/RefreshButton';
|
|
||||||
|
|
||||||
const FirmwareListTable = () => {
|
const FirmwareListTable = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import { Box, Flex, Tab, TabList, TabPanel, TabPanels, Tabs } from '@chakra-ui/r
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import FirmwareDashboard from './Dashboard';
|
import FirmwareDashboard from './Dashboard';
|
||||||
import FirmwareListTable from './List';
|
import FirmwareListTable from './List';
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
|
||||||
const STORAGE_KEY = 'firmware-tab-index';
|
const STORAGE_KEY = 'firmware-tab-index';
|
||||||
|
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ import { Formik, Form } from 'formik';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
import { StringField } from 'components/Form/Fields/StringField';
|
import { StringField } from 'components/Form/Fields/StringField';
|
||||||
import { LoginFormProps } from 'models/Login';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
import { useChangePassword } from 'hooks/Network/Login';
|
|
||||||
import { testRegex } from 'helpers/formTests';
|
import { testRegex } from 'helpers/formTests';
|
||||||
|
import { useChangePassword } from 'hooks/Network/Login';
|
||||||
import { useApiRequirements } from 'hooks/useApiRequirements';
|
import { useApiRequirements } from 'hooks/useApiRequirements';
|
||||||
|
import { LoginFormProps } from 'models/Login';
|
||||||
|
|
||||||
const LoginSchema = (t: (str: string) => string, { passRegex }: { passRegex: string }) =>
|
const LoginSchema = (t: (str: string) => string, { passRegex }: { passRegex: string }) =>
|
||||||
Yup.object().shape({
|
Yup.object().shape({
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import { Formik, Form } from 'formik';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
import { StringField } from '../../components/Form/Fields/StringField';
|
import { StringField } from '../../components/Form/Fields/StringField';
|
||||||
import { LoginFormProps } from 'models/Login';
|
|
||||||
import { useApiRequirements } from 'hooks/useApiRequirements';
|
|
||||||
import { useForgotPassword } from 'hooks/Network/Login';
|
import { useForgotPassword } from 'hooks/Network/Login';
|
||||||
|
import { useApiRequirements } from 'hooks/useApiRequirements';
|
||||||
|
import { LoginFormProps } from 'models/Login';
|
||||||
|
|
||||||
const ForgotPasswordSchema = Yup.object().shape({
|
const ForgotPasswordSchema = Yup.object().shape({
|
||||||
userId: Yup.string().email('Invalid email').required('Required'),
|
userId: Yup.string().email('Invalid email').required('Required'),
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ import { Formik, Field, Form } from 'formik';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
import { StringField } from 'components/Form/Fields/StringField';
|
import { StringField } from 'components/Form/Fields/StringField';
|
||||||
import { LoginFormProps } from 'models/Login';
|
|
||||||
import { useApiRequirements } from 'hooks/useApiRequirements';
|
|
||||||
import { useLogin } from 'hooks/Network/Login';
|
|
||||||
import { FormFieldProps } from 'models/FormField';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { useLogin } from 'hooks/Network/Login';
|
||||||
|
import { useApiRequirements } from 'hooks/useApiRequirements';
|
||||||
|
import { FormFieldProps } from 'models/FormField';
|
||||||
|
import { LoginFormProps } from 'models/Login';
|
||||||
|
|
||||||
const LoginSchema = Yup.object().shape({
|
const LoginSchema = Yup.object().shape({
|
||||||
email: Yup.string().email('Invalid email').required('Required'),
|
email: Yup.string().email('Invalid email').required('Required'),
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ import {
|
|||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
import { LoginFormProps } from 'models/Login';
|
|
||||||
import { useSendPhoneCode, useSendVerifyCode } from 'hooks/Network/Login';
|
import { useSendPhoneCode, useSendVerifyCode } from 'hooks/Network/Login';
|
||||||
|
import { LoginFormProps } from 'models/Login';
|
||||||
|
|
||||||
export interface MfaFormProps {
|
export interface MfaFormProps {
|
||||||
setActiveForm: React.Dispatch<React.SetStateAction<LoginFormProps>>;
|
setActiveForm: React.Dispatch<React.SetStateAction<LoginFormProps>>;
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ import { CardBody } from 'components/Containers/Card/CardBody';
|
|||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
import { StringField } from 'components/Form/Fields/StringField';
|
import { StringField } from 'components/Form/Fields/StringField';
|
||||||
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
||||||
import { useApiRequirements } from 'hooks/useApiRequirements';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
import { useUpdateAccount } from 'hooks/Network/Account';
|
|
||||||
import { useFormRef } from 'hooks/useFormRef';
|
|
||||||
import { useFormModal } from 'hooks/useFormModal';
|
|
||||||
import { testRegex } from 'helpers/formTests';
|
import { testRegex } from 'helpers/formTests';
|
||||||
|
import { useUpdateAccount } from 'hooks/Network/Account';
|
||||||
|
import { useApiRequirements } from 'hooks/useApiRequirements';
|
||||||
|
import { useFormModal } from 'hooks/useFormModal';
|
||||||
|
import { useFormRef } from 'hooks/useFormRef';
|
||||||
|
|
||||||
const FormSchema = (t: (str: string) => string, { passRegex }: { passRegex: string }) =>
|
const FormSchema = (t: (str: string) => string, { passRegex }: { passRegex: string }) =>
|
||||||
Yup.object().shape({
|
Yup.object().shape({
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Button, useDisclosure } from '@chakra-ui/react';
|
import { Button, useDisclosure } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useUpdateAccount } from 'hooks/Network/Account';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import GoogleAuthenticatorModal from './GoogleAuthenticatorModal';
|
import GoogleAuthenticatorModal from './GoogleAuthenticatorModal';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { useUpdateAccount } from 'hooks/Network/Account';
|
||||||
|
|
||||||
const ActivateGoogleAuthenticatorButton = () => {
|
const ActivateGoogleAuthenticatorButton = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|||||||
import { Button, IconButton, Text, Tooltip, useDisclosure } from '@chakra-ui/react';
|
import { Button, IconButton, Text, Tooltip, useDisclosure } from '@chakra-ui/react';
|
||||||
import { Pen } from 'phosphor-react';
|
import { Pen } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useUpdateAccount } from 'hooks/Network/Account';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import AddPhoneNumberModal from './AddPhoneNumberModal';
|
import AddPhoneNumberModal from './AddPhoneNumberModal';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { useUpdateAccount } from 'hooks/Network/Account';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
currentMfaMethod?: string;
|
currentMfaMethod?: string;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { CloseButton, Modal, ModalBody, ModalContent, ModalOverlay, useDisclosure } from '@chakra-ui/react';
|
import { CloseButton, Modal, ModalBody, ModalContent, ModalOverlay, useDisclosure } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
|
||||||
import { ModalHeader } from 'components/Modals/GenericModal/ModalHeader';
|
|
||||||
import ValidatePhoneNumberIntro from './ValidatePhoneNumberIntro';
|
import ValidatePhoneNumberIntro from './ValidatePhoneNumberIntro';
|
||||||
import ValidatePhoneNumberSuccess from './ValidatePhoneNumberSuccess';
|
import ValidatePhoneNumberSuccess from './ValidatePhoneNumberSuccess';
|
||||||
import ValidatePhoneNumberTests from './ValidatePhoneNumberTests';
|
import ValidatePhoneNumberTests from './ValidatePhoneNumberTests';
|
||||||
|
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
||||||
|
import { ModalHeader } from 'components/Modals/GenericModal/ModalHeader';
|
||||||
|
|
||||||
const AddPhoneNumberModal: React.FC<{
|
const AddPhoneNumberModal: React.FC<{
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { CloseButton, Modal, ModalBody, ModalContent, ModalOverlay, useDisclosure } from '@chakra-ui/react';
|
import { CloseButton, Modal, ModalBody, ModalContent, ModalOverlay, useDisclosure } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { SaveButton } from 'components/Buttons/SaveButton';
|
|
||||||
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
|
||||||
import { ModalHeader } from 'components/Modals/GenericModal/ModalHeader';
|
|
||||||
import GoogleAuthenticatorActivationSuccess from './GoogleAuthenticatorActivationSuccess';
|
import GoogleAuthenticatorActivationSuccess from './GoogleAuthenticatorActivationSuccess';
|
||||||
import GoogleAuthenticatorIntro from './GoogleAuthenticatorIntro';
|
import GoogleAuthenticatorIntro from './GoogleAuthenticatorIntro';
|
||||||
import GoogleAuthenticatorQrDisplay from './GoogleAuthenticatorQrDisplay';
|
import GoogleAuthenticatorQrDisplay from './GoogleAuthenticatorQrDisplay';
|
||||||
import GoogleAuthenticatorTests from './GoogleAuthenticatorTests';
|
import GoogleAuthenticatorTests from './GoogleAuthenticatorTests';
|
||||||
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
|
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
||||||
|
import { ModalHeader } from 'components/Modals/GenericModal/ModalHeader';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import * as React from 'react';
|
|||||||
import { Divider, Flex, Heading, Spacer, Tag, Text, VStack } from '@chakra-ui/react';
|
import { Divider, Flex, Heading, Spacer, Tag, Text, VStack } from '@chakra-ui/react';
|
||||||
import { parsePhoneNumber } from 'libphonenumber-js';
|
import { parsePhoneNumber } from 'libphonenumber-js';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Card } from 'components/Containers/Card';
|
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
|
||||||
import ActivateEmailMfaButton from './ActivateEmailMfaButton';
|
import ActivateEmailMfaButton from './ActivateEmailMfaButton';
|
||||||
import ActivateGoogleAuthenticatorButton from './ActivateGoogleAuthenticatorButton';
|
import ActivateGoogleAuthenticatorButton from './ActivateGoogleAuthenticatorButton';
|
||||||
import ActivateSmsAuthButton from './ActivateSmsAuthButton';
|
import ActivateSmsAuthButton from './ActivateSmsAuthButton';
|
||||||
import DeactivateMfaButton from './DeactivateMfaButton';
|
import DeactivateMfaButton from './DeactivateMfaButton';
|
||||||
|
import { Card } from 'components/Containers/Card';
|
||||||
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
|
||||||
const MultiFactorAuthProfile = () => {
|
const MultiFactorAuthProfile = () => {
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ import {
|
|||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { Plus } from 'phosphor-react';
|
import { Plus } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { DataTable } from '../../components/DataTables/DataTable';
|
||||||
|
import FormattedDate from '../../components/InformationDisplays/FormattedDate';
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
import { DataTable } from '../../components/DataTables/DataTable';
|
|
||||||
import FormattedDate from '../../components/InformationDisplays/FormattedDate';
|
|
||||||
import { useUpdateAccount } from 'hooks/Network/Account';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { useUpdateAccount } from 'hooks/Network/Account';
|
||||||
import { Note } from 'models/Note';
|
import { Note } from 'models/Note';
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Avatar, AvatarBadge, Box, Center, Heading, Text, useDisclosure } from '@chakra-ui/react';
|
import { Avatar, AvatarBadge, Box, Center, Heading, Text, useDisclosure } from '@chakra-ui/react';
|
||||||
import { Pen } from 'phosphor-react';
|
import { Pen } from 'phosphor-react';
|
||||||
|
import AvatarModal from './AvatarModal';
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
import AvatarModal from './AvatarModal';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
import { uppercaseFirstLetter } from 'helpers/stringHelper';
|
import { uppercaseFirstLetter } from 'helpers/stringHelper';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
import React, { useCallback } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
import { compactDate } from 'helpers/dateFormatting';
|
import { compactDate } from 'helpers/dateFormatting';
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
import React, { useCallback } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
certificates?: { expiresOn: number; filename: string }[];
|
certificates?: { expiresOn: number; filename: string }[];
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ import { MultiValue, Select } from 'chakra-react-select';
|
|||||||
import { ArrowsClockwise } from 'phosphor-react';
|
import { ArrowsClockwise } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import SystemCertificatesTable from './SystemCertificatesTable';
|
import SystemCertificatesTable from './SystemCertificatesTable';
|
||||||
import { useGetSubsystems, useGetSystemInfo, useReloadSubsystems } from 'hooks/Network/System';
|
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
import { compactSecondsToDetailed } from 'helpers/dateFormatting';
|
import { compactSecondsToDetailed } from 'helpers/dateFormatting';
|
||||||
import { EndpointApiResponse } from 'hooks/Network/Endpoints';
|
import { EndpointApiResponse } from 'hooks/Network/Endpoints';
|
||||||
|
import { useGetSubsystems, useGetSystemInfo, useReloadSubsystems } from 'hooks/Network/System';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
endpoint: EndpointApiResponse;
|
endpoint: EndpointApiResponse;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import React from 'react';
|
|||||||
import { Flex, SimpleGrid } from '@chakra-ui/react';
|
import { Flex, SimpleGrid } from '@chakra-ui/react';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import SystemTile from './SystemTile';
|
import SystemTile from './SystemTile';
|
||||||
import { useGetEndpoints } from 'hooks/Network/Endpoints';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import { axiosSec } from 'constants/axiosInstances';
|
import { axiosSec } from 'constants/axiosInstances';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { useGetEndpoints } from 'hooks/Network/Endpoints';
|
||||||
|
|
||||||
const SystemPage = () => {
|
const SystemPage = () => {
|
||||||
const { token, isUserLoaded } = useAuth();
|
const { token, isUserLoaded } = useAuth();
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IconButton, Menu, MenuButton, MenuItem, MenuList, Tooltip, useToast } from '@chakra-ui/react';
|
import { IconButton, Menu, MenuButton, MenuItem, MenuList, Tooltip, useToast } from '@chakra-ui/react';
|
||||||
|
import axios from 'axios';
|
||||||
import { Wrench } from 'phosphor-react';
|
import { Wrench } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { useSendUserEmailValidation, useSuspendUser, useResetMfa, useResetPassword } from 'hooks/Network/Users';
|
import { useSendUserEmailValidation, useSuspendUser, useResetMfa, useResetPassword } from 'hooks/Network/Users';
|
||||||
import { useMutationResult } from 'hooks/useMutationResult';
|
import { useMutationResult } from 'hooks/useMutationResult';
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ import PropTypes from 'prop-types';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
import { testRegex } from 'helpers/formTests';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import { useApiRequirements } from 'hooks/useApiRequirements';
|
|
||||||
import { StringField } from 'components/Form/Fields/StringField';
|
|
||||||
import { SelectField } from 'components/Form/Fields/SelectField';
|
import { SelectField } from 'components/Form/Fields/SelectField';
|
||||||
|
import { StringField } from 'components/Form/Fields/StringField';
|
||||||
import { ToggleField } from 'components/Form/Fields/ToggleField';
|
import { ToggleField } from 'components/Form/Fields/ToggleField';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { testRegex } from 'helpers/formTests';
|
||||||
|
import { useApiRequirements } from 'hooks/useApiRequirements';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import PropTypes from 'prop-types';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useMutation } from 'react-query';
|
import { useMutation } from 'react-query';
|
||||||
import CreateUserForm from './Form';
|
import CreateUserForm from './Form';
|
||||||
|
import { CloseButton } from 'components/Buttons/CloseButton';
|
||||||
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
|
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
||||||
|
import { ModalHeader } from 'components/Modals/GenericModal/ModalHeader';
|
||||||
|
import { axiosSec } from 'constants/axiosInstances';
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
import { useFormRef } from 'hooks/useFormRef';
|
import { useFormRef } from 'hooks/useFormRef';
|
||||||
import { ModalHeader } from 'components/Modals/GenericModal/ModalHeader';
|
|
||||||
import { SaveButton } from 'components/Buttons/SaveButton';
|
|
||||||
import { CloseButton } from 'components/Buttons/CloseButton';
|
|
||||||
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
|
||||||
import { axiosSec } from 'constants/axiosInstances';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
requirements: PropTypes.shape({
|
requirements: PropTypes.shape({
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import PropTypes from 'prop-types';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import { useApiRequirements } from 'hooks/useApiRequirements';
|
|
||||||
import { StringField } from 'components/Form/Fields/StringField';
|
|
||||||
import { SelectField } from 'components/Form/Fields/SelectField';
|
|
||||||
import { ToggleField } from 'components/Form/Fields/ToggleField';
|
|
||||||
import { NotesField } from 'components/Form/Fields/NotesField';
|
import { NotesField } from 'components/Form/Fields/NotesField';
|
||||||
import { testObjectName } from 'helpers/formTests';
|
import { SelectField } from 'components/Form/Fields/SelectField';
|
||||||
|
import { StringField } from 'components/Form/Fields/StringField';
|
||||||
|
import { ToggleField } from 'components/Form/Fields/ToggleField';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { testObjectName, testRegex } from 'helpers/formTests';
|
||||||
|
import { useApiRequirements } from 'hooks/useApiRequirements';
|
||||||
|
|
||||||
const UpdateUserSchema = (t, { passRegex }) =>
|
const UpdateUserSchema = (t, { passRegex }) =>
|
||||||
Yup.object().shape({
|
Yup.object().shape({
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ import PropTypes from 'prop-types';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useMutation } from 'react-query';
|
import { useMutation } from 'react-query';
|
||||||
import UpdateUserForm from './Form';
|
import UpdateUserForm from './Form';
|
||||||
|
import { CloseButton } from 'components/Buttons/CloseButton';
|
||||||
|
import { EditButton } from 'components/Buttons/EditButton';
|
||||||
|
import { SaveButton } from 'components/Buttons/SaveButton';
|
||||||
|
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
||||||
|
import { ModalHeader } from 'components/Modals/GenericModal/ModalHeader';
|
||||||
|
import { axiosSec } from 'constants/axiosInstances';
|
||||||
import { useGetUser } from 'hooks/Network/Users';
|
import { useGetUser } from 'hooks/Network/Users';
|
||||||
import { useFormRef } from 'hooks/useFormRef';
|
import { useFormRef } from 'hooks/useFormRef';
|
||||||
import { SaveButton } from 'components/Buttons/SaveButton';
|
|
||||||
import { EditButton } from 'components/Buttons/EditButton';
|
|
||||||
import { CloseButton } from 'components/Buttons/CloseButton';
|
|
||||||
import { ConfirmCloseAlertModal } from 'components/Modals/ConfirmCloseAlert';
|
|
||||||
import { axiosSec } from 'constants/axiosInstances';
|
|
||||||
import { ModalHeader } from 'components/Modals/GenericModal/ModalHeader';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
import React, { useCallback, useState } from 'react';
|
import React, { useCallback, useState } from 'react';
|
||||||
import { Avatar, Box, Button, Flex, Heading, useDisclosure, useToast } from '@chakra-ui/react';
|
import { Avatar, Box, Button, Flex, Heading, useDisclosure, useToast } from '@chakra-ui/react';
|
||||||
import { ArrowsClockwise } from 'phosphor-react';
|
import { ArrowsClockwise } from 'phosphor-react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import CreateUserModal from './CreateUserModal';
|
import CreateUserModal from './CreateUserModal';
|
||||||
import EditUserModal from './EditUserModal';
|
import EditUserModal from './EditUserModal';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import UserActions from './UserActions';
|
import UserActions from './UserActions';
|
||||||
import { useGetUsers } from 'hooks/Network/Users';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import { useGetRequirements } from 'hooks/Network/Requirements';
|
|
||||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
|
||||||
import { Card } from 'components/Containers/Card';
|
import { Card } from 'components/Containers/Card';
|
||||||
|
import { CardBody } from 'components/Containers/Card/CardBody';
|
||||||
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
import { CardHeader } from 'components/Containers/Card/CardHeader';
|
||||||
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
import { ColumnPicker } from 'components/DataTables/ColumnPicker';
|
||||||
import { CardBody } from 'components/Containers/Card/CardBody';
|
|
||||||
import { DataTable } from 'components/DataTables/DataTable';
|
import { DataTable } from 'components/DataTables/DataTable';
|
||||||
|
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { useGetRequirements } from 'hooks/Network/Requirements';
|
||||||
|
import { useGetUsers } from 'hooks/Network/Users';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { useAuth } from 'contexts/AuthProvider';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Route, Routes } from 'react-router-dom';
|
import { Route, Routes } from 'react-router-dom';
|
||||||
import darkLogo from 'assets/Logo_Dark_Mode.svg';
|
import darkLogo from 'assets/Logo_Dark_Mode.svg';
|
||||||
import lightLogo from 'assets/Logo_Light_Mode.svg';
|
import lightLogo from 'assets/Logo_Light_Mode.svg';
|
||||||
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
|
||||||
const Layout = React.lazy(() => import('layout'));
|
const Layout = React.lazy(() => import('layout'));
|
||||||
const Login = React.lazy(() => import('pages/LoginPage'));
|
const Login = React.lazy(() => import('pages/LoginPage'));
|
||||||
|
|||||||
Reference in New Issue
Block a user