2016-03-15 16:49:52 -05:00
|
|
|
package dtos
|
|
|
|
|
2022-04-21 08:03:17 -05:00
|
|
|
import (
|
|
|
|
pref "github.com/grafana/grafana/pkg/services/preference"
|
|
|
|
)
|
2022-03-17 07:07:20 -05:00
|
|
|
|
2016-04-02 15:54:06 -05:00
|
|
|
type Prefs struct {
|
2022-04-29 07:37:33 -05:00
|
|
|
Theme string `json:"theme"`
|
|
|
|
HomeDashboardID int64 `json:"homeDashboardId"`
|
|
|
|
HomeDashboardUID string `json:"homeDashboardUID,omitempty"`
|
|
|
|
Timezone string `json:"timezone"`
|
|
|
|
WeekStart string `json:"weekStart"`
|
2022-06-14 06:53:51 -05:00
|
|
|
Locale string `json:"locale"`
|
2022-04-29 07:37:33 -05:00
|
|
|
Navbar pref.NavbarPreference `json:"navbar,omitempty"`
|
|
|
|
QueryHistory pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
2016-04-01 19:34:30 -05:00
|
|
|
}
|
|
|
|
|
2022-02-08 06:38:43 -06:00
|
|
|
// swagger:model
|
2016-04-02 15:54:06 -05:00
|
|
|
type UpdatePrefsCmd struct {
|
2022-02-08 06:38:43 -06:00
|
|
|
// Enum: light,dark
|
|
|
|
Theme string `json:"theme"`
|
|
|
|
// The numerical :id of a favorited dashboard
|
|
|
|
// Default:0
|
2022-04-29 07:37:33 -05:00
|
|
|
HomeDashboardID int64 `json:"homeDashboardId"`
|
|
|
|
HomeDashboardUID *string `json:"homeDashboardUID,omitempty"`
|
2022-02-08 06:38:43 -06:00
|
|
|
// Enum: utc,browser
|
2022-05-26 07:39:57 -05:00
|
|
|
Timezone string `json:"timezone"`
|
|
|
|
WeekStart string `json:"weekStart"`
|
|
|
|
Navbar *pref.NavbarPreference `json:"navbar,omitempty"`
|
|
|
|
QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
2022-06-14 06:53:51 -05:00
|
|
|
Locale string `json:"locale"`
|
2022-03-17 07:07:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// swagger:model
|
|
|
|
type PatchPrefsCmd struct {
|
|
|
|
// Enum: light,dark
|
|
|
|
Theme *string `json:"theme,omitempty"`
|
|
|
|
// The numerical :id of a favorited dashboard
|
|
|
|
// Default:0
|
|
|
|
HomeDashboardID *int64 `json:"homeDashboardId,omitempty"`
|
|
|
|
// Enum: utc,browser
|
2022-04-29 07:37:33 -05:00
|
|
|
Timezone *string `json:"timezone,omitempty"`
|
|
|
|
WeekStart *string `json:"weekStart,omitempty"`
|
2022-06-14 06:53:51 -05:00
|
|
|
Locale *string `json:"locale,omitempty"`
|
2022-04-29 07:37:33 -05:00
|
|
|
Navbar *pref.NavbarPreference `json:"navbar,omitempty"`
|
|
|
|
QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
|
|
|
HomeDashboardUID *string `json:"homeDashboardUID,omitempty"`
|
2016-03-15 16:49:52 -05:00
|
|
|
}
|