summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/logic/service-dependencies/service-dependencies.component.html
blob: f0430ff1cd544b8a7019ae69a7e10ef3d83432b2 (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
<div class="service-dependencies">
  <loader [display]="isLoading" [size]="'medium'" [relative]="true"></loader>
  <select-directives *ngIf="!isDependent || isEditable" (onAddClick)="onAddDirectives($event)" [updateDirectives]="getActualDirectiveValue()">
  </select-directives>
  <div *ngIf="isDependent && !isEditable" class="checkbox-label-mark-as-dependent">
    <label class="i-sdc-form-label">Directive: {{getActualDirectiveValue()}}</label>
    <span class="sprite-new delete-btn delete-icon"
          (click)="onRemoveDirective()" data-tests-id="delete-input-button" *ngIf="!readonly">
    </span>
    <svg-icon-label name="edit-file-o" size="small" class="directive-edit-icon" data-tests-id="directive-edit-icon" 
          (click)="onEditDirectives()" *ngIf="!readonly">
    </svg-icon-label>
  </div>

  <div *ngIf="isDependent">
    <div class="w-sdc-designer-sidebar-section">
      <sdc-accordion [title]="'Node Filter Capabilities'" [arrow-direction]="'right'" [open]="true">
        <div class="i-sdc-designer-sidebar-section-content-node-filter-section">

          <div class="i-sdc-designer-sidebar-section-content-node-filter"
               [ngClass]="{'hand': !readonly}"
               *ngFor="let capability of constraintCapabilities; let i = index">
            <div class="filter-details" [ngClass]="{'readonly': readonly}">
              <div class="filter-desc" (click)="!readonly && onSelectNodeFilterCapability(capabilities, i)"
                   tooltips
                   tooltip="{{constraintCapabilityLabels[i]}}">
                   {{constraintCapabilityLabels[i]}}
              </div>
              <span *ngIf="!readonly" class="sprite-new delete-btn delete-icon"
                    (click)="openDeleteModal(capabilities, i)"
                    data-tests-id="delete-input-button"></span>
            </div>
          </div>

          <div class="w-sdc-designer-sidebar-section-node-filter-footer">
            <button
                class="w-sdc-designer-sidebar-section-node-filter-footer-action add-rule-btn tlv-btn blue"
                data-tests-id="add-rule-button"
                (click)="onAddNodeFilterCapabilities()"
                [disabled]="readonly">
              {{'DIRECTIVES_AND_NODE_FILTER_ADD_NODE_FILTER' | translate}}
            </button>
          </div>
        </div>
      </sdc-accordion>

      <sdc-accordion [title]="'Node Filter Properties'" [arrow-direction]="'right'" [open]="true">
        <div class="i-sdc-designer-sidebar-section-content-node-filter-section">

          <div class="i-sdc-designer-sidebar-section-content-node-filter"
               [ngClass]="{'hand': !readonly}"
               *ngFor="let property of constraintProperties; let i = index">
            <div class="filter-details" [ngClass]="{'readonly': readonly}">
              <div class="filter-desc" (click)="!readonly && onSelectNodeFilter(properties, i)"
                   tooltips
                   tooltip="{{constraintPropertyLabels[i]}}">
                   {{constraintPropertyLabels[i]}}
              </div>
              <span *ngIf="!readonly" class="sprite-new delete-btn delete-icon"
                    (click)="openDeleteModal(properties, i)"
                    data-tests-id="delete-input-button"></span>
            </div>
          </div>

          <div class="w-sdc-designer-sidebar-section-node-filter-footer">
            <button
                class="w-sdc-designer-sidebar-section-node-filter-footer-action add-rule-btn tlv-btn blue"
                data-tests-id="add-rule-button"
                (click)="onAddNodeFilter()"
                [disabled]="readonly">
              {{'DIRECTIVES_AND_NODE_FILTER_ADD_NODE_FILTER' | translate}}
            </button>
          </div>
        </div>
      </sdc-accordion>
    </div>
  </div>
</div>