1dcbc16c128cdbd8f604d539fbd3b2a6c74f486e
[sdc.git] /
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="app-capabilities-filter-properties-editor">
22   <form class="w-sdc-form">
23     <loader [display]="isLoading" [size]="'large'" [relative]="true"></loader>
24     <div class="i-sdc-form-content">
25       <div class="rule-builder-content">
26         <div class="i-sdc-form-item rule-input-field">
27           <label class="i-sdc-form-label required">{{currentServiceName}} Capabilities</label>
28           <ui-element-dropdown class="i-sdc-form-select" class="rule-assigned-value"
29                                [(value)]="currentRule.capabilityName"
30                                [values]="capabilitiesNames"
31                                (elementChanged)="onCapabilityNameChanged($event.value)">
32           </ui-element-dropdown>
33         </div>
34
35         <div class="i-sdc-form-item rule-input-field">
36           <label class="i-sdc-form-label required">Capability Properties</label>
37           <ui-element-dropdown class="i-sdc-form-select" class="rule-assigned-value"
38                                [(value)]="this.currentRule.servicePropertyName"
39                                [values]="capabilityProperties"
40                                (change)="onServicePropertyChanged()">
41           </ui-element-dropdown>
42         </div>
43
44         <div class="i-sdc-form-item rule-input-field operator">
45           <ui-element-dropdown class="i-sdc-form-select"
46                                [values]="operatorTypes"
47                                [(value)]="currentRule.constraintOperator">
48           </ui-element-dropdown>
49         </div>
50
51         <div class="i-sdc-form-item rule-input-field">
52           <label class="i-sdc-form-label required" >Source</label>
53           <ui-element-dropdown class="i-sdc-form-select"
54                                [values]="sourceTypes"
55                                [(value)]="currentRule.sourceName"
56                                (change)="onSelectSourceType()">
57           </ui-element-dropdown>
58         </div>
59
60         <div class="rule-input-field assigned-value-field">
61           <label class="i-sdc-form-label required" >{{assignedValueLabel}}</label>
62           <dynamic-element
63               *ngIf="currentRule.sourceType === SOURCE_TYPES.STATIC.value"
64               [(value)]="currentRule.value"
65               class="rule-assigned-value"
66               data-tests-id="ruleAssignedValue"
67               (elementChanged)="onValueChange($event.isValid)"
68               [type]="selectedCapabilitiesPropertyObject ? selectedCapabilitiesPropertyObject.type : 'string'">
69           </dynamic-element>
70           <ui-element-dropdown *ngIf="currentRule.sourceType !== SOURCE_TYPES.STATIC.value"
71                                class="rule-assigned-value"
72                                data-tests-id="ruleAssignedValue"
73                                [(value)]="currentRule.value"
74                                [values]="listOfValuesToAssign">
75           </ui-element-dropdown>
76         </div>
77       </div>
78     </div>
79   </form>
80
81 </div>