Open GlennMatthys opened 4 years ago
@ryantxu can you please have a look at this?
There is also a missing this.$scope.$digest();
after call to backendSvr, without this call some panels didn't get updated before scroll down
See grafana CHANGELOG
6.7.0-beta1 (2020-03-12) Breaking changes
Notice about changes in backendSrv for plugin authors In our mission to migrate away from AngularJS to React we have removed all AngularJS dependencies in the core data retrieval service backendSrv.
Removing the AngularJS dependencies in backendSrv has the unfortunate side effect of AngularJS digest no longer being triggered for any request made with backendSrv. Because of this, external plugins using backendSrv directly may suffer from strange behaviour in the UI.
To remedy this issue, as a plugin author you need to trigger the digest after a direct call to backendSrv.
Example:
(backendSrv.get(‘http://your.url/api’).then(result => {
this.result = result;
this.$scope.$digest();
});)
Another unfortunate outcome from this work in backendSrv is that the response format for .headers() changed from a function to an object.
I upgraded to Grafana 7 recently, and find the Ajax plugin does not work sometimes (If you scroll down to the panel you can find it refreshing...), when you open the dashboard, the ajax panel does not load, and no error found in console log. And when you click refresh button of the dashboard on the right top, the ajax panel fails to refresh sometimes.
After upgrading Grafana to version 6.7.1, this panel no longer works, the following error is logged in the browser's console:
Panel configuration:![image](https://user-images.githubusercontent.com/31989842/78112501-9b24f780-73fe-11ea-9dd4-723c7c1a4d38.png)
Grafana version: 6.7.1 Browser: Chrome 80.0.3987.162 (Official Build) (64-bit)