本文整理匯總了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')));
}
示例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')));
}
示例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();
}
示例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')));
}
示例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')));
}
示例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')));
}
示例7: loadWizardRoutes
private loadWizardRoutes() {
crossroads.addRoute('/wizard', () => this.sectionRoute.getOld('wizard'));
}
示例8: loadConsoleRoutes
private loadConsoleRoutes() {
crossroads.addRoute('/console', () => this.sectionRoute.getOld('console'));
}
示例9: loadDashboardRoutes
private loadDashboardRoutes() {
crossroads.addRoute('/dashboard', () => this.sectionRoute.getOld('dashboard'));
}
示例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')));
}