mirror of https://github.com/portainer/portainer
feat(services): hide webhook interface (#4794)
parent
7e7127831d
commit
c72d07441d
|
@ -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() {
|
||||
|
|
|
@ -95,19 +95,21 @@
|
|||
</div>
|
||||
<!-- !port-mapping -->
|
||||
<!-- create-webhook -->
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Webhooks
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label text-left">
|
||||
Create a service webhook
|
||||
<portainer-tooltip
|
||||
position="top"
|
||||
message="Create a webhook (or callback URI) to automate the update of this service. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and re-deploy this service."
|
||||
></portainer-tooltip>
|
||||
</label>
|
||||
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" ng-model="formValues.Webhook" /><i></i> </label>
|
||||
<div ng-if="endpoint.Type !== 4">
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Webhooks
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label text-left">
|
||||
Create a service webhook
|
||||
<portainer-tooltip
|
||||
position="top"
|
||||
message="Create a webhook (or callback URI) to automate the update of this service. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and re-deploy this service."
|
||||
></portainer-tooltip>
|
||||
</label>
|
||||
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" ng-model="formValues.Webhook" /><i></i> </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- !create-webhook -->
|
||||
|
|
Loading…
Reference in New Issue