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 {DatabaseComponent} from './overAll/modal/database/database.component';
import {ServerComponent} from './overAll/modal/server/server.component';
import {SwitchComponent} from './overAll/modal/switch/switch.component';

export const route: Routes = [
    {path: '', redirectTo: 'app/main/home', pathMatch: 'full'},
    {
        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: '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: '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: '*', component: AppComponent, canActivate: [LoginGuard]},
];
