diff --git a/src/app/packages/probe/component/detail/detail.component.html b/src/app/packages/probe/component/detail/detail.component.html index 6f936ed..9a92530 100644 --- a/src/app/packages/probe/component/detail/detail.component.html +++ b/src/app/packages/probe/component/detail/detail.component.html @@ -1,3 +1,3 @@
- detail works! + {{probeId}} detail
diff --git a/src/app/packages/probe/component/detail/detail.component.ts b/src/app/packages/probe/component/detail/detail.component.ts index c7b90c6..3878294 100644 --- a/src/app/packages/probe/component/detail/detail.component.ts +++ b/src/app/packages/probe/component/detail/detail.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; @Component({ selector: 'of-detail', @@ -7,9 +8,12 @@ import { Component, OnInit } from '@angular/core'; }) export class DetailComponent implements OnInit { - constructor() { } + probeId = undefined; + + constructor(private route: ActivatedRoute, private router: Router) { } ngOnInit() { + this.probeId = this.route.snapshot.paramMap.get('id'); } } diff --git a/src/app/packages/probe/component/list/list.component.ts b/src/app/packages/probe/component/list/list.component.ts index b455f4d..913d43f 100644 --- a/src/app/packages/probe/component/list/list.component.ts +++ b/src/app/packages/probe/component/list/list.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit, AfterViewInit, ViewChild } from '@angular/core'; import { MatTableDataSource, MatSort } from '@angular/material'; import { AfterContentInit } from '@angular/core/src/metadata/lifecycle_hooks'; +import { Router } from '@angular/router'; export interface Probe { id: string; @@ -19,7 +20,7 @@ export interface Probe { templateUrl: './list.component.html', styleUrls: ['./list.component.scss'] }) -export class ListComponent implements OnInit, AfterContentInit { +export class ListComponent implements OnInit, AfterContentInit { displayedColumns = ['name', 'ip', 'os', 'cidr', 'targetCnt', 'date', 'authBy']; dataSource: MatTableDataSource