refactor: change monitor path

This commit is contained in:
moonrailgun 2023-12-05 20:07:36 +08:00
parent 0a63dd5615
commit d2d105c905
9 changed files with 11 additions and 11 deletions

View File

@ -3,7 +3,7 @@ import { trpc } from '../../api/trpc';
import { useCurrentWorkspaceId } from '../../store/user';
import { ErrorTip } from '../ErrorTip';
import { Loading } from '../Loading';
import { getMonitorProvider } from '../modals/monitor/provider';
import { getMonitorProvider } from './provider';
import { MonitorStatsBlock } from './MonitorStatsBlock';
export const MonitorDataMetrics: React.FC<{

View File

@ -8,7 +8,7 @@ import {
} from '../../api/trpc';
import { useCurrentWorkspaceId } from '../../store/user';
import { Loading } from '../Loading';
import { getMonitorLink } from '../modals/monitor/provider';
import { getMonitorLink } from './provider';
import { NotFoundTip } from '../NotFoundTip';
import { MonitorInfo as MonitorInfoType } from '../../../types';
import { MonitorHealthBar } from './MonitorHealthBar';

View File

@ -2,8 +2,8 @@ import React, { useMemo } from 'react';
import type { Monitor } from '@prisma/client';
import { Button, Form, Input, InputNumber, Select } from 'antd';
import { getMonitorProvider, monitorProviders } from './provider';
import { useEvent } from '../../../hooks/useEvent';
import { NotificationPicker } from '../../notification/NotificationPicker';
import { useEvent } from '../../hooks/useEvent';
import { NotificationPicker } from '../notification/NotificationPicker';
export type MonitorInfoEditorValues = Omit<
Monitor,

View File

@ -1,11 +1,11 @@
import { Form, Input, Select, Switch } from 'antd';
import React from 'react';
import { MonitorOverviewComponent, MonitorProvider } from './types';
import { trpc } from '../../../../api/trpc';
import { MonitorStatsBlock } from '../../../monitor/MonitorStatsBlock';
import { trpc } from '../../../api/trpc';
import { MonitorStatsBlock } from '../MonitorStatsBlock';
import dayjs from 'dayjs';
import { isEmpty } from 'lodash-es';
import { useCurrentWorkspaceId } from '../../../../store/user';
import { useCurrentWorkspaceId } from '../../../store/user';
const MonitorHttp: React.FC = React.memo(() => {
return (

View File

@ -1,5 +1,5 @@
import React from 'react';
import { MonitorInfo } from '../../../../../types';
import { MonitorInfo } from '../../../../types';
import { pingProvider } from './ping';
import { httpProvider } from './http';
import { MonitorProvider } from './types';

View File

@ -1,4 +1,4 @@
import { MonitorInfo } from '../../../../../types';
import { MonitorInfo } from '../../../../types';
export interface MonitorProvider {
label: string;

View File

@ -1,7 +1,7 @@
import React from 'react';
import { useNavigate } from 'react-router';
import { useMonitorUpsert } from '../../api/model/monitor';
import { MonitorInfoEditor } from '../../components/modals/monitor/MonitorInfoEditor';
import { MonitorInfoEditor } from '../../components/monitor/MonitorInfoEditor';
import { useCurrentWorkspaceId } from '../../store/user';
export const MonitorAdd: React.FC = React.memo(() => {

View File

@ -7,7 +7,7 @@ import { Loading } from '../../components/Loading';
import {
MonitorInfoEditor,
MonitorInfoEditorValues,
} from '../../components/modals/monitor/MonitorInfoEditor';
} from '../../components/monitor/MonitorInfoEditor';
import { useCurrentWorkspaceId } from '../../store/user';
export const MonitorEdit: React.FC = React.memo(() => {