|
@ -34,19 +34,37 @@ const LatestMetadata = (props) => { |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
const onFinish = (values) => { |
|
|
const onFinish = (values) => { |
|
|
const { stepOneValues, stepTwoValues } = values; |
|
|
const { stepOneValues, stepTwoValues, stepThreeValue } = values; |
|
|
const adapterInfo = adapters?.find(x => x.adapterName == stepOneValues?.adapterName) |
|
|
const adapterInfo = adapters?.find(x => x.adapterName == stepOneValues?.adapterName) |
|
|
if (adapterInfo) { |
|
|
if (adapterInfo) { |
|
|
dispatch(actions.metadataAcquisition.addDataSource({ |
|
|
dispatch(actions.metadataAcquisition.addDataSource({ |
|
|
name: stepOneValues?.name, |
|
|
name: stepOneValues?.name, |
|
|
audited: true, |
|
|
audited: true, |
|
|
adapter: adapterInfo?.id, |
|
|
adapterId: adapterInfo?.id, |
|
|
mountPath: 1, |
|
|
mountPath: 1, |
|
|
description: stepOneValues?.description, |
|
|
description: stepOneValues?.description, |
|
|
config: stepTwoValues, |
|
|
config: stepTwoValues, |
|
|
time: moment() |
|
|
time: moment() |
|
|
})).then(res => { |
|
|
}, '')).then(res => { |
|
|
setIsModalOpen(false) |
|
|
if (res.success) { |
|
|
|
|
|
const dataToSave = { |
|
|
|
|
|
taskName: stepThreeValue?.taskName, |
|
|
|
|
|
retryCount: stepThreeValue?.retryCount, |
|
|
|
|
|
retryTime: stepThreeValue?.retryTime, |
|
|
|
|
|
retried: stepThreeValue?.retried ? true : false, |
|
|
|
|
|
dataSourceId: res?.payload?.data?.id, |
|
|
|
|
|
cron: stepThreeValue?.cron, |
|
|
|
|
|
} |
|
|
|
|
|
dataToSave.enabled = true; |
|
|
|
|
|
dataToSave.autoReleased = true; |
|
|
|
|
|
dataToSave.storageStrategy = "增量"; |
|
|
|
|
|
dispatch(actions.metadataAcquisition.addTask(dataToSave, '适配器配置')).then(res => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
setIsModalOpen(false) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|