Skip to content

Commit

Permalink
feat(dashboard): a page for watching rclone states
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonH committed May 14, 2020
1 parent 0e859f8 commit 8874908
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/pages/dashboard/dashboard-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { DashboardComponent } from './dashboard.component';

const routes: Routes = [{ path: '', component: DashboardComponent }];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class DashboardRoutingModule { }
25 changes: 25 additions & 0 deletions src/app/pages/dashboard/dashboard.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { DashboardComponent } from './dashboard.component';

describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DashboardComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
20 changes: 20 additions & 0 deletions src/app/pages/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-dashboard',
template: `
<p>
dashboard works!
</p>
`,
styles: [
]
})
export class DashboardComponent implements OnInit {

constructor() { }

ngOnInit(): void {
}

}
15 changes: 15 additions & 0 deletions src/app/pages/dashboard/dashboard.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { DashboardRoutingModule } from './dashboard-routing.module';
import { DashboardComponent } from './dashboard.component';


@NgModule({
declarations: [DashboardComponent],
imports: [
CommonModule,
DashboardRoutingModule
]
})
export class DashboardModule { }
15 changes: 15 additions & 0 deletions src/app/pages/dashboard/pages.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { PagesRoutingModule } from '../pages-routing.module';
import { PagesComponent } from './pages.component';


@NgModule({
declarations: [PagesComponent],
imports: [
CommonModule,
PagesRoutingModule
]
})
export class PagesModule { }
6 changes: 6 additions & 0 deletions src/app/pages/pages-menu.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { NbMenuItem } from '@nebular/theme';

export const MENU_ITEMS: NbMenuItem[] = [
{
title: 'Dashboard',
icon: 'home-outline',
link: 'dashboard',
home: true,
},
];
8 changes: 8 additions & 0 deletions src/app/pages/pages-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ const routes: Routes = [
{
path: '',
component: PagesComponent,
children: [
{
path: 'dashboard',
loadChildren: () => import('./dashboard/dashboard.module').then((m) => m.DashboardModule),
},
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
{ path: '**', redirectTo: 'dashboard' },
],
},
];

Expand Down

0 comments on commit 8874908

Please sign in to comment.