Catalog alignment
[sdc.git] / catalog-ui / src / app / ng2 / components / logic / inputs-table / inputs-table.component.html
1 <!--
2   ~ Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  * 
7  *      http://www.apache.org/licenses/LICENSE-2.0
8  * 
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  -->
15  
16  
17 <div class="properties-table">
18     <loader [display]="isLoading" [size]="'large'" [relative]="true"></loader>
19     <div class="table-header">
20         <div class="table-cell col1" (click)="sort('name')">Property Name
21             <span *ngIf="sortBy === 'name'" class="table-header-sort-arrow" [ngClass]="{'down': reverse, 'up':!reverse}">
22             </span>
23         </div>
24         <div class="table-cell col3" (click)="sort('instanceUniqueId')">From Instance
25             <span *ngIf="sortBy === 'instanceUniqueId'" class="table-header-sort-arrow" [ngClass]="{'down': reverse, 'up':!reverse}">
26             </span>
27         </div>
28         <div class="table-cell col2" (click)="sort('type')">Type
29             <span *ngIf="sortBy === 'type'" class="table-header-sort-arrow" [ngClass]="{'down': reverse, 'up':!reverse}">
30             </span>
31         </div>
32         <div class="table-cell valueCol">Value</div>
33     </div>
34     <div class="table-body">
35         <div class="no-data" *ngIf="!inputs || !inputs.length">No data to display</div>
36         <div>
37             <div class="table-row" *ngFor="let input of inputs" (click)="selectedInputId = input.path" [ngClass]="{'selected': selectedInputId && selectedInputId === input.path}">
38                 <!-- Property Name -->
39                 <div class="table-cell col1">
40                     <div class="inner-cell-div" tooltip="{{input.name}}"><span class="property-name">{{input.name}}</span></div>
41                     <span *ngIf="input.description"
42                           class="property-description-icon sprite-new show-desc"
43                           tooltip="{{input.description}}" tooltipDelay="0"></span>
44                 </div>
45                 <!-- From Instance -->
46                 <div class="table-cell col3">
47                     <div class="inner-cell-div" tooltip="{{instanceNamesMap[input.instanceUniqueId]?.name}}">
48                         <span>{{instanceNamesMap[input.instanceUniqueId]?.name}}</span>
49                     </div>
50                 </div>
51                 <!-- Type -->
52                 <div class="table-cell col2">
53                     <div class="inner-cell-div" tooltip="{{input.type | contentAfterLastDot}}">
54                         <span>{{input.type | contentAfterLastDot}}</span>
55                     </div>
56                 </div>
57                 <!-- Value -->
58                 <div class="table-cell valueCol input-value-col" [class.inner-table-container]="input.childrenProperties || !input.isSimpleType">
59                     <dynamic-element class="value-input"
60                                      *ngIf="checkInstanceFePropertiesMapIsFilled() && input.isSimpleType"
61                                      pattern="validationUtils.getValidationPattern(input.type)"
62                                      [value]="input.defaultValueObj"
63                                      [type]="input.type"
64                                      [name]="input.name"
65                                      (elementChanged)="onInputChanged(input, $event)"
66                                      [readonly]="readonly"
67                                      [testId]="'input-' + input.name"
68                                      [constraints] = "getConstraints(input)">
69                     </dynamic-element>
70                     <div class="delete-button-container">
71                         <span *ngIf="input.instanceUniqueId && !readonly" class="sprite-new delete-btn" (click)="openDeleteModal(input)" data-tests-id="delete-input-button"></span>
72                     </div>
73                 </div>
74
75             </div>
76         </div>
77     </div>
78 </div>
79
80