From a868a311efee8710f29f89c9406903f9f9b7f392 Mon Sep 17 00:00:00 2001 From: Arielk Date: Mon, 21 Jan 2019 13:11:42 +0200 Subject: Null x when adding operation to empty list Change-Id: Ib54f29049d8b576f48f8459439650c45fe1248f6 Issue-ID: SDC-2052 Signed-off-by: Arielk --- .../operation-creator.component.ts | 9 ++--- .../param-row/param-row.component.html | 38 +++++++++++----------- 2 files changed, 24 insertions(+), 23 deletions(-) (limited to 'catalog-ui') diff --git a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts index 7f31e99b93..e746c6d6fe 100644 --- a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts +++ b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts @@ -224,11 +224,12 @@ export class OperationCreatorComponent { _.map( this.interfaceTypes[this.operation.interfaceType], name => { + const curInterf = _.find( + this.interfaces, + interf => interf.type === this.operation.interfaceType + ); const existingOp = _.find( - _.find( - this.interfaces, - interf => interf.type === this.operation.interfaceType - ).operations, + curInterf && curInterf.operations || [], op => op.name === name ); const ddType = (existingOp && existingOp.uniqueId !== this.operation.uniqueId) ? 2 : 0; diff --git a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html index 18142c982b..d23783715c 100644 --- a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html +++ b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html @@ -1,5 +1,5 @@ - +
@@ -28,7 +28,7 @@
- - + + @@ -56,7 +56,7 @@
@@ -64,11 +64,11 @@
+ name="trash-o" + mode="info" + size="small" + [attr.data-tests-id]="'param-remove-' + (param.name || 'unnamed')" + (click)="onRemoveParam(param)" + [clickable]="true">
-- cgit 1.2.3-korg