move saved items feature behind separate feature toggle (#48117)

This commit is contained in:
Ashley Harrison 2022-04-26 11:27:01 +01:00 committed by GitHub
parent c73b9d1818
commit e420252d45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 1 deletions

View File

@ -56,4 +56,5 @@ export interface FeatureToggles {
explore2Dashboard?: boolean;
persistNotifications?: boolean;
commandPalette?: boolean;
savedItems?: boolean;
}

View File

@ -172,7 +172,7 @@ func (hs *HTTPServer) getNavTree(c *models.ReqContext, hasEditPerm bool, prefs *
hasAccess := ac.HasAccess(hs.AccessControl, c)
navTree := []*dtos.NavLink{}
if hs.Features.IsEnabled(featuremgmt.FlagNewNavigation) {
if hs.Features.IsEnabled(featuremgmt.FlagSavedItems) {
savedItemsLinks, err := hs.buildSavedItemsNavLinks(c, prefs)
if err != nil {
return nil, err

View File

@ -226,5 +226,10 @@ var (
Description: "Enable command palette",
State: FeatureStateAlpha,
},
{
Name: "savedItems",
Description: "Enable Saved Items in the navbar.",
State: FeatureStateAlpha,
},
}
)

View File

@ -166,4 +166,8 @@ const (
// FlagCommandPalette
// Enable command palette
FlagCommandPalette = "commandPalette"
// FlagSavedItems
// Enable Saved Items in the navbar.
FlagSavedItems = "savedItems"
)