浏览代码

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

Fix panel time overrides not being applied fully
Torkel Ödegaard 7 年之前
父节点
当前提交
11ad92c08e
共有 1 个文件被更改,包括 3 次插入6 次删除
  1. 3 6
      public/app/features/dashboard/utils/panel.ts

+ 3 - 6
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,
     };
   }