Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | import { Component, OnDestroy, OnInit } from '@angular/core'; |
Sean Condon | 5ca0026 | 2018-09-06 17:55:25 +0100 | [diff] [blame] | 17 | import { |
| 18 | FnService, |
Sean Condon | 5ca0026 | 2018-09-06 17:55:25 +0100 | [diff] [blame] | 19 | LogService, |
| 20 | WebSocketService, |
Sean Condon | 95fb574 | 2019-04-02 12:16:55 +0100 | [diff] [blame] | 21 | SortDir, TableBaseImpl |
Sean Condon | 5ca0026 | 2018-09-06 17:55:25 +0100 | [diff] [blame] | 22 | } from 'gui2-fw-lib'; |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 23 | import { 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', |
| 31 | styleUrls: ['./partition.component.css', '../../../fw/widget/table.css', '../../../fw/widget/table.theme.css'] |
| 32 | }) |
| 33 | export class PartitionComponent extends TableBaseImpl implements OnInit, OnDestroy { |
| 34 | |
| 35 | constructor( |
| 36 | protected fs: FnService, |
| 37 | protected log: LogService, |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 38 | protected as: ActivatedRoute, |
| 39 | protected wss: WebSocketService, |
| 40 | ) { |
Sean Condon | 95fb574 | 2019-04-02 12:16:55 +0100 | [diff] [blame] | 41 | super(fs, log, wss, 'partition'); |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 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 | } |