|
@ -10,7 +10,7 @@ let expandedKeysData = []; |
|
|
let allTreeNodeKeys = []; |
|
|
let allTreeNodeKeys = []; |
|
|
|
|
|
|
|
|
const LatestMetadata = (props) => { |
|
|
const LatestMetadata = (props) => { |
|
|
const { user, dispatch, actions, history, clientHeight, resourceCatalog, isRequesting, location, match } = props; |
|
|
const { user, dispatch, actions, history, clientHeight, resourceCatalog, isRequesting, location, match, organization } = props; |
|
|
const { metadataManagement } = actions; |
|
|
const { metadataManagement } = actions; |
|
|
const [resourceCatalogData, setResourceCatalogData] = useState([]); |
|
|
const [resourceCatalogData, setResourceCatalogData] = useState([]); |
|
|
const [selectedKeys, setSelectedKeys] = useState([]); |
|
|
const [selectedKeys, setSelectedKeys] = useState([]); |
|
@ -30,6 +30,7 @@ const LatestMetadata = (props) => { |
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
const jumpSelectedKey = sessionStorage.getItem('jumpSelectedKey') || null; |
|
|
const jumpSelectedKey = sessionStorage.getItem('jumpSelectedKey') || null; |
|
|
initData(true, jumpSelectedKey); |
|
|
initData(true, jumpSelectedKey); |
|
|
|
|
|
dispatch(actions.organization.getOrganizationList()); |
|
|
}, []) |
|
|
}, []) |
|
|
const initData = (configRefresh, jumpSelectedKey) => { |
|
|
const initData = (configRefresh, jumpSelectedKey) => { |
|
|
dispatch(metadataManagement.getResourceCatalog()).then(res => { |
|
|
dispatch(metadataManagement.getResourceCatalog()).then(res => { |
|
@ -241,18 +242,21 @@ const LatestMetadata = (props) => { |
|
|
resourceCatalog={resourceCatalog} |
|
|
resourceCatalog={resourceCatalog} |
|
|
editData={editData} |
|
|
editData={editData} |
|
|
onCancel={() => setModalVisible(false)} |
|
|
onCancel={() => setModalVisible(false)} |
|
|
onConfirm={onConfirm} /> : '' |
|
|
onConfirm={onConfirm} |
|
|
|
|
|
organization={organization} |
|
|
|
|
|
/> : '' |
|
|
} |
|
|
} |
|
|
</Spin> |
|
|
</Spin> |
|
|
} |
|
|
} |
|
|
function mapStateToProps(state) { |
|
|
function mapStateToProps(state) { |
|
|
const { global, auth, resourceCatalog } = state; |
|
|
const { global, auth, resourceCatalog, organization } = state; |
|
|
return { |
|
|
return { |
|
|
user: auth.user, |
|
|
user: auth.user, |
|
|
actions: global.actions, |
|
|
actions: global.actions, |
|
|
clientHeight: global.clientHeight, |
|
|
clientHeight: global.clientHeight, |
|
|
resourceCatalog: resourceCatalog?.data || [], |
|
|
resourceCatalog: resourceCatalog?.data || [], |
|
|
isRequesting: resourceCatalog.isRequesting |
|
|
isRequesting: resourceCatalog.isRequesting, |
|
|
|
|
|
organization: organization?.data?.rows || [], |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
export default connect(mapStateToProps)(LatestMetadata) |
|
|
export default connect(mapStateToProps)(LatestMetadata) |
|
|