diff options
author | 2020-09-24 15:18:10 +0000 | |
---|---|---|
committer | 2020-09-24 15:18:10 +0000 | |
commit | 2b0442d1d2e721c4bf762bb2a3e75bc7606f9fcf (patch) | |
tree | 5a75e5187a70048a8897f893e1c26a812c912539 /cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts | |
parent | a9de78841e84867f1b5065205760060bdc5307ec (diff) | |
parent | a4d84ebd1db8f9b881c33f5efefc4aa6c1fbf02f (diff) |
Merge "adding save for topology template content"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts index 228953eb9..eb121e98e 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts @@ -46,6 +46,7 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl versionPattern = '^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$'; metadataClasses = 'nav-item nav-link active'; private cbaPackage: CBAPackage = new CBAPackage(); + dataTarget: any = ''; constructor( private route: ActivatedRoute, @@ -159,8 +160,14 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl } this.packageCreationStore.changeDslDefinition(dslDefinition); this.packageCreationStore.setCustomKeys(mapOfCustomKeys); - if (definition.topology_template && definition.topology_template.content) { - this.designerStore.saveSourceContent(definition.topology_template.content); + if (definition.topology_template) { + const content = {}; + const workflow = 'workflows'; + content[workflow] = definition.topology_template.workflows; + const nodeTemplates = 'node_templates'; + content[nodeTemplates] = definition.topology_template.node_templates; + this.designerStore.saveSourceContent(JSON.stringify(content)); + this.packageCreationStore.addTopologyTemplate(definition.topology_template); } } @@ -274,7 +281,6 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl } goToDesignerMode(id) { - this.router.navigate(['/packages/designer', id, {actionName: this.customActionName}]); } @@ -344,4 +350,11 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl return this.isSaveEnabled; } + checkSkipTypesOfAction() { + if (this.cbaPackage.templateTopology.node_templates && this.cbaPackage.templateTopology.workflows) { + this.goToDesignerMode(this.id); + } else { + this.dataTarget = '#exampleModalLong'; + } + } } |