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 { 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<{

View File

@ -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';

View File

@ -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,

View File

@ -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 (

View File

@ -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';

View File

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

View File

@ -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(() => {

View File

@ -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(() => {