+<!--
+ ============LICENSE_START=======================================================
+ VID
+ ================================================================================
+ Copyright (C) 2017 - 2019 AT&T Intellectual Property. 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=========================================================
+ -->
+
<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" />
<div class="modal-header">
<h3 class="modal-title" id="modal-title">New VNF Change</h3>
<option ng-repeat="version in vnfName.availableVersions">{{version.modelInfo.modelVersion}}</option>
</select>
</td>
- <td class="col-md-1 vnf-versions-name">
+ <td class="col-md-1 vnf-versions-file">
<input ng-model="vnfName.filePath" onchange="angular.element(this).scope().selectFileForVNFName(this)" type="file" id="{{vnfName['invariant-id']}}" class="vnf-files-select" />
- <span class="vnf-versions-name">Select File<span class="caret"></span></span></td>
+ <span class="vnf-versions-file">Select File<span class="caret"></span></span></td>
</tr>
</tbody>
</table>
<option value="" disabled>Select workflow</option>
</select>
</div>
- <div class="form-group" ng-if="vm.isScaleOut()">
- <label class="control-label">Configuration Parameters</label>
- <input type="text" name="configurationParameters" ng-model="vm.changeManagement.configurationParameters" id="configuration-parameters" required>
- </div>
- <div class="form-group" ng-if="vm.isConfigUpdate()">
- <label class="control-label">Attach configuration file</label>
+
+ <div class="form-group" ng-if="vm.changeManagement.workflow" ng-repeat="item in vm.getInternalWorkFlowParameters(vm.changeManagement.workflow, 'FILE')">
+ <label class="control-label">{{item.name}}</label>
<div class="file-wrapper">
- <input id="config-update-input" class="file-input" type="file" ngf-select ng-model="vm.configUpdateFile" ngf-validate-async-fn="vm.uploadConfigFile($file)" name="configUpdateFile"
- accept=".csv" ngf-pattern=".csv" required> </input>
- <label id="config-update-label" class="file-input-label">{{vm.configUpdateFile&&vm.configUpdateFile.name||"Select File"}} </label>
- <label for="config-update-input"><span class="icon-browse"></span></label>
+ <input id="internal-workflow-parameter-file-{{item.id}}" class="file-input" type="file" ngf-select ng-model="item.value" ngf-validate-async-fn="vm.uploadConfigFile($file)" name="configUpdateFile" accept="{{item.acceptableFileType}}" ngf-pattern="{{item.acceptableFileType}}" ng-required="{{item.required}}"/>
+ <label id="internal-workflow-parameter-file-{{item.id}}-label" class="file-input-label">{{item.value&&item.value.name||"Select File"}} </label>
+ <label for="internal-workflow-parameter-file-{{item.id}}"><span class="icon-browse"></span></label>
</div>
- <label id="errorLabel" class="icon-alert error" ng-if="newChangeManagement.configUpdateFile.$error.pattern">{{vm.configUpdatePatternError}}</label>
- <label id="errorContentLabel" class="icon-alert error" ng-if="newChangeManagement.configUpdateFile.$error.validateAsyncFn">{{vm.configUpdateContentError}}</label>
+ <label id="errorLabel" class="icon-alert error" ng-if="item.value.$error.pattern">{{item.msgOnPatternError}}</label>
+ <label id="errorContentLabel" class="icon-alert error" ng-if="item.value.$error.validateAsyncFn">{{item.msgOnContentError}}</label>
+ </div>
+
+ <div class="form-group" ng-if="vm.changeManagement.workflow" ng-repeat="item in vm.getInternalWorkFlowParameters(vm.changeManagement.workflow, 'text')">
+ <label for="internal-workflow-parameter-text-{{item.id}}" class="control-label">{{item.name}}</label>
+ <input ng-model="item.value" type="text" id="internal-workflow-parameter-text-{{item.id}}" pattern="{{item.pattern}}" ng-required="{{item.required}}">
</div>
- <div ng-if="vm.shouldShowVnfInPlaceFields()">
- <div class="form-group">
- <label class="control-label">Operations timeout</label>
- <input class="form-control" ng-model="vm.changeManagement.operationTimeout" name="operationTimeout" type="text" id="operations-timeout" pattern="[0-9]+" required>
- </div>
- <div class="form-group">
- <label class="control-label">Existing software version</label>
- <input class="form-control" ng-model="vm.changeManagement.existingSoftwareVersion" name="existingSoftwareVersion" type="text" id="existing-software-version" pattern="{{vm.softwareVersionRegex}}" required>
- </div>
- <div class="form-group">
- <label class="control-label">New software version</label>
- <input class="form-control" ng-model="vm.changeManagement.newSoftwareVersion" name="newSoftwareVersion" type="text" id="new-software-version" pattern="{{vm.softwareVersionRegex}}" required>
- </div>
+ <div class="form-group" ng-if="vm.changeManagement.workflow" ng-repeat="item in vm.getRemoteWorkFlowParameters(vm.changeManagement.workflow)">
+ <label for="so-workflow-parameter-{{item.id}}" class="control-label">{{item.name}}</label>
+ <input ng-model="item.value" type="text" id="so-workflow-parameter-{{item.id}}" pattern="{{item.pattern}}" maxlength="{{item.maxLength}}" ng-required="{{item.required}}" soFieldName="{{item.soFieldName}}">
</div>
</div>
<button ng-if="vm.isScaleOut() && vm.wizardStep === 1" ng-click="vm.nextStep();" type="button" id="next" name="next" class="btn btn-primary" data-ng-disabled="newChangeManagement.$invalid">Next</button>
</div>
</div>
-</form>
\ No newline at end of file
+</form>