mirror of https://github.com/portainer/portainer
fix(stacks): show force pull image for git stacks [EE-2579] (#6607)
parent
1ab65a4b4f
commit
cf7746082b
|
@ -51,7 +51,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" ng-if="$ctrl.model.ShowForcePullImage && $ctrl.model.RepositoryAutomaticUpdates">
|
<div class="form-group" ng-if="$ctrl.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>
|
||||||
|
|
|
@ -6,5 +6,6 @@ export const gitFormAutoUpdateFieldset = {
|
||||||
bindings: {
|
bindings: {
|
||||||
model: '<',
|
model: '<',
|
||||||
onChange: '<',
|
onChange: '<',
|
||||||
|
showForcePullImage: '<',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,5 +12,10 @@
|
||||||
|
|
||||||
<git-form-auth-fieldset model="$ctrl.model" on-change="($ctrl.onChange)"></git-form-auth-fieldset>
|
<git-form-auth-fieldset model="$ctrl.model" on-change="($ctrl.onChange)"></git-form-auth-fieldset>
|
||||||
|
|
||||||
<git-form-auto-update-fieldset ng-if="$ctrl.autoUpdate" model="$ctrl.model" on-change="($ctrl.onChange)"></git-form-auto-update-fieldset>
|
<git-form-auto-update-fieldset
|
||||||
|
ng-if="$ctrl.autoUpdate"
|
||||||
|
model="$ctrl.model"
|
||||||
|
on-change="($ctrl.onChange)"
|
||||||
|
show-force-pull-image="$ctrl.showForcePullImage"
|
||||||
|
></git-form-auto-update-fieldset>
|
||||||
</ng-form>
|
</ng-form>
|
||||||
|
|
|
@ -10,5 +10,6 @@ export const gitForm = {
|
||||||
additionalFile: '<',
|
additionalFile: '<',
|
||||||
autoUpdate: '<',
|
autoUpdate: '<',
|
||||||
showAuthExplanation: '<',
|
showAuthExplanation: '<',
|
||||||
|
showForcePullImage: '<',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,7 +34,6 @@ class StackRedeployGitFormController {
|
||||||
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
|
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
|
||||||
RepositoryFetchInterval: '5m',
|
RepositoryFetchInterval: '5m',
|
||||||
RepositoryWebhookURL: '',
|
RepositoryWebhookURL: '',
|
||||||
ShowForcePullImage: false,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -149,10 +148,10 @@ class StackRedeployGitFormController {
|
||||||
$onInit() {
|
$onInit() {
|
||||||
this.formValues.RefName = this.model.ReferenceName;
|
this.formValues.RefName = this.model.ReferenceName;
|
||||||
this.formValues.Env = this.stack.Env;
|
this.formValues.Env = this.stack.Env;
|
||||||
|
|
||||||
// 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;
|
||||||
|
|
|
@ -8,7 +8,11 @@
|
||||||
additional-files="$ctrl.stack.AdditionalFiles"
|
additional-files="$ctrl.stack.AdditionalFiles"
|
||||||
></git-form-info-panel>
|
></git-form-info-panel>
|
||||||
|
|
||||||
<git-form-auto-update-fieldset model="$ctrl.formValues.AutoUpdate" on-change="($ctrl.onChangeAutoUpdate)"></git-form-auto-update-fieldset>
|
<git-form-auto-update-fieldset
|
||||||
|
model="$ctrl.formValues.AutoUpdate"
|
||||||
|
on-change="($ctrl.onChangeAutoUpdate)"
|
||||||
|
show-force-pull-image="$ctrl.stack.Type !== 3"
|
||||||
|
></git-form-auto-update-fieldset>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -53,7 +53,6 @@ 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 = {
|
||||||
|
@ -313,7 +312,6 @@ 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);
|
||||||
|
|
|
@ -125,6 +125,7 @@
|
||||||
on-change="(onChangeFormValues)"
|
on-change="(onChangeFormValues)"
|
||||||
additional-file="true"
|
additional-file="true"
|
||||||
auto-update="true"
|
auto-update="true"
|
||||||
|
show-force-pull-image="true"
|
||||||
show-auth-explanation="true"
|
show-auth-explanation="true"
|
||||||
path-text-title="Compose path"
|
path-text-title="Compose path"
|
||||||
path-placeholder="docker-compose.yml"
|
path-placeholder="docker-compose.yml"
|
||||||
|
|
Loading…
Reference in New Issue