|
@@ -104,14 +104,9 @@ function (angular, _, config) {
|
|
|
|
|
|
|
|
$scope.getCurrentDatasource().then(function(datasource) {
|
|
$scope.getCurrentDatasource().then(function(datasource) {
|
|
|
$scope.datasource = datasource;
|
|
$scope.datasource = datasource;
|
|
|
-
|
|
|
|
|
- var promise = $scope.refreshData($scope.datasource);
|
|
|
|
|
- if (promise) {
|
|
|
|
|
- promise.then(function() { $scope.panelMeta.loading = false; });
|
|
|
|
|
- } else {
|
|
|
|
|
- $scope.panelMeta.loading = false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ return $scope.refreshData($scope.datasource) || $q.when({});
|
|
|
|
|
+ }).then(function() {
|
|
|
|
|
+ $scope.panelMeta.loading = false;
|
|
|
}, function(err) {
|
|
}, function(err) {
|
|
|
console.log('Panel data error:', err);
|
|
console.log('Panel data error:', err);
|
|
|
$scope.panelMeta.loading = false;
|
|
$scope.panelMeta.loading = false;
|