@ -1,5 +1,5 @@
import React from 'react' ;
import { Redirect } from 'react-router-dom' ;
import { Redirect , RouteComponentProps } from 'react-router-dom' ;
import { isTruthy } from '@grafana/data' ;
import { LoginPage } from 'app/core/components/Login/LoginPage' ;
@ -10,6 +10,7 @@ import { contextSrv } from 'app/core/services/context_srv';
import UserAdminPage from 'app/features/admin/UserAdminPage' ;
import LdapPage from 'app/features/admin/ldap/LdapPage' ;
import { getAlertingRoutes } from 'app/features/alerting/routes' ;
import { ROUTES as CONNECTIONS_ROUTES } from 'app/features/connections/constants' ;
import { getRoutes as getDataConnectionsRoutes } from 'app/features/connections/routes' ;
import { DATASOURCES_ROUTES } from 'app/features/datasources/constants' ;
import { getRoutes as getPluginCatalogRoutes } from 'app/features/plugins/admin/routes' ;
@ -105,30 +106,23 @@ export function getAppRoutes(): RouteDescriptor[] {
} ,
{
path : DATASOURCES_ROUTES.List ,
component : SafeDynamicImport (
( ) = > import ( /* webpackChunkName: "DataSourcesListPage"*/ 'app/features/datasources/pages/DataSourcesListPage' )
) ,
component : ( ) = > < Redirect to = { CONNECTIONS_ROUTES . DataSources } / > ,
} ,
{
path : DATASOURCES_ROUTES.Edit ,
component : SafeDynamicImport (
( ) = > import ( /* webpackChunkName: "EditDataSourcePage"*/ '../features/datasources/pages/EditDataSourcePage' )
component : ( props : RouteComponentProps < { uid : string } > ) = > (
< Redirect to = { CONNECTIONS_ROUTES . DataSourcesEdit . replace ( ':uid' , props . match . params . uid ) } / >
) ,
} ,
{
path : DATASOURCES_ROUTES.Dashboards ,
component : SafeDynamicImport (
( ) = >
import (
/* webpackChunkName: "DataSourceDashboards"*/ 'app/features/datasources/pages/DataSourceDashboardsPage'
)
component : ( props : RouteComponentProps < { uid : string } > ) = > (
< Redirect to = { CONNECTIONS_ROUTES . DataSourcesDashboards . replace ( ':uid' , props . match . params . uid ) } / >
) ,
} ,
{
path : DATASOURCES_ROUTES.New ,
component : SafeDynamicImport (
( ) = > import ( /* webpackChunkName: "NewDataSourcePage"*/ '../features/datasources/pages/NewDataSourcePage' )
) ,
component : ( ) = > < Redirect to = { CONNECTIONS_ROUTES . DataSourcesNew } / > ,
} ,
{
path : '/datasources/correlations' ,