blob: aec5e851821eed428b575c39d5339ca758506feb [file] [log] [blame]
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +05301/*
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, OnDestroy, OnInit } from '@angular/core';
Sean Condon5ca00262018-09-06 17:55:25 +010017import {
18 FnService,
19 LoadingService,
20 LogService,
21 WebSocketService,
22 SortDir, TableBaseImpl, TableResponse
23} from 'gui2-fw-lib';
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053024import { ActivatedRoute } from '@angular/router';
25
26/**
27* ONOS GUI -- Partition View Component extends TableBaseImpl
28*/
29@Component({
30 selector: 'onos-partition',
31 templateUrl: './partition.component.html',
32 styleUrls: ['./partition.component.css', '../../../fw/widget/table.css', '../../../fw/widget/table.theme.css']
33})
34export class PartitionComponent extends TableBaseImpl implements OnInit, OnDestroy {
35
36 constructor(
37 protected fs: FnService,
38 protected log: LogService,
39 protected ls: LoadingService,
40 protected as: ActivatedRoute,
41 protected wss: WebSocketService,
42 ) {
43 super(fs, ls, log, wss, 'partition');
44 this.sortParams = {
45 firstCol: 'name',
46 firstDir: SortDir.desc,
47 secondCol: 'term',
48 secondDir: SortDir.asc,
49 };
50 }
51
52 ngOnInit() {
53 this.init();
54 this.log.debug('PartitionComponent initialized');
55 }
56
57 ngOnDestroy() {
58 this.destroy();
59 this.log.debug('PartitionComponent destroyed');
60 }
61
62}