mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
RestoreDashboards: Create FE feature toggle (#89655)
This commit is contained in:
@@ -184,13 +184,14 @@ Experimental features might be changed or removed without prior notice.
|
||||
| `newDashboardSharingComponent` | Enables the new sharing drawer design |
|
||||
| `alertingListViewV2` | Enables the new alert list view design |
|
||||
| `notificationBanner` | Enables the notification banner UI and API |
|
||||
| `dashboardRestore` | Enables deleted dashboard restore feature |
|
||||
| `dashboardRestore` | Enables deleted dashboard restore feature (backend only) |
|
||||
| `alertingCentralAlertHistory` | Enables the new central alert history. |
|
||||
| `azureMonitorPrometheusExemplars` | Allows configuration of Azure Monitor as a data source that can provide Prometheus exemplars |
|
||||
| `pinNavItems` | Enables pinning of nav items |
|
||||
| `failWrongDSUID` | Throws an error if a datasource has an invalid UIDs |
|
||||
| `databaseReadReplica` | Use a read replica for some database queries. |
|
||||
| `alertingApiServer` | Register Alerting APIs with the K8s API server |
|
||||
| `dashboardRestoreUI` | Enables the frontend to be able to restore a recently deleted dashboard |
|
||||
|
||||
## Development feature toggles
|
||||
|
||||
|
||||
@@ -198,4 +198,5 @@ export interface FeatureToggles {
|
||||
zanzana?: boolean;
|
||||
passScopeToDashboardApi?: boolean;
|
||||
alertingApiServer?: boolean;
|
||||
dashboardRestoreUI?: boolean;
|
||||
}
|
||||
|
||||
@@ -1236,9 +1236,9 @@ var (
|
||||
},
|
||||
{
|
||||
Name: "dashboardRestore",
|
||||
Description: "Enables deleted dashboard restore feature",
|
||||
Description: "Enables deleted dashboard restore feature (backend only)",
|
||||
Stage: FeatureStageExperimental,
|
||||
Owner: grafanaFrontendPlatformSquad,
|
||||
Owner: grafanaSearchAndStorageSquad,
|
||||
HideFromAdminPage: true,
|
||||
},
|
||||
{
|
||||
@@ -1353,6 +1353,13 @@ 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
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ logsExploreTableDefaultVisualization,experimental,@grafana/observability-logs,fa
|
||||
newDashboardSharingComponent,experimental,@grafana/sharing-squad,false,false,true
|
||||
alertingListViewV2,experimental,@grafana/alerting-squad,false,false,true
|
||||
notificationBanner,experimental,@grafana/grafana-frontend-platform,false,false,false
|
||||
dashboardRestore,experimental,@grafana/grafana-frontend-platform,false,false,false
|
||||
dashboardRestore,experimental,@grafana/search-and-storage,false,false,false
|
||||
datasourceProxyDisableRBAC,GA,@grafana/identity-access-team,false,false,false
|
||||
alertingDisableSendAlertsExternal,experimental,@grafana/alerting-squad,false,false,false
|
||||
preserveDashboardStateWhenNavigating,experimental,@grafana/dashboards-squad,false,false,false
|
||||
@@ -179,3 +179,4 @@ databaseReadReplica,experimental,@grafana/grafana-backend-services-squad,false,f
|
||||
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
|
||||
|
||||
|
@@ -664,7 +664,7 @@ const (
|
||||
FlagNotificationBanner = "notificationBanner"
|
||||
|
||||
// FlagDashboardRestore
|
||||
// Enables deleted dashboard restore feature
|
||||
// Enables deleted dashboard restore feature (backend only)
|
||||
FlagDashboardRestore = "dashboardRestore"
|
||||
|
||||
// FlagDatasourceProxyDisableRBAC
|
||||
@@ -726,4 +726,8 @@ const (
|
||||
// FlagAlertingApiServer
|
||||
// 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"
|
||||
)
|
||||
|
||||
@@ -593,16 +593,31 @@
|
||||
{
|
||||
"metadata": {
|
||||
"name": "dashboardRestore",
|
||||
"resourceVersion": "1718727528075",
|
||||
"creationTimestamp": "2024-05-16T17:36:26Z"
|
||||
"resourceVersion": "1719321877748",
|
||||
"creationTimestamp": "2024-05-16T17:36:26Z",
|
||||
"annotations": {
|
||||
"grafana.app/updatedTimestamp": "2024-06-25 13:24:37.748284 +0000 UTC"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"description": "Enables deleted dashboard restore feature",
|
||||
"description": "Enables deleted dashboard restore feature (backend only)",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/grafana-frontend-platform",
|
||||
"codeowner": "@grafana/search-and-storage",
|
||||
"hideFromAdminPage": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "dashboardRestoreUI",
|
||||
"resourceVersion": "1719321338253",
|
||||
"creationTimestamp": "2024-06-25T13:15:38Z"
|
||||
},
|
||||
"spec": {
|
||||
"description": "Enables the frontend to be able to restore a recently deleted dashboard",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/grafana-frontend-platform"
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "dashboardScene",
|
||||
|
||||
@@ -354,7 +354,7 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
|
||||
})
|
||||
}
|
||||
|
||||
if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagDashboardRestore) && hasAccess(ac.EvalPermission(dashboards.ActionDashboardsDelete)) {
|
||||
if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagDashboardRestoreUI) && hasAccess(ac.EvalPermission(dashboards.ActionDashboardsDelete)) {
|
||||
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
||||
Text: "Recently Deleted",
|
||||
SubTitle: "Any items listed here for more than 30 days will be automatically deleted.",
|
||||
|
||||
@@ -434,7 +434,7 @@ export function getAppRoutes(): RouteDescriptor[] {
|
||||
() => import(/* webpackChunkName: "SnapshotListPage" */ 'app/features/manage-dashboards/SnapshotListPage')
|
||||
),
|
||||
},
|
||||
config.featureToggles.dashboardRestore && {
|
||||
config.featureToggles.dashboardRestoreUI && {
|
||||
path: '/dashboard/recently-deleted',
|
||||
roles: () => contextSrv.evaluatePermission([AccessControlAction.DashboardsDelete]),
|
||||
component: SafeDynamicImport(
|
||||
|
||||
Reference in New Issue
Block a user