mirror of
https://github.com/timberjoegithub/grafana-statusmap.git
synced 2026-07-22 15:53:09 +00:00
fix: make it work in 6.7 and 7.0+
This commit is contained in:
@@ -262,6 +262,14 @@ class StatusHeatmapCtrl extends MetricsPanelCtrl {
|
||||
return chartWidth!;
|
||||
}
|
||||
|
||||
// Quick workaround for 6.7 and 7.0+. There is no call to
|
||||
// calculateInterval in updateTimeRange in those versions.
|
||||
updateTimeRange() {
|
||||
let ret = super.updateTimeRange();
|
||||
this.calculateInterval();
|
||||
return ret;
|
||||
}
|
||||
|
||||
// calculateInterval is called on 'refresh' to calculate an interval
|
||||
// for datasource.
|
||||
// It is override of calculateInterval from MetricsPanelCtrl.
|
||||
@@ -356,10 +364,13 @@ class StatusHeatmapCtrl extends MetricsPanelCtrl {
|
||||
|
||||
|
||||
onDataReceived(dataList: any) {
|
||||
//console.log("data",dataList)
|
||||
this.data = dataList;
|
||||
this.bucketMatrix = this.convertDataToBuckets(dataList, this.range.from.valueOf(), this.range.to.valueOf(), this.intervalMs, true);
|
||||
this.noDatapoints = this.bucketMatrix.noDatapoints;
|
||||
|
||||
//console.log("buckets",this.bucketMatrix)
|
||||
|
||||
this.annotationsPromise.then(
|
||||
(result: { alertState: any; annotations: any }) => {
|
||||
this.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user