Which file in kibana does changes the auto interval to 12 hours or 3 hours when changing the timefilter accordingly.
spalger
(Spencer Alger)
December 22, 2018, 1:04am
2
gargPrateek
(Prateek Garg)
December 24, 2018, 10:11am
3
you are right but how the code control flows when we change the timefilter value, how the control goes to calc_auto_interval, how it changes the auto interval before fetching the details,just need to know this much flow.
thanks if anyone can help
Hi @gargPrateek
This is the flow that happens when changing the time filter
Call the onFilterSelect() on the directive
case TIME_MODES.ABSOLUTE:
$scope.absolute.from = dateMath.parse($scope.from || moment().subtract(15, 'minutes'));
$scope.absolute.to = dateMath.parse($scope.to || moment(), { roundUp: true });
break;
}
$scope.mode = thisMode;
};
$scope.setQuick = function (from, to) {
$scope.onFilterSelect({ from, to, mode: TIME_MODES.QUICK });
};
$scope.setToNow = function (key) {
$scope.absolute[key] = moment();
};
$scope.setRelativeToNow = function (key) {
$scope.relative[key].count = 0;
$scope.relative[key].round = false;
$scope.formatRelative(key);
Set the time on theTimeFilter
instance
$scope.forward = function () {
timefilter.setTime(timeNavigation.stepForward(timefilter.getBounds()));
};
$scope.back = function () {
timefilter.setTime(timeNavigation.stepBackward(timefilter.getBounds()));
};
$scope.updateFilter = function (from, to, mode) {
timefilter.setTime({ from, to, mode });
kbnTopNav.close('filter');
};
$scope.updateInterval = function (interval) {
timefilter.setRefreshInterval(interval);
kbnTopNav.close('interval');
};
$scope.getSharedTimeFilterFromDate = function () {
return (timefilter.isAutoRefreshSelectorEnabled || timefilter.isTimeRangeSelectorEnabled)
The Angular globalState.time
is updated
if (newTime) {
if (newTime.to) newTime.to = convertISO8601(newTime.to);
if (newTime.from) newTime.from = convertISO8601(newTime.from);
}
timefilter.setTime(newTime);
timefilter.setRefreshInterval(newRefreshInterval);
});
const updateGlobalStateWithTime = () => {
globalState.time = timefilter.getTime();
globalState.refreshInterval = timefilter.getRefreshInterval();
globalState.save();
};
$rootScope.$listenAndDigestAsync(timefilter, 'refreshIntervalUpdate', updateGlobalStateWithTime);
$rootScope.$listenAndDigestAsync(timefilter, 'timeUpdate', updateGlobalStateWithTime);
});
uiRoutes
system
(system)
Closed
January 21, 2019, 3:46pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.