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