From ef3e6a2e27a554c262e3f5379be14e0c51be930c Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 30 Jan 2018 18:12:56 +0900 Subject: [PATCH] probe menu --- src/app/commons/layouts/layouts.module.ts | 7 ++++-- .../commons/layouts/sidebar/menu-element.ts | 2 +- .../sub-menubar/sub-menubar.component.html | 6 +++++ .../sub-menubar/sub-menubar.component.scss | 0 .../sub-menubar/sub-menubar.component.spec.ts | 25 +++++++++++++++++++ .../sub-menubar/sub-menubar.component.ts | 23 +++++++++++++++++ .../components/list/list.component.html | 3 +++ .../components/list/list.component.scss | 0 .../components/list/list.component.spec.ts | 25 +++++++++++++++++++ .../noauth/components/list/list.component.ts | 15 +++++++++++ src/app/packages/noauth/noauth.module.ts | 13 ++++++++++ .../download/download.component.html | 3 +++ .../download/download.component.scss | 0 .../download/download.component.spec.ts | 25 +++++++++++++++++++ .../components/download/download.component.ts | 15 +++++++++++ .../probe/components/list/list.component.html | 3 +++ .../probe/components/list/list.component.scss | 0 .../components/list/list.component.spec.ts | 25 +++++++++++++++++++ .../probe/components/list/list.component.ts | 15 +++++++++++ src/app/packages/probe/probe.module.ts | 15 +++++++++++ .../probes/probes-page-routing.module.ts | 8 ++++++ .../pages/probes/probes-page.component.html | 7 +++--- src/app/pages/probes/probes-page.module.ts | 14 +++++++++-- 23 files changed, 241 insertions(+), 8 deletions(-) create mode 100644 src/app/commons/layouts/sub-menubar/sub-menubar.component.html create mode 100644 src/app/commons/layouts/sub-menubar/sub-menubar.component.scss create mode 100644 src/app/commons/layouts/sub-menubar/sub-menubar.component.spec.ts create mode 100644 src/app/commons/layouts/sub-menubar/sub-menubar.component.ts create mode 100644 src/app/packages/noauth/components/list/list.component.html create mode 100644 src/app/packages/noauth/components/list/list.component.scss create mode 100644 src/app/packages/noauth/components/list/list.component.spec.ts create mode 100644 src/app/packages/noauth/components/list/list.component.ts create mode 100644 src/app/packages/noauth/noauth.module.ts create mode 100644 src/app/packages/probe/components/download/download.component.html create mode 100644 src/app/packages/probe/components/download/download.component.scss create mode 100644 src/app/packages/probe/components/download/download.component.spec.ts create mode 100644 src/app/packages/probe/components/download/download.component.ts create mode 100644 src/app/packages/probe/components/list/list.component.html create mode 100644 src/app/packages/probe/components/list/list.component.scss create mode 100644 src/app/packages/probe/components/list/list.component.spec.ts create mode 100644 src/app/packages/probe/components/list/list.component.ts create mode 100644 src/app/packages/probe/probe.module.ts diff --git a/src/app/commons/layouts/layouts.module.ts b/src/app/commons/layouts/layouts.module.ts index 722098b..b6e314d 100644 --- a/src/app/commons/layouts/layouts.module.ts +++ b/src/app/commons/layouts/layouts.module.ts @@ -4,12 +4,15 @@ import { SidebarComponent } from './sidebar/sidebar.component'; import { HeaderComponent } from './header/header.component'; import { FooterComponent } from './footer/footer.component'; import { MenuItemComponent } from './menu-item/menu-item.component'; +import { SubMenubarComponent } from './sub-menubar/sub-menubar.component'; +import { FlexLayoutModule } from '@angular/flex-layout'; @NgModule({ imports: [ - CommonModule + CommonModule, + FlexLayoutModule, ], - declarations: [SidebarComponent, HeaderComponent, FooterComponent, MenuItemComponent] + declarations: [SidebarComponent, HeaderComponent, FooterComponent, MenuItemComponent, SubMenubarComponent] }) export class LayoutsModule { } diff --git a/src/app/commons/layouts/sidebar/menu-element.ts b/src/app/commons/layouts/sidebar/menu-element.ts index f5e8096..ed19fb3 100644 --- a/src/app/commons/layouts/sidebar/menu-element.ts +++ b/src/app/commons/layouts/sidebar/menu-element.ts @@ -51,7 +51,7 @@ export const menus = [ 'name': 'Dashboards', 'link': '', 'icon': 'indeterminate_check_box', - 'chip': false, + 'chip': { 'value': 3, 'color': 'accent'}, 'open': false, }, ] diff --git a/src/app/commons/layouts/sub-menubar/sub-menubar.component.html b/src/app/commons/layouts/sub-menubar/sub-menubar.component.html new file mode 100644 index 0000000..26239db --- /dev/null +++ b/src/app/commons/layouts/sub-menubar/sub-menubar.component.html @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/src/app/commons/layouts/sub-menubar/sub-menubar.component.scss b/src/app/commons/layouts/sub-menubar/sub-menubar.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/commons/layouts/sub-menubar/sub-menubar.component.spec.ts b/src/app/commons/layouts/sub-menubar/sub-menubar.component.spec.ts new file mode 100644 index 0000000..1ba6e04 --- /dev/null +++ b/src/app/commons/layouts/sub-menubar/sub-menubar.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SubMenubarComponent } from './sub-menubar.component'; + +describe('SubMenubarComponent', () => { + let component: SubMenubarComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SubMenubarComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SubMenubarComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/commons/layouts/sub-menubar/sub-menubar.component.ts b/src/app/commons/layouts/sub-menubar/sub-menubar.component.ts new file mode 100644 index 0000000..f38dfa9 --- /dev/null +++ b/src/app/commons/layouts/sub-menubar/sub-menubar.component.ts @@ -0,0 +1,23 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'of-sub-menubar', + templateUrl: './sub-menubar.component.html', + styleUrls: ['./sub-menubar.component.scss'] +}) +export class SubMenubarComponent implements OnInit { + + tabs = [ + {label: 'Probe', path: '/probes'}, + {label: 'Unauthorized', path: '/probes/noauth'}, + {label: 'Download', path: '/probes/download'}, + ]; + + constructor(public router: Router) { } + + ngOnInit() { + } + + +} diff --git a/src/app/packages/noauth/components/list/list.component.html b/src/app/packages/noauth/components/list/list.component.html new file mode 100644 index 0000000..2c78552 --- /dev/null +++ b/src/app/packages/noauth/components/list/list.component.html @@ -0,0 +1,3 @@ +

+ list works! +

diff --git a/src/app/packages/noauth/components/list/list.component.scss b/src/app/packages/noauth/components/list/list.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/packages/noauth/components/list/list.component.spec.ts b/src/app/packages/noauth/components/list/list.component.spec.ts new file mode 100644 index 0000000..beacd15 --- /dev/null +++ b/src/app/packages/noauth/components/list/list.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListComponent } from './list.component'; + +describe('ListComponent', () => { + let component: ListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/packages/noauth/components/list/list.component.ts b/src/app/packages/noauth/components/list/list.component.ts new file mode 100644 index 0000000..84f21ac --- /dev/null +++ b/src/app/packages/noauth/components/list/list.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'of-noauth-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.scss'] +}) +export class ListComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/packages/noauth/noauth.module.ts b/src/app/packages/noauth/noauth.module.ts new file mode 100644 index 0000000..8ef8e3b --- /dev/null +++ b/src/app/packages/noauth/noauth.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ListComponent } from 'app/packages/noauth/components/list/list.component'; + +@NgModule({ + imports: [ + CommonModule + ], + declarations: [ + ListComponent + ] +}) +export class NoauthModule { } diff --git a/src/app/packages/probe/components/download/download.component.html b/src/app/packages/probe/components/download/download.component.html new file mode 100644 index 0000000..155b9a8 --- /dev/null +++ b/src/app/packages/probe/components/download/download.component.html @@ -0,0 +1,3 @@ +

+ download works! +

diff --git a/src/app/packages/probe/components/download/download.component.scss b/src/app/packages/probe/components/download/download.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/packages/probe/components/download/download.component.spec.ts b/src/app/packages/probe/components/download/download.component.spec.ts new file mode 100644 index 0000000..ad71a7c --- /dev/null +++ b/src/app/packages/probe/components/download/download.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DownloadComponent } from './download.component'; + +describe('DownloadComponent', () => { + let component: DownloadComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ DownloadComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DownloadComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/packages/probe/components/download/download.component.ts b/src/app/packages/probe/components/download/download.component.ts new file mode 100644 index 0000000..a7db3fa --- /dev/null +++ b/src/app/packages/probe/components/download/download.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'of-download', + templateUrl: './download.component.html', + styleUrls: ['./download.component.scss'] +}) +export class DownloadComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/packages/probe/components/list/list.component.html b/src/app/packages/probe/components/list/list.component.html new file mode 100644 index 0000000..2c78552 --- /dev/null +++ b/src/app/packages/probe/components/list/list.component.html @@ -0,0 +1,3 @@ +

+ list works! +

diff --git a/src/app/packages/probe/components/list/list.component.scss b/src/app/packages/probe/components/list/list.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/packages/probe/components/list/list.component.spec.ts b/src/app/packages/probe/components/list/list.component.spec.ts new file mode 100644 index 0000000..beacd15 --- /dev/null +++ b/src/app/packages/probe/components/list/list.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListComponent } from './list.component'; + +describe('ListComponent', () => { + let component: ListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/packages/probe/components/list/list.component.ts b/src/app/packages/probe/components/list/list.component.ts new file mode 100644 index 0000000..227984a --- /dev/null +++ b/src/app/packages/probe/components/list/list.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'of-probe-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.scss'] +}) +export class ListComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/packages/probe/probe.module.ts b/src/app/packages/probe/probe.module.ts new file mode 100644 index 0000000..2bf3e1f --- /dev/null +++ b/src/app/packages/probe/probe.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ListComponent } from 'app/packages/probe/components/list/list.component'; +import { DownloadComponent } from 'app/packages/probe/components/download/download.component'; + +@NgModule({ + imports: [ + CommonModule + ], + declarations: [ + ListComponent, + DownloadComponent + ], +}) +export class ProbeModule { } diff --git a/src/app/pages/probes/probes-page-routing.module.ts b/src/app/pages/probes/probes-page-routing.module.ts index 7fc5138..60dbc45 100644 --- a/src/app/pages/probes/probes-page-routing.module.ts +++ b/src/app/pages/probes/probes-page-routing.module.ts @@ -1,11 +1,19 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { ProbesPageComponent } from './probes-page.component'; +import { ListComponent as ProbeListComponent } from 'app/packages/probe/components/list/list.component'; +import { ListComponent as NoauthListComponent } from 'app/packages/noauth/components/list/list.component'; +import { DownloadComponent } from 'app/packages/probe/components/download/download.component'; const routes: Routes = [ { path: '', component: ProbesPageComponent, + children: [ + { path: '', component: ProbeListComponent }, + { path: 'noauth', component: NoauthListComponent }, + { path: 'download', component: DownloadComponent }, + ] } ]; diff --git a/src/app/pages/probes/probes-page.component.html b/src/app/pages/probes/probes-page.component.html index c3b2aff..f50f543 100644 --- a/src/app/pages/probes/probes-page.component.html +++ b/src/app/pages/probes/probes-page.component.html @@ -1,3 +1,4 @@ -

- probes works! -

+
+ + +
\ No newline at end of file diff --git a/src/app/pages/probes/probes-page.module.ts b/src/app/pages/probes/probes-page.module.ts index 725c700..bf0f845 100644 --- a/src/app/pages/probes/probes-page.module.ts +++ b/src/app/pages/probes/probes-page.module.ts @@ -2,12 +2,22 @@ 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'; @NgModule({ imports: [ CommonModule, ProbesPageRoutingModule, + MaterialModule, + ProbeModule, + NoauthModule, ], - declarations: [ProbesPageComponent] + declarations: [ + ProbesPageComponent, + SubMenubarComponent + ] }) -export class ProbesPageModule {} +export class ProbesPageModule { }