blob: 80d16498078964c7a38489c653beeee52a85362b [file] [log] [blame]
Andrea Campanella95c02bd2017-09-01 16:51:03 +02001
2<!--
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17
18
19<div class = "row">
20 <div class = "col-xs-12">
Max Chu98dc2c32017-09-08 17:21:38 -070021 <h1>vNaaS Map</h1>
22 <!--
23 In China, replace 'https://maps.googleapis.com/' with 'http://maps.google.cn/' below
24 -->
Andrea Campanella95c02bd2017-09-01 16:51:03 +020025 <div map-lazy-load="https://maps.googleapis.com/maps/api/js?key=AIzaSyA3rQOp26I5a21VQhwLal8Z1x3XGHjXfm4">
26 <ng-map
27 default-style="false"
28 id="foobar"
29 center="0,0"
30 disable-default-u-i="true"
31 map-type-id="ROADMAP"
32 zoom-control="true"
33 min-zoom="2"
34 styles="{{vm.mapStyles}}"
35 >
Max Chudd0b2e12017-09-06 08:49:21 -070036
Andrea Campanella95c02bd2017-09-01 16:51:03 +020037 <marker
38 ng-repeat="uni in vm.unis"
39 id="marker-{{uni.id}}"
40 position="{{uni.latlng.toString()}}"
41 icon="{{vm.MapConfig.marker}}"
42 on-click="vm.showUni(uni)"
43 >
44 </marker>
45
Andrea Campanella95c02bd2017-09-01 16:51:03 +020046 <info-window id = "uni-info">
47 <div class = "marker-info">
48 <h4>{{vm.current_uni.name}}</h4>
49 <p>
50 <b>LatLng: </b>{{vm.current_uni.latlng.toString()}}<br/>
51 <b>Cpe id: </b>{{vm.current_uni.cpe_id}}<br/>
52 <b>Tenant: </b>{{vm.current_uni.tenant}}<br/>
53 </p>
54 <button ng-show="vm.canCreateEline" ng-click="vm.createConnection(vm.current_uni)()">Create connection</button>
55 <button ng-show="!vm.canCreateEline && !uni.eline_start" ng-click="vm.finishConnection(vm.current_uni)">Finish connection</button>
56 </div>
57 </info-window>
58
Andrea Campanella95c02bd2017-09-01 16:51:03 +020059 <shape
60 ng-repeat="eline in vm.elines"
61 name="polyline"
62 id="eline-{{eline.id}}"
63 path="{{eline.path}}"
64 stroke-color="{{vm.colorLine(eline.backend_status)}}"
65 stroke-opacity="1.0"
66 stroke-weight="5"
67 on-click="vm.elinePanel({{eline}}, true)"
68 >
69 </shape>
70
71 </ng-map>
72
73 </div>
74 Changes may not display until page refresh.
75 </div>
76</div>