f781e6c89ba87a3122b1dcf287cd2ff11dbbf1c6
[sdc.git] / catalog-ui / src / app / ng2 / components / logic / substitution-filter / substitution-filter.component.html
1 <!--
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2020 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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19 -->
20
21 <div class="substitution-filter">
22
23   <div *ngIf="compositeService.isService()"
24        class="i-sdc-designer-sidebar-section-content-item-rules-section">
25
26     <div class="i-sdc-designer-sidebar-section-content-item-rule" [ngClass]="{'hand': !readonly}"
27          *ngFor="let constraint of constraintObjects; let i = index">
28       <div class="rule-details" [ngClass]="{'readonly': readonly}">
29         <div class="rule-desc" (click)="!readonly && onSelectFilter(i)" tooltips
30              tooltip="{{constraint.servicePropertyName + ' ' + getSymbol(constraint.constraintOperator) + ' '
31              + (constraint.sourceName ? constraint.sourceName + ':' : '') + constraint.value}}">
32           {{constraint.servicePropertyName + ' ' + getSymbol(constraint.constraintOperator) + ' '
33         + (constraint.sourceName ? constraint.sourceName + ':' : '') + constraint.value}}
34         </div>
35         <span *ngIf="!readonly" class="sprite-new delete-btn delete-icon"
36               (click)="openDeleteModal(i)" data-tests-id="delete-input-button"></span>
37       </div>
38     </div>
39
40     <div *ngIf="!isSubstitutionFilterSet()" class="w-sdc-designer-sidebar-section-footer">
41       <button
42           class="w-sdc-designer-sidebar-section-footer-action tlv-btn blue"
43           data-tests-id="add-rule-button"
44           (click)="onAddSubstitutionFilter()"
45           [disabled]="readonly">
46         {{'ADD_SUBSTITUTION_FILTER' | translate}}
47       </button>
48     </div>
49   </div>
50 </div>