| | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | if (!result.data || result.data.length === 0) { |
| | | this.setState({loadingAppTree: false, appTrees: []}) |
| | | this.setState({loadingAppTree: false, appTrees: [], appInitCheckKeys: null, appCheckedKeys: [], appOpenKeys: [], selectAppTrees: [], selectAppOpenKeys: []}) |
| | | } else { |
| | | this.initTrees(result.data) |
| | | } |
| | | } else { |
| | | this.setState({loadingAppTree: false, appTrees: []}) |
| | | this.setState({loadingAppTree: false, appTrees: [], appInitCheckKeys: null, appCheckedKeys: [], appOpenKeys: [], selectAppTrees: [], selectAppOpenKeys: []}) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | |
| | | |
| | | let expandedKeys = this.getExpandedKeys(trees, 0, []) |
| | | |
| | | this.setState({loadingAppTree: false, appTrees: trees, appOpenKeys: expandedKeys}, () => { |
| | | this.setState({loadingAppTree: false, appInitCheckKeys: null, appCheckedKeys: [], selectAppTrees: [], selectAppOpenKeys: [], appTrees: trees, appOpenKeys: expandedKeys}, () => { |
| | | this.getSelectAppNodeList() |
| | | }) |
| | | } |