1 import { Component } from '@angular/core';
2 import { ActivatedRoute } from '@angular/router';
5 selector: 'cd-performance-counter',
6 templateUrl: './performance-counter.component.html',
7 styleUrls: ['./performance-counter.component.scss']
9 export class PerformanceCounterComponent {
10 static defaultFromLink = '/hosts';
16 constructor(private route: ActivatedRoute) {
17 this.route.queryParams.subscribe((params: { fromLink: string }) => {
18 this.fromLink = params.fromLink || PerformanceCounterComponent.defaultFromLink;
20 this.route.params.subscribe((params: { type: string; id: string }) => {
21 this.serviceId = params.id;
22 this.serviceType = params.type;