mirror of https://github.com/portainer/portainer
fix(stack): git force pull image toggle only for non-kubernetes git based stacks (#6574)
parent
d47a9d590e
commit
5d75ca34ea
|
@ -51,7 +51,7 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" ng-if="$ctrl.model.RepositoryAutomaticUpdates">
|
||||
<div class="form-group" ng-if="$ctrl.model.ShowForcePullImage && $ctrl.model.RepositoryAutomaticUpdates">
|
||||
<div class="col-sm-12">
|
||||
<por-switch-field name="forcePullImage" feature-id="$ctrl.stackPullImageFeature" checked="$ctrl.model.ForcePullImage" label="'Pull latest image'"> </por-switch-field>
|
||||
</div>
|
||||
|
|
|
@ -34,6 +34,7 @@ class StackRedeployGitFormController {
|
|||
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
|
||||
RepositoryFetchInterval: '5m',
|
||||
RepositoryWebhookURL: '',
|
||||
ShowForcePullImage: false,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -151,6 +152,7 @@ class StackRedeployGitFormController {
|
|||
// Init auto update
|
||||
if (this.stack.AutoUpdate && (this.stack.AutoUpdate.Interval || this.stack.AutoUpdate.Webhook)) {
|
||||
this.formValues.AutoUpdate.RepositoryAutomaticUpdates = true;
|
||||
this.formValues.AutoUpdate.ShowForcePullImage = this.stack.Type !== 3;
|
||||
|
||||
if (this.stack.AutoUpdate.Interval) {
|
||||
this.formValues.AutoUpdate.RepositoryMechanism = RepositoryMechanismTypes.INTERVAL;
|
||||
|
|
|
@ -53,6 +53,7 @@ angular
|
|||
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
|
||||
RepositoryFetchInterval: '5m',
|
||||
RepositoryWebhookURL: WebhookHelper.returnStackWebhookUrl(uuidv4()),
|
||||
ShowForcePullImage: false,
|
||||
};
|
||||
|
||||
$scope.state = {
|
||||
|
@ -312,7 +313,7 @@ angular
|
|||
}
|
||||
|
||||
$scope.composeSyntaxMaxVersion = endpoint.ComposeSyntaxMaxVersion;
|
||||
|
||||
$scope.formValues.ShowForcePullImage = $scope.state.StackType !== 3;
|
||||
try {
|
||||
const containers = await ContainerService.containers(true);
|
||||
$scope.containerNames = ContainerHelper.getContainerNames(containers);
|
||||
|
|
Loading…
Reference in New Issue