diff --git a/app/docker/views/containers/edit/container.html b/app/docker/views/containers/edit/container.html
index 2d5be1c34..c00d2ea69 100644
--- a/app/docker/views/containers/edit/container.html
+++ b/app/docker/views/containers/edit/container.html
@@ -110,6 +110,19 @@
diff --git a/app/docker/views/containers/edit/containerController.js b/app/docker/views/containers/edit/containerController.js
index 53c53a5ae..070450011 100644
--- a/app/docker/views/containers/edit/containerController.js
+++ b/app/docker/views/containers/edit/containerController.js
@@ -2,6 +2,7 @@ import moment from 'moment';
import _ from 'lodash-es';
import { PorImageRegistryModel } from 'Docker/models/porImageRegistry';
import { confirmContainerDeletion } from '@/portainer/services/modal.service/prompt';
+import { FeatureId } from 'Portainer/feature-flags/enums';
angular.module('portainer.docker').controller('ContainerController', [
'$q',
@@ -49,6 +50,7 @@ angular.module('portainer.docker').controller('ContainerController', [
$scope.activityTime = 0;
$scope.portBindings = [];
$scope.displayRecreateButton = false;
+ $scope.containerWebhookFeature = FeatureId.CONTAINER_WEBHOOK;
$scope.config = {
RegistryModel: new PorImageRegistryModel(),
diff --git a/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.controller.js b/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.controller.js
index 01af3076c..76f654425 100644
--- a/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.controller.js
+++ b/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.controller.js
@@ -10,6 +10,7 @@ class GitFormAutoUpdateFieldsetController {
this.onChangeInterval = this.onChangeField('RepositoryFetchInterval');
this.limitedFeature = FeatureId.FORCE_REDEPLOYMENT;
+ this.stackPullImageFeature = FeatureId.STACK_PULL_IMAGE;
}
copyWebhook() {
diff --git a/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.html b/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.html
index 6b064808c..4a3e09d9f 100644
--- a/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.html
+++ b/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.html
@@ -51,6 +51,11 @@
/>
+
+
+
+
Do you want to force an update of the stack? ' +
+ ' ';
+ const template = angular.element(tplCrop);
+ const html = $compile(template)($scope);
+ // 'Do you want to force an update of the stack?'
+ ModalService.confirmStackUpdate(html, true, true, null, function (result) {
+ if (!result) {
+ return;
+ }
+ var stackFile = $scope.stackFileContent;
+ var env = FormHelper.removeInvalidEnvVars($scope.formValues.Env);
+ var prune = $scope.formValues.Prune;
- // TODO: this is a work-around for stacks created with Portainer version >= 1.17.1
- // The EndpointID property is not available for these stacks, we can pass
- // the current endpoint identifier as a part of the update request. It will be used if
- // the EndpointID property is not defined on the stack.
- if (stack.EndpointId === 0) {
- stack.EndpointId = endpoint.Id;
- }
+ // TODO: this is a work-around for stacks created with Portainer version >= 1.17.1
+ // The EndpointID property is not available for these stacks, we can pass
+ // the current endpoint identifier as a part of the update request. It will be used if
+ // the EndpointID property is not defined on the stack.
+ if (stack.EndpointId === 0) {
+ stack.EndpointId = endpoint.Id;
+ }
- $scope.state.actionInProgress = true;
- StackService.updateStack(stack, stackFile, env, prune)
- .then(function success() {
- Notifications.success('Stack successfully deployed');
- $scope.state.isEditorDirty = false;
- $state.reload();
- })
- .catch(function error(err) {
- Notifications.error('Failure', err, 'Unable to create stack');
- })
- .finally(function final() {
- $scope.state.actionInProgress = false;
- });
+ $scope.state.actionInProgress = true;
+ StackService.updateStack(stack, stackFile, env, prune)
+ .then(function success() {
+ Notifications.success('Stack successfully deployed');
+ $scope.state.isEditorDirty = false;
+ $state.reload();
+ })
+ .catch(function error(err) {
+ Notifications.error('Failure', err, 'Unable to create stack');
+ })
+ .finally(function final() {
+ $scope.state.actionInProgress = false;
+ });
+ });
};
$scope.editorUpdate = function (cm) {
diff --git a/yarn.lock b/yarn.lock
index 9321c5f4c..92da6bc18 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4547,7 +4547,6 @@ angular-moment-picker@^0.10.2:
dependencies:
angular-mocks "1.6.1"
angular-sanitize "1.6.1"
- lodash-es "^4.17.15"
angular-resource@1.8.2:
version "1.8.2"
@@ -12598,9 +12597,9 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"
-lodash-es@^4.17.21:
+lodash-es@^4.17.15, lodash-es@^4.17.21:
version "4.17.21"
- resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
+ resolved "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
lodash-webpack-plugin@^0.11.6:
|