blob: ff6f99a555c81f1e8f1c69c15cd93a410202ac1d [file] [log] [blame]
Sean Condonf4f54a12018-10-10 23:25:46 +01001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
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 */
16import { Component, OnInit } from '@angular/core';
17
18/**
Sean Condonaa4366d2018-11-02 14:29:01 +000019 * model of the topo2CurrentLayout attrs from BgZoom below
20 */
21export interface BgZoomAttrs {
22 offsetX: number;
23 offsetY: number;
24 scale: number;
25}
26
27/**
28 * model of the topo2CurrentLayout background zoom attrs from Layout below
29 */
30export interface BgZoom {
31 cfg: BgZoomAttrs;
32 usr?: BgZoomAttrs;
33}
34
35/**
36 * model of the topo2CurrentLayout breadcrumb from Layout below
37 */
38export interface LayoutCrumb {
39 id: string;
40 name: string;
41}
42
43/**
44 * Enum of the topo2CurrentRegion location type from Location below
45 */
46export enum LocationType {
47 GEO = 'geo',
48 GRID = 'grid'
49}
50
51/**
52 * model of the topo2CurrentLayout WebSocket response
53 */
54export interface Layout {
55 id: string;
56 bgDefaultScale: number;
57 bgDesc: string;
58 bgFilePath: string;
59 bgId: string;
60 bgType: LocationType;
61 bgWarn: string;
62 bgZoom: BgZoom;
63 crumbs: LayoutCrumb[];
64 parent: string;
65 region: string;
66 regionName: string;
67}
68
69/**
Sean Condonf4f54a12018-10-10 23:25:46 +010070 * ONOS GUI -- Topology Background Layer View.
71 */
72@Component({
73 selector: '[onos-backgroundsvg]',
74 templateUrl: './backgroundsvg.component.html',
75 styleUrls: ['./backgroundsvg.component.css']
76})
77export class BackgroundSvgComponent implements OnInit {
78
Sean Condonaa4366d2018-11-02 14:29:01 +000079 layoutData: Layout = <Layout>{};
80
Sean Condonf4f54a12018-10-10 23:25:46 +010081 constructor() { }
82
83 ngOnInit() {
84 }
85
Sean Condonaa4366d2018-11-02 14:29:01 +000086
87
Sean Condonf4f54a12018-10-10 23:25:46 +010088}