Commit feb5e207 by Torkel Ödegaard

datasource: added option no-direct-access to ds-http-settings diretive, closes #12138

parent f5cf9263
...@@ -204,10 +204,14 @@ coreModule.directive('datasourceHttpSettings', function() { ...@@ -204,10 +204,14 @@ coreModule.directive('datasourceHttpSettings', function() {
scope: { scope: {
current: '=', current: '=',
suggestUrl: '@', suggestUrl: '@',
noDirectAccess: '@',
}, },
templateUrl: 'public/app/features/plugins/partials/ds_http_settings.html', templateUrl: 'public/app/features/plugins/partials/ds_http_settings.html',
link: { link: {
pre: function($scope, elem, attrs) { pre: function($scope, elem, attrs) {
// do not show access option if direct access is disabled
$scope.showAccessOption = $scope.noDirectAccess !== 'true';
$scope.getSuggestUrls = function() { $scope.getSuggestUrls = function() {
return [$scope.suggestUrl]; return [$scope.suggestUrl];
}; };
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> </div>
</div> </div>
<div class="gf-form-inline"> <div class="gf-form-inline" ng-if="showAccessOption">
<div class="gf-form max-width-30"> <div class="gf-form max-width-30">
<span class="gf-form-label width-7">Access</span> <span class="gf-form-label width-7">Access</span>
<div class="gf-form-select-wrapper max-width-24"> <div class="gf-form-select-wrapper max-width-24">
......
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