aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html
blob: a1f1e2fc6830e6858e1258a18bf01293975e2011 (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
<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>