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>
|
</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">
|
<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>
|
<por-switch-field name="forcePullImage" feature-id="$ctrl.stackPullImageFeature" checked="$ctrl.model.ForcePullImage" label="'Pull latest image'"> </por-switch-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,6 +34,7 @@ class StackRedeployGitFormController {
|
||||||
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
|
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
|
||||||
RepositoryFetchInterval: '5m',
|
RepositoryFetchInterval: '5m',
|
||||||
RepositoryWebhookURL: '',
|
RepositoryWebhookURL: '',
|
||||||
|
ShowForcePullImage: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -151,6 +152,7 @@ class StackRedeployGitFormController {
|
||||||
// Init auto update
|
// Init auto update
|
||||||
if (this.stack.AutoUpdate && (this.stack.AutoUpdate.Interval || this.stack.AutoUpdate.Webhook)) {
|
if (this.stack.AutoUpdate && (this.stack.AutoUpdate.Interval || this.stack.AutoUpdate.Webhook)) {
|
||||||
this.formValues.AutoUpdate.RepositoryAutomaticUpdates = true;
|
this.formValues.AutoUpdate.RepositoryAutomaticUpdates = true;
|
||||||
|
this.formValues.AutoUpdate.ShowForcePullImage = this.stack.Type !== 3;
|
||||||
|
|
||||||
if (this.stack.AutoUpdate.Interval) {
|
if (this.stack.AutoUpdate.Interval) {
|
||||||
this.formValues.AutoUpdate.RepositoryMechanism = RepositoryMechanismTypes.INTERVAL;
|
this.formValues.AutoUpdate.RepositoryMechanism = RepositoryMechanismTypes.INTERVAL;
|
||||||
|
|
|
@ -53,6 +53,7 @@ angular
|
||||||
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
|
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
|
||||||
RepositoryFetchInterval: '5m',
|
RepositoryFetchInterval: '5m',
|
||||||
RepositoryWebhookURL: WebhookHelper.returnStackWebhookUrl(uuidv4()),
|
RepositoryWebhookURL: WebhookHelper.returnStackWebhookUrl(uuidv4()),
|
||||||
|
ShowForcePullImage: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.state = {
|
$scope.state = {
|
||||||
|
@ -312,7 +313,7 @@ angular
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.composeSyntaxMaxVersion = endpoint.ComposeSyntaxMaxVersion;
|
$scope.composeSyntaxMaxVersion = endpoint.ComposeSyntaxMaxVersion;
|
||||||
|
$scope.formValues.ShowForcePullImage = $scope.state.StackType !== 3;
|
||||||
try {
|
try {
|
||||||
const containers = await ContainerService.containers(true);
|
const containers = await ContainerService.containers(true);
|
||||||
$scope.containerNames = ContainerHelper.getContainerNames(containers);
|
$scope.containerNames = ContainerHelper.getContainerNames(containers);
|
||||||
|
|
Loading…
Reference in New Issue