Plugins: add card extension to nav-landing-page (#113768)
* Plugins: add card extension to nav-landing-page * feat(nav-landing-page): update card extension to include category and onClick support * feat(NavLandingPage): add setPluginLinksHook to test setup * feat(NavLandingPageCard): refactor className handling using cx for better style management * feat(NavLandingPage): update card extension targets to use plural form for consistency * feat(NavLandingPage): add warning for mutually exclusive extension points
This commit is contained in:
@@ -78,6 +78,13 @@ export const plugin = new AppPlugin<{}>()
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
})
|
||||
.addLink({
|
||||
targets: 'grafana/dynamic/nav-landing-page/nav-id-cfg/cards/v1',
|
||||
title: 'Extensions Test App',
|
||||
description: 'This card tests the admin page card extension point',
|
||||
path: `/a/${pluginJson.id}/`,
|
||||
category: 'error',
|
||||
});
|
||||
|
||||
function isSupported(context?: PluginExtensionPanelContext): boolean {
|
||||
|
||||
@@ -55,6 +55,11 @@
|
||||
"targets": ["grafana/dashboard/panel/menu"],
|
||||
"title": "Open from time series or pie charts (onClick)",
|
||||
"description": "This link will only be visible on time series and pie charts"
|
||||
},
|
||||
{
|
||||
"targets": ["grafana/dynamic/nav-landing-page/nav-id-cfg/cards/v1"],
|
||||
"title": "Extensions Test App",
|
||||
"description": "This card tests the admin page card extension point"
|
||||
}
|
||||
],
|
||||
"extensionPoints": [
|
||||
|
||||
Reference in New Issue
Block a user