2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2022 Nordix Foundation. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 <div class="interface-definition">
21 <loader [display]="isLoading" [size]="'large'" [relative]="true"></loader>
22 <div class="left-column">
23 <div *ngIf="isInterfaceListEmpty()">
24 <div class="interface-empty-msg">
25 <div>{{ 'INTERFACE_DATA_EMPTY' | translate }}</div>
28 <div class="top-add-btn add-btn" [ngClass]="{'disabled': readonly}" *ngIf="!component.isService()" data-tests-id="add-operation" (click)="onSelectInterfaceOperation(undefined, undefined)">
29 {{ 'INTERFACE_ADD_OPERATION' | translate }}
31 <div class="operation-list" *ngIf="!this.component.isService() || this.enableFlag || this.selectedInstanceData && !this.selectedInstanceData.name === 'SELF'">
32 <div *ngIf="!isInterfaceListEmpty()">
33 <div class="expand-collapse" *ngIf="isOperationListEmpty()">
35 [ngClass]="{'disabled': isAllExpanded()}"
36 (click)="collapseAll(false)">{{ 'INTERFACE_EXPAND_ALL' | translate }}
39 [ngClass]="{'disabled': isAllCollapsed()}"
40 (click)="collapseAll()">
41 {{ 'INTERFACE_COLLAPSE_ALL' | translate }}
45 <div class="interface-row" *ngFor="let interface1 of interfaces">
46 <div class="interface-accordion" (click)="interface1.toggleCollapse()">
48 class="chevron-container"
49 [ngClass]="{'isCollapsed': interface1.isCollapsed}"
50 *ngIf="isOperationListEmpty()">
57 <span class="interface-name">{{interface1.type}}</span>
60 <div class="generic-table" *ngIf="!interface1.isCollapsed && isOperationListEmpty()">
61 <div class="header-row table-row">
63 class="cell header-cell field-name header-name">
64 {{ 'INTERFACE_HEADER_NAME' | translate }}
66 <span class="cell header-cell field-description header-description">
67 {{ 'INTERFACE_HEADER_DESCRIPTION' | translate }}
69 <span class="cell field-delete" *ngIf="!readonly"><span class="delete-col-header"></span></span>
71 <div class="data-row" *ngFor="let operation of interface1.operations">
72 <span class="cell field-name"
73 (click)="onSelectInterfaceOperation(interface1, operation)">{{operation.name}}</span>
74 <span class="cell field-description" (click)="onSelectInterfaceOperation(interface1, operation)"
75 [ngClass]="{'collapsed': operation.isCollapsed}">{{operation.getDescriptionEllipsis()}}
76 <span class="more-or-less link" (click)="operation.toggleCollapsed($event)">
77 {{!operation.isEllipsis ? '' : operation.isCollapsed ? 'More' : 'Less'}}
80 <span class="cell field-delete" *ngIf="!readonly">
81 <button class="table-delete-btn" (click)="onRemoveOperation(operation)"></button>
89 <div class="right-column" *ngIf="component.isService()">
90 <div class="add-btn" [ngClass]="{'disabled': !enableFlag}" data-tests-id="add-operation" (click)="onSelectInterfaceOperation(undefined, undefined)">
91 {{ 'INTERFACE_ADD_OPERATION' | translate }}
93 <tabs #hierarchyNavTabs tabStyle="simple-tabs" class="gray-border">
94 <tab tabTitle="Composition">
95 <div class="hierarchy-nav-container">
96 <loader [display]="loadingInstances" [size]="'medium'" [relative]="true" [loaderDelay]="500"></loader>
97 <div class="hierarchy-header white-sub-header">
98 <span tooltip="{{component.name}}">{{component.name}}</span>
100 <div *ngIf="!instancesNavigationData || instancesNavigationData.length === 0">No data to display</div>
101 <hierarchy-navigation class="hierarchy-nav"
102 (updateSelected)="onInstanceSelectedUpdate($event)"
103 [displayData]="instancesNavigationData"
104 [selectedItem]="selectedInstanceData?.uniqueId"
105 [displayOptions]="hierarchyInstancesDisplayOptions"></hierarchy-navigation>