aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts17
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts8
2 files changed, 9 insertions, 16 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 15f2ce456..6873f8948 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
@@ -120,7 +120,9 @@ export class ActionAttributesComponent implements OnInit {
console.log(input);
if (input && input.type && input.name) {
const insertedInputActionAttribute = Object.assign({}, input);
- this.newInputs.push(insertedInputActionAttribute);
+ if (!this.newInputs.includes(insertedInputActionAttribute)) {
+ this.newInputs.push(insertedInputActionAttribute);
+ }
}
}
@@ -166,7 +168,7 @@ export class ActionAttributesComponent implements OnInit {
this.storeOutputs(this.newOutputs);
this.storeInputs((this.newInputs));
this.newInputs.forEach(input => {
- if (!this.inputs.includes(input)) {
+ if (!this.inputs.includes(input.name)) {
this.inputs.push(input);
}
});
@@ -392,16 +394,7 @@ export class ActionAttributesComponent implements OnInit {
this.convertToObject(originalAttributes.substr(0, originalAttributes.length - 1)
+ newAttributes + '}');
}
- const action = this.designerState.template.workflows[this.actionName] as Action;
- this.inputs = [];
- if (action.inputs) {
- const namesOfInput = Object.keys(action.inputs);
- this.inputs = this.extractFields(namesOfInput, action.inputs);
- }
- /* console.log(originalAttributes.substr(0, originalAttributes.length - 1) + ',' + newAttributes + '}');
- this.designerState.template.workflows[this.actionName][attributeType] =
- this.convertToObject(originalAttributes.substr(0, originalAttributes.length - 1)
- + ',' + newAttributes + '}');*/
+
}
private removeTheLastComma(newInputs: string): string {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
index cc7de5f41..652d235a0 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
@@ -535,12 +535,12 @@ export class DesignerComponent implements OnInit, OnDestroy {
.then(blob => {
this.packageCreationService.savePackage(blob).subscribe(
bluePrintDetailModels => {
- this.toastService.info('success updating the package');
+ this.toastService.success('Package is updated successfully');
const id = bluePrintDetailModels.toString().split('id')[1].split(':')[1].split('"')[1];
this.router.navigate(['/packages/designer/' + id]);
console.log('success');
}, error => {
- this.toastService.error('error happened when editing ' + error.message);
+ this.toastService.error('Error Occured during editing process' + error.message);
console.log('Error -' + error.message);
}, () => {
this.ngxService.stop();
@@ -591,11 +591,11 @@ export class DesignerComponent implements OnInit, OnDestroy {
saveAs(blob, this.viewedPackage.artifactName + '-' + this.viewedPackage.artifactVersion + '-CBA.zip');
}, err => {
- this.toastService.error('package ' + this.viewedPackage.artifactName + 'has error when downloading' +
+ this.toastService.error('Package ' + this.viewedPackage.artifactName + 'has error when downloading' +
err.message);
this.ngxService.stop();
}, () => {
- this.toastService.success('package ' + this.viewedPackage.artifactName + 'downloaded successfully');
+ this.toastService.success('Package ' + this.viewedPackage.artifactName + 'downloaded successfully');
this.ngxService.stop();
});
}