RestoreDashboards: Merge both feature toggles to dashboardRestore (#94412)
* refactor: remove FE feat toggle from BE * refactor: remove FE toggle and adjust roles * refactor: replace feat toggle in tracking events * refactor: remove FE feat toggle * refactor: remove FE feat toggle * fix: autogenerated file
This commit is contained in:
@@ -1255,10 +1255,11 @@ var (
|
||||
},
|
||||
{
|
||||
Name: "dashboardRestore",
|
||||
Description: "Enables deleted dashboard restore feature (backend only)",
|
||||
Description: "Enables deleted dashboard restore feature",
|
||||
Stage: FeatureStageExperimental,
|
||||
Owner: grafanaSearchAndStorageSquad,
|
||||
HideFromAdminPage: true,
|
||||
Expression: "false", // enabled by default
|
||||
},
|
||||
{
|
||||
Name: "datasourceProxyDisableRBAC",
|
||||
@@ -1367,13 +1368,6 @@ var (
|
||||
Owner: grafanaAlertingSquad,
|
||||
RequiresRestart: true,
|
||||
},
|
||||
{
|
||||
Name: "dashboardRestoreUI",
|
||||
Description: "Enables the frontend to be able to restore a recently deleted dashboard",
|
||||
Stage: FeatureStageExperimental,
|
||||
Owner: grafanaFrontendPlatformSquad,
|
||||
Expression: "false", // enabled by default
|
||||
},
|
||||
{
|
||||
Name: "cloudWatchRoundUpEndTime",
|
||||
Description: "Round up end time for metric queries to the next minute to avoid missing data",
|
||||
|
||||
@@ -179,7 +179,6 @@ failWrongDSUID,experimental,@grafana/plugins-platform-backend,false,false,false
|
||||
zanzana,experimental,@grafana/identity-access-team,false,false,false
|
||||
passScopeToDashboardApi,experimental,@grafana/dashboards-squad,false,false,false
|
||||
alertingApiServer,experimental,@grafana/alerting-squad,false,true,false
|
||||
dashboardRestoreUI,experimental,@grafana/grafana-frontend-platform,false,false,false
|
||||
cloudWatchRoundUpEndTime,GA,@grafana/aws-datasources,false,false,false
|
||||
cloudwatchMetricInsightsCrossAccount,preview,@grafana/aws-datasources,false,false,true
|
||||
prometheusAzureOverrideAudience,deprecated,@grafana/partner-datasources,false,false,false
|
||||
|
||||
|
@@ -668,7 +668,7 @@ const (
|
||||
FlagNotificationBanner = "notificationBanner"
|
||||
|
||||
// FlagDashboardRestore
|
||||
// Enables deleted dashboard restore feature (backend only)
|
||||
// Enables deleted dashboard restore feature
|
||||
FlagDashboardRestore = "dashboardRestore"
|
||||
|
||||
// FlagDatasourceProxyDisableRBAC
|
||||
@@ -727,10 +727,6 @@ const (
|
||||
// Register Alerting APIs with the K8s API server
|
||||
FlagAlertingApiServer = "alertingApiServer"
|
||||
|
||||
// FlagDashboardRestoreUI
|
||||
// Enables the frontend to be able to restore a recently deleted dashboard
|
||||
FlagDashboardRestoreUI = "dashboardRestoreUI"
|
||||
|
||||
// FlagCloudWatchRoundUpEndTime
|
||||
// Round up end time for metric queries to the next minute to avoid missing data
|
||||
FlagCloudWatchRoundUpEndTime = "cloudWatchRoundUpEndTime"
|
||||
|
||||
@@ -808,17 +808,18 @@
|
||||
{
|
||||
"metadata": {
|
||||
"name": "dashboardRestore",
|
||||
"resourceVersion": "1719321877748",
|
||||
"resourceVersion": "1728397491294",
|
||||
"creationTimestamp": "2024-05-16T17:36:26Z",
|
||||
"annotations": {
|
||||
"grafana.app/updatedTimestamp": "2024-06-25 13:24:37.748284 +0000 UTC"
|
||||
"grafana.app/updatedTimestamp": "2024-10-08 14:24:51.294668 +0000 UTC"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"description": "Enables deleted dashboard restore feature (backend only)",
|
||||
"description": "Enables deleted dashboard restore feature",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/search-and-storage",
|
||||
"hideFromAdminPage": true
|
||||
"hideFromAdminPage": true,
|
||||
"expression": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -826,6 +827,7 @@
|
||||
"name": "dashboardRestoreUI",
|
||||
"resourceVersion": "1720021873452",
|
||||
"creationTimestamp": "2024-06-25T14:43:13Z",
|
||||
"deletionTimestamp": "2024-10-08T14:24:51Z",
|
||||
"annotations": {
|
||||
"grafana.app/updatedTimestamp": "2024-07-03 15:51:13.452477 +0000 UTC"
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
|
||||
})
|
||||
}
|
||||
|
||||
if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagDashboardRestoreUI) && (c.SignedInUser.GetOrgRole() == org.RoleAdmin || c.IsGrafanaAdmin) {
|
||||
if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagDashboardRestore) && (c.SignedInUser.GetOrgRole() == org.RoleAdmin || c.IsGrafanaAdmin) {
|
||||
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
||||
Text: "Recently deleted",
|
||||
SubTitle: "Any items listed here for more than 30 days will be automatically deleted.",
|
||||
|
||||
Reference in New Issue
Block a user