3 ~ ============LICENSE_START=======================================================
4 ~ Copyright (C) 2016-2018 European Support Limited
5 ~ Modification Copyright (C) 2022 Nordix Foundation.
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
11 ~ http://www.apache.org/licenses/LICENSE-2.0
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.
19 ~ SPDX-License-Identifier: Apache-2.0
20 ~ ============LICENSE_END=========================================================
23 <div class="service-dependencies-editor">
24 <form class="w-sdc-form">
26 <loader [display]="isLoading" [size]="'large'" [relative]="true"></loader>
28 <div class="i-sdc-form-content">
29 <div class="rule-builder-content">
30 <div class="i-sdc-form-item rule-input-field property" *ngIf="filterType == FILTER_TYPE_CAPABILITY">
31 <label class="i-sdc-form-label required">{{"CAPABILITY_LABEL" | translate}}</label>
33 class="i-sdc-form-select"
34 data-tests-id="servicePropertyName"
35 [values]="capabilityDropdownList"
36 [(value)]="currentRule.capabilityName"
37 (change)="onCapabilityChange()">
38 </ui-element-dropdown>
40 <div class="i-sdc-form-item rule-input-field property">
41 <label class="i-sdc-form-label required">{{"PROPERTY_LABEL" | translate}}</label>
43 class="i-sdc-form-select"
44 data-tests-id="servicePropertyName"
45 [values]="servicePropertyDropdownList"
46 [(value)]="currentRule.servicePropertyName"
47 (change)="onPropertyChange()">
48 </ui-element-dropdown>
50 <div class="i-sdc-form-item rule-input-field operator">
51 <label class="i-sdc-form-label required">{{"OPERATOR_LABEL" | translate}}</label>
52 <ui-element-dropdown class="i-sdc-form-select" data-tests-id="constraintOperator"
53 [testId]="'constraintOperator'"
54 [values]="operatorTypes" [(value)]="currentRule.constraintOperator"></ui-element-dropdown>
57 <div class="rule-builder-content">
58 <div class="i-sdc-form-item">
59 <label class="i-sdc-form-label required">Value Type</label>
60 <input type="radio" name="sourceType"
61 data-tests-id="value-type-static"
62 [(ngModel)]="selectedSourceType"
63 [value]="SOURCE_TYPES.STATIC.value"
64 (ngModelChange)="onSourceTypeChange()"/> {{"VALUE_LABEL" | translate}}
65 <input type="radio" name="sourceType"
66 data-tests-id="value-type-tosca-function"
67 [(ngModel)]="selectedSourceType"
68 [value]="SOURCE_TYPES.TOSCA_FUNCTION.value"
69 (ngModelChange)="onSourceTypeChange()"/> {{"VALUE_EXPRESSION_LABEL" | translate}}
72 <div class="rule-builder-content" *ngIf="isToscaFunctionSource() && selectedProperty">
73 <div class="i-sdc-form-item rule-input-field">
74 <tosca-function [property]="selectedProperty"
75 [componentInstanceMap]="componentInstanceMap"
77 (onValidityChange)="onToscaFunctionValidityChange($event)"
82 <div *ngIf="isToscaFunctionSource() && !selectedProperty">
83 {{"NODE_FILTER_SELECT_PROPERTY" | translate}}
85 <div class="rule-builder-content" *ngIf="isStaticSource()">
86 <div class="i-sdc-form-item rule-input-field complex-input-field">
88 *ngIf="isComplexListMapType()"
89 [selectedPropertyId]="selectedProperty.uniqueId"
90 [property]="selectedProperty"
91 [expandedChildId]="selectedProperty.expandedChildPropertyId ?
92 selectedProperty.expandedChildPropertyId : selectedProperty.name"
93 [canBeDeclared]="true"
94 (propertyChanged)="updateComplexListMapTypeRuleValue()"
95 [rootProperty]="selectedProperty"
96 (expandChild)="selectedProperty.updateExpandedChildPropertyId($event)">
99 *ngIf="!isComplexListMapType()"
100 [(value)]="currentRule.value"
101 class="rule-assigned-value"
102 data-tests-id="ruleAssignedValue"
103 (elementChanged)="onValueChange($event.isValid)"
104 [type]="selectedProperty ? selectedProperty.type : 'string'">