mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[config] Move day of week next to timezone config
This commit is contained in:
parent
2f44298758
commit
d3187d0c63
2 changed files with 6 additions and 6 deletions
|
@ -35,10 +35,16 @@ chrome
|
|||
});
|
||||
|
||||
config.watch('dateFormat:tz', setDefaultTimezone, $scope);
|
||||
config.watch('dateFormat:dow', setStartDayOfWeek, $scope);
|
||||
|
||||
function setDefaultTimezone(tz) {
|
||||
moment.tz.setDefault(tz);
|
||||
}
|
||||
|
||||
function setStartDayOfWeek(day) {
|
||||
const dow = moment.weekdays().indexOf(day);
|
||||
moment.updateLocale(moment.locale(), { week: { dow } });
|
||||
}
|
||||
});
|
||||
|
||||
modules.get('kibana').run(Notifier.pullMessageFromUrl);
|
||||
|
|
|
@ -19,12 +19,6 @@ UiModules
|
|||
return {
|
||||
template: toggleHtml,
|
||||
link: ($scope, $el, attrs) => {
|
||||
config.bindToScope($scope, 'dateFormat:dow', 'dateFormat_dow');
|
||||
$scope.$watch('dateFormat_dow', function (day) {
|
||||
const dow = moment.weekdays().indexOf(day);
|
||||
moment.updateLocale(moment.locale(), { week: { dow } });
|
||||
});
|
||||
|
||||
listenForUpdates($rootScope);
|
||||
|
||||
$rootScope.timefilter = timefilter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue