From a415181e2637239894d7125837dddf3c02c6ed57 Mon Sep 17 00:00:00 2001 From: geek Date: Tue, 5 Jun 2018 18:32:20 +0900 Subject: [PATCH] ing --- .../component/discovery.component.ts | 4 +-- src/app/app-routing.module.ts | 2 +- src/app/pages/pages-routing.module.ts | 1 + .../probes/probe-tab-page-routing.module.ts | 1 - .../pages/probes/probe-tab-page.component.ts | 3 ++- .../probe/probe-detail-page.component.ts | 2 -- .../probes/probe/probe-list-page.component.ts | 6 ++--- .../target/target-detail-page.component.html | 9 +++++++ .../target/target-detail-page.component.ts | 18 +++++++++++++ .../target/target-list-page.component.html | 9 +++++++ .../target/target-list-page.component.ts | 19 ++++++++++++++ .../target/target-page-routing.module.ts | 7 ++++-- .../pages/target/target-page.component.html | 9 ++++--- src/app/pages/target/target-page.component.ts | 14 +++++------ src/app/pages/target/target-page.module.ts | 9 ++++--- .../targets/targets-page-routing.module.ts | 17 ------------- .../pages/targets/targets-page.component.html | 7 ------ .../targets/targets-page.component.spec.ts | 25 ------------------- .../pages/targets/targets-page.component.ts | 14 ----------- src/app/pages/targets/targets-page.module.ts | 21 ---------------- 20 files changed, 85 insertions(+), 112 deletions(-) create mode 100644 src/app/pages/target/target-detail-page.component.html create mode 100644 src/app/pages/target/target-detail-page.component.ts create mode 100644 src/app/pages/target/target-list-page.component.html create mode 100644 src/app/pages/target/target-list-page.component.ts delete mode 100644 src/app/pages/targets/targets-page-routing.module.ts delete mode 100644 src/app/pages/targets/targets-page.component.html delete mode 100644 src/app/pages/targets/targets-page.component.spec.ts delete mode 100644 src/app/pages/targets/targets-page.component.ts delete mode 100644 src/app/pages/targets/targets-page.module.ts diff --git a/@overflow/discovery/component/discovery.component.ts b/@overflow/discovery/component/discovery.component.ts index 161cfee..8e63434 100644 --- a/@overflow/discovery/component/discovery.component.ts +++ b/@overflow/discovery/component/discovery.component.ts @@ -61,9 +61,9 @@ export class DiscoveryComponent implements OnDestroy { // TODO: fix const zone: Zone = { network: '192.168.1.0/24', - ipv4: '192.168.1.101', + ipv4: '192.168.1.103', iface: 'enp3s0', - mac: '44:8a:5b:f1:f1:f3', + mac: '44:8a:5b:44:8c:e8', hosts: null, }; this.discoveryService.discoverHost(this.selectedProbe.probe.probeKey, zone, dz.discoverHost); diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index d292388..576084d 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -6,7 +6,7 @@ const routes: Routes = [ { path: '', loadChildren: './pages/pages.module#PagesModule', canActivate: [AuthGuard] }, { path: 'auth', loadChildren: './pages/auth/auth-page.module#AuthPageModule' }, { path: 'error', loadChildren: './pages/error/error-page.module#ErrorPageModule' }, - { path: '**', redirectTo: 'error' }, + // { path: '**', redirectTo: 'error' }, ]; @NgModule({ diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index a27c22d..c70be27 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -13,6 +13,7 @@ const routes: Routes = [ { path: 'discovery', loadChildren: './discovery/discovery-page.module#DiscoveryPageModule' }, { path: 'map', loadChildren: './infra/infra-page.module#InfraPageModule' }, { path: 'sensor', loadChildren: './sensors/sensor-tab-page.module#SensorTabPageModule' }, + { path: 'target', loadChildren: './target/target-page.module#TargetPageModule'}, // { path: 'target', loadChildren: './target/target-page.module#TargetPageModule' }, // { path: 'overview', loadChildren: './overview/overview-page.module#OverviewPageModule' }, // { path: 'dashboard', loadChildren: './dashboard/dashboard-page.module#DashboardPageModule' }, diff --git a/src/app/pages/probes/probe-tab-page-routing.module.ts b/src/app/pages/probes/probe-tab-page-routing.module.ts index 26c0830..2c9d1c2 100644 --- a/src/app/pages/probes/probe-tab-page-routing.module.ts +++ b/src/app/pages/probes/probe-tab-page-routing.module.ts @@ -16,7 +16,6 @@ const routes: Routes = [ { path: 'download', component: ProbeDownloadPageComponent }, { path: 'download/:idx', component: ProbeDownloadPageComponent }, { path: ':id/info', component: ProbeDetailPageComponent }, - // { path: ':id/targets', loadChildren: 'app/pages/targets/targets-page.module#TargetsPageModule'}, { path: ':id/history', component: null }, ] }, diff --git a/src/app/pages/probes/probe-tab-page.component.ts b/src/app/pages/probes/probe-tab-page.component.ts index cf2c2a3..2408f6e 100644 --- a/src/app/pages/probes/probe-tab-page.component.ts +++ b/src/app/pages/probes/probe-tab-page.component.ts @@ -41,7 +41,8 @@ export class ProbeTabPageComponent implements OnDestroy { default: this.tabs = [ { label: 'INFO', routerLink: ['/probe/', parsedUrl, 'info'] }, - { label: 'TARGETS', path: ['/probe/', parsedUrl, 'targets'], disabled: true }, + // { label: 'TARGETS', path: ['/probe/', parsedUrl, 'target'] }, + { label: 'TARGETS', routerLink: ['/target/list'], queryParams: {probe: parsedUrl}}, { label: 'HISTORY', path: ['/probe/', parsedUrl, 'history'], disabled: true }, ]; break; diff --git a/src/app/pages/probes/probe/probe-detail-page.component.ts b/src/app/pages/probes/probe/probe-detail-page.component.ts index 8e3c57b..7e4e0c2 100644 --- a/src/app/pages/probes/probe/probe-detail-page.component.ts +++ b/src/app/pages/probes/probe/probe-detail-page.component.ts @@ -1,7 +1,5 @@ import { Component, OnDestroy } from '@angular/core'; import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; -import { Subscription } from 'rxjs'; -import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe'; import { Target } from '@overflow/commons-typescript/model/target'; import { BreadcrumbService } from '@app/commons/service/breadcrumb.service'; diff --git a/src/app/pages/probes/probe/probe-list-page.component.ts b/src/app/pages/probes/probe/probe-list-page.component.ts index 7d5ed7c..c2baa2f 100644 --- a/src/app/pages/probes/probe/probe-list-page.component.ts +++ b/src/app/pages/probes/probe/probe-list-page.component.ts @@ -1,8 +1,6 @@ -import { Component, OnDestroy } from '@angular/core'; -import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; -import { Subscription } from 'rxjs'; +import { Component } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe'; -import { Target } from '@overflow/commons-typescript/model/target'; import { BreadcrumbService } from '@app/commons/service/breadcrumb.service'; @Component({ diff --git a/src/app/pages/target/target-detail-page.component.html b/src/app/pages/target/target-detail-page.component.html new file mode 100644 index 0000000..b6cc073 --- /dev/null +++ b/src/app/pages/target/target-detail-page.component.html @@ -0,0 +1,9 @@ +
+
+
+
+ +
+
+
+
\ No newline at end of file diff --git a/src/app/pages/target/target-detail-page.component.ts b/src/app/pages/target/target-detail-page.component.ts new file mode 100644 index 0000000..c151c66 --- /dev/null +++ b/src/app/pages/target/target-detail-page.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +@Component({ + selector: 'of-target-detail-page', + templateUrl: './target-detail-page.component.html', +}) +export class TargetDetailPageComponent implements OnInit { + + probeHostID: number; + + constructor( + private route: ActivatedRoute + ) { } + + ngOnInit() { + } +} diff --git a/src/app/pages/target/target-list-page.component.html b/src/app/pages/target/target-list-page.component.html new file mode 100644 index 0000000..fb1f644 --- /dev/null +++ b/src/app/pages/target/target-list-page.component.html @@ -0,0 +1,9 @@ +
+
+
+
+ sdjklfhjsklfjhlksdjfklsdhfjoliwejiolf +
+
+
+
diff --git a/src/app/pages/target/target-list-page.component.ts b/src/app/pages/target/target-list-page.component.ts new file mode 100644 index 0000000..a8721a6 --- /dev/null +++ b/src/app/pages/target/target-list-page.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +@Component({ + selector: 'of-target-list-page', + templateUrl: './target-list-page.component.html', +}) +export class TargetListPageComponent implements OnInit { + + probeHostID: number; + + constructor( + private route: ActivatedRoute + ) { } + + ngOnInit() { + + } +} diff --git a/src/app/pages/target/target-page-routing.module.ts b/src/app/pages/target/target-page-routing.module.ts index 6c1c02a..b897084 100644 --- a/src/app/pages/target/target-page-routing.module.ts +++ b/src/app/pages/target/target-page-routing.module.ts @@ -1,14 +1,17 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { TargetPageComponent } from './target-page.component'; -import { DetailComponent as TargetDetailComponent } from '@overflow/target/component/detail/detail.component'; +import { TargetListPageComponent } from './target-list-page.component'; +import { TargetDetailPageComponent } from './target-detail-page.component'; + const routes: Routes = [ { path: '', component: TargetPageComponent, children: [ - { path: ':id/info', component: TargetDetailComponent } + { path: 'list', component: TargetListPageComponent }, + { path: 'detail', component: TargetDetailPageComponent } ] } ]; diff --git a/src/app/pages/target/target-page.component.html b/src/app/pages/target/target-page.component.html index 3fd7827..3e276c0 100644 --- a/src/app/pages/target/target-page.component.html +++ b/src/app/pages/target/target-page.component.html @@ -1,10 +1,11 @@
+ + +
- -
-
+ sdfsdf
-
\ No newline at end of file + diff --git a/src/app/pages/target/target-page.component.ts b/src/app/pages/target/target-page.component.ts index 2dad0b9..3705365 100644 --- a/src/app/pages/target/target-page.component.ts +++ b/src/app/pages/target/target-page.component.ts @@ -7,19 +7,19 @@ import { Router } from '@angular/router'; }) export class TargetPageComponent implements OnInit { - tabs = undefined; + // tabs = undefined; constructor(private router: Router) { } ngOnInit() { - const id = this.router.url.split('target/')[1].split('/')[0]; - - this.tabs = [ - { label: 'INFO', routerLink: ['/target/', id, 'info'] }, - { label: 'HISTORY', path: ['/target/', id, 'history'], disabled: true }, - ]; + // const id = this.router.url.split('target/')[1].split('/')[0]; + // + // this.tabs = [ + // { label: 'INFO', routerLink: ['/target/', id, 'info'] }, + // { label: 'HISTORY', path: ['/target/', id, 'history'], disabled: true }, + // ]; } } diff --git a/src/app/pages/target/target-page.module.ts b/src/app/pages/target/target-page.module.ts index a237b8b..36b8852 100644 --- a/src/app/pages/target/target-page.module.ts +++ b/src/app/pages/target/target-page.module.ts @@ -4,9 +4,9 @@ import { CommonModule } from '@angular/common'; import { UIModule } from '@overflow/shared/ui/ui.module'; import { TargetModule } from '@overflow/target/target.module'; +import { TargetListPageComponent } from './target-list-page.component'; +import { TargetDetailPageComponent } from './target-detail-page.component'; import { TargetPageRoutingModule } from './target-page-routing.module'; -import { TargetPageComponent } from './target-page.component'; -import { TabbarModule } from '../../commons/component/layout/tabbar/app.tabbar.module'; @NgModule({ imports: [ @@ -14,10 +14,11 @@ import { TabbarModule } from '../../commons/component/layout/tabbar/app.tabbar.m UIModule, TargetPageRoutingModule, TargetModule, - TabbarModule + // TabbarModule ], declarations: [ - TargetPageComponent + TargetListPageComponent, + TargetDetailPageComponent, ] }) export class TargetPageModule { } diff --git a/src/app/pages/targets/targets-page-routing.module.ts b/src/app/pages/targets/targets-page-routing.module.ts deleted file mode 100644 index f8c642b..0000000 --- a/src/app/pages/targets/targets-page-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { TargetsPageComponent } from './targets-page.component'; - -const routes: Routes = [ - { - path: '', - component: TargetsPageComponent, - } -]; - - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class TargetsPageRoutingModule { } diff --git a/src/app/pages/targets/targets-page.component.html b/src/app/pages/targets/targets-page.component.html deleted file mode 100644 index fedb503..0000000 --- a/src/app/pages/targets/targets-page.component.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
-
- -
-
-
\ No newline at end of file diff --git a/src/app/pages/targets/targets-page.component.spec.ts b/src/app/pages/targets/targets-page.component.spec.ts deleted file mode 100644 index 931ca6d..0000000 --- a/src/app/pages/targets/targets-page.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { TargetsPageComponent } from './targets-page.component'; - -describe('TargetsComponent', () => { - let component: TargetsPageComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ TargetsPageComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(TargetsPageComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/targets/targets-page.component.ts b/src/app/pages/targets/targets-page.component.ts deleted file mode 100644 index d1dbd44..0000000 --- a/src/app/pages/targets/targets-page.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'of-pages-targets', - templateUrl: './targets-page.component.html', -}) -export class TargetsPageComponent implements OnInit { - - constructor() { - } - - ngOnInit() { - } -} diff --git a/src/app/pages/targets/targets-page.module.ts b/src/app/pages/targets/targets-page.module.ts deleted file mode 100644 index e936460..0000000 --- a/src/app/pages/targets/targets-page.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { UIModule } from '@overflow/shared/ui/ui.module'; -import { TargetModule } from '@overflow/target/target.module'; - -import { TargetsPageRoutingModule } from './targets-page-routing.module'; -import { TargetsPageComponent } from './targets-page.component'; - -@NgModule({ - imports: [ - CommonModule, - UIModule, - TargetsPageRoutingModule, - TargetModule, - ], - declarations: [ - TargetsPageComponent - ] -}) -export class TargetsPageModule { }