import { Component } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
import { BreadcrumbService } from '@app/commons/service/breadcrumb.service';

@Component({
  selector: 'of-pages-probe-list',
  templateUrl: './probe-list-page.component.html',
})
export class ProbeListPageComponent {

  constructor(
    private router: Router,
    private route: ActivatedRoute,
    private breadcrumbService: BreadcrumbService
  ) {
    this.breadcrumbService.setItems([
      { label: 'Probe', routerLink: ['/probe/list'],  }
    ]);
  }

  onProbeSelect(probeHost: ProbeHost) {
    this.router.navigate(['probe', probeHost.id, 'info']);
  }
}
