Commit 7bbbe5b1 by zhaochengxiang

etl api配置提供对外引用

parent 53b7b6ee
......@@ -37,6 +37,8 @@ const MetadataHarvester = loadable(() => import('./view/Manage/MetadataHarvester
const EditAssets = loadable(()=> import('./view/Manage/AssetResourceManage/edit-assets'));
const ModelReviewDetail = loadable(()=> import('./view/Manage/ModelReview'));
const MetadataUpdateDatasource = loadable(()=> import('./view/Feign/metadata-update-datasource'));
const EtlConfig = loadable(()=> import('./view/Feign/etl-config'));
const ApiConfig = loadable(()=> import('./view/Feign/api-config'));
export class App extends React.Component {
constructor() {
......@@ -147,6 +149,36 @@ export class App extends React.Component {
)
}
if (message === 'showEtlConfig') {
return (
<AppContext.Provider value={{
env: hostParams?.env,
user: hostParams?.user,
setGlobalState,
onGlobalStateChange
}}>
<EtlConfig
{...hostParams}
/>
</AppContext.Provider>
)
}
if (message === 'showApiConfig') {
return (
<AppContext.Provider value={{
env: hostParams?.env,
user: hostParams?.user,
setGlobalState,
onGlobalStateChange
}}>
<ApiConfig
{...hostParams}
/>
</AppContext.Provider>
)
}
return (
<AppContext.Provider value={{
env: hostParams?.env,
......
import React from "react";
import APIConfigModal from "../Manage/DatasourceManage/Component/APIConfigModal";
const FC = (props) => {
const { metadataId, onCancel } = props
const [configParams, setConfigParams] = React.useState({
visible: false,
id: undefined
})
React.useEffect(() => {
if (metadataId) {
setConfigParams({
visible: true,
id: metadataId,
})
}
}, [metadataId])
return (
<APIConfigModal
{...configParams}
onCancel={() => {
setConfigParams({
visible: false,
id: undefined,
})
onCancel?.()
}}
/>
)
}
export default FC
\ No newline at end of file
import React from "react";
import ETLConfigModal from "../Manage/DatasourceManage/Component/ETLConfigModal";
const FC = (props) => {
const { metadataId, onCancel } = props
const [configParams, setConfigParams] = React.useState({
visible: false,
id: undefined
})
React.useEffect(() => {
if (metadataId) {
setConfigParams({
visible: true,
id: metadataId,
})
}
}, [metadataId])
return (
<ETLConfigModal
{...configParams}
onCancel={() => {
setConfigParams({
visible: false,
id: undefined,
})
onCancel?.()
}}
/>
)
}
export default FC
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment