diff options
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/interface-definition')
2 files changed, 5 insertions, 5 deletions
diff --git a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html index 15fe65a784..cfdba12037 100644 --- a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html +++ b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html @@ -28,7 +28,7 @@ <div class="top-add-btn add-btn" [ngClass]="{'disabled': readonly}" *ngIf="!component.isService()" data-tests-id="add-operation" (click)="onSelectInterfaceOperation(undefined, undefined)"> {{ 'INTERFACE_ADD_OPERATION' | translate }} </div> - <div class="operation-list"> + <div class="operation-list" *ngIf="!this.component.isService() || this.enableFlag || this.selectedInstanceData && !this.selectedInstanceData.name === 'SELF'"> <div *ngIf="!isInterfaceListEmpty()"> <div class="expand-collapse" *ngIf="isOperationListEmpty()"> <a class="link" @@ -87,7 +87,7 @@ </div> </div> <div class="right-column" *ngIf="component.isService()"> - <div class="add-btn" [ngClass]="{'disabled': disableFlag}" data-tests-id="add-operation" (click)="onSelectInterfaceOperation(undefined, undefined)"> + <div class="add-btn" [ngClass]="{'disabled': !enableFlag}" data-tests-id="add-operation" (click)="onSelectInterfaceOperation(undefined, undefined)"> {{ 'INTERFACE_ADD_OPERATION' | translate }} </div> <tabs #hierarchyNavTabs tabStyle="simple-tabs" class="gray-border"> diff --git a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts index 4ada629cea..4a2ad8abdb 100644 --- a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts +++ b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts @@ -139,7 +139,7 @@ export class InterfaceDefinitionComponent { loadingInstances: boolean = false; selectedInstanceData: any = null; hierarchyInstancesDisplayOptions: HierarchyDisplayOptions = new HierarchyDisplayOptions('uniqueId', 'name', 'archived', null, 'iconClass'); - disableFlag : boolean = true; + enableFlag : boolean = false; deploymentArtifactsFilePath: Array<DropdownValue> = []; @@ -241,7 +241,7 @@ export class InterfaceDefinitionComponent { this.interfaces = []; this.selectedInstanceData = instance; if (instance.name != "SELF") { - this.disableFlag = !this.isAllowAddOperation(instance.originType); + this.enableFlag = this.isAllowAddOperation(instance.originType); if (!instance.interfaces) { return; } @@ -284,7 +284,7 @@ export class InterfaceDefinitionComponent { } this.interfaces = newInterfaces.map((interf) => new UIInterfaceModel(interf)); } else { - this.disableFlag = true; + this.enableFlag = false; this.interfaces = this.serviceInterfaces.map((interf) => new UIInterfaceModel(interf)); } this.sortInterfaces(); |