blob: 935b2ce3dcd0f975d374e234e25a3b65cda2c0b3 [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 */
Sean Condon0c577f62018-11-18 22:40:05 +000016import {Component, Input, OnInit} from '@angular/core';
Sean Condonf4f54a12018-10-10 23:25:46 +010017import { animate, state, style, transition, trigger } from '@angular/animations';
18import {
19 LogService,
20 LoadingService,
21 FnService,
22 DetailsPanelBaseImpl,
23 WebSocketService
24} from 'gui2-fw-lib';
Sean Condon0c577f62018-11-18 22:40:05 +000025import {Node} from '../../layer/forcesvg/models';
Sean Condonf4f54a12018-10-10 23:25:46 +010026
27/*
28 ONOS GUI -- Topology Details Panel.
29 Displays details of selected device.
30 */
31@Component({
32 selector: 'onos-details',
33 templateUrl: './details.component.html',
34 styleUrls: [
35 './details.component.css', './details.theme.css',
36 '../../topology.common.css',
37 '../../../../fw/widget/panel.css', '../../../../fw/widget/panel-theme.css'
38 ],
39 animations: [
40 trigger('detailsPanelState', [
41 state('true', style({
42 transform: 'translateX(0%)',
43 opacity: '100'
44 })),
45 state('false', style({
46 transform: 'translateX(100%)',
47 opacity: '0'
48 })),
49 transition('0 => 1', animate('100ms ease-in')),
50 transition('1 => 0', animate('100ms ease-out'))
51 ])
52 ]
53})
54export class DetailsComponent extends DetailsPanelBaseImpl implements OnInit {
Sean Condon0c577f62018-11-18 22:40:05 +000055 @Input() selectedNode: Node = undefined;
Sean Condonf4f54a12018-10-10 23:25:46 +010056
57 constructor(
58 protected fs: FnService,
59 protected log: LogService,
60 protected ls: LoadingService,
61 protected wss: WebSocketService,
62 ) {
63 super(fs, ls, log, wss, 'topo');
64 this.log.debug('InstanceComponent constructed');
65 }
66
67 ngOnInit() {
Sean Condon55c30532018-10-29 12:26:57 +000068 this.on = false;
Sean Condonf4f54a12018-10-10 23:25:46 +010069 }
70
71}