mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 13:25:26 +02:00
feat(area-endpoints/creation): allow custom Docker socket (#4772) and handle public IP, group and tags for docket sockets (#4798)
* fix(endpoints/creation): hide TLS, make use of PublicIP, Groups, Tags for local Docker endpoint * feat(endpoints/creation): allow specifying custom Docker socket (#4772) * feat(endpoints/creation): override default socket path * fix(endpoints/creation): typo socketPath -> SocketPath
This commit is contained in:
parent
52d4296c08
commit
3dccc59048
4 changed files with 62 additions and 12 deletions
|
@ -100,12 +100,18 @@ angular
|
|||
}
|
||||
|
||||
$scope.addDockerEndpoint = function () {
|
||||
var name = $scope.formValues.Name;
|
||||
var URL = $filter('stripprotocol')($scope.formValues.URL);
|
||||
var publicURL = $scope.formValues.PublicURL;
|
||||
var groupId = $scope.formValues.GroupId;
|
||||
var tagIds = $scope.formValues.TagIds;
|
||||
|
||||
if ($scope.formValues.ConnectSocket) {
|
||||
var endpointName = $scope.formValues.Name;
|
||||
URL = $scope.formValues.SocketPath;
|
||||
$scope.state.actionInProgress = true;
|
||||
EndpointService.createLocalEndpoint(endpointName)
|
||||
EndpointService.createLocalEndpoint(name, URL, publicURL, groupId, tagIds)
|
||||
.then(function success() {
|
||||
Notifications.success('Endpoint created', endpointName);
|
||||
Notifications.success('Endpoint created', name);
|
||||
$state.go('portainer.endpoints', {}, { reload: true });
|
||||
})
|
||||
.catch(function error(err) {
|
||||
|
@ -115,11 +121,9 @@ angular
|
|||
$scope.state.actionInProgress = false;
|
||||
});
|
||||
} else {
|
||||
var name = $scope.formValues.Name;
|
||||
var URL = $filter('stripprotocol')($scope.formValues.URL);
|
||||
var publicURL = $scope.formValues.PublicURL === '' ? URL.split(':')[0] : $scope.formValues.PublicURL;
|
||||
var groupId = $scope.formValues.GroupId;
|
||||
var tagIds = $scope.formValues.TagIds;
|
||||
if (publicURL === '') {
|
||||
publicURL = URL.split(':')[0];
|
||||
}
|
||||
|
||||
var securityData = $scope.formValues.SecurityFormData;
|
||||
var TLS = securityData.TLS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue