File

src/app/ceph/performance-counter/performance-counter/performance-counter.component.ts

Metadata

selector cd-performance-counter
styleUrls ./performance-counter.component.scss
templateUrl ./performance-counter.component.html

Index

Properties

Constructor

constructor(route: ActivatedRoute)
Parameters :
Name Type Optional
route ActivatedRoute No

Properties

Static defaultFromLink
Type : string
Default value : '/hosts'
fromLink
Type : string
serviceId
Type : string
serviceType
Type : string
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

@Component({
  selector: 'cd-performance-counter',
  templateUrl: './performance-counter.component.html',
  styleUrls: ['./performance-counter.component.scss']
})
export class PerformanceCounterComponent {
  static defaultFromLink = '/hosts';

  serviceId: string;
  serviceType: string;
  fromLink: string;

  constructor(private route: ActivatedRoute) {
    this.route.queryParams.subscribe((params: { fromLink: string }) => {
      this.fromLink = params.fromLink || PerformanceCounterComponent.defaultFromLink;
    });
    this.route.params.subscribe((params: { type: string; id: string }) => {
      this.serviceId = params.id;
      this.serviceType = params.type;
    });
  }
}
<legend>{{ serviceType }}.{{ serviceId }}</legend>
<cd-table-performance-counter [serviceType]="serviceType"
                              [serviceId]="serviceId">
</cd-table-performance-counter>

./performance-counter.component.scss

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""