UI Feature flagging support
[vid.git] / vid-app-common / src / main / webapp / app / vid / scripts / modals / new-test-environment / new-test-environment.html
1 <link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" />
2 <div class="modal-header">
3     <h3 class="modal-title" id="modal-title">New Test Environment</h3>
4     <span ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">&times;</span>
5 </div>
6 <form class="form-create" data-tests-id="test-new-environment-form" name="newTestEnvironment" ng-submit="vm.createEnvironment()">
7     <div class="modal-body">
8         <div class="form-group">
9             <label class="control-label" for="environmentName">Environment Name</label>
10             <input id="environmentName" class="form-control" ng-model="vm.newEnvironment.instanceName" name="instanceName" data-tests-id="environment-name" placeholder="Enter environment name" required>
11         </div>
12         <div class="form-group">
13             <label class="control-label" for="ecompInstanceId">ECOMP Environment ID</label>
14             <select class="form-control" ng-class="{'grayedOut': !selectedIndex, 'connect-error': vm.aaiConnectError}" ng-model="selectedIndex" name="ecompInstanceId" id="ecompInstanceId" data-tests-id="ecomp-instance-id" required ng-change="vm.setEcompEnvironment(selectedIndex)">
15                 <option value="" disabled selected hidden>Select environment ID</option>
16                 <option data-tests-id="environment-id-option" class="environmentIdOption" ng-repeat="item in vm.environments" ng-value="$index">{{item.operationalEnvironmentId}}</option>
17             </select>
18         </div>
19         <div class="form-group">
20             <label class="control-label" for="ecompInstanceName">ECOMP Environment Name</label>
21             <input id="ecompInstanceName" class="form-control" ng-model="vm.newEnvironment.ecompInstanceName" name="ecompInstanceName" data-tests-id="ecomp-instance-name" required disabled>
22         </div>
23         <div class="form-group">
24             <label class="control-label" for="tenantContext">Tenant Context</label>
25             <input id="tenantContext" class="form-control" ng-model="vm.newEnvironment.tenantContext" name="tenantContext" data-tests-id="tenant-context" required disabled>
26         </div>
27         <div class="form-group">
28             <label class="control-label" for="operationalEnvironmentType">Environment Type</label>
29             <select class="form-control" ng-class="{'grayedOut': !vm.newEnvironment.operationalEnvironmentType}"  ng-model="vm.newEnvironment.operationalEnvironmentType" name="operationalEnvironmentType" id="operationalEnvironmentType" data-tests-id="operational-environment-type" required>
30                 <option value="" disabled selected hidden>Enter environment type</option>
31                 <option data-tests-id="environment-type-option" class="environmentTypeOption" ng-repeat="item in vm.environmentsTypesList" ng-value="item">{{item}}</option>
32             </select>
33         </div>
34         <div class="form-group">
35             <label class="control-label" for="workloadContext">Workload Context</label>
36             <select class="form-control" ng-class="{'grayedOut': !vm.newEnvironment.workloadContext}" ng-model="vm.newEnvironment.workloadContext" name="workloadContext" id="workloadContext" data-tests-id="workload-context" required>
37                 <option value="" disabled selected hidden>Select workload context</option>
38                 <option data-tests-id="workload-context-option" class="workloadContextOption" ng-repeat="item in vm.workloadContextList" ng-value="item">{{vm.newEnvironment.operationalEnvironmentType + '_' + item}}</option>
39             </select>
40         </div>
41         <div data-tests-id="test-new-environment-error" class="connect-error" ng-if="vm.aaiConnectError">{{vm.aaiConnectError}}</div>
42     </div>
43     <div class="modal-footer">
44         <div class="pull-right">
45             <button data-tests-id="submit-button" type="submit" id="submit" name="submit" class="btn btn-primary" data-ng-disabled="newTestEnvironment.$invalid">Create</button>
46             <button data-tests-id="cancel-button" type="button" id="cancel" name="cancel" class="btn btn-white" ng-click="vm.close()">Cancel</button>
47         </div>
48     </div>
49 </form>
50