Chore: remove dashboardsFromStorage (#65058)
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/annotations"
|
||||
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
||||
"github.com/grafana/grafana/pkg/services/dashboards"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
"github.com/grafana/grafana/pkg/services/guardian"
|
||||
"github.com/grafana/grafana/pkg/services/org"
|
||||
"github.com/grafana/grafana/pkg/services/user"
|
||||
@@ -53,11 +52,7 @@ func (hs *HTTPServer) GetAnnotations(c *contextmodel.ReqContext) response.Respon
|
||||
dq := dashboards.GetDashboardQuery{UID: query.DashboardUID, OrgID: c.OrgID}
|
||||
dqResult, err := hs.DashboardService.GetDashboard(c.Req.Context(), &dq)
|
||||
if err != nil {
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagDashboardsFromStorage) {
|
||||
// OK... the storage UIDs do not (yet?) exist in the DashboardService
|
||||
} else {
|
||||
return response.Error(http.StatusBadRequest, "Invalid dashboard UID in annotation request", err)
|
||||
}
|
||||
return response.Error(http.StatusBadRequest, "Invalid dashboard UID in annotation request", err)
|
||||
} else {
|
||||
query.DashboardID = dqResult.ID
|
||||
}
|
||||
|
||||
@@ -157,10 +157,6 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
r.Get("/dashboards/*", reqSignedIn, hs.Index)
|
||||
r.Get("/goto/:uid", reqSignedIn, hs.redirectFromShortURL, hs.Index)
|
||||
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagDashboardsFromStorage) {
|
||||
r.Get("/g/*", reqSignedIn, hs.Index)
|
||||
}
|
||||
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagPublicDashboards) {
|
||||
// list public dashboards
|
||||
r.Get("/public-dashboards/list", reqSignedIn, hs.Index)
|
||||
|
||||
@@ -121,13 +121,6 @@ var (
|
||||
RequiresDevMode: true,
|
||||
Owner: grafanaAppPlatformSquad,
|
||||
},
|
||||
{
|
||||
Name: "dashboardsFromStorage",
|
||||
Description: "Load dashboards from the generic storage interface",
|
||||
State: FeatureStateAlpha,
|
||||
RequiresDevMode: true, // Also a gate on automatic git storage (for now)
|
||||
Owner: grafanaAppPlatformSquad,
|
||||
},
|
||||
{
|
||||
Name: "exploreMixedDatasource",
|
||||
Description: "Enable mixed datasource in Explore",
|
||||
|
||||
@@ -17,7 +17,6 @@ featureHighlights,stable,@grafana/grafana-as-code,false,false,false,false
|
||||
migrationLocking,beta,@grafana/backend-platform,false,false,false,false
|
||||
storage,alpha,@grafana/grafana-app-platform-squad,false,false,false,false
|
||||
k8s,alpha,@grafana/grafana-app-platform-squad,true,false,false,false
|
||||
dashboardsFromStorage,alpha,@grafana/grafana-app-platform-squad,true,false,false,false
|
||||
exploreMixedDatasource,alpha,@grafana/explore-squad,false,false,false,true
|
||||
tracing,alpha,@grafana/user-essentials,false,false,false,true
|
||||
newTraceView,alpha,@grafana/observability-traces-and-profiling,false,false,false,true
|
||||
|
||||
|
@@ -79,10 +79,6 @@ const (
|
||||
// Explore native k8s integrations
|
||||
FlagK8S = "k8s"
|
||||
|
||||
// FlagDashboardsFromStorage
|
||||
// Load dashboards from the generic storage interface
|
||||
FlagDashboardsFromStorage = "dashboardsFromStorage"
|
||||
|
||||
// FlagExploreMixedDatasource
|
||||
// Enable mixed datasource in Explore
|
||||
FlagExploreMixedDatasource = "exploreMixedDatasource"
|
||||
|
||||
@@ -44,34 +44,6 @@ func LoadStorageConfig(cfg *setting.Cfg, features featuremgmt.FeatureToggles) (*
|
||||
changed = true
|
||||
}
|
||||
|
||||
if g.Roots == nil && features.IsEnabled(featuremgmt.FlagDashboardsFromStorage) {
|
||||
g.Roots = append(g.Roots, RootStorageConfig{
|
||||
Type: "git",
|
||||
Prefix: "it-A",
|
||||
Name: "Repository that requires pull requests",
|
||||
Git: &StorageGitConfig{
|
||||
Remote: "https://github.com/grafana/hackathon-2022-03-git-dash-A",
|
||||
Branch: "main",
|
||||
Root: "dashboards", // the dashboard files
|
||||
RequirePullRequest: true,
|
||||
AccessToken: "$GRAFANA_STORAGE_GITHUB_ACCESS_TOKEN",
|
||||
},
|
||||
})
|
||||
g.Roots = append(g.Roots, RootStorageConfig{
|
||||
Type: "git",
|
||||
Prefix: "it-B",
|
||||
Name: "Another repo (can push to main)",
|
||||
Git: &StorageGitConfig{
|
||||
Remote: "https://github.com/grafana/hackathon-2022-03-git-dash-B",
|
||||
Branch: "main",
|
||||
Root: "dashboards", // the dashboard files
|
||||
RequirePullRequest: false,
|
||||
AccessToken: "$GRAFANA_STORAGE_GITHUB_ACCESS_TOKEN",
|
||||
},
|
||||
})
|
||||
changed = true
|
||||
}
|
||||
|
||||
g.filepath = fpath
|
||||
|
||||
// Also configured from ini files
|
||||
|
||||
Reference in New Issue
Block a user