Graph: show range warning when all data is outside time range (#27603)

This commit is contained in:
Ryan McKinley 2020-09-15 11:55:34 -07:00 committed by GitHub
parent a524c57261
commit 54b677bda4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,12 +271,14 @@ export class GraphCtrl extends MetricsPanelCtrl {
};
}
// Look for data points outside time range
// If any data is in range, do not return an error
for (const series of this.seriesList) {
if (!series.isOutsideRange) {
continue;
return undefined;
}
}
// All data is outside the time range
const dataWarning: DataWarning = {
title: 'Data outside time range',
tip: 'Can be caused by timezone mismatch or missing time filter in query',
@ -299,8 +301,6 @@ export class GraphCtrl extends MetricsPanelCtrl {
return dataWarning;
}
return undefined;
}
onRender() {
if (!this.seriesList) {