+
Filter Area
diff --git a/src/app/packages/target/component/list/list.component.ts b/src/app/packages/target/component/list/list.component.ts
index 2d05372..005f86f 100644
--- a/src/app/packages/target/component/list/list.component.ts
+++ b/src/app/packages/target/component/list/list.component.ts
@@ -35,7 +35,7 @@ export class ListComponent implements OnInit, AfterContentInit {
const data: Probe[] = new Array();
for (let i = 0; i < 10; i++) {
const p: Probe = {
- id: String('id' + i),
+ id: String(i),
name: String('name' + i),
ip: String('ip' + i),
os: String('os' + i),
@@ -57,6 +57,6 @@ export class ListComponent implements OnInit, AfterContentInit {
}
handleRowClick(obj: Probe) {
- this.router.navigate(['probe', obj.id]);
+ this.router.navigate(['target', obj.id]);
}
}
diff --git a/src/app/packages/target/target.module.ts b/src/app/packages/target/target.module.ts
index d8f558c..167469b 100644
--- a/src/app/packages/target/target.module.ts
+++ b/src/app/packages/target/target.module.ts
@@ -2,15 +2,19 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ListComponent } from 'app/packages/target/component/list/list.component';
import { MaterialModule } from 'app/commons/ui/material/material.module';
+import { DetailComponent } from './component/detail/detail.component';
+import { InfoTableModule } from 'app/commons/component/info-table/info-table.module';
@NgModule({
imports: [
CommonModule,
- MaterialModule
+ MaterialModule,
+ InfoTableModule
],
- declarations: [ListComponent],
+ declarations: [ListComponent, DetailComponent],
exports: [
- ListComponent
+ ListComponent,
+ DetailComponent
]
})
export class TargetModule { }
diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts
index f179fc6..2525034 100644
--- a/src/app/pages/pages-routing.module.ts
+++ b/src/app/pages/pages-routing.module.ts
@@ -14,6 +14,7 @@ const routes: Routes = [
{ path: 'discovery', loadChildren: './discovery/discovery-page.module#DiscoveryPageModule' },
{ path: 'map', loadChildren: './infra/infra-page.module#InfraPageModule' },
{ path: 'sensor-setting', loadChildren: './sensor-setting/sensor-setting-page.module#SensorSettingPageModule' },
+ { path: 'target', loadChildren: './target/target-page.module#TargetPageModule' },
]
}
];
diff --git a/src/app/pages/probe/probe-page-routing.module.ts b/src/app/pages/probe/probe-page-routing.module.ts
index 7d1856d..46952b7 100644
--- a/src/app/pages/probe/probe-page-routing.module.ts
+++ b/src/app/pages/probe/probe-page-routing.module.ts
@@ -20,4 +20,4 @@ const routes: Routes = [
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
-export class ProbesPageRoutingModule { }
+export class ProbePageRoutingModule { }
diff --git a/src/app/pages/probe/probe-page.component.ts b/src/app/pages/probe/probe-page.component.ts
index ca18f27..233ad82 100644
--- a/src/app/pages/probe/probe-page.component.ts
+++ b/src/app/pages/probe/probe-page.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { Router, ActivatedRoute } from '@angular/router';
@Component({
selector: 'of-pages-probe',
@@ -10,14 +10,16 @@ export class ProbePageComponent implements OnInit {
tabs = undefined;
- constructor(private router: Router) {
+ constructor(private route: ActivatedRoute, private router: Router) {
}
ngOnInit() {
+ const id = this.router.url.split('probe/')[1].split('/')[0];
+
this.tabs = [
- { label: 'Info', path: this.router.url },
- { label: 'Targets', path: this.router.url + '/targets' },
- { label: 'History', path: this.router.url + '/history' },
+ { label: 'Info', path: '/probe/' + id },
+ { label: 'Targets', path: '/probe/' + id + '/targets' },
+ { label: 'History', path: '/probe/' + id + '/history' },
];
}
diff --git a/src/app/pages/probe/probe-page.module.ts b/src/app/pages/probe/probe-page.module.ts
index 70937fc..d5b8adb 100644
--- a/src/app/pages/probe/probe-page.module.ts
+++ b/src/app/pages/probe/probe-page.module.ts
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ProbePageComponent } from './probe-page.component';
-import { ProbesPageRoutingModule } from './probe-page-routing.module';
+import { ProbePageRoutingModule } from './probe-page-routing.module';
import { MaterialModule } from 'app/commons/ui/material/material.module';
import { ProbeModule } from 'app/packages/probe/probe.module';
import { SubMenubarModule } from 'app/commons/component/sub-menubar/sub-menubar.module';
@@ -9,7 +9,7 @@ import { SubMenubarModule } from 'app/commons/component/sub-menubar/sub-menubar.
@NgModule({
imports: [
CommonModule,
- ProbesPageRoutingModule,
+ ProbePageRoutingModule,
MaterialModule,
ProbeModule,
SubMenubarModule,
diff --git a/src/app/pages/target/target-page-routing.module.ts b/src/app/pages/target/target-page-routing.module.ts
new file mode 100644
index 0000000..4f0225f
--- /dev/null
+++ b/src/app/pages/target/target-page-routing.module.ts
@@ -0,0 +1,18 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { TargetPageComponent } from './target-page.component';
+
+const routes: Routes = [
+ {
+ path: ':id',
+ component: TargetPageComponent,
+ children: [
+ ]
+ }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class TargetPageRoutingModule { }
diff --git a/src/app/pages/target/target-page.component.html b/src/app/pages/target/target-page.component.html
new file mode 100644
index 0000000..0178d45
--- /dev/null
+++ b/src/app/pages/target/target-page.component.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/app/pages/target/target-page.component.scss b/src/app/pages/target/target-page.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/target/target-page.component.spec.ts b/src/app/pages/target/target-page.component.spec.ts
new file mode 100644
index 0000000..1c82b34
--- /dev/null
+++ b/src/app/pages/target/target-page.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TargetPageComponent } from './target-page.component';
+
+describe('ProbeComponent', () => {
+ let component: TargetPageComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ TargetPageComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(TargetPageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/target/target-page.component.ts b/src/app/pages/target/target-page.component.ts
new file mode 100644
index 0000000..79870ea
--- /dev/null
+++ b/src/app/pages/target/target-page.component.ts
@@ -0,0 +1,16 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'of-pages-target',
+ templateUrl: './target-page.component.html',
+ styleUrls: ['./target-page.component.scss']
+})
+export class TargetPageComponent implements OnInit {
+
+ constructor() {
+ }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/pages/target/target-page.module.ts b/src/app/pages/target/target-page.module.ts
new file mode 100644
index 0000000..12db881
--- /dev/null
+++ b/src/app/pages/target/target-page.module.ts
@@ -0,0 +1,21 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { TargetPageComponent } from './target-page.component';
+import { TargetPageRoutingModule } from './target-page-routing.module';
+import { MaterialModule } from 'app/commons/ui/material/material.module';
+import { TargetModule } from 'app/packages/target/target.module';
+import { SubMenubarModule } from 'app/commons/component/sub-menubar/sub-menubar.module';
+
+@NgModule({
+ imports: [
+ CommonModule,
+ TargetPageRoutingModule,
+ MaterialModule,
+ TargetModule,
+ SubMenubarModule,
+ ],
+ declarations: [
+ TargetPageComponent,
+ ]
+})
+export class TargetPageModule { }