blob: 552574f1a920a23480bc048e72591cccc659f943 [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';
17import { TableBaseImpl, SortDir } from '../../../fw/widget/table.base';
18import { WebSocketService } from '../../../fw/remote/websocket.service';
19import { LogService } from '../../../log.service';
20import { LoadingService } from '../../../fw/layer/loading.service';
21import { FnService } from '../../../fw/util/fn.service';
22import { ActivatedRoute } from '@angular/router';
23
24/**
25* ONOS GUI -- Partition View Component extends TableBaseImpl
26*/
27@Component({
28 selector: 'onos-partition',
29 templateUrl: './partition.component.html',
30 styleUrls: ['./partition.component.css', '../../../fw/widget/table.css', '../../../fw/widget/table.theme.css']
31})
32export class PartitionComponent extends TableBaseImpl implements OnInit, OnDestroy {
33
34 constructor(
35 protected fs: FnService,
36 protected log: LogService,
37 protected ls: LoadingService,
38 protected as: ActivatedRoute,
39 protected wss: WebSocketService,
40 ) {
41 super(fs, ls, log, wss, 'partition');
42 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}