blob: e07f30402bb6b8ed1956d75b1d3f5544ab677c33 [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 {
Sean Condon0c577f62018-11-18 22:40:05 +000047 NONE = 'none',
Sean Condonaa4366d2018-11-02 14:29:01 +000048 GEO = 'geo',
49 GRID = 'grid'
50}
51
52/**
53 * model of the topo2CurrentLayout WebSocket response
54 */
55export interface Layout {
56 id: string;
57 bgDefaultScale: number;
58 bgDesc: string;
59 bgFilePath: string;
60 bgId: string;
61 bgType: LocationType;
62 bgWarn: string;
63 bgZoom: BgZoom;
64 crumbs: LayoutCrumb[];
65 parent: string;
66 region: string;
67 regionName: string;
68}
69
70/**
Sean Condonf4f54a12018-10-10 23:25:46 +010071 * ONOS GUI -- Topology Background Layer View.
72 */
73@Component({
74 selector: '[onos-backgroundsvg]',
75 templateUrl: './backgroundsvg.component.html',
76 styleUrls: ['./backgroundsvg.component.css']
77})
78export class BackgroundSvgComponent implements OnInit {
79
Sean Condonaa4366d2018-11-02 14:29:01 +000080 layoutData: Layout = <Layout>{};
81
Sean Condonf4f54a12018-10-10 23:25:46 +010082 constructor() { }
83
84 ngOnInit() {
85 }
86
Sean Condonaa4366d2018-11-02 14:29:01 +000087
88
Sean Condonf4f54a12018-10-10 23:25:46 +010089}