aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm
blob: e2261dc119e08ae506ee925811308478817df8f6 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!--
============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"/>
<link rel="stylesheet" type="text/css" href="app/vid/styles/serviceProxyConfig.css"/>
<div class="service-wrapper-config network-wrapper-config">
    <div class="head">
        <div class="title">Config {{modelName}}</div>
        <div class="btn-wrapper">
            <button class="cancel-btn grey" data-tests-id="backButton" data-ng-click="back()">Back</button>
            <button class="create-btn blue" data-tests-id="createButton" data-ng-disabled="proxiesInstanceName.$invalid|| disableCreate" data-ng-click="create()">Create</button>
        </div>
    </div>

    <div class="content-wrapper">
        <div class="content">
            <div class="diagram">
                <div class="diagram-img">
                    <div class="circle service-circle">
                        <span class="text">Source<br>Service proxy</span>
                    </div>
                    <div class="dotted-line" data-ng-class="{'checked': sourceInstance, 'unchecked': !sourceInstance}">
                        <span class="conn-circle sprite" data-tests-id="sourceInstanceSelectedIcon" data-ng-class="{'valid-large': sourceInstance}"></span>
                    </div>
                    <div class="circle config-circle">
                        <span class="line"></span>
                    </div>
                    <div class="dotted-line" data-ng-class="{'checked': collectorInstance, 'unchecked': !collectorInstance}">
                        <span class="conn-circle sprite" data-tests-id="collectorInstanceSelectedIcon" data-ng-class="{'valid-large': collectorInstance}"></span>
                    </div>
                    <div class="circle service-circle">
                        <span class="text">Collector<br>Service proxy</span>
                    </div>
                </div>
                <div class="element-name-wrapper">
                    <div class="element-name service" data-ng-click="openMetadataModal('sourceMetadata')">
                        <span class="label-txt" data-tests-id="sourceInstanceName">{{sourceInstanceName}} <span class="info" data-tests-id="sourceInfoButton">i</span></span>

                    </div>
                    <div class="element-name config">
                        <span class="label-txt" data-tests-id="modelName">{{modelName}}</span>
                    </div>
                    <div class="element-name  service"  data-ng-click="openMetadataModal('collectorMetadata')">
                        <span class="label-txt" data-tests-id="collectorInstanceName">{{collectorInstanceName}}<span class="info" data-tests-id="collectorInfoButton">i</span></span>

                    </div>
                </div>
            </div>
            <form name="proxiesInstanceName" class="bottom">
                <div class="wrapper-list source-vnf">
                    <div class="title-txt"><b>Source</b> Service Type</div>
                    <select ng-model="sourceServiceType"
                            ng-change="onSourceServiceTypeSelected()" name="sourceServiceType" id="sourceServiceType"
                            ng-options="item['service-type'] disable when !(item['is-permitted']) for item in serviceTypes"
                            required data-tests-id="sourceServiceType">
                        <option value="" disabled>Select service type</option>
                    </select>

                    <div class="title-txt select-vnf-title">VNF providing <b>source</b> requirements</div>
                    <select ng-model="sourceInstance" name="source" ng-disabled="sourceInstanceList === null" required  data-tests-id="sourceDropDown">
                        <option value="" selected>Type/Select VNF name</option>
                        <option ng-repeat="option in sourceInstanceList" data-tests-id="{{'source-' + option.id}}"
                                value="{{option.id}}">{{option['properties']['vnf-name']}}</option>
                    </select>
                    <span class="no-results" data-tests-id="sourceNoResults" ng-show="sourceNoResults">No vnf instances found.</span>
                </div>

                <div class="wrapper-list collector-{{collectorType}}">
                    <div class="title-txt ng-hide-keep-block" ng-hide="collectorType==='pnf'"><b>Collector</b> Service Type</div>
                    <select ng-model="collectorServiceType" ng-hide="collectorType==='pnf'" class="ng-hide-keep-block"
                            ng-change="onCollectorServiceTypeSelected()" name="collectorServiceType" id="collectorServiceType"
                            ng-options="item['service-type'] disable when !(item['is-permitted']) for item in serviceTypes"
                            required data-tests-id="collectorServiceType">
                        <option value="" disabled>Select service type</option>
                    </select>

                    <div class="title-txt select-vnf-title">{{collectorType.toUpperCase()}} providing <b>collector</b> requirements</div>
                    <select ng-model="collectorInstance" name="collector" ng-disabled="collectorInstanceList === null" required data-tests-id="collectorDropDown">
                        <option value="" selected>Type/Select {{collectorType.toUpperCase()}} name</option>
                        <option ng-repeat="option in collectorInstanceList" data-tests-id="{{'collector-' + option.id}}"
                                value="{{option.id}}">{{option['properties'][collectorType=='vnf' ? 'vnf-name' : 'pnfName']}}</option>
                    </select>
                    <span class="no-results" data-tests-id="collectorNoResults" ng-show="collectorNoResults">No {{collectorType}} instances found.</span>
                </div>
            </form>
        </div>

        <div class="sidebar-right">
            <service-metadata title-txt="info" service-metadata-fields="serviceMetadataFields"></service-metadata>
        </div>
    </div>
</div>