213210cc7ddd2950773b05eda4a37ea0d846b43b
[sdc.git] / catalog-ui / src / app / ng2 / components / logic / service-dependencies / service-dependencies.component.html
1 <div class="service-dependencies">
2   <loader [display]="isLoading" [size]="'medium'" [relative]="true"></loader>
3   <select-directives *ngIf="!isDependent || isEditable" (onAddClick)="onAddDirectives($event)" [updateDirectives]="getActualDirectiveValue()">
4   </select-directives>
5   <div *ngIf="isDependent && !isEditable" class="checkbox-label-mark-as-dependent">
6     <label class="i-sdc-form-label">Directive: {{getActualDirectiveValue()}}</label>
7     <span class="sprite-new delete-btn delete-icon"
8           (click)="onRemoveDirective()" data-tests-id="delete-input-button" *ngIf="!readonly">
9     </span>
10     <svg-icon-label name="edit-file-o" size="small" class="directive-edit-icon" data-tests-id="directive-edit-icon" 
11           (click)="onEditDirectives()" *ngIf="!readonly">
12     </svg-icon-label>
13   </div>
14
15   <div *ngIf="isDependent">
16     <div class="w-sdc-designer-sidebar-section">
17       <sdc-accordion [title]="'Node Filter Capabilities'" [arrow-direction]="'right'" [open]="true">
18         <div class="i-sdc-designer-sidebar-section-content-node-filter-section">
19
20           <div class="i-sdc-designer-sidebar-section-content-node-filter"
21                [ngClass]="{'hand': !readonly}"
22                *ngFor="let capability of constraintCapabilities; let i = index">
23             <div class="filter-details" [ngClass]="{'readonly': readonly}">
24               <div class="filter-desc" (click)="!readonly && onSelectNodeFilterCapability(capabilities, i)"
25                    tooltips
26                    tooltip="{{capability.capabilityName + ' : ' +
27                    capability.servicePropertyName + ' ' + getSymbol(capability.constraintOperator) + ' '
28                    + (capability.value | json)}}">
29                    {{capability.capabilityName + ' : ' + capability.servicePropertyName + ' ' + getSymbol(capability.constraintOperator)
30                    + ' ' + (capability.value | json)}}
31               </div>
32               <span *ngIf="!readonly" class="sprite-new delete-btn delete-icon"
33                     (click)="openDeleteModal(capabilities, i)"
34                     data-tests-id="delete-input-button"></span>
35             </div>
36           </div>
37
38           <div class="w-sdc-designer-sidebar-section-node-filter-footer">
39             <button
40                 class="w-sdc-designer-sidebar-section-node-filter-footer-action add-rule-btn tlv-btn blue"
41                 data-tests-id="add-rule-button"
42                 (click)="onAddNodeFilterCapabilities()"
43                 [disabled]="readonly">
44               {{'DIRECTIVES_AND_NODE_FILTER_ADD_NODE_FILTER' | translate}}
45             </button>
46           </div>
47         </div>
48       </sdc-accordion>
49
50       <sdc-accordion [title]="'Node Filter Properties'" [arrow-direction]="'right'" [open]="true">
51         <div class="i-sdc-designer-sidebar-section-content-node-filter-section">
52
53           <div class="i-sdc-designer-sidebar-section-content-node-filter"
54                [ngClass]="{'hand': !readonly}"
55                *ngFor="let property of constraintProperties; let i = index">
56             <div class="filter-details" [ngClass]="{'readonly': readonly}">
57               <div class="filter-desc" (click)="!readonly && onSelectNodeFilter(properties, i)"
58                    tooltips
59                    tooltip="{{property.servicePropertyName + ' ' + getSymbol(property.constraintOperator) + ' '
60                    + (property.value | json)}}">
61                    {{property.servicePropertyName + ' ' + getSymbol(property.constraintOperator)
62                    + ' ' + (property.value | json)}}
63               </div>
64               <span *ngIf="!readonly" class="sprite-new delete-btn delete-icon"
65                     (click)="openDeleteModal(properties, i)"
66                     data-tests-id="delete-input-button"></span>
67             </div>
68           </div>
69
70           <div class="w-sdc-designer-sidebar-section-node-filter-footer">
71             <button
72                 class="w-sdc-designer-sidebar-section-node-filter-footer-action add-rule-btn tlv-btn blue"
73                 data-tests-id="add-rule-button"
74                 (click)="onAddNodeFilter()"
75                 [disabled]="readonly">
76               {{'DIRECTIVES_AND_NODE_FILTER_ADD_NODE_FILTER' | translate}}
77             </button>
78           </div>
79         </div>
80       </sdc-accordion>
81     </div>
82   </div>
83 </div>