File

src/app/ceph/cluster/hosts/host-details/host-details.component.ts

Implements

OnChanges

Metadata

selector cd-host-details
styleUrls ./host-details.component.scss
templateUrl ./host-details.component.html

Index

Properties
Methods
Inputs

Constructor

constructor(authStorageService: AuthStorageService)
Parameters :
Name Type Optional
authStorageService AuthStorageService No

Inputs

selection
Type : CdTableSelection

Methods

ngOnChanges
ngOnChanges()
Returns : void

Properties

grafanaPermission
Type : Permission
host
Type : any
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>

./host-details.component.scss

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""