mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(graphite): minor fix/improvement to graphite error handling when doing metric exploration in query editor, fixes #5778
This commit is contained in:
@@ -9,6 +9,7 @@ import moment from 'moment';
|
||||
import gfunc from './gfunc';
|
||||
import {Parser} from './parser';
|
||||
import {QueryCtrl} from 'app/plugins/sdk';
|
||||
import appEvents from 'app/core/app_events';
|
||||
|
||||
export class GraphiteQueryCtrl extends QueryCtrl {
|
||||
static templateUrl = 'partials/query.editor.html';
|
||||
@@ -141,7 +142,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
this.error = err.message || 'Failed to issue metric query';
|
||||
appEvents.emit('alert-error', ['Error', err]);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -178,7 +179,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
|
||||
altSegments.unshift(this.uiSegmentSrv.newSegment('*'));
|
||||
return altSegments;
|
||||
}).catch(err => {
|
||||
this.error = err.message || 'Failed to issue metric query';
|
||||
appEvents.emit('alert-error', ['Error', err]);
|
||||
return [];
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user