all.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. define([
  2. 'angular',
  3. './dashLoadControllers',
  4. ], function(angular) {
  5. "use strict";
  6. var module = angular.module('grafana.routes');
  7. module.config(function($routeProvider, $locationProvider) {
  8. $locationProvider.html5Mode(true);
  9. $routeProvider
  10. .when('/', {
  11. templateUrl: 'app/partials/dashboard.html',
  12. controller : 'DashFromDBCtrl',
  13. reloadOnSearch: false,
  14. })
  15. .when('/dashboard/db/:slug', {
  16. templateUrl: 'app/partials/dashboard.html',
  17. controller : 'DashFromDBCtrl',
  18. reloadOnSearch: false,
  19. })
  20. .when('/dashboard/file/:jsonFile', {
  21. templateUrl: 'app/partials/dashboard.html',
  22. controller : 'DashFromFileCtrl',
  23. reloadOnSearch: false,
  24. })
  25. .when('/dashboard/script/:jsFile', {
  26. templateUrl: 'app/partials/dashboard.html',
  27. controller : 'DashFromScriptCtrl',
  28. reloadOnSearch: false,
  29. })
  30. .when('/dashboard/import/:file', {
  31. templateUrl: 'app/partials/dashboard.html',
  32. controller : 'DashFromImportCtrl',
  33. reloadOnSearch: false,
  34. })
  35. .when('/dashboard/snapshot/:key', {
  36. templateUrl: 'app/partials/dashboard.html',
  37. controller : 'DashFromSnapshotCtrl',
  38. })
  39. .when('/dashboard/solo/db/:slug', {
  40. templateUrl: 'app/features/panel/partials/soloPanel.html',
  41. controller : 'SoloPanelCtrl',
  42. })
  43. .when('/dashboard/solo/snapshot/:key', {
  44. templateUrl: 'app/features/panel/partials/soloPanel.html',
  45. controller : 'SoloPanelCtrl',
  46. })
  47. .when('/dashboard/new', {
  48. templateUrl: 'app/partials/dashboard.html',
  49. controller : 'NewDashboardCtrl',
  50. reloadOnSearch: false,
  51. })
  52. .when('/dashboard/import', {
  53. templateUrl: 'app/features/dashboard/partials/import.html',
  54. controller : 'DashboardImportCtrl',
  55. })
  56. .when('/datasources', {
  57. templateUrl: 'app/features/org/partials/datasources.html',
  58. controller : 'DataSourcesCtrl',
  59. })
  60. .when('/datasources/edit/:id', {
  61. templateUrl: 'app/features/org/partials/datasourceEdit.html',
  62. controller : 'DataSourceEditCtrl',
  63. })
  64. .when('/datasources/new', {
  65. templateUrl: 'app/features/org/partials/datasourceEdit.html',
  66. controller : 'DataSourceEditCtrl',
  67. })
  68. .when('/org', {
  69. templateUrl: 'app/features/org/partials/orgDetails.html',
  70. controller : 'OrgDetailsCtrl',
  71. })
  72. .when('/org/new', {
  73. templateUrl: 'app/features/org/partials/newOrg.html',
  74. controller : 'NewOrgCtrl',
  75. })
  76. .when('/org/users', {
  77. templateUrl: 'app/features/org/partials/orgUsers.html',
  78. controller : 'OrgUsersCtrl',
  79. })
  80. .when('/org/apikeys', {
  81. templateUrl: 'app/features/org/partials/orgApiKeys.html',
  82. controller : 'OrgApiKeysCtrl',
  83. })
  84. .when('/profile', {
  85. templateUrl: 'app/features/profile/partials/profile.html',
  86. controller : 'ProfileCtrl',
  87. })
  88. .when('/profile/password', {
  89. templateUrl: 'app/features/profile/partials/password.html',
  90. controller : 'ChangePasswordCtrl',
  91. })
  92. .when('/admin/settings', {
  93. templateUrl: 'app/features/admin/partials/settings.html',
  94. controller : 'AdminSettingsCtrl',
  95. })
  96. .when('/admin/users', {
  97. templateUrl: 'app/features/admin/partials/users.html',
  98. controller : 'AdminUsersCtrl',
  99. })
  100. .when('/admin/users/create', {
  101. templateUrl: 'app/features/admin/partials/new_user.html',
  102. controller : 'AdminEditUserCtrl',
  103. })
  104. .when('/admin/users/edit/:id', {
  105. templateUrl: 'app/features/admin/partials/edit_user.html',
  106. controller : 'AdminEditUserCtrl',
  107. })
  108. .when('/admin/orgs', {
  109. templateUrl: 'app/features/admin/partials/orgs.html',
  110. })
  111. .when('/login', {
  112. templateUrl: 'app/partials/login.html',
  113. controller : 'LoginCtrl',
  114. })
  115. .otherwise({
  116. templateUrl: 'app/partials/error.html',
  117. controller: 'ErrorCtrl'
  118. });
  119. });
  120. });