File
Implements
Metadata
selector |
cd-host-details |
styleUrls |
./host-details.component.scss |
templateUrl |
./host-details.component.html |
Index
Properties
|
|
Methods
|
|
Inputs
|
|
Methods
ngOnChanges
|
ngOnChanges()
|
|
|
import { Component, Input, OnChanges } from '@angular/core';
import { CdTableSelection } from '../../../../shared/models/cd-table-selection';
import { Permission } from '../../../../shared/models/permissions';
import { AuthStorageService } from '../../../../shared/services/auth-storage.service';
@Component({
selector: 'cd-host-details',
templateUrl: './host-details.component.html',
styleUrls: ['./host-details.component.scss']
})
export class HostDetailsComponent implements OnChanges {
grafanaPermission: Permission;
@Input()
selection: CdTableSelection;
host: any;
constructor(private authStorageService: AuthStorageService) {
this.grafanaPermission = this.authStorageService.getPermissions().grafana;
}
ngOnChanges() {
if (this.selection.hasSelection) {
this.host = this.selection.first();
}
}
}
<tabset *ngIf="selection.hasSingleSelection && grafanaPermission.read">
<tab i18n-heading
heading="Performance Details">
<cd-grafana [grafanaPath]="'host-details?var-ceph_hosts=' + host['hostname']"
uid="7IGu2Ttmz"
grafanaStyle="three">
</cd-grafana>
</tab>
</tabset>
Legend
Html element with directive