2017-12-20 12:33:33 +01:00
|
|
|
import './dashboard_loaders';
|
2017-12-21 11:56:45 +01:00
|
|
|
import './ReactContainer';
|
2018-10-11 12:36:04 +02:00
|
|
|
import { applyRouteRegistrationHandlers } from './registry';
|
2019-02-04 13:49:14 +01:00
|
|
|
// Pages
|
2019-09-16 17:56:01 +02:00
|
|
|
import LdapPage from 'app/features/admin/ldap/LdapPage';
|
2020-01-13 19:10:19 +03:00
|
|
|
import UserAdminPage from 'app/features/admin/UserAdminPage';
|
2020-02-17 11:13:13 +01:00
|
|
|
import SignupPage from 'app/features/profile/SignupPage';
|
2020-03-16 09:53:20 +01:00
|
|
|
import { LoginPage } from 'app/core/components/Login/LoginPage';
|
2020-02-17 11:13:13 +01:00
|
|
|
|
2019-01-21 08:47:41 +01:00
|
|
|
import config from 'app/core/config';
|
2019-11-06 11:04:27 +01:00
|
|
|
import { ILocationProvider, route } from 'angular';
|
2019-02-04 13:49:14 +01:00
|
|
|
// Types
|
|
|
|
|
import { DashboardRouteInfo } from 'app/types';
|
2019-11-06 11:04:27 +01:00
|
|
|
import { SafeDynamicImport } from '../core/components/DynamicImports/SafeDynamicImport';
|
2019-02-04 13:49:14 +01:00
|
|
|
|
2018-08-31 16:40:43 +02:00
|
|
|
/** @ngInject */
|
2019-06-19 13:40:42 +02:00
|
|
|
export function setupAngularRoutes($routeProvider: route.IRouteProvider, $locationProvider: ILocationProvider) {
|
2016-02-09 11:17:49 +01:00
|
|
|
$locationProvider.html5Mode(true);
|
|
|
|
|
|
2019-07-25 16:54:26 +02: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 09:29:02 +01:00
|
|
|
const importDashboardPage = () =>
|
2019-09-17 09:46:26 +02:00
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "DashboardPage" */ '../features/dashboard/containers/DashboardPage'));
|
2019-09-03 09:29:02 +01:00
|
|
|
|
2016-02-09 11:17:49 +01:00
|
|
|
$routeProvider
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/', {
|
2019-02-03 14:53:42 +01:00
|
|
|
template: '<react-container />',
|
2019-06-19 13:40:42 +02:00
|
|
|
//@ts-ignore
|
2017-12-20 12:33:33 +01:00
|
|
|
pageClass: 'page-dashboard',
|
2019-02-04 13:49:14 +01:00
|
|
|
routeInfo: DashboardRouteInfo.Home,
|
2019-02-03 14:53:42 +01:00
|
|
|
reloadOnSearch: false,
|
|
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: importDashboardPage,
|
2019-02-03 14:53:42 +01:00
|
|
|
},
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
2018-01-31 00:26:26 +01:00
|
|
|
.when('/d/:uid/:slug', {
|
2019-02-02 19:23:19 +01:00
|
|
|
template: '<react-container />',
|
2018-01-31 00:26:26 +01:00
|
|
|
pageClass: 'page-dashboard',
|
2019-02-04 13:49:14 +01:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-02-02 19:23:19 +01:00
|
|
|
reloadOnSearch: false,
|
|
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: importDashboardPage,
|
2019-02-02 19:23:19 +01:00
|
|
|
},
|
2018-01-31 00:26:26 +01:00
|
|
|
})
|
2018-03-13 21:06:25 +01:00
|
|
|
.when('/d/:uid', {
|
2019-02-03 14:53:42 +01:00
|
|
|
template: '<react-container />',
|
2018-03-13 21:06:25 +01:00
|
|
|
pageClass: 'page-dashboard',
|
2019-02-03 14:53:42 +01:00
|
|
|
reloadOnSearch: false,
|
2019-02-04 13:49:14 +01:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-02-03 14:53:42 +01:00
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: importDashboardPage,
|
2019-02-03 14:53:42 +01:00
|
|
|
},
|
2018-03-13 21:06:25 +01:00
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/dashboard/:type/:slug', {
|
2019-02-03 14:53:42 +01:00
|
|
|
template: '<react-container />',
|
2018-01-31 11:01:01 +01:00
|
|
|
pageClass: 'page-dashboard',
|
2019-02-04 17:36:04 +01:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-02-04 13:49:14 +01:00
|
|
|
reloadOnSearch: false,
|
|
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: importDashboardPage,
|
2019-02-04 13:49:14 +01:00
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.when('/dashboard/new', {
|
|
|
|
|
template: '<react-container />',
|
|
|
|
|
pageClass: 'page-dashboard',
|
|
|
|
|
routeInfo: DashboardRouteInfo.New,
|
2019-02-03 14:53:42 +01:00
|
|
|
reloadOnSearch: false,
|
|
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: importDashboardPage,
|
2019-02-03 14:53:42 +01:00
|
|
|
},
|
2018-01-31 11:01:01 +01:00
|
|
|
})
|
|
|
|
|
.when('/d-solo/:uid/:slug', {
|
2019-01-31 09:44:12 +01:00
|
|
|
template: '<react-container />',
|
2019-10-14 21:51:44 +05:30
|
|
|
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 09:44:12 +01:00
|
|
|
pageClass: 'dashboard-solo',
|
2019-02-04 13:49:14 +01:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-03-06 11:46:38 +01:00
|
|
|
reloadOnSearch: false,
|
2019-01-31 09:44:12 +01:00
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: () =>
|
2019-09-17 09:46:26 +02:00
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "SoloPanelPage" */ '../features/dashboard/containers/SoloPanelPage')
|
|
|
|
|
),
|
2019-01-31 09:44:12 +01:00
|
|
|
},
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/dashboard-solo/:type/:slug', {
|
2019-02-01 08:12:58 +01:00
|
|
|
template: '<react-container />',
|
|
|
|
|
pageClass: 'dashboard-solo',
|
2019-02-04 17:36:04 +01:00
|
|
|
routeInfo: DashboardRouteInfo.Normal,
|
2019-03-06 11:46:38 +01:00
|
|
|
reloadOnSearch: false,
|
2019-02-01 08:12:58 +01:00
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: () =>
|
2019-09-17 09:46:26 +02:00
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "SoloPanelPage" */ '../features/dashboard/containers/SoloPanelPage')
|
|
|
|
|
),
|
2019-02-01 08:12:58 +01:00
|
|
|
},
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/dashboard/import', {
|
2020-03-31 16:29:44 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-03-31 16:29:44 +02:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "DashboardImport"*/ 'app/features/manage-dashboards/DashboardImportPage')
|
|
|
|
|
),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/datasources', {
|
2018-09-28 11:05:34 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-09-28 11:05:34 +02:00
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: () =>
|
2019-09-17 09:46:26 +02:00
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "DataSourcesListPage"*/ 'app/features/datasources/DataSourcesListPage')
|
|
|
|
|
),
|
2018-09-28 11:05:34 +02:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
2018-10-24 16:17:25 +02:00
|
|
|
.when('/datasources/edit/:id/', {
|
|
|
|
|
template: '<react-container />',
|
2019-05-13 22:55:49 -07:00
|
|
|
reloadOnSearch: false, // for tabs
|
2018-10-24 16:17:25 +02:00
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: () =>
|
2019-09-17 09:46:26 +02:00
|
|
|
SafeDynamicImport(
|
2019-11-19 13:59:39 +00:00
|
|
|
import(
|
|
|
|
|
/* webpackChunkName: "DataSourceSettingsPage"*/ '../features/datasources/settings/DataSourceSettingsPage'
|
|
|
|
|
)
|
2019-09-17 09:46:26 +02:00
|
|
|
),
|
2018-10-24 16:17:25 +02:00
|
|
|
},
|
|
|
|
|
})
|
2018-01-18 17:42:40 +01:00
|
|
|
.when('/datasources/edit/:id/dashboards', {
|
2018-10-08 14:09:02 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-10-08 14:09:02 +02:00
|
|
|
resolve: {
|
2019-09-03 09:29:02 +01:00
|
|
|
component: () =>
|
2019-09-17 09:46:26 +02:00
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "DataSourceDashboards"*/ 'app/features/datasources/DataSourceDashboards')
|
|
|
|
|
),
|
2018-10-08 14:09:02 +02:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/datasources/new', {
|
2018-10-02 16:18:42 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-10-02 16:18:42 +02:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "NewDataSourcePage"*/ '../features/datasources/NewDataSourcePage')
|
|
|
|
|
),
|
2018-10-02 16:18:42 +02:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/dashboards', {
|
2020-04-17 15:29:20 +03:00
|
|
|
template: '<react-container />',
|
2020-04-20 18:04:51 +03:00
|
|
|
reloadOnSearch: false,
|
2020-04-17 15:29:20 +03:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "DashboardListPage"*/ 'app/features/search/components/DashboardListPage')
|
|
|
|
|
),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/dashboards/folder/new', {
|
2020-03-13 14:02:54 +00:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-03-13 14:02:54 +00:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
2020-03-15 17:03:41 +01:00
|
|
|
import(/* webpackChunkName: "NewDashboardsFolder"*/ 'app/features/folders/components/NewDashboardsFolder')
|
2020-03-13 14:02:54 +00:00
|
|
|
),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
2018-01-31 17:15:00 +01:00
|
|
|
.when('/dashboards/f/:uid/:slug/permissions', {
|
2018-01-16 11:28:14 +01:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-01-16 11:28:14 +01:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "FolderPermissions"*/ 'app/features/folders/FolderPermissions')
|
|
|
|
|
),
|
2018-01-16 11:28:14 +01:00
|
|
|
},
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
2018-01-31 17:15:00 +01:00
|
|
|
.when('/dashboards/f/:uid/:slug/settings', {
|
2018-01-11 15:42:45 +01:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-01-11 15:42:45 +01:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "FolderSettingsPage"*/ 'app/features/folders/FolderSettingsPage')
|
|
|
|
|
),
|
2018-01-11 15:42:45 +01:00
|
|
|
},
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
2018-01-31 17:15:00 +01:00
|
|
|
.when('/dashboards/f/:uid/:slug', {
|
2020-04-17 15:29:20 +03:00
|
|
|
template: '<react-container />',
|
2020-04-20 18:04:51 +03:00
|
|
|
reloadOnSearch: false,
|
2020-04-17 15:29:20 +03:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "DashboardListPage"*/ 'app/features/search/components/DashboardListPage')
|
|
|
|
|
),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
2018-03-13 21:32:37 +01:00
|
|
|
.when('/dashboards/f/:uid', {
|
2020-04-17 15:29:20 +03:00
|
|
|
template: '<react-container />',
|
2020-04-20 18:04:51 +03:00
|
|
|
reloadOnSearch: false,
|
2020-04-17 15:29:20 +03:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "DashboardListPage"*/ 'app/features/search/components/DashboardListPage')
|
|
|
|
|
),
|
|
|
|
|
},
|
2018-03-13 21:32:37 +01:00
|
|
|
})
|
2018-07-17 12:56:05 +02:00
|
|
|
.when('/explore', {
|
2018-04-26 11:58:42 +02:00
|
|
|
template: '<react-container />',
|
2018-09-28 16:44:07 +02:00
|
|
|
reloadOnSearch: false,
|
2020-03-24 10:30:53 +01:00
|
|
|
pageClass: 'page-explore',
|
2018-04-26 11:58:42 +02:00
|
|
|
resolve: {
|
2019-01-21 08:47:41 +01:00
|
|
|
roles: () => (config.viewersCanEdit ? [] : ['Editor', 'Admin']),
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () => SafeDynamicImport(import(/* webpackChunkName: "explore" */ 'app/features/explore/Wrapper')),
|
2018-04-26 11:58:42 +02:00
|
|
|
},
|
|
|
|
|
})
|
2019-05-02 10:15:39 -07:00
|
|
|
.when('/a/:pluginId/', {
|
|
|
|
|
// Someday * and will get a ReactRouter under that path!
|
|
|
|
|
template: '<react-container />',
|
|
|
|
|
reloadOnSearch: false,
|
|
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "AppRootPage" */ 'app/features/plugins/AppRootPage')),
|
2019-05-02 10:15:39 -07:00
|
|
|
},
|
|
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/org', {
|
2018-10-25 07:45:22 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-10-25 07:45:22 +02:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "OrgDetailsPage" */ '../features/org/OrgDetailsPage')),
|
2018-10-25 07:45:22 +02:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/org/new', {
|
2020-03-19 14:22:53 +01:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-03-19 14:22:53 +01:00
|
|
|
resolve: {
|
|
|
|
|
component: () => SafeDynamicImport(import(/* webpackChunkName: "NewOrgPage" */ 'app/features/org/NewOrgPage')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/org/users', {
|
2018-10-03 09:43:10 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-10-03 09:43:10 +02:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "UsersListPage" */ 'app/features/users/UsersListPage')),
|
2018-10-03 09:43:10 +02:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/org/users/invite', {
|
2020-02-20 08:01:14 +01:00
|
|
|
template: '<react-container/>',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-02-20 08:01:14 +01:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "UserInvitePage" */ 'app/features/org/UserInvitePage')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/org/apikeys', {
|
2018-09-25 16:23:43 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-09-25 16:23:43 +02:00
|
|
|
resolve: {
|
|
|
|
|
roles: () => ['Editor', 'Admin'],
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "ApiKeysPage" */ 'app/features/api-keys/ApiKeysPage')),
|
2018-09-25 16:23:43 +02:00
|
|
|
},
|
|
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/org/teams', {
|
2018-07-11 11:23:07 -07:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-07-11 11:23:07 -07:00
|
|
|
resolve: {
|
2019-03-13 10:38:09 +01:00
|
|
|
roles: () => (config.editorsCanAdmin ? [] : ['Editor', 'Admin']),
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () => SafeDynamicImport(import(/* webpackChunkName: "TeamList" */ 'app/features/teams/TeamList')),
|
2018-07-11 11:23:07 -07:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
2017-12-20 21:20:12 +01:00
|
|
|
.when('/org/teams/new', {
|
2019-12-13 08:51:10 +00:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2019-12-13 08:51:10 +00:00
|
|
|
resolve: {
|
|
|
|
|
roles: () => (config.editorsCanAdmin ? [] : ['Admin']),
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "CreateTeam" */ 'app/features/teams/CreateTeam')),
|
|
|
|
|
},
|
2017-12-20 21:20:12 +01:00
|
|
|
})
|
2018-07-11 11:23:07 -07:00
|
|
|
.when('/org/teams/edit/:id/:page?', {
|
|
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-07-11 11:23:07 -07:00
|
|
|
resolve: {
|
2019-03-13 10:38:09 +01:00
|
|
|
roles: () => (config.editorsCanAdmin ? [] : ['Admin']),
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () => SafeDynamicImport(import(/* webpackChunkName: "TeamPages" */ 'app/features/teams/TeamPages')),
|
2018-07-11 11:23:07 -07:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/profile', {
|
2020-06-08 11:19:00 -04:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-06-08 11:19:00 -04:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "UserProfileEdit" */ 'app/features/profile/UserProfileEdit')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/profile/password', {
|
2019-07-03 11:02:12 -04:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2019-07-03 11:02:12 -04:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
2020-06-08 11:19:00 -04:00
|
|
|
import(/* webpackChunkName: "ChangePasswordPage" */ 'app/features/profile/ChangePasswordPage')
|
2019-09-17 09:46:26 +02:00
|
|
|
),
|
2019-07-03 11:02:12 -04:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/profile/select-org', {
|
2020-05-19 09:55:04 +02:00
|
|
|
template: '<react-container/>',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-05-19 09:55:04 +02:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
2020-06-08 11:19:00 -04:00
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "SelectOrgPage" */ 'app/features/org/SelectOrgPage')),
|
2020-05-19 09:55:04 +02:00
|
|
|
},
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
|
|
|
|
// ADMIN
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/admin', {
|
|
|
|
|
templateUrl: 'public/app/features/admin/partials/admin_home.html',
|
|
|
|
|
controller: 'AdminHomeCtrl',
|
|
|
|
|
controllerAs: 'ctrl',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/admin/settings', {
|
2019-10-03 13:11:21 +01:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2019-10-03 13:11:21 +01:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "AdminSettings" */ 'app/features/admin/AdminSettings')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
2020-01-15 14:50:44 +01:00
|
|
|
.when('/admin/upgrading', {
|
|
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-01-15 14:50:44 +01:00
|
|
|
resolve: {
|
|
|
|
|
component: () => SafeDynamicImport(import('app/features/admin/UpgradePage')),
|
|
|
|
|
},
|
|
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/admin/users', {
|
2020-03-16 09:53:20 +01:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-03-16 09:53:20 +01:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "UserListAdminPage" */ 'app/features/admin/UserListAdminPage')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/admin/users/create', {
|
2020-01-22 15:26:03 +01:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-01-22 15:26:03 +01:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "UserCreatePage" */ 'app/features/admin/UserCreatePage')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/admin/users/edit/:id', {
|
2020-01-13 19:10:19 +03:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-01-13 19:10:19 +03:00
|
|
|
resolve: {
|
|
|
|
|
component: () => UserAdminPage,
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/admin/orgs', {
|
2020-04-27 10:00:17 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-04-27 10:00:17 +02:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "AdminListOrgsPage" */ 'app/features/admin/AdminListOrgsPage')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/admin/orgs/edit/:id', {
|
2020-04-25 14:14:22 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-04-25 14:14:22 +02:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "AdminEditOrgPage" */ 'app/features/admin/AdminEditOrgPage')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/admin/stats', {
|
2017-12-21 11:56:45 +01:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2017-12-21 11:56:45 +01:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "ServerStats" */ 'app/features/admin/ServerStats')),
|
2017-12-21 11:56:45 +01:00
|
|
|
},
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
2019-09-16 17:56:01 +02:00
|
|
|
.when('/admin/ldap', {
|
|
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2019-09-16 17:56:01 +02:00
|
|
|
resolve: {
|
|
|
|
|
component: () => LdapPage,
|
|
|
|
|
},
|
|
|
|
|
})
|
2017-12-19 16:06:54 +01:00
|
|
|
// LOGIN / SIGNUP
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/login', {
|
2019-08-13 15:46:40 +02:00
|
|
|
template: '<react-container/>',
|
|
|
|
|
resolve: {
|
|
|
|
|
component: () => LoginPage,
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
pageClass: 'login-page sidemenu-hidden',
|
|
|
|
|
})
|
|
|
|
|
.when('/invite/:code', {
|
2020-02-28 15:45:00 +01:00
|
|
|
template: '<react-container/>',
|
2017-12-20 12:33:33 +01:00
|
|
|
pageClass: 'sidemenu-hidden',
|
2020-02-28 15:45:00 +01:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "SignupInvited" */ 'app/features/users/SignupInvited')),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/signup', {
|
2020-02-17 11:13:13 +01:00
|
|
|
template: '<react-container/>',
|
|
|
|
|
resolve: {
|
|
|
|
|
component: () => SignupPage,
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
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', {
|
2020-05-06 11:11:25 +03:00
|
|
|
template: '<react-container />',
|
|
|
|
|
reloadOnSearch: false,
|
|
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "SnapshotListPage" */ 'app/features/manage-dashboards/SnapshotListPage')
|
|
|
|
|
),
|
|
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/plugins', {
|
2018-09-25 14:53:55 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2018-09-25 14:53:55 +02:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "PluginListPage" */ 'app/features/plugins/PluginListPage')),
|
2018-09-25 14:53:55 +02:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
2019-05-02 10:15:39 -07:00
|
|
|
.when('/plugins/:pluginId/', {
|
|
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2019-05-02 10:15:39 -07:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "PluginPage" */ '../features/plugins/PluginPage')),
|
2019-05-02 10:15:39 -07:00
|
|
|
},
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/plugins/:pluginId/page/:slug', {
|
|
|
|
|
templateUrl: 'public/app/features/plugins/partials/plugin_page.html',
|
|
|
|
|
controller: 'AppPageCtrl',
|
|
|
|
|
controllerAs: 'ctrl',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2017-12-20 12:33:33 +01:00
|
|
|
})
|
|
|
|
|
.when('/alerting', {
|
|
|
|
|
redirectTo: '/alerting/list',
|
|
|
|
|
})
|
2017-12-31 22:31:11 +01:00
|
|
|
.when('/alerting/list', {
|
2017-12-28 18:49:33 +01:00
|
|
|
template: '<react-container />',
|
2017-12-31 22:31:11 +01:00
|
|
|
reloadOnSearch: false,
|
2017-12-28 18:49:33 +01:00
|
|
|
resolve: {
|
2019-09-17 09:46:26 +02:00
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(import(/* webpackChunkName: "AlertRuleList" */ 'app/features/alerting/AlertRuleList')),
|
2017-12-28 18:49:33 +01:00
|
|
|
},
|
|
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/alerting/notifications', {
|
2020-04-24 18:13:45 +02:00
|
|
|
template: '<react-container />',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2020-04-24 18:13:45 +02:00
|
|
|
resolve: {
|
|
|
|
|
component: () =>
|
|
|
|
|
SafeDynamicImport(
|
|
|
|
|
import(/* webpackChunkName: "NotificationsListPage" */ 'app/features/alerting/NotificationsListPage')
|
|
|
|
|
),
|
|
|
|
|
},
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/alerting/notification/new', {
|
2017-12-21 08:39:31 +01:00
|
|
|
templateUrl: 'public/app/features/alerting/partials/notification_edit.html',
|
2017-12-20 12:33:33 +01:00
|
|
|
controller: 'AlertNotificationEditCtrl',
|
|
|
|
|
controllerAs: 'ctrl',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
2017-12-20 12:33:33 +01:00
|
|
|
.when('/alerting/notification/:id/edit', {
|
2017-12-21 08:39:31 +01:00
|
|
|
templateUrl: 'public/app/features/alerting/partials/notification_edit.html',
|
2017-12-20 12:33:33 +01:00
|
|
|
controller: 'AlertNotificationEditCtrl',
|
|
|
|
|
controllerAs: 'ctrl',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2017-12-19 16:06:54 +01:00
|
|
|
})
|
|
|
|
|
.otherwise({
|
2017-12-20 12:33:33 +01:00
|
|
|
templateUrl: 'public/app/partials/error.html',
|
|
|
|
|
controller: 'ErrorCtrl',
|
2020-04-27 16:38:04 +02:00
|
|
|
reloadOnSearch: false,
|
2017-12-19 16:06:54 +01:00
|
|
|
});
|
2018-10-11 12:36:04 +02:00
|
|
|
|
|
|
|
|
applyRouteRegistrationHandlers($routeProvider);
|
2016-02-09 11:17:49 +01:00
|
|
|
}
|