aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
diff options
context:
space:
mode:
authorEltanany Shaaban <shaaban.eltanany.ext@orange.com>2020-11-29 14:18:19 +0200
committerEltanany Shaaban <shaaban.eltanany.ext@orange.com>2020-11-29 14:31:01 +0200
commit778c37423df0742c672e0c6193038f8c1d8d2c95 (patch)
treefc141d7dad77d26425505ed90340fd6620445dc9 /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
parentc9abcdb52610466e0939ba6758e358949e0a38b5 (diff)
Add attribute details on hover - List, Get value and delete
Issue-ID: CCSDK-2292 Issue-ID: CCSDK-2780 Issue-ID: CCSDK-2779 Signed-off-by: Eltanany Shaaban <shaaban.eltanany.ext@orange.com> Change-Id: Ia45ba20cd83a5cb639d1e127f4591e29ffef3954
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts20
1 files changed, 19 insertions, 1 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
index 95b53fb01..1c5a387d0 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
@@ -50,6 +50,8 @@ export class ActionAttributesComponent implements OnInit {
suggestedMappingParameters: string[] = [];
selectedParameterList: string[] = [];
currentSuggestedArtifact: string;
+ suggestedDeletedInput: any = {};
+ suggestedEditedAttribute: any = {};
constructor(private designerStore: DesignerStore,
private functionsStore: FunctionsStore,
@@ -107,6 +109,8 @@ export class ActionAttributesComponent implements OnInit {
fieldAttribute.description = container[nameOutput].description;
fieldAttribute.required = container[nameOutput].required;
fieldAttribute.type = container[nameOutput].type;
+ fieldAttribute.value = container[nameOutput].value;
+ console.log(fieldAttribute.value);
const insertedOutputActionAttribute = Object.assign({}, fieldAttribute);
fields.push(insertedOutputActionAttribute);
}
@@ -490,7 +494,7 @@ export class ActionAttributesComponent implements OnInit {
}
editAttribute(input: any) {
- console.log(input);
+ this.suggestedEditedAttribute = input;
}
private createAttributeTypeIfNotExisted(originalAttributes: string, attributeType: string) {
@@ -502,4 +506,18 @@ export class ActionAttributesComponent implements OnInit {
private checkIfTypeIsList(type: string) {
return type.includes('list');
}
+
+ markDeletedInput(input: any) {
+ this.suggestedDeletedInput = input;
+ }
+
+ deleteActionAttribute() {
+ delete this.designerState.template.workflows[this.actionName]
+ ['inputs'][this.suggestedDeletedInput.name];
+ this.deleteAttribute(this.inputs, this.suggestedDeletedInput);
+
+ delete this.designerState.template.workflows[this.actionName]
+ ['outputs'][this.suggestedDeletedInput.name];
+ this.deleteAttribute(this.outputs, this.suggestedDeletedInput);
+ }
}