blob: 8644ac1f1b2cc665ad10267e3d78f1013dd1a8d1 [file] [log] [blame]
Sean Condonf4f54a12018-10-10 23:25:46 +01001<!--
Sean Condon91481822019-01-01 13:56:14 +00002~ Copyright 2019-present Open Networking Foundation
Sean Condonf4f54a12018-10-10 23:25:46 +01003~
4~ Licensed under the Apache License, Version 2.0 (the "License");
5~ you may not use this file except in compliance with the License.
6~ You may obtain a copy of the License at
7~
8~ http://www.apache.org/licenses/LICENSE-2.0
9~
10~ Unless required by applicable law or agreed to in writing, software
11~ distributed under the License is distributed on an "AS IS" BASIS,
12~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13~ See the License for the specific language governing permissions and
14~ limitations under the License.
15-->
Sean Condon91481822019-01-01 13:56:14 +000016<!-- Template explaination - Add in the flash message component - and link it to
17the local variable - this is used to display messages when keyboard shortcuts are pressed
18-->
Sean Condonf4f54a12018-10-10 23:25:46 +010019<onos-flash id="topoMsgFlash" message="{{ flashMsg }}" (closed)="flashMsg = ''"></onos-flash>
20
Sean Condonb2c483c2019-01-16 20:28:55 +000021<onos-quickhelp id="topoQuickHelp"></onos-quickhelp>
Sean Condon91481822019-01-01 13:56:14 +000022<!-- Template explanation - Add in the Panel components for the Topology view
23 These are referenced inside the typescript by @ViewChild and their label
24-->
Sean Condonb2c483c2019-01-16 20:28:55 +000025<onos-instance #instance [divTopPx]="80"
26 (mastershipEvent)="force.onosInstMastership = $event"
27 [on]="prefsState.insts">
28</onos-instance>
29<onos-summary #summary [on]="prefsState.summary"></onos-summary>
30<onos-toolbar #toolbar
31 (buttonEvent)="toolbarButtonClicked($event)"
32 [on]="prefsState.toolbar"
33 [backgroundVisible]="prefsState.bg"
34 [detailsVisible]="prefsState.detail"
35 [hostsVisible]="prefsState.hosts"
36 [instancesVisible]="prefsState.insts"
37 [portsVisible]="prefsState.porthl"
38 [summaryVisible]="prefsState.summary">
39</onos-toolbar>
40<onos-details #details [on]="prefsState.detail"></onos-details>
Sean Condon0d064ec2019-02-04 21:53:53 +000041<onos-mapselector *ngIf="mapSelShown" (chosenMap)="changeMap($event)"></onos-mapselector>
Sean Condonf4f54a12018-10-10 23:25:46 +010042
43<div id="ov-topo2">
Sean Condon91481822019-01-01 13:56:14 +000044 <!-- Template explanation -
45 Line 0) This is the root of the whole SVG canvas of the Topology View - all
46 components beneath it are SVG components only (no HTML)
47 line 1) the No Devices Connected banner is shown if the force component
48 (from line 4) does not contain any devices
49 line 2) Create an SVG Grouping and apply the onosZoomableOf directive to it,
50 passing in the whole SVG canvas (#svgZoom)
51 line 3) Add in the Background Svg Component (if showBackground is true - toggled
52 by toolbar and by keyboard shortcut 'B'
53 line 4) Add in the layer of the Force Svg Component. If any item is selected on it, pass
54 to the details view and deselect all others. This is node and line graph
55 whose contents are supplied through the Topology Service, and whose positions
56 are driven by the d3.force engine
57 -->
Sean Condon71910542019-02-16 18:16:42 +000058 <svg:svg #svgZoom xmlns:svg="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" id="topo2"
59 preserveAspectRatio="xMaxYMax none">
Sean Condon91481822019-01-01 13:56:14 +000060 <svg:desc>The main SVG canvas of the Topology View</svg:desc>
61 <svg:g *ngIf="force.regionData?.devices[0].length +
62 force.regionData?.devices[1].length +
63 force.regionData?.devices[2].length=== 0"
64 onos-nodeviceconnected />
Sean Condon0c577f62018-11-18 22:40:05 +000065 <svg:g id="topo-zoomlayer" onosZoomableOf [zoomableOf]="svgZoom">
Sean Condon91481822019-01-01 13:56:14 +000066 <svg:desc>A logical layer that allows the main SVG canvas to be zoomed and panned</svg:desc>
Sean Condon71910542019-02-16 18:16:42 +000067 <svg:g #gridFull *ngIf="prefsState.grid == 1 || prefsState.grid == 3" onos-gridsvg>
68 </svg:g>
69 <svg:g #geoGrid *ngIf="prefsState.grid == 2 || prefsState.grid == 3"
70 onos-gridsvg [horizLowerLimit]="-180" [horizUpperLimit]="180"
71 [vertLowerLimit]="-75" [vertUpperLimit]="75" [spacing]="15"
72 [invertVertical]="true" [fit]="'fit1000high'" [aspectRatio]="0.83333"
73 [gridcolor]="'#bfe7fb'">
74 </svg:g>
Sean Condon1ae15802019-03-02 09:07:18 +000075 <svg:g *ngIf="prefsState.bg"
76 onos-backgroundsvg [map]="mapIdState" (zoomlevel)="mapExtentsZoom($event)">
Sean Condonb2c483c2019-01-16 20:28:55 +000077 <svg:desc>The Background SVG component - contains maps</svg:desc>
78 </svg:g>
79 <svg:g #force onos-forcesvg
80 [deviceLabelToggle]="prefsState.dlbls"
81 [hostLabelToggle]="prefsState.hlbls"
82 [showHosts]="prefsState.hosts"
83 [highlightPorts]="prefsState.porthl"
Sean Condon1ae15802019-03-02 09:07:18 +000084 [scale]="1 / (2 * zoomDirective.zoomCached.sc)"
Sean Condonb2c483c2019-01-16 20:28:55 +000085 (selectedNodeEvent)="nodeSelected($event)">
86 <svg:desc>The Force SVG component - contains all the devices, hosts and links</svg:desc>
87 </svg:g>
Sean Condon55c30532018-10-29 12:26:57 +000088 </svg:g>
Sean Condon0c577f62018-11-18 22:40:05 +000089 </svg:svg>
Sean Condonf4f54a12018-10-10 23:25:46 +010090</div>
91
92<div id="breadcrumbs"></div>