aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute
diff options
context:
space:
mode:
authorAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>2020-12-15 11:17:29 +0200
committerAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>2020-12-15 16:35:04 +0200
commit398ae83b6b18fdff202dd7f64ee57d8e3d700937 (patch)
treed83d36db7fa090a39968b6f5ff4fd16c4f597e95 /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute
parent981573b5b00cdb47cd9f2bbd002735ccc0c362fc (diff)
Stop clearing angular store after deploy to avoid script problem.
Issue-ID: CCSDK-3042 Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> Change-Id: I5eb109c6f27600be63714e93a3748f4d5ecfe37f
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css2
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html13
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts8
3 files changed, 14 insertions, 9 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css
index 10ed56b55..1159d8f80 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css
@@ -1,3 +1,3 @@
.createAttributeTabs .active {
- background: #eaeaea;
+ background: #C3CDDB;
} \ No newline at end of file
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
index ea17f888d..ded7e5f23 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
@@ -73,9 +73,10 @@
Template</label>
</div>
<br />
- <button type="button" data-toggle="modal" data-target="#templateModal"
- class="btn btn-select-template m-auto"><i class="icon-add-circle"
- type="button" aria-hidden="true"></i> Select Template</button>
+ <button (click)="init()" type="button" data-toggle="modal"
+ data-target="#templateModal" class="btn btn-select-template m-auto"><i
+ class="icon-add-circle" type="button" aria-hidden="true"></i> Select
+ Template</button>
</div>
<div class="attribute-wrap"
@@ -235,9 +236,9 @@
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary" (click)="cancel()" data-dismiss="modal">Close</button>
- <button type="button" class="btn btn-primary" data-dismiss="modal" (click)="addTemplates()">Add
- Template</button>
+ <button type="button" class="btn btn-secondary" (click)="cancel()" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-primary" data-dismiss="modal"
+ (click)="addTemplates()">Save</button>
</div>
</div>
</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts
index d36b16f16..f46004b0b 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts
@@ -99,7 +99,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
onInitMapping() {
// selectedTemplates , templateAndMappingMap
- this.selectedTemplates = new Map<string, TemplateAndMapping>();
+ // this.selectedTemplates = new Map<string, TemplateAndMapping>();
try {
const functionMap = this.designerState.template.node_templates[this.functionName].artifacts;
console.log(this.templateAndMappingMap);
@@ -117,6 +117,10 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
} catch (e) { }
}
+ init() {
+ this.selectedTemplates = new Map(this.finalTemplates);
+ }
+
toNodeProcess(nodeTemplate, functionName) {
console.log(nodeTemplate);
this.currentFuncion['instance-name'] = functionName;
@@ -156,7 +160,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy {
}
addTemplates() {
- this.finalTemplates = this.selectedTemplates;
+ this.finalTemplates = new Map(this.selectedTemplates);
}
cancel() {
this.selectedTemplates = new Map<string, TemplateAndMapping>();