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 {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';
import {TemplateComponent} from './overAll/template/template.component';
import {CheckListComponent} from './overAll/template/check-list/check-list.component';
import {TriggerListComponent} from './overAll/template/trigger-list/trigger-list.component';
import {DiscoveryListComponent} from './overAll/template/discovery-list/discovery-list.component';
import {ItemListComponent} from './overAll/template/list/item-list/item-list.component';
import {TriListComponent} from './overAll/template/list/tri-list/tri-list.component';
import {BOverviewComponent} from './business/b-overview/b-overview.component';
import {BTopologyComponent} from './business/b-topology/b-topology.component';
import {EffectAnalysisComponent} from './business/effect-analysis/effect-analysis.component';
import {LogAnalysisComponent} from './business/log-analysis/log-analysis.component';
import {BConfigComponent} from './business/b-config/b-config.component';
import {SignalComponent} from './shared/signal/signal.component';
import {DatabaseComponent} from './overAll/modal/database/database.component';
import {ServerComponent} from './overAll/modal/server/server.component';
import {SwitchComponent} from './overAll/modal/switch/switch.component';
import {MineComponent} from './mine/mine.component';
import {CommentStmt} from '@angular/compiler';
import {CommonProblemComponent} from './knowladge/common-problem/common-problem.component';
import {InformationTechComponent} from './knowladge/information-tech/information-tech.component';
import {ManagementSystemComponent} from './knowladge/management-system/management-system.component';
import {OprCompanyComponent} from './project-manager/opr-company/opr-company.component';
import {OprCostComponent} from './project-manager/opr-cost/opr-cost.component';
import {OprProjectComponent} from './project-manager/opr-project/opr-project.component';
import {OprTeamComponent} from './project-manager/opr-team/opr-team.component';
import {MyFollowComponent} from './overview/my-follow/my-follow.component';
import {WorkReminderComponent} from './overview/work-reminder/work-reminder.component';
import {ChangeManageComponent} from './system-change/change-manage/change-manage.component';
import {ChangeParamsComponent} from './system-change/change-params/change-params.component';
import {SparePartsManagementComponent} from './work/spare-parts-management/spare-parts-management.component';
import {InspectPlanConfigComponent} from './work/inspect-plan-config/inspect-plan-config.component';
import {AssetManageComponent} from './infomationResource/asset-manage/asset-manage.component';
import {SysChangeCountComponent} from './analysis/sys-change-count/sys-change-count.component';
import {InfoHomeComponent} from './infomationResource/info-home/info-home.component';
import {BCountComponent} from './analysis/b-count/b-count.component';

export const route: Routes = [
    {path: '', redirectTo: 'app/main/home', pathMatch: 'prefix'},  //空路由定向
    {
        path: 'app', component: AppComponent,
        children: [
            {path: 'signal', component: SignalComponent},
            {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: '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: 'systemCount', component: SysChangeCountComponent, data: {breadcrumb: '系统变更统计'},},
                    {path: 'operationWork', component: OperationWorkComponent, data: {breadcrumb: '运维工作'},},
                    {path: 'resourceAlarm', component: ResourceAlarmComponent, data: {breadcrumb: '资源告警统计'},},
                    {path: 'params', component: PararmsComponent, data: {breadcrumb: '参数配置'},},
                    {path: 'template', component: TemplateComponent, data: {breadcrumb: '模版配置'},},
                    {path: 'discoveryList', component: DiscoveryListComponent, data: {breadcrumb: '自动发现列表'},},
                    {path: 'checkList', component: CheckListComponent, data: {breadcrumb: '监控项原型'},},
                    {path: 'triggerList', component: TriggerListComponent, data: {breadcrumb: '阈值原型'},},
                    {path: 'itemList', component: ItemListComponent, data: {breadcrumb: '监控项'},},
                    {path: 'triList', component: TriListComponent, data: {breadcrumb: '阈值'},},
                    {path: 'bOverview', component: BOverviewComponent, data: {breadcrumb: '业务概览'},},
                    {path: 'bTopology', component: BTopologyComponent, data: {breadcrumb: '业务拓扑'},},
                    {path: 'effectAnalysis', component: EffectAnalysisComponent, data: {breadcrumb: '效能分析'},},
                    {path: 'logAnalysis', component: LogAnalysisComponent, data: {breadcrumb: '日志分析'},},
                    {path: 'bConfig', component: BConfigComponent, data: {breadcrumb: '业务配置'},},
                    {path: 'database', component: DatabaseComponent, data: {breadcrumb: '数据库'},},
                    {path: 'server', component: ServerComponent, data: {breadcrumb: '服务器'},},
                    {path: 'switch', component: SwitchComponent, data: {breadcrumb: '交换机'},},
                    {path: 'commonProblem', component: CommonProblemComponent, data: {breadcrumb: '常见问题'},},
                    {path: 'informationTech', component: InformationTechComponent, data: {breadcrumb: '信息技术'},},
                    {path: 'managementSystem', component: ManagementSystemComponent, data: {breadcrumb: '管理制度'},},
                    {path: 'oprCompany', component: OprCompanyComponent, data: {breadcrumb: '运维公司'},},
                    {path: 'oprCost', component: OprCostComponent, data: {breadcrumb: '运维费用'},},
                    {path: 'oprProject', component: OprProjectComponent, data: {breadcrumb: '运维项目'},},
                    {path: 'oprTeam', component: OprTeamComponent, data: {breadcrumb: '运维团队'},},
                    {path: 'SparePartsManagement', component: SparePartsManagementComponent, data: {breadcrumb: '备件管理'},},
                    {path: 'inspectPlanConfig', component: InspectPlanConfigComponent, data: {breadcrumb: '巡检计划配置'},},
                    {path: 'oprTeam', component: OprTeamComponent, data: {breadcrumb: '工作提醒'},},
                    {path: 'myFollow', component: MyFollowComponent, data: {breadcrumb: '我的关注'},},
                    {path: 'workReminder', component: WorkReminderComponent, data: {breadcrumb: '工作提醒'},},
                    {path: 'changeManage', component: ChangeManageComponent, data: {breadcrumb: '变更管理'},},
                    {path: 'changeParams', component: ChangeParamsComponent, data: {breadcrumb: '变更参数配置'},},
                    {path: 'assetManage', component: AssetManageComponent, data: {breadcrumb: '资产管理'},},
                    {path: 'mine', component: MineComponent, data: {breadcrumb: '菜单栏'},},
                    {path: 'infoHome', component: InfoHomeComponent, data: {breadcrumb: '首页'},},
                    {path: 'bCount', component: BCountComponent, data: {breadcrumb: '业务监管统计'},},
                ]
            },
        ]
    },
    {path: '**', redirectTo: 'app/main/home', pathMatch: 'full'},   //未找到的路由 重定向
];
