aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/interface-definition/operation-creator/param-row/param-row.component.html
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2022-03-24 18:31:14 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-04-04 16:56:40 +0000
commit4aff8f5eafb6fbd6cc2c764fa1a5a676fa05c89c (patch)
tree4fbb91db254b1e4791830f5f91673e58376b293e /catalog-ui/src/app/ng2/pages/interface-definition/operation-creator/param-row/param-row.component.html
parentf6b81e6da9b95ec5ef2c8b2b7b50fb8de9f3dd28 (diff)
Implement adding Interface to VFC
Change-Id: I7cd8b82c306294d897d37d486aa3eeff7ca4206d Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3893 Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/interface-definition/operation-creator/param-row/param-row.component.html')
-rw-r--r--catalog-ui/src/app/ng2/pages/interface-definition/operation-creator/param-row/param-row.component.html100
1 files changed, 100 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/pages/interface-definition/operation-creator/param-row/param-row.component.html b/catalog-ui/src/app/ng2/pages/interface-definition/operation-creator/param-row/param-row.component.html
new file mode 100644
index 0000000000..1ed0375a16
--- /dev/null
+++ b/catalog-ui/src/app/ng2/pages/interface-definition/operation-creator/param-row/param-row.component.html
@@ -0,0 +1,100 @@
+<!--
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+-->
+
+<div class="cell field-name">
+ <ui-element-input
+ *ngIf="!isAssociateWorkflow"
+ [testId]="'param-name-' + (param.name || 'unnamed')"
+ [(value)]="param.name"
+ (valueChange)="onChangeName()"
+ [readonly]="readonly">
+ </ui-element-input>
+ <span *ngIf="isAssociateWorkflow">{{param.name}}</span>
+</div>
+
+<div class="cell field-type">
+ <ui-element-dropdown
+ *ngIf="!isAssociateWorkflow"
+ [testId]="'param-type-' + (param.name || 'unnamed')"
+ [values]="propTypeEnum"
+ [(value)]="param.type"
+ (valueChange)="onChangeType()"
+ [readonly]="readonly">
+ </ui-element-dropdown>
+ <span *ngIf="isAssociateWorkflow">{{param.type}}</span>
+</div>
+
+<div class="cell field-property" *ngIf="isInputParam">
+ <select
+ *ngIf="filteredInputProps.length || operationOutputCats.length || !isAssociateWorkflow"
+ [(ngModel)]="param.inputId"
+ (change)="onChangeProperty($event)"
+ [ngClass]="{'disabled': readonly}"
+ [attr.data-tests-id]="'value-param-property-' + (param.name || 'unnamed')">
+ <option
+ *ngFor="let prop of filteredInputProps"
+ [ngValue]="prop.value">
+ {{prop.label}}
+ </option>
+ <optgroup
+ *ngFor="let operation of operationOutputCats"
+ label="{{operation.operationName}}">
+ <option
+ *ngFor="let output of operation.outputs"
+ [ngValue]="output.value">
+ {{output.label}}
+ </option>
+ </optgroup>
+ <optgroup
+ *ngFor="let cap of filteredCapabilitiesProps"
+ label="{{cap.capabilityName}}">
+ <option
+ *ngFor="let prop of cap.properties"
+ [ngValue]="prop.value">
+ {{prop.label}}
+ </option>
+ </optgroup>
+ </select>
+ <span
+ *ngIf="!filteredInputProps.length && !operationOutputCats.length && isAssociateWorkflow"
+ class="no-properties-error">
+ {{ 'PARAM_NONE_OF_TYPE' | translate }}
+ </span>
+</div>
+
+<div class="cell field-mandatory" *ngIf="!isAssociateWorkflow">
+ <checkbox
+ *ngIf="!isAssociateWorkflow"
+ [attr.data-tests-id]="'param-mandatory-' + (param.name || 'unnamed')"
+ [(checked)]="param.required"
+ [ngClass]="{'disabled':readonly}">
+ </checkbox>
+</div>
+
+<div class="cell remove" *ngIf="!isAssociateWorkflow && !readonly">
+ <svg-icon
+ name="trash-o"
+ mode="info"
+ size="small"
+ [attr.data-tests-id]="'param-remove-' + (param.name || 'unnamed')"
+ (click)="onRemoveParam(param)"
+ [clickable]="true">
+ </svg-icon>
+</div>