Rename behavior related to the interactive learning plugin (#112752)
This commit is contained in:
@@ -246,7 +246,6 @@ func isSupportBundlesEnabled(s *ServiceImpl) bool {
|
||||
}
|
||||
|
||||
// addHelpLinks adds a help menu item to the navigation bar.
|
||||
// If the Grafana Pathfinder plugin is installed, it will handle enriching the help menu.
|
||||
func (s *ServiceImpl) addHelpLinks(treeRoot *navtree.NavTreeRoot, c *contextmodel.ReqContext) {
|
||||
if s.cfg.HelpEnabled {
|
||||
helpNode := &navtree.NavLink{
|
||||
@@ -261,12 +260,12 @@ func (s *ServiceImpl) addHelpLinks(treeRoot *navtree.NavTreeRoot, c *contextmode
|
||||
treeRoot.AddSection(helpNode)
|
||||
|
||||
ctx := c.Req.Context()
|
||||
// The docs plugin ID is going to transition from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
|
||||
// The interactive learning plugin ID is transitioning from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
|
||||
// Support both until that migration is complete.
|
||||
_, oldPathfinderInstalled := s.pluginStore.Plugin(ctx, "grafana-grafanadocsplugin-app")
|
||||
_, newPathfinderInstalled := s.pluginStore.Plugin(ctx, "grafana-pathfinder-app")
|
||||
if oldPathfinderInstalled || newPathfinderInstalled {
|
||||
// Add a custom property to indicate this should open Grafana Pathfinder.
|
||||
_, oldInteractiveLearningPluginInstalled := s.pluginStore.Plugin(ctx, "grafana-grafanadocsplugin-app")
|
||||
_, newInteractiveLearningPluginInstalled := s.pluginStore.Plugin(ctx, "grafana-pathfinder-app")
|
||||
if oldInteractiveLearningPluginInstalled || newInteractiveLearningPluginInstalled {
|
||||
// Add a custom property to indicate this should open the interactive learning plugin if available.
|
||||
helpNode.HideFromTabs = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user