mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AngularPanels: Fixed loading spinner being stuck in some rare cases (#20878)
This commit is contained in:
parent
9a7a1b86ee
commit
62f0aca3e6
@ -115,6 +115,14 @@ class MetricsPanelCtrl extends PanelCtrl {
|
||||
this.error = err.data.error;
|
||||
}
|
||||
}
|
||||
|
||||
this.angularDirtyCheck();
|
||||
}
|
||||
|
||||
angularDirtyCheck() {
|
||||
if (!this.$scope.$$phase) {
|
||||
this.$scope.$digest();
|
||||
}
|
||||
}
|
||||
|
||||
// Updates the response with information from the stream
|
||||
@ -128,6 +136,7 @@ class MetricsPanelCtrl extends PanelCtrl {
|
||||
// Ignore data in loading state
|
||||
if (data.state === LoadingState.Loading) {
|
||||
this.loading = true;
|
||||
this.angularDirtyCheck();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -149,6 +158,8 @@ class MetricsPanelCtrl extends PanelCtrl {
|
||||
const legacy = data.series.map(v => toLegacyResponseData(v));
|
||||
this.handleQueryResult({ data: legacy });
|
||||
}
|
||||
|
||||
this.angularDirtyCheck();
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user