From: Tiago Melo Date: Mon, 29 Jan 2018 12:08:00 +0000 (+0000) Subject: mgr/dashboard_v2: simplify router and fix navigation X-Git-Tag: wip-pdonnell-testing-20180317.202121~127^2~123 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1d2b7929304ce143343cc6e438a12fc85ac0e6b1;p=ceph-ci.git mgr/dashboard_v2: simplify router and fix navigation Signed-off-by: Tiago Melo --- diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/app-routing.module.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/app-routing.module.ts index 6f320da0067..4fb1abd512c 100644 --- a/src/pybind/mgr/dashboard_v2/frontend/src/app/app-routing.module.ts +++ b/src/pybind/mgr/dashboard_v2/frontend/src/app/app-routing.module.ts @@ -2,10 +2,12 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { AuthGuardService } from './shared/services/auth-guard.service'; import { EmptyComponent } from './shared/empty/empty.component'; +import { LoginComponent } from './core/auth/login/login.component'; const routes: Routes = [ // TODO configure an appropriate default route (maybe on ceph module?) { path: '', canActivate: [AuthGuardService], component: EmptyComponent }, + { path: 'login', component: LoginComponent } ]; @NgModule({ diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/core/core-routing.module.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/core/core-routing.module.ts deleted file mode 100644 index fbd98d27d12..00000000000 --- a/src/pybind/mgr/dashboard_v2/frontend/src/app/core/core-routing.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { LoginComponent } from './auth/login/login.component'; - -const routes: Routes = [ - { path: 'login', component: LoginComponent } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class CoreRoutingModule { } diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/core/core.module.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/core/core.module.ts index 4f4a618ef40..462806eee03 100644 --- a/src/pybind/mgr/dashboard_v2/frontend/src/app/core/core.module.ts +++ b/src/pybind/mgr/dashboard_v2/frontend/src/app/core/core.module.ts @@ -1,13 +1,11 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { CoreRoutingModule } from './core-routing.module'; import { NavigationModule } from './navigation/navigation.module'; import { AuthModule } from './auth/auth.module'; @NgModule({ imports: [ CommonModule, - CoreRoutingModule, NavigationModule, AuthModule ], diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/core/navigation/navigation.module.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/core/navigation/navigation.module.ts index 42a0d5a6eed..b4fbd416ffa 100644 --- a/src/pybind/mgr/dashboard_v2/frontend/src/app/core/navigation/navigation.module.ts +++ b/src/pybind/mgr/dashboard_v2/frontend/src/app/core/navigation/navigation.module.ts @@ -2,13 +2,19 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { NavigationComponent } from './navigation/navigation.component'; import { AuthModule } from '../auth/auth.module'; +import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; +import { AppRoutingModule } from '../../app-routing.module'; +import { SharedModule } from '../../shared/shared.module'; @NgModule({ imports: [ CommonModule, - AuthModule + AuthModule, + BsDropdownModule.forRoot(), + AppRoutingModule, + SharedModule ], declarations: [NavigationComponent], exports: [NavigationComponent] }) -export class NavigationModule { } +export class NavigationModule {} diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/core/navigation/navigation/navigation.component.html b/src/pybind/mgr/dashboard_v2/frontend/src/app/core/navigation/navigation/navigation.component.html index 0f5f0d5d532..5648a9d7d85 100644 --- a/src/pybind/mgr/dashboard_v2/frontend/src/app/core/navigation/navigation/navigation.component.html +++ b/src/pybind/mgr/dashboard_v2/frontend/src/app/core/navigation/navigation/navigation.component.html @@ -25,31 +25,31 @@