|
@ -10,7 +10,13 @@ import { useFsRequest, ApiTable } from '$utils'; |
|
|
const LatestMetadata = (props) => { |
|
|
const LatestMetadata = (props) => { |
|
|
const { history, actions, dispatch, adapters } = props; |
|
|
const { history, actions, dispatch, adapters } = props; |
|
|
const [isModalOpen, setIsModalOpen] = useState(false); |
|
|
const [isModalOpen, setIsModalOpen] = useState(false); |
|
|
const { data: treeData = [] } = useFsRequest({ url: ApiTable.getResourceCatalog }); |
|
|
const [refreshTree, setRefreshTree] = useState(1); |
|
|
|
|
|
|
|
|
|
|
|
const { data: treeData = [] } = useFsRequest({ |
|
|
|
|
|
url: ApiTable.getResourceCatalog, |
|
|
|
|
|
refreshDeps: [refreshTree] |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
dispatch(actions.metadataAcquisition.getAdapters()) |
|
|
dispatch(actions.metadataAcquisition.getAdapters()) |
|
|
dispatch(actions.metadataAcquisition.getDataSources()); |
|
|
dispatch(actions.metadataAcquisition.getDataSources()); |
|
@ -35,6 +41,11 @@ const LatestMetadata = (props) => { |
|
|
{ label: '关系型数据库', key: '关系型数据库', children: renderRelationalDatabase() }, |
|
|
{ label: '关系型数据库', key: '关系型数据库', children: renderRelationalDatabase() }, |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const refresh = () => { |
|
|
|
|
|
// queryData();
|
|
|
|
|
|
setRefreshTree(refreshTree + 1) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const onFinish = (values) => { |
|
|
const onFinish = (values) => { |
|
|
const { stepOneValues, stepTwoValues, stepThreeValue } = values; |
|
|
const { stepOneValues, stepTwoValues, stepThreeValue } = values; |
|
|
const adapterInfo = adapters?.find(x => x.adapterName == stepOneValues?.adapterName) |
|
|
const adapterInfo = adapters?.find(x => x.adapterName == stepOneValues?.adapterName) |
|
@ -86,6 +97,7 @@ const LatestMetadata = (props) => { |
|
|
type={isModalOpen} //当前卡片的key (目前只有postgre,支持后续扩展)
|
|
|
type={isModalOpen} //当前卡片的key (目前只有postgre,支持后续扩展)
|
|
|
onFinish={onFinish} |
|
|
onFinish={onFinish} |
|
|
treeData={treeData} |
|
|
treeData={treeData} |
|
|
|
|
|
refresh={refresh} |
|
|
{...props} |
|
|
{...props} |
|
|
/> |
|
|
/> |
|
|
</Modal> |
|
|
</Modal> |
|
|