mirror of
https://github.com/grafana/grafana.git
synced 2026-05-30 19:30:08 +09:00
feat: add queryHistory feature flags (#125299)
* feat(featuremgmt): add `queryHistory.localOnly` and `queryHistory.recentQueriesUI` feature flags * chore: update owner for queryHistory feature flags * fix: ran make gen-feature-toggles to regenerate feature flags
This commit is contained in:
@@ -12,6 +12,8 @@ declare module "@openfeature/core" {
|
||||
export type BooleanFlagKey =
|
||||
| "lokiShardSplitting"
|
||||
| "faroSessionReplay"
|
||||
| "queryHistory.localOnly"
|
||||
| "queryHistory.recentQueriesUI"
|
||||
| "provisioningFolderMetadata"
|
||||
| "provisioning.readmes"
|
||||
| "grafana.kubernetesAnnotationsClient"
|
||||
|
||||
@@ -83,6 +83,10 @@ export const FlagKeys = {
|
||||
QueryEditorNext: "queryEditorNext",
|
||||
/** Enables multi-select UX (card checkboxes and bulk-actions footer) in the next query editor */
|
||||
QueryEditorNextMultiSelect: "queryEditorNextMultiSelect",
|
||||
/** Store query history in browser IndexedDB instead of server-side */
|
||||
QueryHistoryLocalOnly: "queryHistory.localOnly",
|
||||
/** Replace the Query History drawer with a new Recent Queries modal UI */
|
||||
QueryHistoryRecentQueriesUI: "queryHistory.recentQueriesUI",
|
||||
/** Enables recently viewed dashboards section in the browsing dashboard page */
|
||||
RecentlyViewedDashboards: "recentlyViewedDashboards",
|
||||
/** Enables reporting for any page in Grafana */
|
||||
@@ -482,6 +486,28 @@ export const useFlagQueryEditorNextMultiSelect = (options?: ReactFlagEvaluationO
|
||||
return useFlag("queryEditorNextMultiSelect", false, options).value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Store query history in browser IndexedDB instead of server-side
|
||||
*
|
||||
* **Details:**
|
||||
* - flag key: `queryHistory.localOnly`
|
||||
* - default value: `false`
|
||||
*/
|
||||
export const useFlagQueryHistoryLocalOnly = (options?: ReactFlagEvaluationOptions): boolean => {
|
||||
return useFlag("queryHistory.localOnly", false, options).value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Replace the Query History drawer with a new Recent Queries modal UI
|
||||
*
|
||||
* **Details:**
|
||||
* - flag key: `queryHistory.recentQueriesUI`
|
||||
* - default value: `false`
|
||||
*/
|
||||
export const useFlagQueryHistoryRecentQueriesUI = (options?: ReactFlagEvaluationOptions): boolean => {
|
||||
return useFlag("queryHistory.recentQueriesUI", false, options).value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Enables recently viewed dashboards section in the browsing dashboard page
|
||||
*
|
||||
|
||||
@@ -200,6 +200,22 @@ var (
|
||||
Owner: grafanaSessionReplaySquad,
|
||||
Expression: "false",
|
||||
},
|
||||
{
|
||||
Name: "queryHistory.localOnly",
|
||||
Description: "Store query history in browser IndexedDB instead of server-side",
|
||||
Stage: FeatureStageExperimental,
|
||||
Generate: Generate{React: true},
|
||||
Owner: grafanaDataProSquad,
|
||||
Expression: "false",
|
||||
},
|
||||
{
|
||||
Name: "queryHistory.recentQueriesUI",
|
||||
Description: "Replace the Query History drawer with a new Recent Queries modal UI",
|
||||
Stage: FeatureStageExperimental,
|
||||
Owner: grafanaDataProSquad,
|
||||
Expression: "false",
|
||||
Generate: Generate{React: true},
|
||||
},
|
||||
{
|
||||
Name: "awsDatasourcesTempCredentials",
|
||||
Description: "Support temporary security credentials in AWS plugins for Grafana Cloud customers",
|
||||
|
||||
2
pkg/services/featuremgmt/toggles_gen.csv
generated
2
pkg/services/featuremgmt/toggles_gen.csv
generated
@@ -21,6 +21,8 @@ Created,Name,Stage,Owner,requiresDevMode,RequiresRestart,FrontendOnly
|
||||
2023-06-06,refactorVariablesTimeRange,preview,@grafana/dashboards-squad,false,false,false
|
||||
2023-05-05,faroDatasourceSelector,preview,@grafana/app-o11y,false,false,true
|
||||
2026-05-22,faroSessionReplay,experimental,@grafana/session-replay,false,false,true
|
||||
2026-05-21,queryHistory.localOnly,experimental,@grafana/datapro,false,false,true
|
||||
2026-05-21,queryHistory.recentQueriesUI,experimental,@grafana/datapro,false,false,true
|
||||
2023-07-06,awsDatasourcesTempCredentials,GA,@grafana/data-sources-plugins,false,false,false
|
||||
2023-07-13,mlExpressions,experimental,@grafana/alerting-squad,false,false,false
|
||||
2024-09-19,datasourceAPIServers,experimental,@grafana/grafana-app-platform-squad,false,true,false
|
||||
|
||||
|
34
pkg/services/featuremgmt/toggles_gen.json
generated
34
pkg/services/featuremgmt/toggles_gen.json
generated
@@ -4170,6 +4170,40 @@
|
||||
"expression": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "queryHistory.localOnly",
|
||||
"resourceVersion": "1779463558878",
|
||||
"creationTimestamp": "2026-05-21T19:21:07Z",
|
||||
"annotations": {
|
||||
"grafana.app/updatedTimestamp": "2026-05-22 15:25:58.878199 +0000 UTC"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"description": "Store query history in browser IndexedDB instead of server-side",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/datapro",
|
||||
"frontend": true,
|
||||
"expression": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "queryHistory.recentQueriesUI",
|
||||
"resourceVersion": "1779463558878",
|
||||
"creationTimestamp": "2026-05-21T19:21:07Z",
|
||||
"annotations": {
|
||||
"grafana.app/updatedTimestamp": "2026-05-22 15:25:58.878199 +0000 UTC"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"description": "Replace the Query History drawer with a new Recent Queries modal UI",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/datapro",
|
||||
"frontend": true,
|
||||
"expression": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "queryLibrary",
|
||||
|
||||
Reference in New Issue
Block a user