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 *ngIf="isInterfaceListEmpty()">
23 <div class="interface-empty-msg">
24 <div>{{ 'INTERFACE_DATA_EMPTY' | translate }}</div>
28 class="top-add-btn add-btn"
29 [ngClass]="{'disabled': readonly}"
30 data-tests-id="add-operation"
31 (click)="onSelectInterfaceOperation(undefined, undefined)">
32 {{ 'INTERFACE_ADD_OPERATION' | translate }}
34 <div class="operation-list">
35 <div *ngIf="!isInterfaceListEmpty()">
36 <div class="expand-collapse" *ngIf="isOperationListEmpty()">
38 [ngClass]="{'disabled': isAllExpanded()}"
39 (click)="collapseAll(false)">{{ 'INTERFACE_EXPAND_ALL' | translate }}
42 [ngClass]="{'disabled': isAllCollapsed()}"
43 (click)="collapseAll()">
44 {{ 'INTERFACE_COLLAPSE_ALL' | translate }}
48 <div class="interface-row" *ngFor="let interface1 of interfaces">
49 <div class="interface-accordion" (click)="interface1.toggleCollapse()">
51 class="chevron-container"
52 [ngClass]="{'isCollapsed': interface1.isCollapsed}"
53 *ngIf="isOperationListEmpty()">
60 <span class="interface-name">{{interface1.type}}</span>
63 <div class="generic-table" *ngIf="!interface1.isCollapsed && isOperationListEmpty()">
64 <div class="header-row table-row">
66 class="cell header-cell field-name header-name">
67 {{ 'INTERFACE_HEADER_NAME' | translate }}
69 <span class="cell header-cell field-description header-description">
70 {{ 'INTERFACE_HEADER_DESCRIPTION' | translate }}
72 <span class="cell field-delete" *ngIf="!readonly"><span class="delete-col-header"></span></span>
74 <div class="data-row" *ngFor="let operation of interface1.operations">
75 <span class="cell field-name"
76 (click)="onSelectInterfaceOperation(interface1, operation)">{{operation.name}}</span>
77 <span class="cell field-description" (click)="onSelectInterfaceOperation(interface1, operation)"
78 [ngClass]="{'collapsed': operation.isCollapsed}">{{operation.getDescriptionEllipsis()}}
79 <span class="more-or-less link" (click)="operation.toggleCollapsed($event)">
80 {{!operation.isEllipsis ? '' : operation.isCollapsed ? 'More' : 'Less'}}
83 <span class="cell field-delete" *ngIf="!readonly">
84 <button class="table-delete-btn" (click)="onRemoveOperation(operation)"></button>