main-routing.module.ts 4.0 KB
Newer Older
J
Jason 已提交
1 2
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
J
顶替  
Jason 已提交
3 4 5
import {DashComponent} from './dash/dash.component';
import {MainComponent} from './main.component';
import {LinkComponent} from './link/link.component';
J
Jason 已提交
6
import {TunnelComponent} from './tunnel/tunnel.component';
J
Jason 已提交
7
import {PluginComponent} from './plugin/plugin.component';
J
Jason 已提交
8
import {LinkMonitorComponent} from './link-monitor/link-monitor.component';
J
Jason 已提交
9
import {ProjectComponent} from './project/project.component';
10 11 12 13 14
import {ModelAdapterComponent} from './project-adapter/model-adapter.component';
import {ModelVariableComponent} from './project-variable/model-variable.component';
import {ModelBatchComponent} from './project-batch/model-batch.component';
import {ModelJobComponent} from './project-job/model-job.component';
import {ModelStrategyComponent} from './project-strategy/model-strategy.component';
J
Jason 已提交
15
import {ProjectEditComponent} from './project-edit/project-edit.component';
J
Jason 已提交
16
import {TunnelEditComponent} from './tunnel-edit/tunnel-edit.component';
J
Jason 已提交
17
import {LinkEditComponent} from './link-edit/link-edit.component';
18 19 20 21 22
import {ModelStrategyEditComponent} from './project-strategy-edit/model-strategy-edit.component';
import {ModelJobEditComponent} from './project-job-edit/model-job-edit.component';
import {ModelBatchEditComponent} from './project-batch-edit/model-batch-edit.component';
import {ModelVariableEditComponent} from './project-variable-edit/model-variable-edit.component';
import {ModelAdapterEditComponent} from './project-adapter-edit/model-adapter-edit.component';
J
Jason 已提交
23
import {PluginEditComponent} from './plugin-edit/plugin-edit.component';
24
import {ProjectDetailComponent} from './project-detail/project-detail.component';
J
Jason 已提交
25 26 27 28 29 30 31 32

const routes: Routes = [
  {
    path: '',
    component: MainComponent,
    children: [
      {path: '', redirectTo: 'dash'},
      {path: 'dash', component: DashComponent},
J
Jason 已提交
33
      {path: 'tunnel', component: TunnelComponent},
34 35 36
      {path: 'tunnel/create', component: TunnelEditComponent},
      {path: 'tunnel/:id/edit', component: TunnelEditComponent},
      {path: 'tunnel/:id/link', component: LinkComponent},
J
顶替  
Jason 已提交
37
      {path: 'link', component: LinkComponent},
38 39
      {path: 'link/:id/edit', component: LinkEditComponent},
      {path: 'link/:id/monitor', component: LinkMonitorComponent},
J
Jason 已提交
40
      {path: 'plugin', component: PluginEditComponent},
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
      {path: 'plugin/create', component: PluginEditComponent},
      {path: 'plugin/:id/edit', component: PluginComponent},
      {path: 'project', component: ProjectComponent},
      {path: 'project/create', component: ProjectEditComponent},
      {path: 'project/:id/edit', component: ProjectEditComponent},
      {path: 'project/:id/detail', component: ProjectDetailComponent},
      {path: 'project/:id/adapter', component: ModelAdapterComponent},
      {path: 'project/:id/adapter/create', component: ModelAdapterEditComponent},
      {path: 'project/:id/adapter/:id/edit', component: ModelAdapterEditComponent},
      {path: 'project/:id/variable', component: ModelVariableComponent},
      {path: 'project/:id/variable/create', component: ModelVariableEditComponent},
      {path: 'project/:id/variable/:id/edit', component: ModelVariableEditComponent},
      {path: 'project/:id/batch', component: ModelBatchComponent},
      {path: 'project/:id/batch/create', component: ModelBatchEditComponent},
      {path: 'project/:id/batch/:id/edit', component: ModelBatchEditComponent},
      {path: 'project/:id/job', component: ModelJobComponent},
      {path: 'project/:id/job/create', component: ModelJobEditComponent},
      {path: 'project/:id/job/:id/edit', component: ModelJobEditComponent},
      {path: 'project/:id/strategy', component: ModelStrategyComponent},
      {path: 'project/:id/strategy/create', component: ModelStrategyEditComponent},
      {path: 'project/:id/strategy/:id/edit', component: ModelStrategyEditComponent},

J
Jason 已提交
63
      {path: '**', redirectTo: 'dash'},
J
Jason 已提交
64 65 66 67 68 69 70 71 72 73
    ]
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MainRoutingModule {
}