mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 01:00:33 +08:00

* add prop * add angular conf * invert naming * undo md changes * fix wording * y u fail 4 me * refactor(datasourcesettings): rename hideForwardOAuthIdentityOption prop * refactor(datasourcesettings): rename scope.hideForwardOAuthIdentityOption * Update contribute/style-guides/e2e.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * feat(datasourcehttpsettings): add showForwardOAuthIdentityOption to angular wrappers & template Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com> Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
23 lines
643 B
TypeScript
23 lines
643 B
TypeScript
import { coreModule } from 'app/core/core';
|
|
|
|
coreModule.directive('datasourceHttpSettings', () => {
|
|
return {
|
|
scope: {
|
|
current: '=',
|
|
suggestUrl: '@',
|
|
noDirectAccess: '@',
|
|
showForwardOAuthIdentityOption: '@',
|
|
},
|
|
templateUrl: 'public/app/features/datasources/partials/http_settings_next.html',
|
|
link: {
|
|
pre: ($scope: any) => {
|
|
// do not show access option if direct access is disabled
|
|
$scope.showAccessOption = $scope.noDirectAccess !== 'true';
|
|
$scope.onChange = (datasourceSetting: any) => {
|
|
$scope.current = datasourceSetting;
|
|
};
|
|
},
|
|
},
|
|
};
|
|
});
|