mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
* moved the plugins admin to core and used the plugins toggle to decide which version to use. * reverted change. * changed so the library tab is the default one. * fixing navigation. # * fixed so we have the proper header. * including the core plugins * fixed so we display logos for local plugins. * fixed so we have a working version of plugin catalog. * removed console logs. * reverted changes. * fixing failed test.
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { SafeDynamicImport } from 'app/core/components/DynamicImports/SafeDynamicImport';
|
|
import { config } from 'app/core/config';
|
|
import { RouteDescriptor } from 'app/core/navigation/types';
|
|
|
|
export function getPluginsAdminRoutes(cfg = config): RouteDescriptor[] {
|
|
if (!cfg.pluginAdminEnabled) {
|
|
return [
|
|
{
|
|
path: '/plugins',
|
|
component: SafeDynamicImport(() => import(/* webpackChunkName: "PluginListPage" */ './PluginListPage')),
|
|
},
|
|
{
|
|
path: '/plugins/browse',
|
|
component: SafeDynamicImport(
|
|
() => import(/* webpackChunkName: "PluginAdminNotEnabled" */ './admin/pages/NotEnabed')
|
|
),
|
|
},
|
|
{
|
|
path: '/plugins/:pluginId/',
|
|
component: SafeDynamicImport(() => import(/* webpackChunkName: "PluginPage" */ './PluginPage')),
|
|
},
|
|
];
|
|
}
|
|
|
|
return [
|
|
{
|
|
path: '/plugins',
|
|
component: SafeDynamicImport(() => import(/* webpackChunkName: "PluginListPage" */ './admin/pages/Browse')),
|
|
},
|
|
{
|
|
path: '/plugins/browse',
|
|
component: SafeDynamicImport(() => import(/* webpackChunkName: "PluginListPage" */ './admin/pages/Browse')),
|
|
},
|
|
{
|
|
path: '/plugins/:pluginId/',
|
|
component: SafeDynamicImport(() => import(/* webpackChunkName: "PluginPage" */ './admin/pages/PluginDetails')),
|
|
},
|
|
];
|
|
}
|