mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* Navigation Bar: Remove plugins link under Server Admin * Modify frontend to handle admin plugins as just plugins * update assets and documentation mentioned path * Fix copy to remove redundant text
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import { Redirect } from 'react-router-dom';
|
|
|
|
import { SafeDynamicImport } from 'app/core/components/DynamicImports/SafeDynamicImport';
|
|
import { RouteDescriptor } from 'app/core/navigation/types';
|
|
|
|
import { PluginAdminRoutes } from './types';
|
|
|
|
const DEFAULT_ROUTES = [
|
|
{
|
|
path: '/plugins',
|
|
navId: 'plugins',
|
|
routeName: PluginAdminRoutes.Home,
|
|
component: SafeDynamicImport(() => import(/* webpackChunkName: "PluginListPage" */ './pages/Browse')),
|
|
},
|
|
{
|
|
path: '/plugins/browse',
|
|
navId: 'plugins',
|
|
routeName: PluginAdminRoutes.Browse,
|
|
component: SafeDynamicImport(() => import(/* webpackChunkName: "PluginListPage" */ './pages/Browse')),
|
|
},
|
|
{
|
|
path: '/plugins/:pluginId/',
|
|
navId: 'plugins',
|
|
routeName: PluginAdminRoutes.Details,
|
|
component: SafeDynamicImport(() => import(/* webpackChunkName: "PluginPage" */ './pages/PluginDetails')),
|
|
},
|
|
{
|
|
path: '/admin/plugins/*',
|
|
navId: 'admin-plugins',
|
|
component: () => <Redirect to="/plugins" />,
|
|
},
|
|
];
|
|
|
|
export function getRoutes(): RouteDescriptor[] {
|
|
return DEFAULT_ROUTES;
|
|
}
|