}
}
- let cpNumber = 0;
+
let AppHeader = (<div className="AppHeader">
<RiftHeader />
</div>);
const isModified = self.state.item && self.state.item.uiState.modified;
const isEditingNSD = self.state.item && self.state.item.uiState && /nsd/.test(self.state.item.uiState.type);
const isEditingVNFD = self.state.item && self.state.item.uiState && /vnfd/.test(self.state.item.uiState.type);
- const containers = [self.state.item].reduce(DescriptorModelFactory.buildCatalogItemFactory(CatalogDataStore.getState().catalogs), []);
-
- containers.filter(d => DescriptorModelFactory.isConnectionPoint(d)).forEach(d => {
- d.cpNumber = ++cpNumber;
- containers.filter(d => DescriptorModelFactory.isVnfdConnectionPointRef(d)).filter(ref => ref.key === d.key).forEach(ref => ref.cpNumber = d.cpNumber);
- });
+ const containers = self.state.containers;
const canvasTitle = containers.length ? containers[0].model.name : '';
const hasNoCatalogs = CatalogDataStore.getState().catalogs.length === 0;
const isLoading = self.state.isLoading;
this.files = false;
this.filesState = {};
this.downloadJobs = {};
+ this.containers = [];
//End File manager values
this.bindListeners({
onResize: PanelResizeAction.RESIZE,
}
updateItem(item) {
+ const self = this;
+ let containers = [];
+ let cpNumber = 0;
if(!document.body.classList.contains('resizing')) {
- this.setState({item: _.cloneDeep(item)});
+ containers = [item].reduce(DescriptorModelFactory.buildCatalogItemFactory(CatalogDataStore.getState().catalogs), []);
+
+ containers.filter(d => DescriptorModelFactory.isConnectionPoint(d)).forEach(d => {
+ d.cpNumber = ++cpNumber;
+ containers.filter(d => DescriptorModelFactory.isVnfdConnectionPointRef(d)).filter(ref => ref.key === d.key).forEach(ref => ref.cpNumber = d.cpNumber);
+ });
+ this.setState({containers: containers, item: _.cloneDeep(item)});
}
SelectionManager.refreshOutline();
}