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"> |
| 21 | <h1>Enterprise Network Map</h1> |
| 22 | <div map-lazy-load="https://maps.googleapis.com/maps/api/js?key=AIzaSyA3rQOp26I5a21VQhwLal8Z1x3XGHjXfm4"> |
| 23 | <ng-map |
| 24 | default-style="false" |
| 25 | id="foobar" |
| 26 | center="0,0" |
| 27 | disable-default-u-i="true" |
| 28 | map-type-id="ROADMAP" |
| 29 | zoom-control="true" |
| 30 | min-zoom="2" |
| 31 | styles="{{vm.mapStyles}}" |
| 32 | > |
Max Chu | dd0b2e1 | 2017-09-06 08:49:21 -0700 | [diff] [blame^] | 33 | |
Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 34 | <marker |
| 35 | ng-repeat="uni in vm.unis" |
| 36 | id="marker-{{uni.id}}" |
| 37 | position="{{uni.latlng.toString()}}" |
| 38 | icon="{{vm.MapConfig.marker}}" |
| 39 | on-click="vm.showUni(uni)" |
| 40 | > |
| 41 | </marker> |
| 42 | |
Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 43 | <info-window id = "uni-info"> |
| 44 | <div class = "marker-info"> |
| 45 | <h4>{{vm.current_uni.name}}</h4> |
| 46 | <p> |
| 47 | <b>LatLng: </b>{{vm.current_uni.latlng.toString()}}<br/> |
| 48 | <b>Cpe id: </b>{{vm.current_uni.cpe_id}}<br/> |
| 49 | <b>Tenant: </b>{{vm.current_uni.tenant}}<br/> |
| 50 | </p> |
| 51 | <button ng-show="vm.canCreateEline" ng-click="vm.createConnection(vm.current_uni)()">Create connection</button> |
| 52 | <button ng-show="!vm.canCreateEline && !uni.eline_start" ng-click="vm.finishConnection(vm.current_uni)">Finish connection</button> |
| 53 | </div> |
| 54 | </info-window> |
| 55 | |
Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame] | 56 | <shape |
| 57 | ng-repeat="eline in vm.elines" |
| 58 | name="polyline" |
| 59 | id="eline-{{eline.id}}" |
| 60 | path="{{eline.path}}" |
| 61 | stroke-color="{{vm.colorLine(eline.backend_status)}}" |
| 62 | stroke-opacity="1.0" |
| 63 | stroke-weight="5" |
| 64 | on-click="vm.elinePanel({{eline}}, true)" |
| 65 | > |
| 66 | </shape> |
| 67 | |
| 68 | </ng-map> |
| 69 | |
| 70 | </div> |
| 71 | Changes may not display until page refresh. |
| 72 | </div> |
| 73 | </div> |