mirror of
https://github.com/grafana/grafana.git
synced 2025-09-26 03:44:19 +08:00
Query history: Create API to add query to query history (#44479)
* Create config to enable/disable query history * Create add to query history functionality * Add documentation * Add test * Refactor * Add test * Fix built errors and linting errors * Refactor * Remove old tests * Refactor, adjust based on feedback, add new test * Update default value
This commit is contained in:
@ -429,6 +429,9 @@ type Cfg struct {
|
||||
|
||||
// Unified Alerting
|
||||
UnifiedAlerting UnifiedAlertingSettings
|
||||
|
||||
// Query history
|
||||
QueryHistoryEnabled bool
|
||||
}
|
||||
|
||||
type CommandLineArgs struct {
|
||||
@ -940,6 +943,9 @@ func (cfg *Cfg) Load(args CommandLineArgs) error {
|
||||
explore := iniFile.Section("explore")
|
||||
ExploreEnabled = explore.Key("enabled").MustBool(true)
|
||||
|
||||
queryHistory := iniFile.Section("query_history")
|
||||
cfg.QueryHistoryEnabled = queryHistory.Key("enabled").MustBool(false)
|
||||
|
||||
panelsSection := iniFile.Section("panels")
|
||||
cfg.DisableSanitizeHtml = panelsSection.Key("disable_sanitize_html").MustBool(false)
|
||||
|
||||
|
Reference in New Issue
Block a user