aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html
blob: ca51a8def2becdf821c15ac70801dda78e4fe129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!--
  ============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 Test Environment</h3>
    <span ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">&times;</span>
</div>
<form class="form-create" data-tests-id="test-new-environment-form" name="newTestEnvironment" ng-submit="vm.createEnvironment()">
    <div class="modal-body">
        <div class="form-group">
            <label class="control-label" for="environmentName">Environment Name</label>
            <input id="environmentName" class="form-control" ng-model="vm.newEnvironment.instanceName" name="instanceName" data-tests-id="environment-name" placeholder="Enter environment name" required>
        </div>
        <div class="form-group">
            <label class="control-label" for="ecompInstanceId">ECOMP Environment ID</label>
            <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)">
                <option value="" disabled selected hidden>Select environment ID</option>
                <option data-tests-id="environment-id-option" class="environmentIdOption" ng-repeat="item in vm.environments" ng-value="$index">{{item.operationalEnvironmentId}}</option>
            </select>
        </div>
        <div class="form-group">
            <label class="control-label" for="ecompInstanceName">ECOMP Environment Name</label>
            <input id="ecompInstanceName" class="form-control" ng-model="vm.newEnvironment.ecompInstanceName" name="ecompInstanceName" data-tests-id="ecomp-instance-name" required disabled>
        </div>
        <div class="form-group">
            <label class="control-label" for="tenantContext">Tenant Context</label>
            <input id="tenantContext" class="form-control" ng-model="vm.newEnvironment.tenantContext" name="tenantContext" data-tests-id="tenant-context" required disabled>
        </div>
        <div class="form-group">
            <label class="control-label" for="operationalEnvironmentType">Environment Type</label>
            <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>
                <option value="" disabled selected hidden>Enter environment type</option>
                <option data-tests-id="environment-type-option" class="environmentTypeOption" ng-repeat="item in vm.environmentsTypesList" ng-value="item">{{item}}</option>
            </select>
        </div>
        <div class="form-group">
            <label class="control-label" for="workloadContext">Workload Context</label>
            <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>
                <option value="" disabled selected hidden>Select workload context</option>
                <option data-tests-id="workload-context-option" class="workloadContextOption" ng-repeat="item in vm.workloadContextList" ng-value="item">{{vm.newEnvironment.operationalEnvironmentType + '_' + item}}</option>
            </select>
        </div>
        <div data-tests-id="test-new-environment-error" class="connect-error" ng-if="vm.aaiConnectError">{{vm.aaiConnectError}}</div>
    </div>
    <div class="modal-footer">
        <div class="pull-right">
            <button data-tests-id="submit-button" type="submit" id="submit" name="submit" class="btn btn-primary" data-ng-disabled="newTestEnvironment.$invalid">Create</button>
            <button data-tests-id="cancel-button" type="button" id="cancel" name="cancel" class="btn btn-white" ng-click="vm.close()">Cancel</button>
        </div>
    </div>
</form>