summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard
diff options
context:
space:
mode:
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';
+ }
+ }
}