Fix panel time overrides not being applied fully

When both relative and time shift were applied, only time shift was taken into consideration
pull/14831/head
Dominik Prokop 6 years ago
parent 0f82fffed6
commit 60fadcf1e5
  1. 9
      public/app/features/dashboard/utils/panel.ts

@ -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,
};
}

Loading…
Cancel
Save