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

            </div>
        </div>
    </div>
</div>