Selaa lähdekoodia

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

Fix panel time overrides not being applied fully
Torkel Ödegaard 7 vuotta sitten
vanhempi
commit
11ad92c08e
1 muutettua tiedostoa jossa 3 lisäystä ja 6 poistoa
  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;
     const timeShift = '-' + timeShiftInterpolated;
     newTimeData.timeInfo += ' timeshift ' + timeShift;
     newTimeData.timeInfo += ' timeshift ' + timeShift;
     newTimeData.timeRange = {
     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,
     };
     };
   }
   }