diff --git a/src/client/components/monitor/MonitorPicker.tsx b/src/client/components/monitor/MonitorPicker.tsx index 23b9b88..610be6e 100644 --- a/src/client/components/monitor/MonitorPicker.tsx +++ b/src/client/components/monitor/MonitorPicker.tsx @@ -13,7 +13,7 @@ export const MonitorPicker: React.FC = React.memo( }); return ( - {allMonitor.map((m) => ( diff --git a/src/client/components/monitor/StatusPage/EditForm.tsx b/src/client/components/monitor/StatusPage/EditForm.tsx index 1ff014c..11b0708 100644 --- a/src/client/components/monitor/StatusPage/EditForm.tsx +++ b/src/client/components/monitor/StatusPage/EditForm.tsx @@ -2,6 +2,8 @@ import { Button, Form, Input, Typography } from 'antd'; import React from 'react'; import { slugRegex } from '../../../../shared'; import { z } from 'zod'; +import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons'; +import { MonitorPicker } from '../MonitorPicker'; const { Text } = Typography; @@ -26,6 +28,7 @@ export const MonitorStatusPageEditForm: React.FC layout="vertical" initialValues={props.initialValues} onFinish={props.onFinish} + onValuesChange={console.log} > + + {(fields, { add, remove }, { errors }) => { + return ( + <> + + {fields.map((field, index) => ( +
+ + + + + remove(field.name)} + /> +
+ ))} + + + + +
+ + ); + }} +
+
-
- {allowEdit && !editMode && ( + {allowEdit && !editMode && ( +
- )} -
+
+ )}
Services
{info && ( -
+
{monitorList.length > 0 ? ( monitorList.map((item) => (