summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard
diff options
context:
space:
mode:
authorShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-09-23 11:40:09 +0200
committerAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>2020-09-24 16:27:02 +0200
commita4d84ebd1db8f9b881c33f5efefc4aa6c1fbf02f (patch)
tree0c011fa5dfe92e1bae95afac512cbd49e9d9e51e /cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard
parent2e80cc8a3e97b1e0979511c54aebd86bddfa7f35 (diff)
adding save for topology template content
Issue-ID: CCSDK-2298 Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com> Change-Id: I8333f84e1551bb49f016c25f1c98f8b0f15b7ed3
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html4
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts19
2 files changed, 18 insertions, 5 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
index 879b9b94a..e006f23e6 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
@@ -167,8 +167,8 @@
</button> -->
<!-- Button trigger modal - 1st Action -->
- <button type="button" class="btn btn-sm btn-primary mb-2" data-toggle="modal"
- data-target="#exampleModalLong">
+ <button (click)="checkSkipTypesOfAction()" type="button" class="btn btn-sm btn-primary mb-2" data-toggle="modal"
+ [attr.data-target]="dataTarget">
<i class="icon-topologyView-active"></i> Designer Mode
</button>
<!-- Designer Modal -->
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';
+ }
+ }
}