blob: 2addffeee69da4f944dc6c8a97cfdefdf1b2789d [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';
17import {
18 LogService,
19 LoadingService,
20 FnService,
21 PanelBaseImpl
22} from 'gui2-fw-lib';
Sean Condon50855cf2018-12-23 15:37:42 +000023import {animate, state, style, transition, trigger} from '@angular/animations';
Sean Condonf4f54a12018-10-10 23:25:46 +010024
25/*
26 ONOS GUI -- Topology Toolbar Module.
27 Defines modeling of ONOS toolbar.
28 */
29@Component({
30 selector: 'onos-toolbar',
31 templateUrl: './toolbar.component.html',
32 styleUrls: [
33 './toolbar.component.css', './toolbar.theme.css',
34 '../../topology.common.css',
35 '../../../../fw/widget/panel.css', '../../../../fw/widget/panel-theme.css'
Sean Condon50855cf2018-12-23 15:37:42 +000036 ],
37 animations: [
38 trigger('toolbarState', [
39 state('true', style({
40 transform: 'translateX(0%)',
41 opacity: '1.0'
42 })),
43 state('false', style({
44 transform: 'translateX(-100%)',
45 opacity: '0.0'
46 })),
47 transition('0 => 1', animate('100ms ease-in')),
48 transition('1 => 0', animate('100ms ease-out'))
49 ])
Sean Condonf4f54a12018-10-10 23:25:46 +010050 ]
51})
52export class ToolbarComponent extends PanelBaseImpl implements OnInit {
53
54 constructor(
55 protected fs: FnService,
56 protected log: LogService,
57 protected ls: LoadingService,
58 ) {
59 super(fs, ls, log);
Sean Condon50855cf2018-12-23 15:37:42 +000060 this.on = false;
Sean Condonf4f54a12018-10-10 23:25:46 +010061 this.log.debug('ToolbarComponent constructed');
62 }
63
64 ngOnInit() {
65 }
66
67}