1import { coreModule } from 'app/angular/core_module'; 2 3coreModule.directive('datasourceHttpSettings', () => { 4 return { 5 scope: { 6 current: '=', 7 suggestUrl: '@', 8 noDirectAccess: '@', 9 showForwardOAuthIdentityOption: '@', 10 }, 11 templateUrl: 'public/app/angular/partials/http_settings_next.html', 12 link: { 13 pre: ($scope: any) => { 14 // do not show access option if direct access is disabled 15 $scope.showAccessOption = $scope.noDirectAccess !== 'true'; 16 $scope.onChange = (datasourceSetting: any) => { 17 $scope.current = datasourceSetting; 18 }; 19 }, 20 }, 21 }; 22}); 23