aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm
blob: 6983477e18bca7f8bde44f86d7263414f9de0e3a (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
<!--
============LICENSE_START=======================================================
VID
================================================================================
Copyright (C) 2017 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/networkNode.css"/>

<div class="network-wrapper-config">
    <div class="head">
        <div class="title">Config {{modelName}}</div>
        <div class="btn-wrapper">
            <button class="cancel-btn grey" data-tests-id="cancelButton" data-ng-click="cancel()">Cancel</button>
            <button class="next-btn blue" data-tests-id="nextButton" data-ng-disabled="networkNodeForm.$invalid" data-ng-click="next()">Next</button>
        </div>
    </div>

    <div class="content-wrapper">
        <div class="content">
            <form name="networkNodeForm" class="form-wrapper">
                <div class="instance-field {{field.id}}" ng-repeat="(key, field) in nodeTemplateFields">
                    <input id="{{field.id}}" data-tests-id="suppressRollbackInput" ng-if="key === 'suppressRollback'" type="checkbox" ng-model="field.value"/>
                    <label for="{{field.id}}"class="title" ng-if="key !== 'lineOfBusiness' && key !== 'platform'">
                        {{field.name}}
                    </label>
                    <div class="" ng-if="key === 'instanceName'">
                        <input data-tests-id="instanceNameInput" name="{{field.id}}" id="{{field.id}}" type="text" required ng-model="field.value" ng-pattern="regexInstanceName">
                        <span class="error" data-ng-show="!networkNodeForm.instanceName.$error.required && networkNodeForm.instanceName.$dirty && networkNodeForm.instanceName.$invalid">{{errorMsg}}</span>
                    </div>
                    <select id="{{field.id}}" data-tests-id="regionDropDown" ng-if="key === 'lcpRegion'" required ng-model="field.value"
                            placeholder="Choose {{field.name}}"
                            data-ng-change="setTenant(field)">
                        <option value="" selected>LCP region</option>
                        <option data-ng-disabled="!option.isPermitted" ng-repeat="option in field.optionList"
                                value="{{option.id}}" data-tests-id="{{'region-' + option.id}}">{{option.id}}</option>
                    </select>
                    <select id="{{field.id}}" data-tests-id="tenantDropDown" ng-if="key === 'tenant'" required ng-model="field.value"
                            data-ng-options="option.tenantName for option in field.optionList" placeholder="Choose {{field.name}}"
                            data-ng-disabled="!field.optionList || !field.optionList.length">
                        <option value="" selected>Tenant name</option>
                    </select>
                </div>
            </form>
        </div>
        <div class="sidebar-right">
            <service-metadata title-txt="info" service-metadata-fields="serviceMetadataFields"></service-metadata>
        </div>
    </div>
</div>