aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2020-09-27 16:27:28 +0000
committerGerrit Code Review <gerrit@onap.org>2020-09-27 16:27:28 +0000
commit3e84c6e26fbce878d5f06f4c6f7666e18d020925 (patch)
treea220c168c47675ff2f1ef8845a721f6418b7df5c /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation
parent4d60ff9e5cb5a35f2676083cffdce80c957fa9ae (diff)
parent8049a6f71ddfae40b62b23f4307acce65fee8001 (diff)
Merge "add save & deploy button in designer"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts30
1 files changed, 16 insertions, 14 deletions
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 b1dcded1c..fe98fa22b 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
@@ -1,12 +1,12 @@
-import {Injectable, ViewChild} from '@angular/core';
-import {MetaDataTabModel} from './mapping-models/metadata/MetaDataTab.model';
-import {VlbDefinition} from './mapping-models/definitions/VlbDefinition';
-import {DslDefinition} from './mapping-models/CBAPacakge.model';
-import {PackageCreationStore} from './package-creation.store';
+import { Injectable, ViewChild } from '@angular/core';
+import { MetaDataTabModel } from './mapping-models/metadata/MetaDataTab.model';
+import { VlbDefinition } from './mapping-models/definitions/VlbDefinition';
+import { DslDefinition } from './mapping-models/CBAPacakge.model';
+import { PackageCreationStore } from './package-creation.store';
import * as JSZip from 'jszip';
-import {PackageCreationUtils} from './package-creation.utils';
-import {MetadataTabComponent} from './metadata-tab/metadata-tab.component';
-import {DesignerStore} from '../designer/designer.store';
+import { PackageCreationUtils } from './package-creation.utils';
+import { MetadataTabComponent } from './metadata-tab/metadata-tab.component';
+import { DesignerStore } from '../designer/designer.store';
@Injectable({
providedIn: 'root'
@@ -19,12 +19,14 @@ export class PackageCreationExtractionService {
private toscaMetaDataKeys: string[] = ['TOSCA-Meta-File-Version', 'CSAR-Version',
'Created-By', 'Entry-Definitions', 'Template-Name', 'Template-Version', 'Template-Type', 'Template-Tags'];
- @ViewChild(MetadataTabComponent, {static: false})
+ @ViewChild(MetadataTabComponent, { static: false })
private metadataTabComponent: MetadataTabComponent;
- constructor(private packageCreationStore: PackageCreationStore,
- private packageCreationUtils: PackageCreationUtils,
- private designerStore: DesignerStore) {
+ constructor(
+ private packageCreationStore: PackageCreationStore,
+ private packageCreationUtils: PackageCreationUtils,
+ private designerStore: DesignerStore
+ ) {
}
@@ -96,9 +98,9 @@ export class PackageCreationExtractionService {
console.log(definition.topology_template);
const content = {};
const workflow = 'workflows';
- content[workflow] = definition.topology_template.workflows;
+ content[workflow] = definition.topology_template ? definition.topology_template.workflows : {};
const nodeTemplates = 'node_templates';
- content[nodeTemplates] = definition.topology_template.node_templates;
+ content[nodeTemplates] = definition.topology_template ? definition.topology_template.node_templates : {};
this.designerStore.saveSourceContent(JSON.stringify(content));
}