mirror of
https://github.com/grafana/grafana.git
synced 2024-12-27 09:21:35 -06:00
a9faab6b09
* Add global week start option to shared preferences * Add default_week_start to configuration docs * Add week start option to dashboards * Add week start argument to tsdb time range parser * Fix strict check issues * Add tests for week start * Change wording on default_week_start documentation Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update week_start column to be a nullable field Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> * Update configuration to include browser option * Update WeekStartPicker container selector Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com> * Add menuShouldPortal to WeekStartPicker to remove deprecation warning Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com> * Add inputId to WeekStartPicker * Use e2e selector on WeekStartPicker aria-label * Simplify WeekStartPicker onChange condition * Specify value type on WeekStartPicker weekStarts * Remove setWeekStart side effect from reducer * Fix updateLocale failing to reset week start * Store week start as string to handle empty values Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com> Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
51 lines
862 B
Go
51 lines
862 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Preferences struct {
|
|
Id int64
|
|
OrgId int64
|
|
UserId int64
|
|
TeamId int64
|
|
Version int
|
|
HomeDashboardId int64
|
|
Timezone string
|
|
WeekStart string
|
|
Theme string
|
|
Created time.Time
|
|
Updated time.Time
|
|
}
|
|
|
|
// ---------------------
|
|
// QUERIES
|
|
|
|
type GetPreferencesQuery struct {
|
|
Id int64
|
|
OrgId int64
|
|
UserId int64
|
|
TeamId int64
|
|
|
|
Result *Preferences
|
|
}
|
|
|
|
type GetPreferencesWithDefaultsQuery struct {
|
|
User *SignedInUser
|
|
|
|
Result *Preferences
|
|
}
|
|
|
|
// ---------------------
|
|
// COMMANDS
|
|
type SavePreferencesCommand struct {
|
|
UserId int64
|
|
OrgId int64
|
|
TeamId int64
|
|
|
|
HomeDashboardId int64 `json:"homeDashboardId"`
|
|
Timezone string `json:"timezone"`
|
|
WeekStart string `json:"weekStart"`
|
|
Theme string `json:"theme"`
|
|
}
|