Navigation: Add pluginId to standalone plugin page NavLinks (#57769)

* feat(Navigation): add `pluginId` to NavLink and override sibling navlinks with the same URL

* test replacing page from plugin

* chore: fix go lint issues

* fix(NavLink): change `PluginId` to `PluginID`

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* fix(NavLink): make the `PluginId` -> `PluginID` change everywhere

* chore(navModel.ts): update explanatory comment for `pluginId`

Co-authored-by: Miklós Tolnai <miklos.tolnai@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Levente Balogh
2022-11-03 21:19:42 +01:00
committed by GitHub
co-authored by Torkel Ödegaard Miklós Tolnai
parent 6fcc5b42c0
commit 376f4b0cc7
4 changed files with 70 additions and 6 deletions
@@ -26,6 +26,8 @@ export interface NavLinkDTO {
children?: NavLinkDTO[];
highlightText?: string;
emptyMessageId?: string;
// The ID of the plugin that registered the page (in case it was registered by a plugin, otherwise left empty)
pluginId?: string;
}
export interface NavModelItem extends NavLinkDTO {