fix(stacks): show force pull image for git stacks [EE-2579] (#6607)

pull/6665/head
Chaim Lev-Ari 3 years ago committed by GitHub
parent 1ab65a4b4f
commit cf7746082b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,7 +51,7 @@
/>
</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">
<por-switch-field name="forcePullImage" feature-id="$ctrl.stackPullImageFeature" checked="$ctrl.model.ForcePullImage" label="'Pull latest image'"> </por-switch-field>
</div>

@ -6,5 +6,6 @@ export const gitFormAutoUpdateFieldset = {
bindings: {
model: '<',
onChange: '<',
showForcePullImage: '<',
},
};

@ -12,5 +12,10 @@
<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>

@ -10,5 +10,6 @@ export const gitForm = {
additionalFile: '<',
autoUpdate: '<',
showAuthExplanation: '<',
showForcePullImage: '<',
},
};

@ -34,7 +34,6 @@ class StackRedeployGitFormController {
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
RepositoryFetchInterval: '5m',
RepositoryWebhookURL: '',
ShowForcePullImage: false,
},
};
@ -149,10 +148,10 @@ class StackRedeployGitFormController {
$onInit() {
this.formValues.RefName = this.model.ReferenceName;
this.formValues.Env = this.stack.Env;
// 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;

@ -8,7 +8,11 @@
additional-files="$ctrl.stack.AdditionalFiles"
></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="col-sm-12">
<p>

@ -53,7 +53,6 @@ angular
RepositoryMechanism: RepositoryMechanismTypes.INTERVAL,
RepositoryFetchInterval: '5m',
RepositoryWebhookURL: WebhookHelper.returnStackWebhookUrl(uuidv4()),
ShowForcePullImage: false,
};
$scope.state = {
@ -313,7 +312,6 @@ angular
}
$scope.composeSyntaxMaxVersion = endpoint.ComposeSyntaxMaxVersion;
$scope.formValues.ShowForcePullImage = $scope.state.StackType !== 3;
try {
const containers = await ContainerService.containers(true);
$scope.containerNames = ContainerHelper.getContainerNames(containers);

@ -125,6 +125,7 @@
on-change="(onChangeFormValues)"
additional-file="true"
auto-update="true"
show-force-pull-image="true"
show-auth-explanation="true"
path-text-title="Compose path"
path-placeholder="docker-compose.yml"

Loading…
Cancel
Save