HttpSettingsCtrl.ts 640 B

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