mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
omit extra template refresh (#12454)
This commit is contained in:
parent
861af4cb97
commit
aa1b5959da
@ -38,7 +38,11 @@ export class VariableSrv {
|
||||
});
|
||||
}
|
||||
|
||||
onDashboardRefresh() {
|
||||
onDashboardRefresh(evt, payload) {
|
||||
if (payload && payload.fromVariableValueUpdated) {
|
||||
return Promise.resolve({});
|
||||
}
|
||||
|
||||
var promises = this.variables.filter(variable => variable.refresh === 2).map(variable => {
|
||||
var previousOptions = variable.options.slice();
|
||||
|
||||
@ -130,7 +134,7 @@ export class VariableSrv {
|
||||
return this.$q.all(promises).then(() => {
|
||||
if (emitChangeEvents) {
|
||||
this.$rootScope.$emit('template-variable-value-updated');
|
||||
this.$rootScope.$broadcast('refresh');
|
||||
this.$rootScope.$broadcast('refresh', { fromVariableValueUpdated: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user