3 ~ ============LICENSE_START=======================================================
4 ~ Copyright (C) 2023 Nordix Foundation.
5 ~ ================================================================================
6 ~ Licensed under the Apache License, Version 2.0 (the "License");
7 ~ you may not use this file except in compliance with the License.
8 ~ You may obtain a copy of the License at
10 ~ http://www.apache.org/licenses/LICENSE-2.0
12 ~ Unless required by applicable law or agreed to in writing, software
13 ~ distributed under the License is distributed on an "AS IS" BASIS,
14 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 ~ See the License for the specific language governing permissions and
16 ~ limitations under the License.
18 ~ SPDX-License-Identifier: Apache-2.0
19 ~ ============LICENSE_END=========================================================
22 <div class="component-container">
23 <ng-container [formGroup]="formGroup">
24 <label>Custom function name: </label>
25 <input type="text" formControlName="customName" [value]="name" required/><br/><br/>
26 <div formArrayName="customParameterList">
27 <div *ngFor="let parameter of parameters; let idx = index">
28 <div *ngIf="idx > 0" class="text-center"><span class="custom-plus-icon"></span></div>
29 <div class="parameter-card">
30 <div class="card-content">
31 <ng-container *ngIf="parameter.type === STRING_FUNCTION_TYPE">
32 <input type="text" [formControlName]="idx" [value]="parameter.value"/><br/>
34 <ng-container *ngIf="parameter.type !== STRING_FUNCTION_TYPE">
35 <tosca-function [property]="propertyInputList[idx]" [componentInstanceMap]="componentInstanceMap" [allowClear]="false"
36 (onValidityChange)="onFunctionValidityChange($event, idx)">
39 <div class="buttons-container">
40 <span class="delete-icon" (click)="removeParameter(idx)"></span>
47 <div class="buttons-container">
48 <a class="add-link" (click)="addStringParameter()">String Value</a> <a class="add-link" (click)="addFunction()">TOSCA Function Expression</a>