Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 1 | |
| 2 | <!-- |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | |
| 19 | <div class = "row"> |
| 20 | <div class = "col-xs-12"> |
Max Chu | 98dc2c3 | 2017-09-08 17:21:38 -0700 | [diff] [blame] | 21 | <h1>vNaaS Map</h1> |
| 22 | <!-- |
| 23 | In China, replace 'https://maps.googleapis.com/' with 'http://maps.google.cn/' below |
| 24 | --> |
Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 25 | <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 Chu | dd0b2e1 | 2017-09-06 08:49:21 -0700 | [diff] [blame] | 36 | |
Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 37 | <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 Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 46 | <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 Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 59 | <shape |
| 60 | ng-repeat="eline in vm.elines" |
| 61 | name="polyline" |
| 62 | id="eline-{{eline.id}}" |
| 63 | path="{{eline.path}}" |
Max Chu | d94b722 | 2017-10-03 10:13:48 -0700 | [diff] [blame] | 64 | stroke-color="{{vm.colorLine(eline.backend_code)}}" |
Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 65 | stroke-opacity="1.0" |
| 66 | stroke-weight="5" |
Max Chu | fd614ae | 2017-10-26 13:54:28 -0700 | [diff] [blame] | 67 | on-click="vm.elinePanel({{eline.id}}, true)" |
Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 68 | > |
| 69 | </shape> |
| 70 | |
| 71 | </ng-map> |
| 72 | |
| 73 | </div> |
| 74 | Changes may not display until page refresh. |
| 75 | </div> |
| 76 | </div> |