controller_route.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. var App = require('app');
  19. /**
  20. * This is required to reroute directly to the wizard controller. This is desired in following scenarios
  21. * 1. A wizard is being navigated and another browser window is simultaneously opened by the same or another user
  22. * 2. browser window crashed while navigating through any wizard and a new browser window is opened to complete the wizard
  23. * @type {Array} Array of Objects
  24. */
  25. module.exports = [
  26. {
  27. wizardControllerName: App.router.get('addHostController.name'),
  28. route: 'main.hostAdd'
  29. },
  30. {
  31. wizardControllerName: App.router.get('kerberosWizardController.name'),
  32. route: 'main.admin.adminKerberos.adminAddKerberos'
  33. },
  34. {
  35. wizardControllerName: App.router.get('addServiceController.name'),
  36. route: 'main.serviceAdd'
  37. },
  38. {
  39. wizardControllerName: App.router.get('reassignMasterController.name'),
  40. route: 'main.reassign'
  41. },
  42. {
  43. wizardControllerName: App.router.get('highAvailabilityWizardController.name'),
  44. route: 'main.services.enableHighAvailability'
  45. },
  46. {
  47. wizardControllerName: App.router.get('rMHighAvailabilityWizardController.name'),
  48. route: 'main.services.enableRMHighAvailability'
  49. },
  50. {
  51. wizardControllerName: App.router.get('addHawqStandbyWizardController.name'),
  52. route: 'main.services.addHawqStandby'
  53. },
  54. {
  55. wizardControllerName: App.router.get('removeHawqStandbyWizardController.name'),
  56. route: 'main.services.removeHawqStandby'
  57. },
  58. {
  59. wizardControllerName: App.router.get('activateHawqStandbyWizardController.name'),
  60. route: 'main.services.activateHawqStandby'
  61. },
  62. {
  63. wizardControllerName: App.router.get('rAHighAvailabilityWizardController.name'),
  64. route: 'main.services.enableRAHighAvailability'
  65. },
  66. {
  67. wizardControllerName: App.router.get('rollbackHighAvailabilityWizardController.name'),
  68. route: 'main.services.rollbackHighAvailability'
  69. },
  70. {
  71. wizardControllerName: App.router.get('mainAdminStackAndUpgradeController.name'),
  72. route: App.db.get('MainAdminStackAndUpgrade', 'upgradeState') == 'INIT' ? 'main.admin.stackAndUpgrade.index' : 'main.admin.stackAndUpgrade.versions'
  73. },
  74. {
  75. wizardControllerName: App.router.get('widgetWizardController.name'),
  76. route: 'main.createWidget'
  77. },
  78. {
  79. wizardControllerName: App.router.get('widgetEditController.name'),
  80. route: 'main.editWidget'
  81. }
  82. ];