mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Restored http settings directive that was hidden in an unused angular controller page
This commit is contained in:
parent
03c6cc59a7
commit
6b4dcb38ea
@ -11,3 +11,4 @@ import './alerting/NotificationsListCtrl';
|
||||
import './manage-dashboards';
|
||||
import './teams/CreateTeamCtrl';
|
||||
import './profile/all';
|
||||
import './datasources/settings/HttpSettingsCtrl';
|
||||
|
26
public/app/features/datasources/settings/HttpSettingsCtrl.ts
Normal file
26
public/app/features/datasources/settings/HttpSettingsCtrl.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { coreModule } from 'app/core/core';
|
||||
|
||||
coreModule.directive('datasourceHttpSettings', () => {
|
||||
return {
|
||||
scope: {
|
||||
current: '=',
|
||||
suggestUrl: '@',
|
||||
noDirectAccess: '@',
|
||||
},
|
||||
templateUrl: 'public/app/features/datasources/partials/http_settings.html',
|
||||
link: {
|
||||
pre: ($scope, elem, attrs) => {
|
||||
// do not show access option if direct access is disabled
|
||||
$scope.showAccessOption = $scope.noDirectAccess !== 'true';
|
||||
$scope.showAccessHelp = false;
|
||||
$scope.toggleAccessHelp = () => {
|
||||
$scope.showAccessHelp = !$scope.showAccessHelp;
|
||||
};
|
||||
|
||||
$scope.getSuggestUrls = () => {
|
||||
return [$scope.suggestUrl];
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
Loading…
Reference in New Issue
Block a user