2017-12-20 05:33:33 -06:00
|
|
|
import './dashboard_loaders';
|
2017-12-21 04:56:45 -06:00
|
|
|
import './ReactContainer';
|
2018-10-11 05:36:04 -05:00
|
|
|
import { applyRouteRegistrationHandlers } from './registry';
|
2019-02-04 06:49:14 -06:00
|
|
|
// Pages
|
2019-01-23 13:21:07 -06:00
|
|
|
import CreateFolderCtrl from 'app/features/folders/CreateFolderCtrl';
|
|
|
|
import FolderDashboardsCtrl from 'app/features/folders/FolderDashboardsCtrl';
|
2019-01-24 02:46:03 -06:00
|
|
|
import DashboardImportCtrl from 'app/features/manage-dashboards/DashboardImportCtrl';
|
2019-09-16 10:56:01 -05:00
|
|
|
import LdapPage from 'app/features/admin/ldap/LdapPage';
|
2019-01-21 01:47:41 -06:00
|
|
|
import config from 'app/core/config';
|
2019-11-06 04:04:27 -06:00
|
|
|
import { ILocationProvider, route } from 'angular';
|
2019-02-04 06:49:14 -06:00
|
|
|
// Types
|
|
|
|
import { DashboardRouteInfo } from 'app/types';
|
2019-08-13 08:46:40 -05:00
|
|
|
import { LoginPage } from 'app/core/components/Login/LoginPage';
|
2019-11-06 04:04:27 -06:00
|
|
|
import { SafeDynamicImport } from '../core/components/DynamicImports/SafeDynamicImport';
|
2019-02-04 06:49:14 -06:00
|
|
|
|
2018-08-31 09:40:43 -05:00
|
|
|
/** @ngInject */
|
2019-06-19 06:40:42 -05:00
|
|
|
export function setupAngularRoutes($routeProvider: route.IRouteProvider, $locationProvider: ILocationProvider) {
|
2016-02-09 04:17:49 -06:00
|
|
|
$locationProvider.html5Mode(true);
|
|
|
|
|
2019-07-25 09:54:26 -05:00
|
|
|
// Routes here are guarded both here and server side for react-container routes or just on the server for angular
|
|
|
|
// ones. That means angular ones could be navigated to in case there is a client side link some where.
|
|
|
|
|
2019-09-03 03:29:02 -05:00
|
|
|
const importDashboardPage = () =>
|
2019-09-17 02:46:26 -05:00
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "DashboardPage" */ '../features/dashboard/containers/DashboardPage'));
|
2019-09-03 03:29:02 -05:00
|
|
|
|
2016-02-09 04:17:49 -06:00
|
|
|
$routeProvider
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/', {
|
2019-02-03 07:53:42 -06:00
|
|
|
template: '<react-container />',
|
2019-06-19 06:40:42 -05:00
|
|
|
//@ts-ignore
|
2017-12-20 05:33:33 -06:00
|
|
|
pageClass: 'page-dashboard',
|
2019-02-04 06:49:14 -06:00
|
|
|
routeInfo: DashboardRouteInfo.Home,
|
2019-02-03 07:53:42 -06:00
|
|
|
reloadOnSearch: false,
|
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: importDashboardPage,
|
2019-02-03 07:53:42 -06:00
|
|
|
},
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
2018-01-30 17:26:26 -06:00
|
|
|
.when('/d/:uid/:slug', {
|
2019-02-02 12:23:19 -06:00
|
|
|
template: '<react-container />',
|
2018-01-30 17:26:26 -06:00
|
|
|
pageClass: 'page-dashboard',
|
2019-02-04 06:49:14 -06:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-02-02 12:23:19 -06:00
|
|
|
reloadOnSearch: false,
|
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: importDashboardPage,
|
2019-02-02 12:23:19 -06:00
|
|
|
},
|
2018-01-30 17:26:26 -06:00
|
|
|
})
|
2018-03-13 15:06:25 -05:00
|
|
|
.when('/d/:uid', {
|
2019-02-03 07:53:42 -06:00
|
|
|
template: '<react-container />',
|
2018-03-13 15:06:25 -05:00
|
|
|
pageClass: 'page-dashboard',
|
2019-02-03 07:53:42 -06:00
|
|
|
reloadOnSearch: false,
|
2019-02-04 06:49:14 -06:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-02-03 07:53:42 -06:00
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: importDashboardPage,
|
2019-02-03 07:53:42 -06:00
|
|
|
},
|
2018-03-13 15:06:25 -05:00
|
|
|
})
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/dashboard/:type/:slug', {
|
2019-02-03 07:53:42 -06:00
|
|
|
template: '<react-container />',
|
2018-01-31 04:01:01 -06:00
|
|
|
pageClass: 'page-dashboard',
|
2019-02-04 10:36:04 -06:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-02-04 06:49:14 -06:00
|
|
|
reloadOnSearch: false,
|
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: importDashboardPage,
|
2019-02-04 06:49:14 -06:00
|
|
|
},
|
|
|
|
})
|
|
|
|
.when('/dashboard/new', {
|
|
|
|
template: '<react-container />',
|
|
|
|
pageClass: 'page-dashboard',
|
|
|
|
routeInfo: DashboardRouteInfo.New,
|
2019-02-03 07:53:42 -06:00
|
|
|
reloadOnSearch: false,
|
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: importDashboardPage,
|
2019-02-03 07:53:42 -06:00
|
|
|
},
|
2018-01-31 04:01:01 -06:00
|
|
|
})
|
|
|
|
.when('/d-solo/:uid/:slug', {
|
2019-01-31 02:44:12 -06:00
|
|
|
template: '<react-container />',
|
2019-10-14 11:21:44 -05:00
|
|
|
pageClass: 'dashboard-solo',
|
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
|
|
|
reloadOnSearch: false,
|
|
|
|
resolve: {
|
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webpackChunkName: "SoloPanelPage" */ '../features/dashboard/containers/SoloPanelPage')
|
|
|
|
),
|
|
|
|
},
|
|
|
|
})
|
|
|
|
.when('/d-solo/:uid', {
|
|
|
|
template: '<react-container />',
|
2019-01-31 02:44:12 -06:00
|
|
|
pageClass: 'dashboard-solo',
|
2019-02-04 06:49:14 -06:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-03-06 04:46:38 -06:00
|
|
|
reloadOnSearch: false,
|
2019-01-31 02:44:12 -06:00
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: () =>
|
2019-09-17 02:46:26 -05:00
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webpackChunkName: "SoloPanelPage" */ '../features/dashboard/containers/SoloPanelPage')
|
|
|
|
),
|
2019-01-31 02:44:12 -06:00
|
|
|
},
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/dashboard-solo/:type/:slug', {
|
2019-02-01 01:12:58 -06:00
|
|
|
template: '<react-container />',
|
|
|
|
pageClass: 'dashboard-solo',
|
2019-02-04 10:36:04 -06:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-03-06 04:46:38 -06:00
|
|
|
reloadOnSearch: false,
|
2019-02-01 01:12:58 -06:00
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: () =>
|
2019-09-17 02:46:26 -05:00
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webpackChunkName: "SoloPanelPage" */ '../features/dashboard/containers/SoloPanelPage')
|
|
|
|
),
|
2019-02-01 01:12:58 -06:00
|
|
|
},
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/dashboard/import', {
|
2019-01-24 02:46:03 -06:00
|
|
|
templateUrl: 'public/app/features/manage-dashboards/partials/dashboard_import.html',
|
|
|
|
controller: DashboardImportCtrl,
|
2017-12-20 05:33:33 -06:00
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/datasources', {
|
2018-09-28 04:05:34 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: () =>
|
2019-09-17 02:46:26 -05:00
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webpackChunkName: "DataSourcesListPage"*/ 'app/features/datasources/DataSourcesListPage')
|
|
|
|
),
|
2018-09-28 04:05:34 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
2018-10-24 09:17:25 -05:00
|
|
|
.when('/datasources/edit/:id/', {
|
|
|
|
template: '<react-container />',
|
2019-05-14 00:55:49 -05:00
|
|
|
reloadOnSearch: false, // for tabs
|
2018-10-24 09:17:25 -05:00
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: () =>
|
2019-09-17 02:46:26 -05:00
|
|
|
SafeDynamicImport(
|
2019-11-19 07:59:39 -06:00
|
|
|
import(
|
|
|
|
/* webpackChunkName: "DataSourceSettingsPage"*/ '../features/datasources/settings/DataSourceSettingsPage'
|
|
|
|
)
|
2019-09-17 02:46:26 -05:00
|
|
|
),
|
2018-10-24 09:17:25 -05:00
|
|
|
},
|
|
|
|
})
|
2018-01-18 10:42:40 -06:00
|
|
|
.when('/datasources/edit/:id/dashboards', {
|
2018-10-08 07:09:02 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-03 03:29:02 -05:00
|
|
|
component: () =>
|
2019-09-17 02:46:26 -05:00
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webpackChunkName: "DataSourceDashboards"*/ 'app/features/datasources/DataSourceDashboards')
|
|
|
|
),
|
2018-10-08 07:09:02 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/datasources/new', {
|
2018-10-02 09:18:42 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webpackChunkName: "NewDataSourcePage"*/ '../features/datasources/NewDataSourcePage')
|
|
|
|
),
|
2018-10-02 09:18:42 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/dashboards', {
|
2018-09-10 06:59:31 -05:00
|
|
|
templateUrl: 'public/app/features/manage-dashboards/partials/dashboard_list.html',
|
2017-12-20 05:33:33 -06:00
|
|
|
controller: 'DashboardListCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/dashboards/folder/new', {
|
2019-01-23 13:21:07 -06:00
|
|
|
templateUrl: 'public/app/features/folders/partials/create_folder.html',
|
|
|
|
controller: CreateFolderCtrl,
|
2017-12-20 05:33:33 -06:00
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
2018-01-31 10:15:00 -06:00
|
|
|
.when('/dashboards/f/:uid/:slug/permissions', {
|
2018-01-16 04:28:14 -06:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webpackChunkName: "FolderPermissions"*/ 'app/features/folders/FolderPermissions')
|
|
|
|
),
|
2018-01-16 04:28:14 -06:00
|
|
|
},
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
2018-01-31 10:15:00 -06:00
|
|
|
.when('/dashboards/f/:uid/:slug/settings', {
|
2018-01-11 08:42:45 -06:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webpackChunkName: "FolderSettingsPage"*/ 'app/features/folders/FolderSettingsPage')
|
|
|
|
),
|
2018-01-11 08:42:45 -06:00
|
|
|
},
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
2018-01-31 10:15:00 -06:00
|
|
|
.when('/dashboards/f/:uid/:slug', {
|
2019-01-23 13:21:07 -06:00
|
|
|
templateUrl: 'public/app/features/folders/partials/folder_dashboards.html',
|
|
|
|
controller: FolderDashboardsCtrl,
|
2017-12-20 05:33:33 -06:00
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
2018-03-13 15:32:37 -05:00
|
|
|
.when('/dashboards/f/:uid', {
|
2019-02-11 04:11:21 -06:00
|
|
|
templateUrl: 'public/app/features/folders/partials/folder_dashboards.html',
|
|
|
|
controller: FolderDashboardsCtrl,
|
2018-03-13 15:32:37 -05:00
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
2018-07-17 05:56:05 -05:00
|
|
|
.when('/explore', {
|
2018-04-26 04:58:42 -05:00
|
|
|
template: '<react-container />',
|
2018-09-28 09:44:07 -05:00
|
|
|
reloadOnSearch: false,
|
2018-04-26 04:58:42 -05:00
|
|
|
resolve: {
|
2019-01-21 01:47:41 -06:00
|
|
|
roles: () => (config.viewersCanEdit ? [] : ['Editor', 'Admin']),
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () => SafeDynamicImport(import(/* webpackChunkName: "explore" */ 'app/features/explore/Wrapper')),
|
2018-04-26 04:58:42 -05:00
|
|
|
},
|
|
|
|
})
|
2019-05-02 12:15:39 -05:00
|
|
|
.when('/a/:pluginId/', {
|
|
|
|
// Someday * and will get a ReactRouter under that path!
|
|
|
|
template: '<react-container />',
|
|
|
|
reloadOnSearch: false,
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "AppRootPage" */ 'app/features/plugins/AppRootPage')),
|
2019-05-02 12:15:39 -05:00
|
|
|
},
|
|
|
|
})
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/org', {
|
2018-10-25 00:45:22 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "OrgDetailsPage" */ '../features/org/OrgDetailsPage')),
|
2018-10-25 00:45:22 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/org/new', {
|
|
|
|
templateUrl: 'public/app/features/org/partials/newOrg.html',
|
|
|
|
controller: 'NewOrgCtrl',
|
|
|
|
})
|
|
|
|
.when('/org/users', {
|
2018-10-03 02:43:10 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "UsersListPage" */ 'app/features/users/UsersListPage')),
|
2018-10-03 02:43:10 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/org/users/invite', {
|
|
|
|
templateUrl: 'public/app/features/org/partials/invite.html',
|
|
|
|
controller: 'UserInviteCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/org/apikeys', {
|
2018-09-25 09:23:43 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
|
|
|
roles: () => ['Editor', 'Admin'],
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "ApiKeysPage" */ 'app/features/api-keys/ApiKeysPage')),
|
2018-09-25 09:23:43 -05:00
|
|
|
},
|
|
|
|
})
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/org/teams', {
|
2018-07-11 13:23:07 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-03-13 04:38:09 -05:00
|
|
|
roles: () => (config.editorsCanAdmin ? [] : ['Editor', 'Admin']),
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () => SafeDynamicImport(import(/* webpackChunkName: "TeamList" */ 'app/features/teams/TeamList')),
|
2018-07-11 13:23:07 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
2017-12-20 14:20:12 -06:00
|
|
|
.when('/org/teams/new', {
|
2018-10-31 14:21:16 -05:00
|
|
|
templateUrl: 'public/app/features/teams/partials/create_team.html',
|
2017-12-20 14:20:12 -06:00
|
|
|
controller: 'CreateTeamCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
2018-07-11 13:23:07 -05:00
|
|
|
.when('/org/teams/edit/:id/:page?', {
|
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-03-13 04:38:09 -05:00
|
|
|
roles: () => (config.editorsCanAdmin ? [] : ['Admin']),
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () => SafeDynamicImport(import(/* webpackChunkName: "TeamPages" */ 'app/features/teams/TeamPages')),
|
2018-07-11 13:23:07 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/profile', {
|
2018-10-31 14:25:46 -05:00
|
|
|
templateUrl: 'public/app/features/profile/partials/profile.html',
|
2017-12-20 05:33:33 -06:00
|
|
|
controller: 'ProfileCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/profile/password', {
|
2019-07-03 10:02:12 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(
|
|
|
|
import(/* webPackChunkName: "ChangePasswordPage" */ 'app/features/profile/ChangePasswordPage')
|
|
|
|
),
|
2019-07-03 10:02:12 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/profile/select-org', {
|
|
|
|
templateUrl: 'public/app/features/org/partials/select_org.html',
|
|
|
|
controller: 'SelectOrgCtrl',
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
|
|
|
// ADMIN
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/admin', {
|
|
|
|
templateUrl: 'public/app/features/admin/partials/admin_home.html',
|
|
|
|
controller: 'AdminHomeCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/admin/settings', {
|
2019-10-03 07:11:21 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "AdminSettings" */ 'app/features/admin/AdminSettings')),
|
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/admin/users', {
|
|
|
|
templateUrl: 'public/app/features/admin/partials/users.html',
|
|
|
|
controller: 'AdminListUsersCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/admin/users/create', {
|
|
|
|
templateUrl: 'public/app/features/admin/partials/new_user.html',
|
|
|
|
controller: 'AdminEditUserCtrl',
|
|
|
|
})
|
|
|
|
.when('/admin/users/edit/:id', {
|
|
|
|
templateUrl: 'public/app/features/admin/partials/edit_user.html',
|
|
|
|
controller: 'AdminEditUserCtrl',
|
|
|
|
})
|
|
|
|
.when('/admin/orgs', {
|
|
|
|
templateUrl: 'public/app/features/admin/partials/orgs.html',
|
|
|
|
controller: 'AdminListOrgsCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/admin/orgs/edit/:id', {
|
|
|
|
templateUrl: 'public/app/features/admin/partials/edit_org.html',
|
|
|
|
controller: 'AdminEditOrgCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/admin/stats', {
|
2017-12-21 04:56:45 -06:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "ServerStats" */ 'app/features/admin/ServerStats')),
|
2017-12-21 04:56:45 -06:00
|
|
|
},
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
2019-09-16 10:56:01 -05:00
|
|
|
.when('/admin/ldap', {
|
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
|
|
|
component: () => LdapPage,
|
|
|
|
},
|
|
|
|
})
|
2017-12-19 09:06:54 -06:00
|
|
|
// LOGIN / SIGNUP
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/login', {
|
2019-08-13 08:46:40 -05:00
|
|
|
template: '<react-container/>',
|
|
|
|
resolve: {
|
|
|
|
component: () => LoginPage,
|
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
pageClass: 'login-page sidemenu-hidden',
|
|
|
|
})
|
|
|
|
.when('/invite/:code', {
|
|
|
|
templateUrl: 'public/app/partials/signup_invited.html',
|
|
|
|
controller: 'InvitedCtrl',
|
|
|
|
pageClass: 'sidemenu-hidden',
|
|
|
|
})
|
|
|
|
.when('/signup', {
|
|
|
|
templateUrl: 'public/app/partials/signup_step2.html',
|
|
|
|
controller: 'SignUpCtrl',
|
|
|
|
pageClass: 'sidemenu-hidden',
|
|
|
|
})
|
|
|
|
.when('/user/password/send-reset-email', {
|
|
|
|
templateUrl: 'public/app/partials/reset_password.html',
|
|
|
|
controller: 'ResetPasswordCtrl',
|
|
|
|
pageClass: 'sidemenu-hidden',
|
|
|
|
})
|
|
|
|
.when('/user/password/reset', {
|
|
|
|
templateUrl: 'public/app/partials/reset_password.html',
|
|
|
|
controller: 'ResetPasswordCtrl',
|
|
|
|
pageClass: 'sidemenu-hidden',
|
|
|
|
})
|
|
|
|
.when('/dashboard/snapshots', {
|
2018-09-10 06:59:31 -05:00
|
|
|
templateUrl: 'public/app/features/manage-dashboards/partials/snapshot_list.html',
|
|
|
|
controller: 'SnapshotListCtrl',
|
2017-12-20 05:33:33 -06:00
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/plugins', {
|
2018-09-25 07:53:55 -05:00
|
|
|
template: '<react-container />',
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "PluginListPage" */ 'app/features/plugins/PluginListPage')),
|
2018-09-25 07:53:55 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
2019-05-02 12:15:39 -05:00
|
|
|
.when('/plugins/:pluginId/', {
|
|
|
|
template: '<react-container />',
|
|
|
|
reloadOnSearch: false, // tabs from query parameters
|
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "PluginPage" */ '../features/plugins/PluginPage')),
|
2019-05-02 12:15:39 -05:00
|
|
|
},
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/plugins/:pluginId/page/:slug', {
|
|
|
|
templateUrl: 'public/app/features/plugins/partials/plugin_page.html',
|
|
|
|
controller: 'AppPageCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
})
|
|
|
|
.when('/styleguide/:page?', {
|
|
|
|
controller: 'StyleGuideCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
2018-09-10 06:38:45 -05:00
|
|
|
templateUrl: 'public/app/features/admin/partials/styleguide.html',
|
2017-12-20 05:33:33 -06:00
|
|
|
})
|
|
|
|
.when('/alerting', {
|
|
|
|
redirectTo: '/alerting/list',
|
|
|
|
})
|
2017-12-31 15:31:11 -06:00
|
|
|
.when('/alerting/list', {
|
2017-12-28 11:49:33 -06:00
|
|
|
template: '<react-container />',
|
2017-12-31 15:31:11 -06:00
|
|
|
reloadOnSearch: false,
|
2017-12-28 11:49:33 -06:00
|
|
|
resolve: {
|
2019-09-17 02:46:26 -05:00
|
|
|
component: () =>
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "AlertRuleList" */ 'app/features/alerting/AlertRuleList')),
|
2017-12-28 11:49:33 -06:00
|
|
|
},
|
|
|
|
})
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/alerting/notifications', {
|
2017-12-21 01:39:31 -06:00
|
|
|
templateUrl: 'public/app/features/alerting/partials/notifications_list.html',
|
2017-12-20 05:33:33 -06:00
|
|
|
controller: 'AlertNotificationsListCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/alerting/notification/new', {
|
2017-12-21 01:39:31 -06:00
|
|
|
templateUrl: 'public/app/features/alerting/partials/notification_edit.html',
|
2017-12-20 05:33:33 -06:00
|
|
|
controller: 'AlertNotificationEditCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
2017-12-20 05:33:33 -06:00
|
|
|
.when('/alerting/notification/:id/edit', {
|
2017-12-21 01:39:31 -06:00
|
|
|
templateUrl: 'public/app/features/alerting/partials/notification_edit.html',
|
2017-12-20 05:33:33 -06:00
|
|
|
controller: 'AlertNotificationEditCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
2017-12-19 09:06:54 -06:00
|
|
|
})
|
|
|
|
.otherwise({
|
2017-12-20 05:33:33 -06:00
|
|
|
templateUrl: 'public/app/partials/error.html',
|
|
|
|
controller: 'ErrorCtrl',
|
2017-12-19 09:06:54 -06:00
|
|
|
});
|
2018-10-11 05:36:04 -05:00
|
|
|
|
|
|
|
applyRouteRegistrationHandlers($routeProvider);
|
2016-02-09 04:17:49 -06:00
|
|
|
}
|