blob: dd2a509bc6bfae72cf43bd46650162148efde446 [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,
Sean Condon5ca00262018-09-06 17:55:25 +010019 LogService,
20 WebSocketService,
Sean Condon95fb5742019-04-02 12:16:55 +010021 SortDir, TableBaseImpl
Sean Condon98b6ddb2019-12-24 08:07:40 +000022} from '../../../../../../../../gui2-fw-lib/public_api';
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053023import { ActivatedRoute } from '@angular/router';
24
25/**
26* ONOS GUI -- Partition View Component extends TableBaseImpl
27*/
28@Component({
29 selector: 'onos-partition',
30 templateUrl: './partition.component.html',
Sean Condon98b6ddb2019-12-24 08:07:40 +000031 styleUrls: ['./partition.component.css', '../../../../../../../../gui2-fw-lib/lib/widget/table.css', '../../../../../../../../gui2-fw-lib/lib/widget/table.theme.css']
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053032})
33export class PartitionComponent extends TableBaseImpl implements OnInit, OnDestroy {
34
35 constructor(
36 protected fs: FnService,
37 protected log: LogService,
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053038 protected as: ActivatedRoute,
39 protected wss: WebSocketService,
40 ) {
Sean Condon95fb5742019-04-02 12:16:55 +010041 super(fs, log, wss, 'partition');
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053042 this.sortParams = {
43 firstCol: 'name',
44 firstDir: SortDir.desc,
45 secondCol: 'term',
46 secondDir: SortDir.asc,
47 };
48 }
49
50 ngOnInit() {
51 this.init();
52 this.log.debug('PartitionComponent initialized');
53 }
54
55 ngOnDestroy() {
56 this.destroy();
57 this.log.debug('PartitionComponent destroyed');
58 }
59
60}