From 54a8e07309b4d8ae7d0c9f6f6535f76d4f8db1f7 Mon Sep 17 00:00:00 2001 From: ShaabanEltanany Date: Tue, 13 Oct 2020 12:50:31 +0200 Subject: add import&deploy feature Issue-ID: CCSDK-2904 Signed-off-by: ShaabanEltanany Change-Id: I69f7d9f951a20ae688ec8f627c5acfac3a30dcc9 --- .../creationModes/DesignerCreationMode.ts | 2 +- .../package-creation-extraction.service.ts | 4 ++-- .../import-package/import-package.component.html | 4 ++++ .../import-package/import-package.component.ts | 19 +++++++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) (limited to 'cds-ui/designer-client') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts index adae66244..61de5078b 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts @@ -43,7 +43,7 @@ export class DesignerCreationMode extends PackageCreationModes { }); } - const filenameEntry = 'Definitions/' + cbaPackage.metaData.name + '.json'; + const filenameEntry = 'Definitions/' + cbaPackage.metaData.name.trim() + '.json'; const vlbDefinition: VlbDefinition = new VlbDefinition(); const metadata: Metadata = new Metadata(); diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts index 232590c62..f44f68887 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts @@ -42,7 +42,7 @@ export class PackageCreationExtractionService { if (filename.includes('TOSCA-Metadata/')) { const metaDataTabInfo: MetaDataTabModel = this.getMetaDataTabInfo(fileData); - packageName = metaDataTabInfo.name; + packageName = metaDataTabInfo.name.trim(); this.setMetaData(metaDataTabInfo); console.log('found file ' + packageName); } @@ -145,7 +145,7 @@ export class PackageCreationExtractionService { map.set(currentKey, currentValue); } metaDataTabModel.entryFileName = map.get(this.toscaMetaDataKeys[3]); - metaDataTabModel.name = map.get(this.toscaMetaDataKeys[4]); + metaDataTabModel.name = map.get(this.toscaMetaDataKeys[4]).trim(); metaDataTabModel.version = map.get(this.toscaMetaDataKeys[5]).trim(); metaDataTabModel.mode = map.get(this.toscaMetaDataKeys[6]); if (map.get(this.toscaMetaDataKeys[7])) { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.html index d578582fd..0632fb47d 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.html @@ -48,6 +48,10 @@ data-dismiss="modal" (click)="importAndSave()"> Import&Save +