1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-28 09:49:40 +02:00

feat(services): hide webhook interface (#4794)

This commit is contained in:
Chaim Lev-Ari 2021-02-25 00:08:22 +02:00 committed by GitHub
parent 7e7127831d
commit c72d07441d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 16 deletions

View file

@ -31,7 +31,6 @@ angular.module('portainer.docker').controller('CreateServiceController', [
'HttpRequestHelper',
'NodeService',
'WebhookService',
'EndpointProvider',
'endpoint',
function (
$q,
@ -57,9 +56,10 @@ angular.module('portainer.docker').controller('CreateServiceController', [
HttpRequestHelper,
NodeService,
WebhookService,
EndpointProvider,
endpoint
) {
$scope.endpoint = endpoint;
$scope.formValues = {
Name: '',
RegistryModel: new PorImageRegistryModel(),
@ -493,7 +493,7 @@ angular.module('portainer.docker').controller('CreateServiceController', [
const resourceControl = data.Portainer.ResourceControl;
const userId = Authentication.getUserDetails().ID;
const rcPromise = ResourceControlService.applyResourceControl(userId, accessControlData, resourceControl);
const webhookPromise = $q.when($scope.formValues.Webhook && WebhookService.createServiceWebhook(serviceId, EndpointProvider.endpointID()));
const webhookPromise = $q.when(endpoint.Type !== 4 && $scope.formValues.Webhook && WebhookService.createServiceWebhook(serviceId, endpoint.ID));
return $q.all([rcPromise, webhookPromise]);
})
.then(function success() {