Commit df0ddc0b by Torkel Ödegaard

fix(prometheus): fixed bug in prometheus query editor, fixes #5107

parent 37821e6d
...@@ -58,6 +58,10 @@ class PrometheusQueryCtrl extends QueryCtrl { ...@@ -58,6 +58,10 @@ class PrometheusQueryCtrl extends QueryCtrl {
updateLink() { updateLink() {
var range = this.panelCtrl.range; var range = this.panelCtrl.range;
if (!range) {
return;
}
var rangeDiff = Math.ceil((range.to.valueOf() - range.from.valueOf()) / 1000); var rangeDiff = Math.ceil((range.to.valueOf() - range.from.valueOf()) / 1000);
var endTime = range.to.utc().format('YYYY-MM-DD HH:mm'); var endTime = range.to.utc().format('YYYY-MM-DD HH:mm');
var expr = { var expr = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment