Implement preference service (#47870)
* Implement preference service * Adjust wire.go * Fix integration test user * Fix api pref tests * Fix a11y error Co-authored-by: Alexandra Vargas <alexa1866@gmail.com> Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
co-authored by
Alexandra Vargas
Emil Tullstedt
parent
03cf38e659
commit
dbcaedac6c
+14
-11
@@ -1,14 +1,17 @@
|
||||
package dtos
|
||||
|
||||
import "github.com/grafana/grafana/pkg/models"
|
||||
import (
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
pref "github.com/grafana/grafana/pkg/services/preference"
|
||||
)
|
||||
|
||||
type Prefs struct {
|
||||
Theme string `json:"theme"`
|
||||
HomeDashboardID int64 `json:"homeDashboardId"`
|
||||
Timezone string `json:"timezone"`
|
||||
WeekStart string `json:"weekStart"`
|
||||
Navbar models.NavbarPreference `json:"navbar,omitempty"`
|
||||
QueryHistory models.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
Theme string `json:"theme"`
|
||||
HomeDashboardID int64 `json:"homeDashboardId"`
|
||||
Timezone string `json:"timezone"`
|
||||
WeekStart string `json:"weekStart"`
|
||||
Navbar pref.NavbarPreference `json:"navbar,omitempty"`
|
||||
QueryHistory pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
@@ -33,8 +36,8 @@ type PatchPrefsCmd struct {
|
||||
// Default:0
|
||||
HomeDashboardID *int64 `json:"homeDashboardId,omitempty"`
|
||||
// Enum: utc,browser
|
||||
Timezone *string `json:"timezone,omitempty"`
|
||||
WeekStart *string `json:"weekStart,omitempty"`
|
||||
Navbar *models.NavbarPreference `json:"navbar,omitempty"`
|
||||
QueryHistory *models.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
Timezone *string `json:"timezone,omitempty"`
|
||||
WeekStart *string `json:"weekStart,omitempty"`
|
||||
Navbar *pref.NavbarPreference `json:"navbar,omitempty"`
|
||||
QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user