Merge pull request #14831 from grafana/fix/time-range-overrides

Fix panel time overrides not being applied fully
This commit is contained in:
Torkel Ödegaard 2019-01-11 09:38:15 +01:00 committed by GitHub
commit 11ad92c08e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,12 +143,9 @@ export function applyPanelTimeOverrides(panel: PanelModel, timeRange: TimeRange)
const timeShift = '-' + timeShiftInterpolated;
newTimeData.timeInfo += ' timeshift ' + timeShift;
newTimeData.timeRange = {
from: dateMath.parseDateMath(timeShift, timeRange.from, false),
to: dateMath.parseDateMath(timeShift, timeRange.to, true),
raw: {
from: timeRange.from,
to: timeRange.to,
},
from: dateMath.parseDateMath(timeShift, newTimeData.timeRange.from, false),
to: dateMath.parseDateMath(timeShift, newTimeData.timeRange.to, true),
raw: newTimeData.timeRange.raw,
};
}