mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
This PR adds an audit table for public dashboards allowing a user to view all public dashboards on an instance of grafana. The public dashboards team is working on a proposal for adding RBAC support to the audit table for 9.3 Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import { SafeDynamicImport } from '../../core/components/DynamicImports/SafeDynamicImport';
|
|
import { config } from '../../core/config';
|
|
import { RouteDescriptor } from '../../core/navigation/types';
|
|
import { DashboardRoutes } from '../../types';
|
|
|
|
export const getPublicDashboardRoutes = (): RouteDescriptor[] => {
|
|
if (config.featureToggles.publicDashboards) {
|
|
return [
|
|
{
|
|
path: '/dashboard/public',
|
|
pageClass: 'page-dashboard',
|
|
routeName: DashboardRoutes.Public,
|
|
component: SafeDynamicImport(
|
|
() =>
|
|
import(
|
|
/* webpackChunkName: "ListPublicDashboardPage" */ '../../features/manage-dashboards/PublicDashboardListPage'
|
|
)
|
|
),
|
|
},
|
|
{
|
|
path: '/public-dashboards/:accessToken',
|
|
pageClass: 'page-dashboard',
|
|
routeName: DashboardRoutes.Public,
|
|
component: SafeDynamicImport(
|
|
() =>
|
|
import(
|
|
/* webpackChunkName: "PublicDashboardPage" */ '../../features/dashboard/containers/PublicDashboardPage'
|
|
)
|
|
),
|
|
},
|
|
];
|
|
}
|
|
|
|
return [];
|
|
};
|