blob: 6fe0cb1a54ba3cbc5c946064cb4fdb47a9ff0785 [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 Condon91481822019-01-01 13:56:14 +000021<!-- Template explanation - Add in the Panel components for the Topology view
22 These are referenced inside the typescript by @ViewChild and their label
23-->
Sean Condonaa4366d2018-11-02 14:29:01 +000024<onos-instance #instance [divTopPx]="80" (mastershipEvent)="force.onosInstMastership = $event"></onos-instance>
Sean Condonf4f54a12018-10-10 23:25:46 +010025<onos-summary #summary></onos-summary>
Sean Condon91481822019-01-01 13:56:14 +000026<onos-toolbar #toolbar (buttonEvent)="toolbarButtonClicked($event)"></onos-toolbar>
Sean Condonf4f54a12018-10-10 23:25:46 +010027<onos-details #details></onos-details>
28
29<div id="ov-topo2">
Sean Condon91481822019-01-01 13:56:14 +000030 <!-- Template explanation -
31 Line 0) This is the root of the whole SVG canvas of the Topology View - all
32 components beneath it are SVG components only (no HTML)
33 line 1) the No Devices Connected banner is shown if the force component
34 (from line 4) does not contain any devices
35 line 2) Create an SVG Grouping and apply the onosZoomableOf directive to it,
36 passing in the whole SVG canvas (#svgZoom)
37 line 3) Add in the Background Svg Component (if showBackground is true - toggled
38 by toolbar and by keyboard shortcut 'B'
39 line 4) Add in the layer of the Force Svg Component. If any item is selected on it, pass
40 to the details view and deselect all others. This is node and line graph
41 whose contents are supplied through the Topology Service, and whose positions
42 are driven by the d3.force engine
43 -->
Sean Condon0c577f62018-11-18 22:40:05 +000044 <svg:svg #svgZoom xmlns:svg="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" id="topo2">
Sean Condon91481822019-01-01 13:56:14 +000045 <svg:desc>The main SVG canvas of the Topology View</svg:desc>
46 <svg:g *ngIf="force.regionData?.devices[0].length +
47 force.regionData?.devices[1].length +
48 force.regionData?.devices[2].length=== 0"
49 onos-nodeviceconnected />
Sean Condon0c577f62018-11-18 22:40:05 +000050 <svg:g id="topo-zoomlayer" onosZoomableOf [zoomableOf]="svgZoom">
Sean Condon91481822019-01-01 13:56:14 +000051 <svg:desc>A logical layer that allows the main SVG canvas to be zoomed and panned</svg:desc>
Sean Condon50855cf2018-12-23 15:37:42 +000052 <svg:g *ngIf="showBackground" onos-backgroundsvg/>
Sean Condon0c577f62018-11-18 22:40:05 +000053 <svg:g #force onos-forcesvg (selectedNodeEvent)="nodeSelected($event)"/>
Sean Condon55c30532018-10-29 12:26:57 +000054 </svg:g>
Sean Condon0c577f62018-11-18 22:40:05 +000055 </svg:svg>
Sean Condonf4f54a12018-10-10 23:25:46 +010056</div>
57
58<div id="breadcrumbs"></div>