mirror of
https://github.com/timberjoegithub/grafana-statusmap.git
synced 2026-07-22 15:53:09 +00:00
fix: compatibility with Grafana 7.4
This commit is contained in:
+5
-4
@@ -1,9 +1,9 @@
|
||||
import _ from 'lodash';
|
||||
import $ from 'jquery';
|
||||
|
||||
// TODO moment is used instead of @grafana/data to run in 6.2 and earlier.
|
||||
/* eslint-disable id-blacklist, no-restricted-imports, @typescript-eslint/ban-types */
|
||||
// import moment from 'moment';
|
||||
import { toUtc } from '@grafana/data';
|
||||
import moment from 'moment';
|
||||
|
||||
import kbn from 'grafana/app/core/utils/kbn';
|
||||
import { appEvents, contextSrv } from 'grafana/app/core/core';
|
||||
@@ -643,9 +643,10 @@ export class StatusmapRenderer {
|
||||
Math.max(this.selection.x1, this.selection.x2) - this.yAxisWidth - this.xGridSize / 2
|
||||
);
|
||||
|
||||
// TODO use toUtc method from moment wrapper in @grafana/data
|
||||
this.ctrl.timeSrv.setTime({
|
||||
from: toUtc(timeFrom),
|
||||
to: toUtc(timeTo),
|
||||
from: moment.utc(timeFrom),
|
||||
to: moment.utc(timeTo),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user