mirror of
https://github.com/grafana/grafana.git
synced 2025-02-04 12:41:12 -06:00
125 lines
4.0 KiB
JavaScript
125 lines
4.0 KiB
JavaScript
define([
|
|
'angular',
|
|
'./dashLoadControllers',
|
|
], function(angular) {
|
|
"use strict";
|
|
|
|
var module = angular.module('grafana.routes');
|
|
|
|
module.config(function($routeProvider, $locationProvider) {
|
|
$locationProvider.html5Mode(true);
|
|
|
|
$routeProvider
|
|
.when('/', {
|
|
templateUrl: 'app/partials/dashboard.html',
|
|
controller : 'DashFromDBCtrl',
|
|
reloadOnSearch: false,
|
|
})
|
|
.when('/dashboard/db/:slug', {
|
|
templateUrl: 'app/partials/dashboard.html',
|
|
controller : 'DashFromDBCtrl',
|
|
reloadOnSearch: false,
|
|
})
|
|
.when('/dashboard/file/:jsonFile', {
|
|
templateUrl: 'app/partials/dashboard.html',
|
|
controller : 'DashFromFileCtrl',
|
|
reloadOnSearch: false,
|
|
})
|
|
.when('/dashboard/script/:jsFile', {
|
|
templateUrl: 'app/partials/dashboard.html',
|
|
controller : 'DashFromScriptCtrl',
|
|
reloadOnSearch: false,
|
|
})
|
|
.when('/dashboard/import/:file', {
|
|
templateUrl: 'app/partials/dashboard.html',
|
|
controller : 'DashFromImportCtrl',
|
|
reloadOnSearch: false,
|
|
})
|
|
.when('/dashboard/snapshot/:key', {
|
|
templateUrl: 'app/partials/dashboard.html',
|
|
controller : 'DashFromSnapshotCtrl',
|
|
})
|
|
.when('/dashboard/solo/db/:slug', {
|
|
templateUrl: 'app/features/panel/partials/soloPanel.html',
|
|
controller : 'SoloPanelCtrl',
|
|
})
|
|
.when('/dashboard/solo/snapshot/:key', {
|
|
templateUrl: 'app/features/panel/partials/soloPanel.html',
|
|
controller : 'SoloPanelCtrl',
|
|
})
|
|
.when('/dashboard/new', {
|
|
templateUrl: 'app/partials/dashboard.html',
|
|
controller : 'NewDashboardCtrl',
|
|
reloadOnSearch: false,
|
|
})
|
|
.when('/dashboard/import', {
|
|
templateUrl: 'app/features/dashboard/partials/import.html',
|
|
controller : 'DashboardImportCtrl',
|
|
})
|
|
.when('/datasources', {
|
|
templateUrl: 'app/features/org/partials/datasources.html',
|
|
controller : 'DataSourcesCtrl',
|
|
})
|
|
.when('/datasources/edit/:id', {
|
|
templateUrl: 'app/features/org/partials/datasourceEdit.html',
|
|
controller : 'DataSourceEditCtrl',
|
|
})
|
|
.when('/datasources/new', {
|
|
templateUrl: 'app/features/org/partials/datasourceEdit.html',
|
|
controller : 'DataSourceEditCtrl',
|
|
})
|
|
.when('/org', {
|
|
templateUrl: 'app/features/org/partials/orgDetails.html',
|
|
controller : 'OrgDetailsCtrl',
|
|
})
|
|
.when('/org/new', {
|
|
templateUrl: 'app/features/org/partials/newOrg.html',
|
|
controller : 'NewOrgCtrl',
|
|
})
|
|
.when('/org/users', {
|
|
templateUrl: 'app/features/org/partials/orgUsers.html',
|
|
controller : 'OrgUsersCtrl',
|
|
})
|
|
.when('/org/apikeys', {
|
|
templateUrl: 'app/features/org/partials/orgApiKeys.html',
|
|
controller : 'OrgApiKeysCtrl',
|
|
})
|
|
.when('/profile', {
|
|
templateUrl: 'app/features/profile/partials/profile.html',
|
|
controller : 'ProfileCtrl',
|
|
})
|
|
.when('/profile/password', {
|
|
templateUrl: 'app/features/profile/partials/password.html',
|
|
controller : 'ChangePasswordCtrl',
|
|
})
|
|
.when('/admin/settings', {
|
|
templateUrl: 'app/features/admin/partials/settings.html',
|
|
controller : 'AdminSettingsCtrl',
|
|
})
|
|
.when('/admin/users', {
|
|
templateUrl: 'app/features/admin/partials/users.html',
|
|
controller : 'AdminUsersCtrl',
|
|
})
|
|
.when('/admin/users/create', {
|
|
templateUrl: 'app/features/admin/partials/new_user.html',
|
|
controller : 'AdminEditUserCtrl',
|
|
})
|
|
.when('/admin/users/edit/:id', {
|
|
templateUrl: 'app/features/admin/partials/edit_user.html',
|
|
controller : 'AdminEditUserCtrl',
|
|
})
|
|
.when('/admin/orgs', {
|
|
templateUrl: 'app/features/admin/partials/orgs.html',
|
|
})
|
|
.when('/login', {
|
|
templateUrl: 'app/partials/login.html',
|
|
controller : 'LoginCtrl',
|
|
})
|
|
.otherwise({
|
|
templateUrl: 'app/partials/error.html',
|
|
controller: 'ErrorCtrl'
|
|
});
|
|
});
|
|
|
|
});
|