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 { 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<{
|
||||
|
@ -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';
|
||||
|
@ -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,
|
@ -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 (
|
@ -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';
|
@ -1,4 +1,4 @@
|
||||
import { MonitorInfo } from '../../../../../types';
|
||||
import { MonitorInfo } from '../../../../types';
|
||||
|
||||
export interface MonitorProvider {
|
||||
label: string;
|
@ -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(() => {
|
||||
|
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user