From: Bob Gallagher Date: Tue, 21 Mar 2017 15:25:27 +0000 (-0400) Subject: Bug 177 - Export of nsd/vnfd should not prompt for format and grammar X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=abbd84264b1e2e05d8b3d4b72789e66829d7b09c;p=osm%2FUI.git Bug 177 - Export of nsd/vnfd should not prompt for format and grammar Export will be done using MANO and OSM. Change-Id: Ia118bbf8cab80fb1715d629797dcac0f7ab61721 Signed-off-by: Bob Gallagher --- diff --git a/skyquake/plugins/composer/src/src/stores/CatalogDataStore.js b/skyquake/plugins/composer/src/src/stores/CatalogDataStore.js index afc500934..9345bc39f 100644 --- a/skyquake/plugins/composer/src/src/stores/CatalogDataStore.js +++ b/skyquake/plugins/composer/src/src/stores/CatalogDataStore.js @@ -36,7 +36,6 @@ import ComposerAppActions from '../actions/ComposerAppActions' import CatalogDataSource from '../sources/CatalogDataSource' import ComposerAppStore from '../stores/ComposerAppStore' import SelectionManager from '../libraries/SelectionManager' -import ExportSelectorDialog from '../components/ExportSelectorDialog' const defaults = { catalogs: [], @@ -581,61 +580,17 @@ class CatalogDataStore { } exportSelectedCatalogItems(draggedItem) { - const onSelectFormat = (selectedFormat, event) => { - this.setState({ - selectedFormat: selectedFormat - }); - }; - - const onSelectGrammar = (selectedGrammar, event) => { - this.setState({ - selectedGrammar: selectedGrammar - }); - } - - - const onCancel = () => { - this.resetSelectionState(); - ModalOverlayActions.hideModalOverlay(); - }; - - const onDownload = (event) => { + // collect the selected items and delegate to the catalog package manager action creator + const selectedItems = this.getAllSelectedCatalogItems(); + if (selectedItems.length) { CatalogPackageManagerActions.downloadCatalogPackage.defer({ selectedItems: selectedItems, - selectedFormat: this.selectedFormat, - selectedGrammar: this.selectedGrammar + selectedFormat: 'mano', + selectedGrammar: 'osm' }); this.resetSelectionState(); - ModalOverlayActions.hideModalOverlay(); - return; - } - - if (draggedItem) { - // if item is given make sure it is also selected - //draggedItem.uiState.selected = true; - SelectionManager.addSelection(draggedItem); - this.updateCatalogItem(draggedItem); - } - // collect the selected items and delegate to the catalog package manager action creator - const selectedItems = this.getAllSelectedCatalogItems(); - if (selectedItems.length) { - CatalogDataStore.chooseExportFormat(onSelectFormat, onSelectGrammar, onDownload, onCancel); } } - - static chooseExportFormat(onSelectFormat, onSelectGrammar, onDownload, onCancel) { - ModalOverlayActions.showModalOverlay.defer( - - ); - } - } export default alt.createStore(CatalogDataStore, 'CatalogDataStore');