fix(stack): git stack redeploy issue EE-2737 (#6667)

* fix(stack) git stack redeploy issue
pull/6714/head
sunportainer 2022-03-28 21:31:03 +08:00 committed by GitHub
parent 379f9e2822
commit b846c8e6d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -95,13 +95,13 @@ class StackRedeployGitFormController {
'<be-feature-indicator feature="stackPullImageFeature"></be-feature-indicator></div></div>'; '<be-feature-indicator feature="stackPullImageFeature"></be-feature-indicator></div></div>';
const template = angular.element(tplCrop); const template = angular.element(tplCrop);
const html = this.$compile(template)(this.$scope); const html = this.$compile(template)(this.$scope);
this.ModalService.confirmStackUpdate(html, true, true, 'btn-warning', function (result) { this.ModalService.confirmStackUpdate(html, true, true, 'btn-warning', async (result) => {
if (!result) { if (!result) {
return; return;
} }
try { try {
this.state.redeployInProgress = true; this.state.redeployInProgress = true;
this.StackService.updateGit(this.stack.Id, this.stack.EndpointId, this.FormHelper.removeInvalidEnvVars(this.formValues.Env), false, this.formValues); await this.StackService.updateGit(this.stack.Id, this.stack.EndpointId, this.FormHelper.removeInvalidEnvVars(this.formValues.Env), false, this.formValues);
this.Notifications.success('Pulled and redeployed stack successfully'); this.Notifications.success('Pulled and redeployed stack successfully');
this.$state.reload(); this.$state.reload();
} catch (err) { } catch (err) {