mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 18:32:39 +08:00
move saved items feature behind separate feature toggle (#48117)
This commit is contained in:
@ -56,4 +56,5 @@ export interface FeatureToggles {
|
|||||||
explore2Dashboard?: boolean;
|
explore2Dashboard?: boolean;
|
||||||
persistNotifications?: boolean;
|
persistNotifications?: boolean;
|
||||||
commandPalette?: boolean;
|
commandPalette?: boolean;
|
||||||
|
savedItems?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ func (hs *HTTPServer) getNavTree(c *models.ReqContext, hasEditPerm bool, prefs *
|
|||||||
hasAccess := ac.HasAccess(hs.AccessControl, c)
|
hasAccess := ac.HasAccess(hs.AccessControl, c)
|
||||||
navTree := []*dtos.NavLink{}
|
navTree := []*dtos.NavLink{}
|
||||||
|
|
||||||
if hs.Features.IsEnabled(featuremgmt.FlagNewNavigation) {
|
if hs.Features.IsEnabled(featuremgmt.FlagSavedItems) {
|
||||||
savedItemsLinks, err := hs.buildSavedItemsNavLinks(c, prefs)
|
savedItemsLinks, err := hs.buildSavedItemsNavLinks(c, prefs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -226,5 +226,10 @@ var (
|
|||||||
Description: "Enable command palette",
|
Description: "Enable command palette",
|
||||||
State: FeatureStateAlpha,
|
State: FeatureStateAlpha,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "savedItems",
|
||||||
|
Description: "Enable Saved Items in the navbar.",
|
||||||
|
State: FeatureStateAlpha,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -166,4 +166,8 @@ const (
|
|||||||
// FlagCommandPalette
|
// FlagCommandPalette
|
||||||
// Enable command palette
|
// Enable command palette
|
||||||
FlagCommandPalette = "commandPalette"
|
FlagCommandPalette = "commandPalette"
|
||||||
|
|
||||||
|
// FlagSavedItems
|
||||||
|
// Enable Saved Items in the navbar.
|
||||||
|
FlagSavedItems = "savedItems"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user