mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 06:45:23 +02:00
fix(git): update stack name for git stacks [EE-6670] (#11217)
This commit is contained in:
parent
ce3a1b8ba5
commit
988d4103d4
5 changed files with 13 additions and 0 deletions
|
@ -180,6 +180,7 @@
|
|||
ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.GIT"
|
||||
stack="ctrl.stack"
|
||||
namespace="ctrl.formValues.ResourcePool.Namespace.Name"
|
||||
stack-name="ctrl.formValues.StackName"
|
||||
></kubernetes-redeploy-app-git-form>
|
||||
<!-- #endregion -->
|
||||
|
||||
|
|
|
@ -126,6 +126,10 @@ class KubernetesRedeployAppGitFormController {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.stack.Name !== this.stackName) {
|
||||
this.formValues.StackName = this.stackName;
|
||||
}
|
||||
|
||||
this.state.redeployInProgress = true;
|
||||
await this.StackService.updateKubeGit(this.stack.Id, this.stack.EndpointId, this.namespace, this.formValues);
|
||||
this.Notifications.success('Success', 'Pulled and redeployed stack successfully');
|
||||
|
|
|
@ -7,6 +7,7 @@ const kubernetesRedeployAppGitForm = {
|
|||
bindings: {
|
||||
stack: '<',
|
||||
namespace: '<',
|
||||
stackName: '<',
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -461,6 +461,7 @@ angular.module('portainer.app').factory('StackService', [
|
|||
RepositoryAuthentication: gitConfig.RepositoryAuthentication,
|
||||
RepositoryUsername: gitConfig.RepositoryUsername,
|
||||
RepositoryPassword: gitConfig.RepositoryPassword,
|
||||
StackName: gitConfig.StackName,
|
||||
}
|
||||
).$promise;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue