refactor: change monitor path
This commit is contained in:
parent
0a63dd5615
commit
d2d105c905
@ -3,7 +3,7 @@ import { trpc } from '../../api/trpc';
|
|||||||
import { useCurrentWorkspaceId } from '../../store/user';
|
import { useCurrentWorkspaceId } from '../../store/user';
|
||||||
import { ErrorTip } from '../ErrorTip';
|
import { ErrorTip } from '../ErrorTip';
|
||||||
import { Loading } from '../Loading';
|
import { Loading } from '../Loading';
|
||||||
import { getMonitorProvider } from '../modals/monitor/provider';
|
import { getMonitorProvider } from './provider';
|
||||||
import { MonitorStatsBlock } from './MonitorStatsBlock';
|
import { MonitorStatsBlock } from './MonitorStatsBlock';
|
||||||
|
|
||||||
export const MonitorDataMetrics: React.FC<{
|
export const MonitorDataMetrics: React.FC<{
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
} from '../../api/trpc';
|
} from '../../api/trpc';
|
||||||
import { useCurrentWorkspaceId } from '../../store/user';
|
import { useCurrentWorkspaceId } from '../../store/user';
|
||||||
import { Loading } from '../Loading';
|
import { Loading } from '../Loading';
|
||||||
import { getMonitorLink } from '../modals/monitor/provider';
|
import { getMonitorLink } from './provider';
|
||||||
import { NotFoundTip } from '../NotFoundTip';
|
import { NotFoundTip } from '../NotFoundTip';
|
||||||
import { MonitorInfo as MonitorInfoType } from '../../../types';
|
import { MonitorInfo as MonitorInfoType } from '../../../types';
|
||||||
import { MonitorHealthBar } from './MonitorHealthBar';
|
import { MonitorHealthBar } from './MonitorHealthBar';
|
||||||
|
@ -2,8 +2,8 @@ import React, { useMemo } from 'react';
|
|||||||
import type { Monitor } from '@prisma/client';
|
import type { Monitor } from '@prisma/client';
|
||||||
import { Button, Form, Input, InputNumber, Select } from 'antd';
|
import { Button, Form, Input, InputNumber, Select } from 'antd';
|
||||||
import { getMonitorProvider, monitorProviders } from './provider';
|
import { getMonitorProvider, monitorProviders } from './provider';
|
||||||
import { useEvent } from '../../../hooks/useEvent';
|
import { useEvent } from '../../hooks/useEvent';
|
||||||
import { NotificationPicker } from '../../notification/NotificationPicker';
|
import { NotificationPicker } from '../notification/NotificationPicker';
|
||||||
|
|
||||||
export type MonitorInfoEditorValues = Omit<
|
export type MonitorInfoEditorValues = Omit<
|
||||||
Monitor,
|
Monitor,
|
@ -1,11 +1,11 @@
|
|||||||
import { Form, Input, Select, Switch } from 'antd';
|
import { Form, Input, Select, Switch } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { MonitorOverviewComponent, MonitorProvider } from './types';
|
import { MonitorOverviewComponent, MonitorProvider } from './types';
|
||||||
import { trpc } from '../../../../api/trpc';
|
import { trpc } from '../../../api/trpc';
|
||||||
import { MonitorStatsBlock } from '../../../monitor/MonitorStatsBlock';
|
import { MonitorStatsBlock } from '../MonitorStatsBlock';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { isEmpty } from 'lodash-es';
|
import { isEmpty } from 'lodash-es';
|
||||||
import { useCurrentWorkspaceId } from '../../../../store/user';
|
import { useCurrentWorkspaceId } from '../../../store/user';
|
||||||
|
|
||||||
const MonitorHttp: React.FC = React.memo(() => {
|
const MonitorHttp: React.FC = React.memo(() => {
|
||||||
return (
|
return (
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { MonitorInfo } from '../../../../../types';
|
import { MonitorInfo } from '../../../../types';
|
||||||
import { pingProvider } from './ping';
|
import { pingProvider } from './ping';
|
||||||
import { httpProvider } from './http';
|
import { httpProvider } from './http';
|
||||||
import { MonitorProvider } from './types';
|
import { MonitorProvider } from './types';
|
@ -1,4 +1,4 @@
|
|||||||
import { MonitorInfo } from '../../../../../types';
|
import { MonitorInfo } from '../../../../types';
|
||||||
|
|
||||||
export interface MonitorProvider {
|
export interface MonitorProvider {
|
||||||
label: string;
|
label: string;
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useNavigate } from 'react-router';
|
import { useNavigate } from 'react-router';
|
||||||
import { useMonitorUpsert } from '../../api/model/monitor';
|
import { useMonitorUpsert } from '../../api/model/monitor';
|
||||||
import { MonitorInfoEditor } from '../../components/modals/monitor/MonitorInfoEditor';
|
import { MonitorInfoEditor } from '../../components/monitor/MonitorInfoEditor';
|
||||||
import { useCurrentWorkspaceId } from '../../store/user';
|
import { useCurrentWorkspaceId } from '../../store/user';
|
||||||
|
|
||||||
export const MonitorAdd: React.FC = React.memo(() => {
|
export const MonitorAdd: React.FC = React.memo(() => {
|
||||||
|
@ -7,7 +7,7 @@ import { Loading } from '../../components/Loading';
|
|||||||
import {
|
import {
|
||||||
MonitorInfoEditor,
|
MonitorInfoEditor,
|
||||||
MonitorInfoEditorValues,
|
MonitorInfoEditorValues,
|
||||||
} from '../../components/modals/monitor/MonitorInfoEditor';
|
} from '../../components/monitor/MonitorInfoEditor';
|
||||||
import { useCurrentWorkspaceId } from '../../store/user';
|
import { useCurrentWorkspaceId } from '../../store/user';
|
||||||
|
|
||||||
export const MonitorEdit: React.FC = React.memo(() => {
|
export const MonitorEdit: React.FC = React.memo(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user