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:
@@ -0,0 +1,21 @@
|
||||
package queryhistory
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
)
|
||||
|
||||
type QueryHistory struct {
|
||||
Id int64 `json:"id"`
|
||||
Uid string `json:"uid"`
|
||||
DatasourceUid string `json:"datasourceUid"`
|
||||
OrgId int64 `json:"orgId"`
|
||||
CreatedBy int64 `json:"createdBy"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
Comment string `json:"comment"`
|
||||
Queries *simplejson.Json `json:"queries"`
|
||||
}
|
||||
|
||||
type CreateQueryInQueryHistoryCommand struct {
|
||||
DatasourceUid string `json:"datasourceUid"`
|
||||
Queries *simplejson.Json `json:"queries"`
|
||||
}
|
||||
Reference in New Issue
Block a user