mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: No logs should show an empty graph (#19132)
* Explore: add no data points text to graph * Explore: add console log for error (accidentaly removed) * Explore: refactor, created getYAxes method for better readability * Explore: remove unnecessary console.log * Explore: fix getYAxes method to return value * Graph: Simplify warning from no data points to No data
This commit is contained in:
committed by
Torkel Ödegaard
parent
3c61b563c3
commit
85e128fede
@@ -225,14 +225,14 @@ class GraphCtrl extends MetricsPanelCtrl {
|
||||
|
||||
if (datapointsCount === 0) {
|
||||
this.dataWarning = {
|
||||
title: 'No data points',
|
||||
tip: 'No datapoints returned from data query',
|
||||
title: 'No data',
|
||||
tip: 'No data returned from query',
|
||||
};
|
||||
} else {
|
||||
for (const series of this.seriesList) {
|
||||
if (series.isOutsideRange) {
|
||||
this.dataWarning = {
|
||||
title: 'Data points outside time range',
|
||||
title: 'Data outside time range',
|
||||
tip: 'Can be caused by timezone mismatch or missing time filter in query',
|
||||
};
|
||||
break;
|
||||
|
||||
@@ -58,7 +58,7 @@ describe('GraphCtrl', () => {
|
||||
});
|
||||
|
||||
it('should set datapointsOutside', () => {
|
||||
expect(ctx.ctrl.dataWarning.title).toBe('Data points outside time range');
|
||||
expect(ctx.ctrl.dataWarning.title).toBe('Data outside time range');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -94,7 +94,7 @@ describe('GraphCtrl', () => {
|
||||
});
|
||||
|
||||
it('should set datapointsCount warning', () => {
|
||||
expect(ctx.ctrl.dataWarning.title).toBe('No data points');
|
||||
expect(ctx.ctrl.dataWarning.title).toBe('No data');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user