diff --git a/src/packages/commons/component/footer/footer.component.html b/src/app/commons/component/layout/footer/footer.component.html similarity index 100% rename from src/packages/commons/component/footer/footer.component.html rename to src/app/commons/component/layout/footer/footer.component.html diff --git a/src/packages/commons/component/footer/footer.component.scss b/src/app/commons/component/layout/footer/footer.component.scss similarity index 100% rename from src/packages/commons/component/footer/footer.component.scss rename to src/app/commons/component/layout/footer/footer.component.scss diff --git a/src/packages/commons/component/footer/footer.component.spec.ts b/src/app/commons/component/layout/footer/footer.component.spec.ts similarity index 100% rename from src/packages/commons/component/footer/footer.component.spec.ts rename to src/app/commons/component/layout/footer/footer.component.spec.ts diff --git a/src/packages/commons/component/footer/footer.component.ts b/src/app/commons/component/layout/footer/footer.component.ts similarity index 100% rename from src/packages/commons/component/footer/footer.component.ts rename to src/app/commons/component/layout/footer/footer.component.ts diff --git a/src/packages/commons/component/header/header.component.html b/src/app/commons/component/layout/header/header.component.html similarity index 100% rename from src/packages/commons/component/header/header.component.html rename to src/app/commons/component/layout/header/header.component.html diff --git a/src/packages/commons/component/header/header.component.scss b/src/app/commons/component/layout/header/header.component.scss similarity index 100% rename from src/packages/commons/component/header/header.component.scss rename to src/app/commons/component/layout/header/header.component.scss diff --git a/src/packages/commons/component/header/header.component.spec.ts b/src/app/commons/component/layout/header/header.component.spec.ts similarity index 100% rename from src/packages/commons/component/header/header.component.spec.ts rename to src/app/commons/component/layout/header/header.component.spec.ts diff --git a/src/packages/commons/component/header/header.component.ts b/src/app/commons/component/layout/header/header.component.ts similarity index 100% rename from src/packages/commons/component/header/header.component.ts rename to src/app/commons/component/layout/header/header.component.ts diff --git a/src/app/commons/component/layout/layout.module.ts b/src/app/commons/component/layout/layout.module.ts new file mode 100644 index 0000000..d904530 --- /dev/null +++ b/src/app/commons/component/layout/layout.module.ts @@ -0,0 +1,38 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { MaterialModule } from 'packages/commons/material/material.module'; +import { FooterComponent } from './footer/footer.component'; +import { NotificationModule } from 'packages/notification/notification.module'; +import { HeaderComponent } from './header/header.component'; +import { LocalizationModule } from 'angular-l10n'; +import { RouterModule } from '@angular/router'; +import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar'; +import { MenuItemModule } from 'packages/commons/component/menu-item/menu-item.module'; +import { SidebarComponent } from './sidebar/sidebar.component'; +import { SubMenubarComponent } from './sub-menubar/sub-menubar.component'; + + +@NgModule({ + imports: [ + CommonModule, + MaterialModule, + NotificationModule, + LocalizationModule, + RouterModule, + PerfectScrollbarModule, + MenuItemModule, + ], + declarations: [ + FooterComponent, + HeaderComponent, + SidebarComponent, + SubMenubarComponent + ], + exports: [ + FooterComponent, + HeaderComponent, + SidebarComponent, + SubMenubarComponent + ] +}) +export class LayoutModule { } diff --git a/src/packages/commons/component/sidebar/menu-element.ts b/src/app/commons/component/layout/sidebar/menu-element.ts similarity index 100% rename from src/packages/commons/component/sidebar/menu-element.ts rename to src/app/commons/component/layout/sidebar/menu-element.ts diff --git a/src/packages/commons/component/sidebar/sidebar.component.html b/src/app/commons/component/layout/sidebar/sidebar.component.html similarity index 100% rename from src/packages/commons/component/sidebar/sidebar.component.html rename to src/app/commons/component/layout/sidebar/sidebar.component.html diff --git a/src/packages/commons/component/sidebar/sidebar.component.scss b/src/app/commons/component/layout/sidebar/sidebar.component.scss similarity index 100% rename from src/packages/commons/component/sidebar/sidebar.component.scss rename to src/app/commons/component/layout/sidebar/sidebar.component.scss diff --git a/src/packages/commons/component/sidebar/sidebar.component.spec.ts b/src/app/commons/component/layout/sidebar/sidebar.component.spec.ts similarity index 100% rename from src/packages/commons/component/sidebar/sidebar.component.spec.ts rename to src/app/commons/component/layout/sidebar/sidebar.component.spec.ts diff --git a/src/packages/commons/component/sidebar/sidebar.component.ts b/src/app/commons/component/layout/sidebar/sidebar.component.ts similarity index 100% rename from src/packages/commons/component/sidebar/sidebar.component.ts rename to src/app/commons/component/layout/sidebar/sidebar.component.ts diff --git a/src/packages/commons/component/sub-menubar/sub-menubar.component.html b/src/app/commons/component/layout/sub-menubar/sub-menubar.component.html similarity index 100% rename from src/packages/commons/component/sub-menubar/sub-menubar.component.html rename to src/app/commons/component/layout/sub-menubar/sub-menubar.component.html diff --git a/src/packages/commons/component/sub-menubar/sub-menubar.component.scss b/src/app/commons/component/layout/sub-menubar/sub-menubar.component.scss similarity index 100% rename from src/packages/commons/component/sub-menubar/sub-menubar.component.scss rename to src/app/commons/component/layout/sub-menubar/sub-menubar.component.scss diff --git a/src/packages/commons/component/sub-menubar/sub-menubar.component.spec.ts b/src/app/commons/component/layout/sub-menubar/sub-menubar.component.spec.ts similarity index 100% rename from src/packages/commons/component/sub-menubar/sub-menubar.component.spec.ts rename to src/app/commons/component/layout/sub-menubar/sub-menubar.component.spec.ts diff --git a/src/packages/commons/component/sub-menubar/sub-menubar.component.ts b/src/app/commons/component/layout/sub-menubar/sub-menubar.component.ts similarity index 100% rename from src/packages/commons/component/sub-menubar/sub-menubar.component.ts rename to src/app/commons/component/layout/sub-menubar/sub-menubar.component.ts diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index 051f0d0..cfb12cc 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -15,11 +15,10 @@ import { NotificationModule } from 'packages/notification/notification.module'; import { MemberModule } from 'packages/member/member.module'; import { MaterialModule } from 'packages/commons/material/material.module'; -import { HeaderModule } from 'packages/commons/component/header/header.module'; -import { SidebarModule } from 'packages/commons/component/sidebar/sidebar.module'; import { PagesComponent } from './pages.component'; import { PagesRoutingModule } from './pages-routing.module'; +import { LayoutModule } from 'app/commons/component/layout/layout.module'; const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { @@ -34,8 +33,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { PerfectScrollbarModule, LocalizationModule, MaterialModule, - HeaderModule, - SidebarModule, + LayoutModule, NotificationModule, MemberModule, ], diff --git a/src/app/pages/probe/probe-page.module.ts b/src/app/pages/probe/probe-page.module.ts index 81dbee0..313f512 100644 --- a/src/app/pages/probe/probe-page.module.ts +++ b/src/app/pages/probe/probe-page.module.ts @@ -4,10 +4,10 @@ import { CommonModule } from '@angular/common'; import { ProbeModule } from 'packages/probe/probe.module'; import { MaterialModule } from 'packages/commons/material/material.module'; -import { SubMenubarModule } from 'packages/commons/component/sub-menubar/sub-menubar.module'; import { ProbePageComponent } from './probe-page.component'; import { ProbePageRoutingModule } from './probe-page-routing.module'; +import { LayoutModule } from 'app/commons/component/layout/layout.module'; @NgModule({ imports: [ @@ -15,7 +15,7 @@ import { ProbePageRoutingModule } from './probe-page-routing.module'; ProbePageRoutingModule, MaterialModule, ProbeModule, - SubMenubarModule, + LayoutModule, ], declarations: [ ProbePageComponent, diff --git a/src/app/pages/probes/probes-page.module.ts b/src/app/pages/probes/probes-page.module.ts index 9e8b97a..4f87cc0 100644 --- a/src/app/pages/probes/probes-page.module.ts +++ b/src/app/pages/probes/probes-page.module.ts @@ -2,13 +2,13 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MaterialModule } from 'packages/commons/material/material.module'; -import { SubMenubarModule } from 'packages/commons/component/sub-menubar/sub-menubar.module'; import { ProbeModule } from 'packages/probe/probe.module'; import { NoauthModule } from 'packages/noauth/noauth.module'; import { ProbesPageComponent } from './probes-page.component'; import { ProbesPageRoutingModule } from './probes-page-routing.module'; +import { LayoutModule } from 'app/commons/component/layout/layout.module'; @NgModule({ imports: [ @@ -17,7 +17,7 @@ import { ProbesPageRoutingModule } from './probes-page-routing.module'; MaterialModule, ProbeModule, NoauthModule, - SubMenubarModule + LayoutModule ], declarations: [ ProbesPageComponent, diff --git a/src/app/pages/sensor-setting/sensor-setting-page.component.ts b/src/app/pages/sensor-setting/sensor-setting-page.component.ts index a7c5f53..d7816b1 100644 --- a/src/app/pages/sensor-setting/sensor-setting-page.component.ts +++ b/src/app/pages/sensor-setting/sensor-setting-page.component.ts @@ -1,8 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import {MatDialog} from '@angular/material'; -import { SettingComponent as DiscoverySettingComponent } from 'packages/discovery/component/setting/setting.component'; - @Component({ selector: 'of-sensor-setting-page', @@ -11,7 +8,7 @@ import { SettingComponent as DiscoverySettingComponent } from 'packages/discover }) export class SensorSettingPageComponent implements OnInit { - constructor(public dialog: MatDialog) { } + constructor() { } step = 1; @@ -19,26 +16,10 @@ export class SensorSettingPageComponent implements OnInit { } - openDialog(): void { - const dialogRef = this.dialog.open(DiscoverySettingComponent, { - width: '850px', - }); - - dialogRef.afterClosed().subscribe(result => { - console.log('The dialog was closed'); - - }); - } onNext() { this.step = 2; // this.router.navigate(['step2']); } - onCloseCancel() { - // this.dialogRef.close('Cancel'); - this.openDialog(); - } - - } diff --git a/src/app/pages/sensor-setting/sensor-setting-page.module.ts b/src/app/pages/sensor-setting/sensor-setting-page.module.ts index 0d93145..e54fa12 100644 --- a/src/app/pages/sensor-setting/sensor-setting-page.module.ts +++ b/src/app/pages/sensor-setting/sensor-setting-page.module.ts @@ -8,8 +8,6 @@ import { DiscoveryModule } from 'packages/discovery/discovery.module'; import { MaterialModule } from 'packages/commons/material/material.module'; -import { SettingComponent as DiscoverySettingComponent } from 'packages/discovery/component/setting/setting.component'; - import { SensorSettingPageRoutingModule } from './sensor-setting-page-routing.module'; import { SensorSettingPageComponent } from './sensor-setting-page.component'; @@ -21,11 +19,9 @@ import { SensorSettingPageComponent } from './sensor-setting-page.component'; SensorSettingPageRoutingModule, SensorModule, FormsModule, - DiscoveryModule ], - entryComponents: [ - DiscoverySettingComponent - ], - declarations: [SensorSettingPageComponent] + declarations: [ + SensorSettingPageComponent + ] }) export class SensorSettingPageModule { } diff --git a/src/app/pages/sensor/sensor-page.module.ts b/src/app/pages/sensor/sensor-page.module.ts index f0737ce..c62a6f4 100644 --- a/src/app/pages/sensor/sensor-page.module.ts +++ b/src/app/pages/sensor/sensor-page.module.ts @@ -4,10 +4,10 @@ import { CommonModule } from '@angular/common'; import { SensorModule } from 'packages/sensor/sensor.module'; import { MaterialModule } from 'packages/commons/material/material.module'; -import { SubMenubarModule } from 'packages/commons/component/sub-menubar/sub-menubar.module'; import { SensorPageRoutingModule } from './sensor-page-routing.module'; import { SensorPageComponent } from './sensor-page.component'; +import { LayoutModule } from 'app/commons/component/layout/layout.module'; @NgModule({ imports: [ @@ -15,7 +15,7 @@ import { SensorPageComponent } from './sensor-page.component'; SensorPageRoutingModule, MaterialModule, SensorModule, - SubMenubarModule, + LayoutModule ], declarations: [ SensorPageComponent, diff --git a/src/app/pages/target/target-page.module.ts b/src/app/pages/target/target-page.module.ts index 9584e1c..3bc8de1 100644 --- a/src/app/pages/target/target-page.module.ts +++ b/src/app/pages/target/target-page.module.ts @@ -4,10 +4,10 @@ import { CommonModule } from '@angular/common'; import { TargetModule } from 'packages/target/target.module'; import { MaterialModule } from 'packages/commons/material/material.module'; -import { SubMenubarModule } from 'packages/commons/component/sub-menubar/sub-menubar.module'; import { TargetPageComponent } from './target-page.component'; import { TargetPageRoutingModule } from './target-page-routing.module'; +import { LayoutModule } from 'app/commons/component/layout/layout.module'; @NgModule({ imports: [ @@ -15,7 +15,7 @@ import { TargetPageRoutingModule } from './target-page-routing.module'; TargetPageRoutingModule, MaterialModule, TargetModule, - SubMenubarModule, + LayoutModule ], declarations: [ TargetPageComponent, diff --git a/src/app/pages/targets/targets-page.module.ts b/src/app/pages/targets/targets-page.module.ts index bb7c9b3..f6c4f74 100644 --- a/src/app/pages/targets/targets-page.module.ts +++ b/src/app/pages/targets/targets-page.module.ts @@ -4,17 +4,18 @@ import { CommonModule } from '@angular/common'; import { TargetModule } from 'packages/target/target.module'; import { MaterialModule } from 'packages/commons/material/material.module'; -import { SubMenubarModule } from 'packages/commons/component/sub-menubar/sub-menubar.module'; import { TargetsPageRoutingModule } from './targets-page-routing.module'; import { TargetsPageComponent } from './targets-page.component'; +import { LayoutModule } from 'app/commons/component/layout/layout.module'; @NgModule({ imports: [ CommonModule, MaterialModule, TargetsPageRoutingModule, - TargetModule + TargetModule, + LayoutModule ], declarations: [ TargetsPageComponent diff --git a/src/packages/commons/component/footer/footer.module.ts b/src/packages/commons/component/footer/footer.module.ts deleted file mode 100644 index e641953..0000000 --- a/src/packages/commons/component/footer/footer.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MaterialModule } from 'packages/commons/material/material.module'; - -import { FooterComponent } from './footer.component'; - -@NgModule({ - imports: [ - CommonModule, - MaterialModule - ], - declarations: [ - FooterComponent - ], - exports: [ - FooterComponent - ] -}) -export class FooterModule { } diff --git a/src/packages/commons/component/header/header.module.ts b/src/packages/commons/component/header/header.module.ts deleted file mode 100644 index ccff5f3..0000000 --- a/src/packages/commons/component/header/header.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MaterialModule } from 'packages/commons/material/material.module'; - -import { NotificationModule } from 'packages/notification/notification.module'; - -import { HeaderComponent } from './header.component'; - -@NgModule({ - imports: [ - CommonModule, - MaterialModule, - NotificationModule, - ], - declarations: [ - HeaderComponent - ], - exports: [ - HeaderComponent - ] -}) -export class HeaderModule { } diff --git a/src/packages/commons/component/sidebar/sidebar.module.ts b/src/packages/commons/component/sidebar/sidebar.module.ts deleted file mode 100644 index 64a7198..0000000 --- a/src/packages/commons/component/sidebar/sidebar.module.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { RouterModule } from '@angular/router'; - -import { - LocalizationModule, -} from 'angular-l10n'; - -import { - PerfectScrollbarModule, -} from 'ngx-perfect-scrollbar'; - -import { MaterialModule } from 'packages/commons/material/material.module'; - -import { MenuItemModule } from 'packages/commons/component/menu-item/menu-item.module'; - -import { SidebarComponent } from './sidebar.component'; - -@NgModule({ - imports: [ - CommonModule, - LocalizationModule, - MaterialModule, - RouterModule, - PerfectScrollbarModule, - MenuItemModule, - ], - declarations: [ - SidebarComponent, - ], - exports: [ - SidebarComponent, - ] -}) -export class SidebarModule { } diff --git a/src/packages/commons/component/sub-menubar/sub-menubar.module.ts b/src/packages/commons/component/sub-menubar/sub-menubar.module.ts deleted file mode 100644 index 59f83b1..0000000 --- a/src/packages/commons/component/sub-menubar/sub-menubar.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { RouterModule } from '@angular/router'; - -import { MaterialModule } from 'packages/commons/material/material.module'; -import { SubMenubarComponent } from './sub-menubar.component'; - -@NgModule({ - imports: [ - CommonModule, - MaterialModule, - RouterModule - ], - declarations: [ - SubMenubarComponent, - ], - exports: [ - SubMenubarComponent, - ] -}) -export class SubMenubarModule { } diff --git a/src/theme/theme.scss b/src/theme/theme.scss index e50ff81..b8effb5 100644 --- a/src/theme/theme.scss +++ b/src/theme/theme.scss @@ -1,6 +1,6 @@ @import '~@angular/material/theming'; @import '~app/pages/pages.component.scss'; -@import '~packages/commons/component/sidebar/sidebar.component.scss'; +@import '~app/commons/component/layout/sidebar/sidebar.component.scss'; @import '~packages/commons/component/menu-item/menu-item.component.scss'; @import '~packages/commons/component/dashboard-card/dashboard-card.component.scss'; @import '~packages/commons/component/sensor-summary/sensor-summary.component.scss';