• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript crossroads.addRoute函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中crossroads.addRoute函数的典型用法代码示例。如果您正苦于以下问题:TypeScript addRoute函数的具体用法?TypeScript addRoute怎么用?TypeScript addRoute使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了addRoute函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: loadPeeringRoutes

 private loadPeeringRoutes() {
     crossroads.addRoute('/peering', () => this.loadSection('peering'));
     crossroads.addRoute('/peering/peer/_/{peerId}',
         (peerId) => this.peeringRoute.get(peerId, this.currentStacks.get('peering')));
     crossroads.addRoute('/peering/create',
         () => this.peeringRoute.selectNewPeerType(this.currentStacks.get('peering')));
     crossroads.addRoute('/peering/create/{peerType}',
         (peerType) => this.peeringRoute.create(peerType, this.currentStacks.get('peering')));
 }
开发者ID:pchaussalet,项目名称:gui,代码行数:9,代码来源:routing-service.ts


示例2: loadCalendarRoutes

 private loadCalendarRoutes() {
     crossroads.addRoute('/calendar',
         () => this.calendarRoute.get().then((stack) => this.currentStacks.set('calendar', stack)));
     crossroads.addRoute('/calendar/calendar-task/_/{calendarTaskId}',
         (calendarTaskId) => this.calendarRoute.getTask(calendarTaskId, this.currentStacks.get('calendar')));
     crossroads.addRoute('/calendar/calendar-task/_/{calendarTaskId}/calendar-custom-schedule',
         () => this.calendarRoute.getCustomSchedule(this.currentStacks.get('calendar')));
     crossroads.addRoute('/calendar/calendar-task/create/{taskType}',
         (taskType) => this.calendarRoute.createTask(taskType, this.currentStacks.get('calendar')));
     crossroads.addRoute('/calendar/calendar-task/create/{taskType}/calendar-custom-schedule',
         () => this.calendarRoute.getCustomSchedule(this.currentStacks.get('calendar')));
 }
开发者ID:pchaussalet,项目名称:gui,代码行数:12,代码来源:routing-service.ts


示例3: loadRoutes

    private loadRoutes() {
        crossroads.addRoute('/_/retry/{taskId}',
            (taskId) => this.restoreTask(taskId));

        this.loadDashboardRoutes();
        this.loadStorageRoutes();
        this.loadNetworkRoutes();
        this.loadSettingsRoutes();
        this.loadServicesRoutes();
        this.loadConsoleRoutes();
        this.loadCalendarRoutes();
        this.loadPeeringRoutes();
        this.loadContainersRoutes();
        this.loadWizardRoutes();
    }
开发者ID:pchaussalet,项目名称:gui,代码行数:15,代码来源:routing-service.ts


示例4: loadNetworkRoutes

 private loadNetworkRoutes() {
     crossroads.addRoute('/network', () => this.loadSection('network'));
     crossroads.addRoute('/network/settings',
         (sectionId) => this.sectionRoute.getSettings('network', this.currentStacks.get('network')));
     crossroads.addRoute('/network/network-interface/_/{interfaceId}',
         (interfaceId) => this.networkRoute.get(interfaceId, this.currentStacks.get('network')));
     crossroads.addRoute('/network/ipmi',
         () => this.networkRoute.listIpmi(this.currentStacks.get('network')));
     crossroads.addRoute('/network/ipmi/_/{ipmiId}',
         (ipmiId) => this.networkRoute.getIpmi(ipmiId, this.currentStacks.get('network')));
     crossroads.addRoute('/network/create',
         () => this.networkRoute.selectNewInterfaceType(this.currentStacks.get('network')));
     crossroads.addRoute('/network/create/{interfaceType}',
         (interfaceType) => this.networkRoute.create(interfaceType, this.currentStacks.get('network')));
 }
开发者ID:pchaussalet,项目名称:gui,代码行数:15,代码来源:routing-service.ts


示例5: loadServicesRoutes

 private loadServicesRoutes() {
     crossroads.addRoute('/services', () => this.loadSection('services'));
     crossroads.addRoute('/services/services-category/_/{categoryId}',
         (categoryId) => this.serviceRoute.getCategory(categoryId, this.currentStacks.get('services')));
     crossroads.addRoute('/services/services-category/_/{categoryId}/service/_/{serviceId}',
         (categoryId, serviceId) => this.serviceRoute.getService(serviceId, this.currentStacks.get('services')));
     crossroads.addRoute('/services/services-category/_/{categoryId}/service/_/{serviceId}/modules',
         () => this.serviceRoute.listRsyncdModules(this.currentStacks.get('services')));
     crossroads.addRoute('/services/services-category/_/{categoryId}/service/_/{serviceId}/modules/create',
         () => this.serviceRoute.createRsyncdModule(this.currentStacks.get('services')));
     crossroads.addRoute('/services/services-category/_/{categoryId}/service/_/{serviceId}/modules/rsyncd-module/_/{moduleId}',
         (categoryId, serviceId, moduleId) => this.serviceRoute.getRsyncdModule(moduleId, this.currentStacks.get('services')));
 }
开发者ID:pchaussalet,项目名称:gui,代码行数:13,代码来源:routing-service.ts


示例6: loadStorageRoutes

 private loadStorageRoutes() {
     crossroads.addRoute('/storage', () => this.loadSection('storage'));
     crossroads.addRoute('/storage/volume/_/{volumeId}',
         (volumeId) => this.volumeRoute.get(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/share',
         (volumeId) => this.shareRoute.list(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/share/create',
         (volumeId) => this.shareRoute.selectNewType(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/share/create/{type}',
         (volumeId, type) => this.shareRoute.create(volumeId, type, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/share/_/{shareId}',
         (volumeId, shareId) => this.shareRoute.get(volumeId, shareId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-snapshot',
         (volumeId) => this.snapshotRoute.list(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-snapshot/create',
         (volumeId) => this.snapshotRoute.create(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-snapshot/_/{snapshotId*}',
         (volumeId, snapshotId) => this.snapshotRoute.get(volumeId, snapshotId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset',
         (volumeId) => this.datasetRoute.list(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/create',
         (volumeId) => this.datasetRoute.create(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}',
         (volumeId, datasetId) => this.datasetRoute.get(volumeId, datasetId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}/volume-snapshot',
         (volumeId, datasetId) => this.snapshotRoute.listForDataset(volumeId, datasetId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}/volume-snapshot/create',
         (volumeId, datasetId) => this.snapshotRoute.createForDataset(volumeId, datasetId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}/volume-snapshot/_/{snapshotId*}',
         (volumeId, datasetId, snapshotId) => this.snapshotRoute.getForDataset(volumeId, snapshotId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}/vmware-dataset',
         (volumeId, datasetId) => this.datasetRoute.listVmware(datasetId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}/vmware-dataset/create',
         (volumeId, datasetId) => this.datasetRoute.createVmware(datasetId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}/vmware-dataset/_/{vmwareDatasetId*}',
         (volumeId, datasetId, vmwareDatasetId) => this.datasetRoute.getVmware(vmwareDatasetId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}/replication',
         (volumeId, datasetId) => this.replicationRoute.createForDataset(datasetId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/volume-dataset/_/{datasetId*}/share',
         (volumeId, datasetId) => this.datasetRoute.getShare(volumeId, datasetId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/topology',
         (volumeId) => this.volumeRoute.topology(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/topology/disk/_/{diskId}',
         (volumeId, diskId) => this.volumeRoute.topologyDisk(volumeId, diskId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/create',
         () => this.volumeRoute.create(this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/create/disk/_/{diskId}',
         (diskId) => this.volumeRoute.creatorDisk(diskId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume-importer/_/-',
         () => this.volumeRoute.import(this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume-media-importer/_/-',
         () => this.volumeRoute.mediaImport(this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume-importer/_/-/detached-volume/_/{volumeId}',
         (volumeId) => this.volumeRoute.getDetachedVolume(volumeId, this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume-importer/_/-/detached-volume/_/{volumeId}/topology',
         (volumeId) => this.volumeRoute.getDetachedVolumeTopology(this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume-importer/_/-/encrypted',
         () => this.volumeRoute.importEncrypted(this.currentStacks.get('storage')));
     crossroads.addRoute('/storage/volume/_/{volumeId}/replication',
         (volumeId) => this.replicationRoute.list(volumeId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/replication/create',
         (volumeId) => this.replicationRoute.create(volumeId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/replication/_/{replicationId*}',
         (volumeId, replicationId) => this.replicationRoute.get(replicationId, this.currentStacks.get('storage')), 1);
     crossroads.addRoute('/storage/volume/_/{volumeId}/encrypted-volume-actions',
         (volumeId) => this.volumeRoute.getEncryptedVolumeActions(volumeId, this.currentStacks.get('storage')));
 }
开发者ID:pchaussalet,项目名称:gui,代码行数:67,代码来源:routing-service.ts


示例7: loadWizardRoutes

 private loadWizardRoutes() {
     crossroads.addRoute('/wizard', () => this.sectionRoute.getOld('wizard'));
 }
开发者ID:pchaussalet,项目名称:gui,代码行数:3,代码来源:routing-service.ts


示例8: loadConsoleRoutes

 private loadConsoleRoutes() {
     crossroads.addRoute('/console', () => this.sectionRoute.getOld('console'));
 }
开发者ID:pchaussalet,项目名称:gui,代码行数:3,代码来源:routing-service.ts


示例9: loadDashboardRoutes

 private loadDashboardRoutes() {
     crossroads.addRoute('/dashboard', () => this.sectionRoute.getOld('dashboard'));
 }
开发者ID:pchaussalet,项目名称:gui,代码行数:3,代码来源:routing-service.ts


示例10: loadSettingsRoutes

    private loadSettingsRoutes() {
        crossroads.addRoute('/settings', () => this.loadSection('settings'));
        crossroads.addRoute('/settings/system-section/_/{systemSectionId}',
            (systemSectionId) => this.systemRoute.get(systemSectionId, this.currentStacks.get('settings')));
        crossroads.addRoute('/settings/system-section/_/certificates/crypto-certificate/_/{certificateId}',
            (certificateId) => this.systemRoute.getCertificate(certificateId, this.currentStacks.get('settings')));
        crossroads.addRoute('/settings/system-section/_/certificates/create',
            () => this.systemRoute.selectNewCertificateType(this.currentStacks.get('settings')));
        crossroads.addRoute('/settings/system-section/_/certificates/create/{certificateType}',
            (certificateType) => this.systemRoute.createCertificate(certificateType, this.currentStacks.get('settings')));
        crossroads.addRoute('/settings/system-section/_/alert',
            () => this.systemRoute.getAlert(this.currentStacks.get('settings')), 1);
        crossroads.addRoute('/settings/system-section/_/alert/settings',
            () => this.systemRoute.getAlertSettings(this.currentStacks.get('settings')));
        crossroads.addRoute('/settings/system-section/_/tunables/tunable/_/{tunableId}',
            (tunableId) => this.systemRoute.getTunable(tunableId, this.currentStacks.get('settings')));
        crossroads.addRoute('/settings/system-section/_/tunables/create',
            () => this.systemRoute.createTunable(this.currentStacks.get('settings')));
        crossroads.addRoute('/settings/system-section/_/ntpservers/ntp-server/_/{ntpServerId}',
            (ntpServerId) => this.systemRoute.getNtpServer(ntpServerId, this.currentStacks.get('settings')));
        crossroads.addRoute('/settings/system-section/_/ntpservers/create',
            () => this.systemRoute.createNtpServer(this.currentStacks.get('settings')));

    }
开发者ID:pchaussalet,项目名称:gui,代码行数:24,代码来源:routing-service.ts



注:本文中的crossroads.addRoute函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript csx.viewHeight函数代码示例发布时间:2022-05-25
下一篇:
TypeScript types.isTypedArray函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap