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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
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}">
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}">
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}">
32 <div class="table-cell col4" (click)="sort('required')" *ngIf="componentType == 'SERVICE'">
33 <span tooltip="Required in Runtime" tooltipDelay="400">Req. in RT</span>
35 <div class="table-cell" [class.metadata-col-small]="!hasInputMetadata()" [class.metadata-col-wide]="hasInputMetadata()">
36 <div [class.metadata-col-wide-text]="hasInputMetadata()">Metadata</div>
38 <div class="table-cell valueCol">Value</div>
40 <div class="table-body">
41 <div class="no-data" *ngIf="!inputs || !inputs.length">No data to display</div>
43 <div class="table-row" *ngFor="let input of inputs" (click)="selectedInputId = input.path" [ngClass]="{'selected': selectedInputId && selectedInputId === input.path}">
44 <!-- Property Name -->
45 <div class="table-cell col1">
46 <div class="inner-cell-div">
47 <span class="property-name" tooltip="{{input.name}}">{{input.name}}</span>
49 <span *ngIf="input.description"
50 class="property-description-icon sprite-new show-desc"
51 tooltip="{{input.description}}" tooltipDelay="0"></span>
52 <div class="delete-button-container">
53 <span *ngIf="showDelete" class="sprite-new delete-btn" (click)="openDeleteModal(input)" data-tests-id="delete-input-button"></span>
56 <!-- From Instance -->
57 <div class="table-cell col3">
58 <div class="inner-cell-div" tooltip="{{instanceNamesMap[input.instanceUniqueId]?.name}}">
59 <span>{{instanceNamesMap[input.instanceUniqueId]?.name}}</span>
63 <div class="table-cell col2">
64 <div class="inner-cell-div" tooltip="{{input.type | contentAfterLastDot}}">
65 <span>{{input.type | contentAfterLastDot}}</span>
68 <!-- Required in runtime -->
69 <div class="table-cell col4" *ngIf="componentType == 'SERVICE'">
70 <sdc-checkbox [(checked)]="input.required"
71 (checkedChange)="onRequiredChanged(input, $event)"
72 [disabled]="readonly"></sdc-checkbox>
75 <div class="table-cell" [class.metadata-col-small]="!hasInputMetadata()" [class.metadataCol]="hasInputMetadata()">
76 <div class="inner-cell-div metadata-add" tooltip="Add key value pair">
77 <a class="property-icon add-item" (click)="createNewMetadataEntry(input);" [ngClass]="{'disabled':readonly}">Add metadata</a>
80 <div class="metadata-container">
81 <ng-container *ngFor="let metadataEntry of input.metadataEntries;">
82 <div class="metadata-entry">
84 <div class="metadata-key-value metadata-key" >
85 <dynamic-element #metadataViewChildren
87 pattern="validationUtils.getValidationPattern(string)"
88 [value]="metadataEntry.key"
90 name="{{input.name}}_{{metadataEntry.key}}"
91 (elementChanged)="onMetadataKeyChanged(input, $event, metadataEntry)"
93 [testId]="'prop-key-' + propertyTestsId"
98 <div class="metadata-key-value">
101 pattern="validationUtils.getValidationPattern(string)"
102 [value]="metadataEntry.value"
104 [name]="metadataEntry.key"
105 (elementChanged)="onMetadataValueChanged(input, $event, metadataEntry)"
106 [readonly]="readonly"
107 [testId]="'prop-key-' + propertyTestsId"
110 <span (click)="deleteMetadataEntry(input, metadataEntry);" class="delete-icon sprite-new delete-item-icon" [ngClass]="{'disabled':readonly}"></span>
118 <div class="table-cell valueCol" [class.inner-table-container]="input.childrenProperties || !input.isSimpleType">
119 <dynamic-element class="value-input"
120 *ngIf="checkInstanceFePropertiesMapIsFilled() && input.isSimpleType"
121 pattern="validationUtils.getValidationPattern(input.type)"
122 [value]="input.defaultValueObj"
125 (elementChanged)="onInputChanged(input, $event)"
126 [readonly]="readonly"
127 [testId]="'input-' + input.name"
128 [constraints] = "getConstraints(input)">