bugfix for operations screen
[sdc.git] / catalog-ui / src / app / ng2 / pages / interface-operation / operation-creator / operation-creator.component.html
index 8f70f7f..60cb1d4 100644 (file)
@@ -25,7 +25,7 @@
                     label="{{ 'OPERATION_INTERFACE_TYPE' | translate }}"
                     [required]="true"
                     testId="interface-name"
-                    selectedOption="{{operation.interfaceType}}"
+                    [selectedOption]="getSelectedDropdown(interfaceNames, operation.interfaceType)"
                     placeHolder="Select..."
                     [disabled]="readonly"
                     (changed)="onSelectInterface($event)"
 
             <div class="form-item" *ngIf="!isInterfaceOther()">
                 <sdc-dropdown
+                    #operationNamesDropdown
                     label="{{ 'OPERATION_NAME' | translate }}"
                     [required]="true"
                     testId="operation-name"
-                    selectedOption="{{operation.name}}"
+                    [selectedOption]="getSelectedDropdown(operationNames, operation.name)"
                     placeHolder="Select..."
                     [disabled]="readonly"
                     (changed)="onSelectOperationName($event)"
         <div class="side-by-side" *ngIf="enableWorkflowAssociation">
             <div class="form-item">
                 <sdc-dropdown
+                    #workflowAssignmentDropdown
                     label="{{ 'OPERATION_WORKFLOW_ASSIGNMENT' | translate }}"
                     placeHolder="Select..."
                     testId="association-type"
-                    selectedOption="{{workflowAssociationType}}"
+                    [selectedOption]="toDropDownOption(workflowAssociationType)"
                     [options]="associationOptions"
                     (changed)="toggleAssociateWorkflow($event)"
                     [disabled]="readonly">
                 <sdc-dropdown
                     placeHolder="Select..."
                     testId="associated-workflow"
-                    selectedOption="{{operation.workflowId}}"
+                    [selectedOption]="getSelectedDropdown(workflows, operation.workflowId)"
                     [options]="workflows"
                     (changed)="onSelectWorkflow($event)"
                     [disabled]="readonly || !workflows.length || !workflowIsOnline">
                     *ngIf="workflowIsOnline && workflows.length"
                     label="{{ 'OPERATION_WORKFLOW_VERSION' | translate }}"
                     testId="associated-workflow-version"
-                    selectedOption="{{operation.workflowVersionId}}"
+                    [selectedOption]="getSelectedDropdown(workflowVersions, operation.workflowVersionId)"
                     [options]="workflowVersions"
                     (changed)="changeWorkflowVersion($event)"
                     [disabled]="!operation.workflowId || archivedWorkflowId === operation.workflowId || readonly">
                         <span class="bold-message">{{ 'EMPTY_PARAM_TABLE_NO_SELECTED_WORKFLOW_1' | translate }}</span>
                         <span>{{ 'EMPTY_PARAM_TABLE_NO_SELECTED_WORKFLOW_2' | translate }}</span>
                     </div>
+                    <div *ngIf="!workflows.length">
+                        Only <span class="bold-message">certified</span> workflow versions can be assigned to an operation
+                    </div>
                 </div>
             </div>
 
             <param-row
-                *ngFor="let param of tableParameters"
-                class="data-row"
-                [isInputParam]="currentTab === TYPE_INPUT"
-                [isAssociateWorkflow]="isUsingExistingWF()"
-                [param]="param"
-                [inputProps]="inputProperties"
-                [operationOutputs]="operationOutputs"
-                [onRemoveParam]="onRemoveParam"
-                [readonly]="readonly"
-                [validityChanged]="validityChanged">
+                    *ngFor="let param of tableParameters"
+                    class="data-row"
+                    [isInputParam]="currentTab === TYPE_INPUT"
+                    [isAssociateWorkflow]="isUsingExistingWF()"
+                    [param]="param"
+                    [inputProps]="inputProperties"
+                    [capabilitiesProps]="componentCapabilities"
+                    [operationOutputs]="operationOutputs"
+                    [onRemoveParam]="onRemoveParam"
+                    [readonly]="readonly"
+                    [validityChanged]="validityChanged">
             </param-row>
         </div>