mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #14880 from grafana/restored-http-settings
Restored http settings directive that was hidden in an unused angular controller
This commit is contained in:
commit
0941097dc4
@ -11,3 +11,4 @@ import './alerting/NotificationsListCtrl';
|
|||||||
import './manage-dashboards';
|
import './manage-dashboards';
|
||||||
import './teams/CreateTeamCtrl';
|
import './teams/CreateTeamCtrl';
|
||||||
import './profile/all';
|
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