From: Arielk Date: Mon, 21 Jan 2019 11:11:42 +0000 (+0200) Subject: Null x when adding operation to empty list X-Git-Tag: 1.4.0~149 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F61%2F76061%2F3;p=sdc.git Null x when adding operation to empty list Change-Id: Ib54f29049d8b576f48f8459439650c45fe1248f6 Issue-ID: SDC-2052 Signed-off-by: Arielk --- 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">