| @@ -7,6 +7,7 @@ import { getDictSelectOption } from '@/services/system/dict'; | |||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { getFileListFromEvent, validateUploadFiles } from '@/utils/ui'; | import { getFileListFromEvent, validateUploadFiles } from '@/utils/ui'; | ||||
| import { | import { | ||||
| App, | |||||
| Button, | Button, | ||||
| Form, | Form, | ||||
| Input, | Input, | ||||
| @@ -14,7 +15,6 @@ import { | |||||
| Select, | Select, | ||||
| Upload, | Upload, | ||||
| UploadFile, | UploadFile, | ||||
| message, | |||||
| type ModalProps, | type ModalProps, | ||||
| type UploadProps, | type UploadProps, | ||||
| } from 'antd'; | } from 'antd'; | ||||
| @@ -32,6 +32,7 @@ interface AddDatasetModalProps extends Omit<ModalProps, 'onOk'> { | |||||
| function AddDatasetModal({ typeList, tagList, onOk, ...rest }: AddDatasetModalProps) { | function AddDatasetModal({ typeList, tagList, onOk, ...rest }: AddDatasetModalProps) { | ||||
| const [uuid] = useState(Date.now()); | const [uuid] = useState(Date.now()); | ||||
| const [clusterOptions, setClusterOptions] = useState<DictValueEnumObj[]>([]); | const [clusterOptions, setClusterOptions] = useState<DictValueEnumObj[]>([]); | ||||
| const { message } = App.useApp(); | |||||
| useEffect(() => { | useEffect(() => { | ||||
| getClusterOptions(); | getClusterOptions(); | ||||
| @@ -6,13 +6,13 @@ import { addModel } from '@/services/dataset/index.js'; | |||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { getFileListFromEvent, validateUploadFiles } from '@/utils/ui'; | import { getFileListFromEvent, validateUploadFiles } from '@/utils/ui'; | ||||
| import { | import { | ||||
| App, | |||||
| Button, | Button, | ||||
| Form, | Form, | ||||
| Input, | Input, | ||||
| Select, | Select, | ||||
| Upload, | Upload, | ||||
| UploadFile, | UploadFile, | ||||
| message, | |||||
| type ModalProps, | type ModalProps, | ||||
| type UploadProps, | type UploadProps, | ||||
| } from 'antd'; | } from 'antd'; | ||||
| @@ -28,6 +28,8 @@ interface AddModelModalProps extends Omit<ModalProps, 'onOk'> { | |||||
| function AddModelModal({ typeList, tagList, onOk, ...rest }: AddModelModalProps) { | function AddModelModal({ typeList, tagList, onOk, ...rest }: AddModelModalProps) { | ||||
| const [uuid] = useState(Date.now()); | const [uuid] = useState(Date.now()); | ||||
| const { message } = App.useApp(); | |||||
| // 上传组件参数 | // 上传组件参数 | ||||
| const uploadProps: UploadProps = { | const uploadProps: UploadProps = { | ||||
| action: '/api/mmp/models/upload', | action: '/api/mmp/models/upload', | ||||
| @@ -5,12 +5,12 @@ import { ResourceType, resourceConfig } from '@/pages/Dataset/types'; | |||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { getFileListFromEvent, validateUploadFiles } from '@/utils/ui'; | import { getFileListFromEvent, validateUploadFiles } from '@/utils/ui'; | ||||
| import { | import { | ||||
| App, | |||||
| Button, | Button, | ||||
| Form, | Form, | ||||
| Input, | Input, | ||||
| Upload, | Upload, | ||||
| UploadFile, | UploadFile, | ||||
| message, | |||||
| type ModalProps, | type ModalProps, | ||||
| type UploadProps, | type UploadProps, | ||||
| } from 'antd'; | } from 'antd'; | ||||
| @@ -33,6 +33,7 @@ function AddVersionModal({ | |||||
| ...rest | ...rest | ||||
| }: AddVersionModalProps) { | }: AddVersionModalProps) { | ||||
| const [uuid] = useState(Date.now()); | const [uuid] = useState(Date.now()); | ||||
| const { message } = App.useApp(); | |||||
| // 上传组件参数 | // 上传组件参数 | ||||
| const uploadProps: UploadProps = { | const uploadProps: UploadProps = { | ||||
| @@ -5,7 +5,7 @@ import { openAntdModal } from '@/utils/modal'; | |||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { modalConfirm } from '@/utils/ui'; | import { modalConfirm } from '@/utils/ui'; | ||||
| import { useNavigate } from '@umijs/max'; | import { useNavigate } from '@umijs/max'; | ||||
| import { Button, Input, Pagination, PaginationProps, message } from 'antd'; | |||||
| import { App, Button, Input, Pagination, PaginationProps } from 'antd'; | |||||
| import { Ref, forwardRef, useEffect, useImperativeHandle, useState } from 'react'; | import { Ref, forwardRef, useEffect, useImperativeHandle, useState } from 'react'; | ||||
| import { CategoryData, ResourceData, ResourceType, resourceConfig } from '../../types'; | import { CategoryData, ResourceData, ResourceType, resourceConfig } from '../../types'; | ||||
| import AddDatasetModal from '../AddDatasetModal'; | import AddDatasetModal from '../AddDatasetModal'; | ||||
| @@ -53,6 +53,7 @@ function ResourceList( | |||||
| ); | ); | ||||
| const [searchText, setSearchText] = useState(initialSearchText); | const [searchText, setSearchText] = useState(initialSearchText); | ||||
| const [inputText, setInputText] = useState(initialSearchText); | const [inputText, setInputText] = useState(initialSearchText); | ||||
| const { message } = App.useApp(); | |||||
| useEffect(() => { | useEffect(() => { | ||||
| getDataList(); | getDataList(); | ||||
| @@ -11,7 +11,7 @@ import { downLoadZip } from '@/utils/downloadfile'; | |||||
| import { openAntdModal } from '@/utils/modal'; | import { openAntdModal } from '@/utils/modal'; | ||||
| import { modalConfirm } from '@/utils/ui'; | import { modalConfirm } from '@/utils/ui'; | ||||
| import { useParams, useSearchParams } from '@umijs/max'; | import { useParams, useSearchParams } from '@umijs/max'; | ||||
| import { Button, Input, Select, Table, Tabs, message } from 'antd'; | |||||
| import { App, Button, Input, Select, Table, Tabs } from 'antd'; | |||||
| import { useEffect, useRef, useState } from 'react'; | import { useEffect, useRef, useState } from 'react'; | ||||
| import AddVersionModal from './components/AddVersionModal'; | import AddVersionModal from './components/AddVersionModal'; | ||||
| import Styles from './intro.less'; | import Styles from './intro.less'; | ||||
| @@ -19,6 +19,7 @@ const { Search } = Input; | |||||
| const { TabPane } = Tabs; | const { TabPane } = Tabs; | ||||
| const Dataset = () => { | const Dataset = () => { | ||||
| const { message } = App.useApp(); | |||||
| const [formList, setFormList] = useState([]); | const [formList, setFormList] = useState([]); | ||||
| const [datasetDetailObj, setDatasetDetailObj] = useState({}); | const [datasetDetailObj, setDatasetDetailObj] = useState({}); | ||||
| const [version, setVersion] = useState(null); | const [version, setVersion] = useState(null); | ||||
| @@ -18,7 +18,7 @@ import themes from '@/styles/theme.less'; | |||||
| import { elapsedTime, formatDate } from '@/utils/date'; | import { elapsedTime, formatDate } from '@/utils/date'; | ||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { modalConfirm } from '@/utils/ui'; | import { modalConfirm } from '@/utils/ui'; | ||||
| import { Button, ConfigProvider, Space, Table, message } from 'antd'; | |||||
| import { App, Button, ConfigProvider, Space, Table } from 'antd'; | |||||
| import classNames from 'classnames'; | import classNames from 'classnames'; | ||||
| import { useEffect, useRef, useState } from 'react'; | import { useEffect, useRef, useState } from 'react'; | ||||
| import { useNavigate } from 'react-router-dom'; | import { useNavigate } from 'react-router-dom'; | ||||
| @@ -47,6 +47,7 @@ function Experiment() { | |||||
| const [isAdd, setIsAdd] = useState(true); | const [isAdd, setIsAdd] = useState(true); | ||||
| const [isModalOpen, setIsModalOpen] = useState(false); | const [isModalOpen, setIsModalOpen] = useState(false); | ||||
| const [addFormData, setAddFormData] = useState({}); | const [addFormData, setAddFormData] = useState({}); | ||||
| const { message } = App.useApp(); | |||||
| useEffect(() => { | useEffect(() => { | ||||
| getList(); | getList(); | ||||
| @@ -18,7 +18,7 @@ import { | |||||
| } from '@/utils/sessionStorage'; | } from '@/utils/sessionStorage'; | ||||
| import { getFileListFromEvent, validateUploadFiles } from '@/utils/ui'; | import { getFileListFromEvent, validateUploadFiles } from '@/utils/ui'; | ||||
| import { useNavigate } from '@umijs/max'; | import { useNavigate } from '@umijs/max'; | ||||
| import { Button, Col, Form, Input, Row, Upload, UploadFile, message, type UploadProps } from 'antd'; | |||||
| import { App, Button, Col, Form, Input, Row, Upload, UploadFile, type UploadProps } from 'antd'; | |||||
| import { omit } from 'lodash'; | import { omit } from 'lodash'; | ||||
| import { useEffect, useState } from 'react'; | import { useEffect, useState } from 'react'; | ||||
| import styles from './index.less'; | import styles from './index.less'; | ||||
| @@ -49,6 +49,7 @@ function MirrorCreate() { | |||||
| const navgite = useNavigate(); | const navgite = useNavigate(); | ||||
| const [form] = Form.useForm(); | const [form] = Form.useForm(); | ||||
| const [nameDisabled, setNameDisabled] = useState(false); | const [nameDisabled, setNameDisabled] = useState(false); | ||||
| const { message } = App.useApp(); | |||||
| const uploadProps: UploadProps = { | const uploadProps: UploadProps = { | ||||
| action: '/api/mmp/image/upload', | action: '/api/mmp/image/upload', | ||||
| @@ -68,11 +68,13 @@ function MirrorInfo() { | |||||
| pageSize: 10, | pageSize: 10, | ||||
| }, | }, | ||||
| ); | ); | ||||
| const isPublic = searchParams.get('isPublic') === 'true'; | |||||
| const { message } = App.useApp(); | const { message } = App.useApp(); | ||||
| const isPublic = searchParams.get('isPublic') === 'true'; | |||||
| useEffect(() => { | useEffect(() => { | ||||
| getMirrorInfo(); | getMirrorInfo(); | ||||
| }, []); | }, []); | ||||
| useEffect(() => { | useEffect(() => { | ||||
| getMirrorVersionList(); | getMirrorVersionList(); | ||||
| }, [pagination]); | }, [pagination]); | ||||
| @@ -15,12 +15,12 @@ import { mirrorNameKey, setSessionStorageItem } from '@/utils/sessionStorage'; | |||||
| import { modalConfirm } from '@/utils/ui'; | import { modalConfirm } from '@/utils/ui'; | ||||
| import { useNavigate } from '@umijs/max'; | import { useNavigate } from '@umijs/max'; | ||||
| import { | import { | ||||
| App, | |||||
| Button, | Button, | ||||
| ConfigProvider, | ConfigProvider, | ||||
| Input, | Input, | ||||
| Table, | Table, | ||||
| Tabs, | Tabs, | ||||
| message, | |||||
| type TablePaginationConfig, | type TablePaginationConfig, | ||||
| type TableProps, | type TableProps, | ||||
| type TabsProps, | type TabsProps, | ||||
| @@ -64,6 +64,7 @@ function MirrorList() { | |||||
| pageSize: 10, | pageSize: 10, | ||||
| }, | }, | ||||
| ); | ); | ||||
| const { message } = App.useApp(); | |||||
| useEffect(() => { | useEffect(() => { | ||||
| getMirrorList(); | getMirrorList(); | ||||
| @@ -12,7 +12,7 @@ import { downLoadZip } from '@/utils/downloadfile'; | |||||
| import { openAntdModal } from '@/utils/modal'; | import { openAntdModal } from '@/utils/modal'; | ||||
| import { modalConfirm } from '@/utils/ui'; | import { modalConfirm } from '@/utils/ui'; | ||||
| import { useParams, useSearchParams } from '@umijs/max'; | import { useParams, useSearchParams } from '@umijs/max'; | ||||
| import { Button, Input, Select, Table, Tabs, message } from 'antd'; | |||||
| import { App, Button, Input, Select, Table, Tabs } from 'antd'; | |||||
| import { useEffect, useRef, useState } from 'react'; | import { useEffect, useRef, useState } from 'react'; | ||||
| import Styles from './intro.less'; | import Styles from './intro.less'; | ||||
| const { Search } = Input; | const { Search } = Input; | ||||
| @@ -26,6 +26,7 @@ const Dataset = () => { | |||||
| const locationParams = useParams(); //新版本获取路由参数接口 | const locationParams = useParams(); //新版本获取路由参数接口 | ||||
| const [searchParams] = useSearchParams(); | const [searchParams] = useSearchParams(); | ||||
| const [wordList, setWordList] = useState([]); | const [wordList, setWordList] = useState([]); | ||||
| const { message } = App.useApp(); | |||||
| const isPublic = searchParams.get('isPublic') === 'true'; | const isPublic = searchParams.get('isPublic') === 'true'; | ||||
| const getModelByDetail = () => { | const getModelByDetail = () => { | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictOptionType, DictValueEnumObj } from '@/components/DictTag'; | import { DictOptionType, DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormCaptcha, | ProFormCaptcha, | ||||
| @@ -9,9 +10,8 @@ import { | |||||
| ProFormTextArea, | ProFormTextArea, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| /** | /** | ||||
| * 定时任务调度 Edit Form | * 定时任务调度 Edit Form | ||||
| * | * | ||||
| @@ -3,7 +3,7 @@ import { useStateRef, useVisible } from '@/hooks'; | |||||
| import { getWorkflowById, saveWorkflow } from '@/services/pipeline/index.js'; | import { getWorkflowById, saveWorkflow } from '@/services/pipeline/index.js'; | ||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import G6 from '@antv/g6'; | import G6 from '@antv/g6'; | ||||
| import { Button, message } from 'antd'; | |||||
| import { App, Button } from 'antd'; | |||||
| import { useEffect, useRef } from 'react'; | import { useEffect, useRef } from 'react'; | ||||
| import { useNavigate, useParams } from 'react-router-dom'; | import { useNavigate, useParams } from 'react-router-dom'; | ||||
| import { s8 } from '../../../utils'; | import { s8 } from '../../../utils'; | ||||
| @@ -24,7 +24,7 @@ const EditPipeline = () => { | |||||
| const propsRef = useRef(); | const propsRef = useRef(); | ||||
| const [paramsDrawerOpen, openParamsDrawer, closeParamsDrawer] = useVisible(false); | const [paramsDrawerOpen, openParamsDrawer, closeParamsDrawer] = useVisible(false); | ||||
| const [globalParam, setGlobalParam, globalParamRef] = useStateRef([]); | const [globalParam, setGlobalParam, globalParamRef] = useStateRef([]); | ||||
| const { message } = App.useApp(); | |||||
| let sourceAnchorIdx, targetAnchorIdx; | let sourceAnchorIdx, targetAnchorIdx; | ||||
| const onDragEnd = (val) => { | const onDragEnd = (val) => { | ||||
| @@ -12,7 +12,7 @@ import { | |||||
| } from '@/services/pipeline/index.js'; | } from '@/services/pipeline/index.js'; | ||||
| import themes from '@/styles/theme.less'; | import themes from '@/styles/theme.less'; | ||||
| import { modalConfirm } from '@/utils/ui'; | import { modalConfirm } from '@/utils/ui'; | ||||
| import { Button, ConfigProvider, Form, Input, Space, Table, message } from 'antd'; | |||||
| import { App, Button, ConfigProvider, Form, Input, Space, Table } from 'antd'; | |||||
| import classNames from 'classnames'; | import classNames from 'classnames'; | ||||
| import { useEffect, useRef, useState } from 'react'; | import { useEffect, useRef, useState } from 'react'; | ||||
| import { useNavigate } from 'react-router-dom'; | import { useNavigate } from 'react-router-dom'; | ||||
| @@ -28,6 +28,7 @@ const Pipeline = () => { | |||||
| const [pipeList, setPipeList] = useState([]); | const [pipeList, setPipeList] = useState([]); | ||||
| const [total, setTotal] = useState(0); | const [total, setTotal] = useState(0); | ||||
| const [isModalOpen, setIsModalOpen] = useState(false); | const [isModalOpen, setIsModalOpen] = useState(false); | ||||
| const { message } = App.useApp(); | |||||
| const editTable = (e, record) => { | const editTable = (e, record) => { | ||||
| e.stopPropagation(); | e.stopPropagation(); | ||||
| getWorkflowById(record.id).then((ret) => { | getWorkflowById(record.id).then((ret) => { | ||||
| @@ -66,7 +67,7 @@ const Pipeline = () => { | |||||
| } else { | } else { | ||||
| addWorkflow(values).then((ret) => { | addWorkflow(values).then((ret) => { | ||||
| console.log(ret); | console.log(ret); | ||||
| if (ret.code == 200) { | |||||
| if (ret.code === 200) { | |||||
| navgite({ pathname: `/pipeline/template/${ret.data.id}/${ret.data.name}` }); | navgite({ pathname: `/pipeline/template/${ret.data.id}/${ret.data.name}` }); | ||||
| } | } | ||||
| }); | }); | ||||