Commit 448717a7 by Torkel Ödegaard

Fixed small issue when changing data source from metrics panel

parent 4b322470
...@@ -58,13 +58,7 @@ function (angular, _, config) { ...@@ -58,13 +58,7 @@ function (angular, _, config) {
$scope.setDatasource = function(datasource) { $scope.setDatasource = function(datasource) {
$scope.panel.datasource = datasource; $scope.panel.datasource = datasource;
datasourceSrv.get(datasource).then(function(ds) { $scope.datasource = null;
$scope.datasource = ds;
});
};
$scope.changeDatasource = function(datasource) {
$scope.setDatasource(datasource);
$scope.get_data(); $scope.get_data();
}; };
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li ng-repeat="datasource in datasources" role="menuitem"> <li ng-repeat="datasource in datasources" role="menuitem">
<a ng-click="changeDatasource(datasource.value);">{{datasource.name}}</a> <a ng-click="setDatasource(datasource.value);">{{datasource.name}}</a>
</li> </li>
</ul> </ul>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment