mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
Template vars: Add error message for failed query var (#21731)
This commit is contained in:
parent
39f7cff7c7
commit
4c41d7e7fb
@ -11,9 +11,10 @@ import { TimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
|||||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import { TimeRange } from '@grafana/data';
|
import { TimeRange, AppEvents } from '@grafana/data';
|
||||||
import { CoreEvents } from 'app/types';
|
import { CoreEvents } from 'app/types';
|
||||||
import { UrlQueryMap } from '@grafana/runtime';
|
import { UrlQueryMap } from '@grafana/runtime';
|
||||||
|
import { appEvents } from 'app/core/core';
|
||||||
|
|
||||||
export class VariableSrv {
|
export class VariableSrv {
|
||||||
dashboard: DashboardModel;
|
dashboard: DashboardModel;
|
||||||
@ -71,9 +72,14 @@ export class VariableSrv {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return this.$q.all(promises).then(() => {
|
return this.$q
|
||||||
this.dashboard.startRefresh();
|
.all(promises)
|
||||||
});
|
.then(() => {
|
||||||
|
this.dashboard.startRefresh();
|
||||||
|
})
|
||||||
|
.catch(e => {
|
||||||
|
appEvents.emit(AppEvents.alertError, ['Template variable service failed', e.message]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
processVariable(variable: any, queryParams: any) {
|
processVariable(variable: any, queryParams: any) {
|
||||||
|
Loading…
Reference in New Issue
Block a user