2017-09-25 13:07:52 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
|
|
2018-06-27 10:34:15 +02:00
|
|
|
import { ProjectMapComponent } from './components/project-map/project-map.component';
|
2019-01-15 11:15:54 +01:00
|
|
|
import { ServersComponent } from './components/servers/servers.component';
|
|
|
|
import { ProjectsComponent } from './components/projects/projects.component';
|
|
|
|
import { DefaultLayoutComponent } from './layouts/default-layout/default-layout.component';
|
|
|
|
import { SettingsComponent } from './components/settings/settings.component';
|
|
|
|
import { LocalServerComponent } from './components/local-server/local-server.component';
|
2019-01-17 04:24:52 -08:00
|
|
|
import { PreferencesComponent } from './components/preferences/preferences.component';
|
2018-01-04 11:42:43 +01:00
|
|
|
|
2017-09-25 13:07:52 +02:00
|
|
|
const routes: Routes = [
|
2019-01-15 11:15:54 +01:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: DefaultLayoutComponent,
|
2017-10-27 13:55:40 +02:00
|
|
|
children: [
|
2019-01-15 11:15:54 +01:00
|
|
|
{ path: '', redirectTo: 'servers', pathMatch: 'full' },
|
2017-10-27 13:55:40 +02:00
|
|
|
{ path: 'servers', component: ServersComponent },
|
2018-06-26 11:13:09 +02:00
|
|
|
{ path: 'local', component: LocalServerComponent },
|
2018-04-04 16:05:29 +02:00
|
|
|
{ path: 'server/:server_id/projects', component: ProjectsComponent },
|
2019-01-17 04:24:52 -08:00
|
|
|
{ path: 'settings', component: SettingsComponent },
|
|
|
|
{ path: 'preferences', component: PreferencesComponent }
|
2017-10-27 13:55:40 +02:00
|
|
|
]
|
|
|
|
},
|
2019-01-15 11:15:54 +01:00
|
|
|
{ path: 'server/:server_id/project/:project_id', component: ProjectMapComponent }
|
2017-09-25 13:07:52 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
2019-01-15 11:15:54 +01:00
|
|
|
imports: [RouterModule.forRoot(routes)],
|
|
|
|
exports: [RouterModule]
|
2017-09-25 13:07:52 +02:00
|
|
|
})
|
|
|
|
export class AppRoutingModule {}
|