all.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. define([
  2. 'angular',
  3. '../core_module',
  4. './bundle_loader',
  5. './dashboard_loaders',
  6. ], function(angular, coreModule, BundleLoader) {
  7. "use strict";
  8. coreModule.config(function($routeProvider, $locationProvider) {
  9. $locationProvider.html5Mode(true);
  10. var loadOrgBundle = new BundleLoader.BundleLoader('app/features/org/all');
  11. $routeProvider
  12. .when('/', {
  13. templateUrl: 'app/partials/dashboard.html',
  14. controller : 'LoadDashboardCtrl',
  15. reloadOnSearch: false,
  16. })
  17. .when('/dashboard/:type/:slug', {
  18. templateUrl: 'app/partials/dashboard.html',
  19. controller : 'LoadDashboardCtrl',
  20. reloadOnSearch: false,
  21. })
  22. .when('/dashboard-solo/:type/:slug', {
  23. templateUrl: 'app/features/panel/partials/soloPanel.html',
  24. controller : 'SoloPanelCtrl',
  25. })
  26. .when('/dashboard-import/:file', {
  27. templateUrl: 'app/partials/dashboard.html',
  28. controller : 'DashFromImportCtrl',
  29. reloadOnSearch: false,
  30. })
  31. .when('/dashboard/new', {
  32. templateUrl: 'app/partials/dashboard.html',
  33. controller : 'NewDashboardCtrl',
  34. reloadOnSearch: false,
  35. })
  36. .when('/import/dashboard', {
  37. templateUrl: 'app/features/dashboard/partials/import.html',
  38. controller : 'DashboardImportCtrl',
  39. })
  40. .when('/datasources', {
  41. templateUrl: 'app/features/org/partials/datasources.html',
  42. controller : 'DataSourcesCtrl',
  43. resolve: loadOrgBundle,
  44. })
  45. .when('/datasources/edit/:id', {
  46. templateUrl: 'app/features/org/partials/datasourceEdit.html',
  47. controller : 'DataSourceEditCtrl',
  48. resolve: loadOrgBundle,
  49. })
  50. .when('/datasources/new', {
  51. templateUrl: 'app/features/org/partials/datasourceEdit.html',
  52. controller : 'DataSourceEditCtrl',
  53. resolve: loadOrgBundle,
  54. })
  55. .when('/org', {
  56. templateUrl: 'app/features/org/partials/orgDetails.html',
  57. controller : 'OrgDetailsCtrl',
  58. resolve: loadOrgBundle,
  59. })
  60. .when('/org/new', {
  61. templateUrl: 'app/features/org/partials/newOrg.html',
  62. controller : 'NewOrgCtrl',
  63. resolve: loadOrgBundle,
  64. })
  65. .when('/org/users', {
  66. templateUrl: 'app/features/org/partials/orgUsers.html',
  67. controller : 'OrgUsersCtrl',
  68. resolve: loadOrgBundle,
  69. })
  70. .when('/org/apikeys', {
  71. templateUrl: 'app/features/org/partials/orgApiKeys.html',
  72. controller : 'OrgApiKeysCtrl',
  73. resolve: loadOrgBundle,
  74. })
  75. .when('/profile', {
  76. templateUrl: 'app/features/profile/partials/profile.html',
  77. controller : 'ProfileCtrl',
  78. })
  79. .when('/profile/password', {
  80. templateUrl: 'app/features/profile/partials/password.html',
  81. controller : 'ChangePasswordCtrl',
  82. })
  83. .when('/profile/select-org', {
  84. templateUrl: 'app/features/profile/partials/select_org.html',
  85. controller : 'SelectOrgCtrl',
  86. })
  87. .when('/admin/settings', {
  88. templateUrl: 'app/features/admin/partials/settings.html',
  89. controller : 'AdminSettingsCtrl',
  90. })
  91. .when('/admin/users', {
  92. templateUrl: 'app/features/admin/partials/users.html',
  93. controller : 'AdminListUsersCtrl',
  94. })
  95. .when('/admin/users/create', {
  96. templateUrl: 'app/features/admin/partials/new_user.html',
  97. controller : 'AdminEditUserCtrl',
  98. })
  99. .when('/admin/users/edit/:id', {
  100. templateUrl: 'app/features/admin/partials/edit_user.html',
  101. controller : 'AdminEditUserCtrl',
  102. })
  103. .when('/admin/orgs', {
  104. templateUrl: 'app/features/admin/partials/orgs.html',
  105. controller : 'AdminListOrgsCtrl',
  106. })
  107. .when('/admin/orgs/edit/:id', {
  108. templateUrl: 'app/features/admin/partials/edit_org.html',
  109. controller : 'AdminEditOrgCtrl',
  110. })
  111. .when('/login', {
  112. templateUrl: 'app/partials/login.html',
  113. controller : 'LoginCtrl',
  114. })
  115. .when('/invite/:code', {
  116. templateUrl: 'app/partials/signup_invited.html',
  117. controller : 'InvitedCtrl',
  118. })
  119. .when('/signup', {
  120. templateUrl: 'app/partials/signup_step2.html',
  121. controller : 'SignUpCtrl',
  122. })
  123. .when('/user/password/send-reset-email', {
  124. templateUrl: 'app/partials/reset_password.html',
  125. controller : 'ResetPasswordCtrl',
  126. })
  127. .when('/user/password/reset', {
  128. templateUrl: 'app/partials/reset_password.html',
  129. controller : 'ResetPasswordCtrl',
  130. })
  131. .otherwise({
  132. templateUrl: 'app/partials/error.html',
  133. controller: 'ErrorCtrl'
  134. });
  135. });
  136. });