]>
Commit | Line | Data |
---|---|---|
1 | import { Component, Input, ViewChild } from '@angular/core'; | |
2 | ||
3 | import { TabsetComponent } from 'ngx-bootstrap/tabs'; | |
4 | ||
5 | import { CdTableSelection } from '../../../../shared/models/cd-table-selection'; | |
6 | import { Permissions } from '../../../../shared/models/permissions'; | |
7 | ||
8 | @Component({ | |
9 | selector: 'cd-host-details', | |
10 | templateUrl: './host-details.component.html', | |
11 | styleUrls: ['./host-details.component.scss'] | |
12 | }) | |
13 | export class HostDetailsComponent { | |
14 | @Input() | |
15 | permissions: Permissions; | |
16 | ||
17 | @Input() | |
18 | selection: CdTableSelection; | |
19 | ||
20 | @ViewChild(TabsetComponent, { static: false }) | |
21 | tabsetChild: TabsetComponent; | |
22 | ||
23 | get selectedHostname(): string { | |
24 | return this.selection.hasSelection ? this.selection.first()['hostname'] : null; | |
25 | } | |
26 | ||
27 | constructor() {} | |
28 | } |