Dashboard: Add week start option to global and dashboard preferences (#40010)

* 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>
This commit is contained in:
Guilherme Caulada
2021-10-18 10:27:14 -03:00
committed by GitHub
parent db62ce477d
commit a9faab6b09
27 changed files with 362 additions and 21 deletions

View File

@@ -1785,6 +1785,10 @@ Set this to `true` to have date formats automatically derived from your browser
Used as the default time zone for user preferences. Can be either `browser` for the browser local time zone or a time zone name from the IANA Time Zone database, such as `UTC` or `Europe/Amsterdam`.
### default_week_start
Set the default start of the week, valid values are: `saturday`, `sunday`, `monday` or `browser` to use the browser locale to define the first day of the week. Default is `browser`.
## [expressions]
> **Note:** This feature is available in Grafana v7.4 and later versions.