import {Routes} from "@angular/router";
import { LoginGuard } from "./shared/common/loginGuard";
import {AppComponent} from "./app.component";
import {JhiLoginModalComponent} from "./shared";
import {JhiMainComponent} from "./layouts";
import {BasicComponent} from "./overAll/basic/basic.component";
import {BasicDetailComponent} from "./overAll/basic/basic-detail/basic-detail.component";
import {AuditComponent} from "./system/audit/audit.component";
import {ExamineComponent} from "./system/examine/examine.component";
import {GroupComponent} from "./system/group/group.component";
import {PowerComponent} from "./system/power/power.component";
import {AlarmListComponent} from './alarm/alarm-list/alarm-list.component';
import {AlarmLogComponent} from './alarm/alarm-log/alarm-log.component';
import {AlarmManageComponent} from './alarm/alarm-manage/alarm-manage.component';
import {AlarmSetComponent} from './alarm/alarm-set/alarm-set.component';
import {NowAlarmComponent} from './alarm/now-alarm/now-alarm.component';
import {SendSetComponent} from './alarm/send-set/send-set.component';
import {NeTopologyComponent} from './netTopology/ne-topology/ne-topology.component';
import {FlowTrendComponent} from './netTopology/flow-trend/flow-trend.component';
import {NetworkCheckComponent} from './overAll/network-check/network-check.component';
import {NetworkDetailComponent} from './overAll/network-check/network-detail/network-detail.component';
import {TopologyImgComponent} from './netTopology/topology-img/topology-img.component';
import {WorkHandleComponent} from './work/work-handle/work-handle.component';
import {InspectPlanComponent} from './work/inspect-plan/inspect-plan.component';
import {AssetPartComponent} from './work/asset-part/asset-part.component';
import {ChildAssetsComponent} from './work/asset-part/child-assets/child-assets.component';
import {AssetsDetailComponent} from './work/asset-part/assets-detail/assets-detail.component';
import {HandleDetailComponent} from './work/work-handle/handle-detail/handle-detail.component';
import {HandleEventComponent} from './work/work-handle/handle-event/handle-event.component';
import {ResourceUsabilComponent} from './analysis/resource-usabil/resource-usabil.component';
import {OperationWorkComponent} from './analysis/operation-work/operation-work.component';
import {ResourceAlarmComponent} from './analysis/resource-alarm/resource-alarm.component';
import {PararmsComponent} from './work/pararms/pararms.component';
import {HomeComponent} from './home/home.component';

export const route: Routes = [
    {path: '', component: JhiMainComponent,canActivate:[LoginGuard]},
    {
        path: 'app', component: AppComponent,
        children: [
            {path: 'login', component: JhiLoginModalComponent},
            {
                path: 'main', component: JhiMainComponent,canActivate:[LoginGuard],data: { breadcrumb: '首页' },
                children: [
                    {path: 'home', component: HomeComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'basic', component: BasicComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'basic-detail', component: BasicDetailComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'networkCheck', component: NetworkCheckComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'network-detail', component: NetworkDetailComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'audit', component: AuditComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'examine', component: ExamineComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'group', component: GroupComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'power', component: PowerComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'alarmList', component: AlarmListComponent,data: { breadcrumb: '告警推送日志' },},
                    {path: 'alarmLog', component: AlarmLogComponent,data: { breadcrumb: '告警记录' },},
                    {path: 'alarmManage', component: AlarmManageComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'alarmSet', component: AlarmSetComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'nowAlarm', component: NowAlarmComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'sendSet', component: SendSetComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'neTopology', component: NeTopologyComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'flowTrend', component: FlowTrendComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'topoImg', component: TopologyImgComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'workHandle', component: WorkHandleComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'inspectPlan', component: InspectPlanComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'assetPart', component: AssetPartComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'assetChild', component: ChildAssetsComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'assetsDetail', component: AssetsDetailComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'handleDetail', component: HandleDetailComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'handleEvent', component: HandleEventComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'resourceUsabil', component: ResourceUsabilComponent,data: { breadcrumb: '资源可用性统计' },},
                    {path: 'operationWork', component: OperationWorkComponent,data: { breadcrumb: '运维工作' },},
                    {path: 'resourceAlarm', component: ResourceAlarmComponent,data: { breadcrumb: '资源告警统计' },},
                    {path: 'params', component: PararmsComponent,data: { breadcrumb: '参数配置' },},
                ]
            },
        ]
    },
    {path: '*', component: AppComponent,canActivate:[LoginGuard]},
];
