From 7237decc092cae1dc61de92498711070614ed859 Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 31 Jan 2018 16:03:21 +0900 Subject: [PATCH] T_____________T --- .../layouts/sub-menubar/sub-menubar.module.ts | 15 +++++++++++ src/app/pages/pages-routing.module.ts | 4 +-- src/app/pages/pages.component.html | 2 +- src/app/pages/pages.module.ts | 4 ++- .../pages/probe/probe-page-routing.module.ts | 23 +++++++++++++++++ src/app/pages/probe/probe-page.component.html | 6 +++++ src/app/pages/probe/probe-page.component.scss | 0 .../pages/probe/probe-page.component.spec.ts | 25 +++++++++++++++++++ src/app/pages/probe/probe-page.component.ts | 18 +++++++++++++ src/app/pages/probe/probe-page.module.ts | 19 ++++++++++++++ .../probes/probes-page-routing.module.ts | 1 - src/app/pages/probes/probes-page.component.ts | 6 ----- src/app/pages/probes/probes-page.module.ts | 2 -- 13 files changed, 112 insertions(+), 13 deletions(-) create mode 100644 src/app/commons/layouts/sub-menubar/sub-menubar.module.ts create mode 100644 src/app/pages/probe/probe-page-routing.module.ts create mode 100644 src/app/pages/probe/probe-page.component.html create mode 100644 src/app/pages/probe/probe-page.component.scss create mode 100644 src/app/pages/probe/probe-page.component.spec.ts create mode 100644 src/app/pages/probe/probe-page.component.ts create mode 100644 src/app/pages/probe/probe-page.module.ts diff --git a/src/app/commons/layouts/sub-menubar/sub-menubar.module.ts b/src/app/commons/layouts/sub-menubar/sub-menubar.module.ts new file mode 100644 index 0000000..5ba1c7d --- /dev/null +++ b/src/app/commons/layouts/sub-menubar/sub-menubar.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SubMenubarComponent } from 'app/commons/layouts/sub-menubar/sub-menubar.component'; +import { MaterialModule } from 'app/commons/ui/material/material.module'; + +@NgModule({ + imports: [ + CommonModule, + MaterialModule + ], + declarations: [ + SubMenubarComponent + ] +}) +export class SubMenubarModule { } diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index 8d98aa4..b54031a 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -9,8 +9,8 @@ const routes: Routes = [ children: [ { path: '', redirectTo: 'home' }, { path: 'home', loadChildren: './home/home-page.module#HomePageModule' }, - { path: 'probe', loadChildren: './probes/probes-page.module#ProbesPageModule' }, - + { path: 'probes', loadChildren: './probes/probes-page.module#ProbesPageModule' }, + { path: 'probe', loadChildren: './probe/probe-page.module#ProbePageModule' }, { path: 'discovery', loadChildren: './discovery/discovery-page.module#DiscoveryPageModule' }, { path: 'map', loadChildren: './infra/infra-page.module#InfraPageModule' }, ] diff --git a/src/app/pages/pages.component.html b/src/app/pages/pages.component.html index 05b90c1..783ac93 100644 --- a/src/app/pages/pages.component.html +++ b/src/app/pages/pages.component.html @@ -26,7 +26,7 @@ -
+
diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index 158b0ef..34f58f2 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -15,6 +15,7 @@ import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar'; import { NotificationComponent } from 'app/packages/notification/notification.component'; +import { SubMenubarModule } from 'app/commons/layouts/sub-menubar/sub-menubar.module'; const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true @@ -28,7 +29,8 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { CovalentModule, MaterialModule, PerfectScrollbarModule, - FlexLayoutModule + FlexLayoutModule, + SubMenubarModule ], declarations: [ PagesComponent, diff --git a/src/app/pages/probe/probe-page-routing.module.ts b/src/app/pages/probe/probe-page-routing.module.ts new file mode 100644 index 0000000..445e794 --- /dev/null +++ b/src/app/pages/probe/probe-page-routing.module.ts @@ -0,0 +1,23 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { ProbePageComponent } from './probe-page.component'; +import { ListComponent as ProbeListComponent } from 'app/packages/probe/component/list/list.component'; +import { ListComponent as NoauthListComponent } from 'app/packages/noauth/component/list/list.component'; +import { DownloadComponent } from 'app/packages/probe/component/download/download.component'; +import { DetailComponent as ProbeDetailComponent } from 'app/packages/probe/component/detail/detail.component'; + +const routes: Routes = [ + { + path: '', + component: ProbePageComponent, + children: [ + { path: '', component: ProbeListComponent }, + ] + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ProbesPageRoutingModule { } diff --git a/src/app/pages/probe/probe-page.component.html b/src/app/pages/probe/probe-page.component.html new file mode 100644 index 0000000..190e412 --- /dev/null +++ b/src/app/pages/probe/probe-page.component.html @@ -0,0 +1,6 @@ +
+ +
+ 이거슨 detail +
+
\ No newline at end of file diff --git a/src/app/pages/probe/probe-page.component.scss b/src/app/pages/probe/probe-page.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/pages/probe/probe-page.component.spec.ts b/src/app/pages/probe/probe-page.component.spec.ts new file mode 100644 index 0000000..7e72ea9 --- /dev/null +++ b/src/app/pages/probe/probe-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProbePageComponent } from './probe-page.component'; + +describe('ProbeComponent', () => { + let component: ProbePageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ProbePageComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProbePageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/probe/probe-page.component.ts b/src/app/pages/probe/probe-page.component.ts new file mode 100644 index 0000000..f94d610 --- /dev/null +++ b/src/app/pages/probe/probe-page.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'of-pages-probe', + templateUrl: './probe-page.component.html', + styleUrls: ['./probe-page.component.scss'] +}) +export class ProbePageComponent { + + tabs2 = [ + { label: 'Info', path: '/probe/' }, + { label: 'Targets', path: '/target' }, + { label: 'History', path: '/probe/history' }, + ]; + + constructor() { } + +} diff --git a/src/app/pages/probe/probe-page.module.ts b/src/app/pages/probe/probe-page.module.ts new file mode 100644 index 0000000..d6f6431 --- /dev/null +++ b/src/app/pages/probe/probe-page.module.ts @@ -0,0 +1,19 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ProbePageComponent } from './probe-page.component'; +import { ProbesPageRoutingModule } from './probe-page-routing.module'; +import { MaterialModule } from 'app/commons/ui/material/material.module'; +import { ProbeModule } from 'app/packages/probe/probe.module'; + +@NgModule({ + imports: [ + CommonModule, + ProbesPageRoutingModule, + MaterialModule, + ProbeModule, + ], + declarations: [ + ProbePageComponent, + ] +}) +export class ProbePageModule { } diff --git a/src/app/pages/probes/probes-page-routing.module.ts b/src/app/pages/probes/probes-page-routing.module.ts index f2583f7..3205cba 100644 --- a/src/app/pages/probes/probes-page-routing.module.ts +++ b/src/app/pages/probes/probes-page-routing.module.ts @@ -12,7 +12,6 @@ const routes: Routes = [ component: ProbesPageComponent, children: [ { path: '', component: ProbeListComponent }, - { path: 'detail/:id', component: ProbeDetailComponent }, { path: 'noauth', component: NoauthListComponent }, { path: 'download', component: DownloadComponent }, ] diff --git a/src/app/pages/probes/probes-page.component.ts b/src/app/pages/probes/probes-page.component.ts index ce5c45c..12ea362 100644 --- a/src/app/pages/probes/probes-page.component.ts +++ b/src/app/pages/probes/probes-page.component.ts @@ -13,12 +13,6 @@ export class ProbesPageComponent { { label: 'Download', path: '/probes/download' }, ]; - // tabs2 = [ - // { label: 'Info', path: '/probe/' }, - // { label: 'Targets', path: '/target' }, - // { label: 'History', path: '/probe/history' }, - // ]; - constructor() { } } diff --git a/src/app/pages/probes/probes-page.module.ts b/src/app/pages/probes/probes-page.module.ts index bf0f845..67fd10e 100644 --- a/src/app/pages/probes/probes-page.module.ts +++ b/src/app/pages/probes/probes-page.module.ts @@ -2,7 +2,6 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ProbesPageComponent } from './probes-page.component'; import { ProbesPageRoutingModule } from './probes-page-routing.module'; -import { SubMenubarComponent } from 'app/commons/layouts/sub-menubar/sub-menubar.component'; import { MaterialModule } from 'app/commons/ui/material/material.module'; import { ProbeModule } from 'app/packages/probe/probe.module'; import { NoauthModule } from 'app/packages/noauth/noauth.module'; @@ -17,7 +16,6 @@ import { NoauthModule } from 'app/packages/noauth/noauth.module'; ], declarations: [ ProbesPageComponent, - SubMenubarComponent ] }) export class ProbesPageModule { }