all.js 4.7 KB

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