Skip to content

Commit

Permalink
fix(stack): EE-3908 broken modal when updating/redeploying stacks (#7…
Browse files Browse the repository at this point in the history
…497)
  • Loading branch information
cmenginnz authored Aug 23, 2022
1 parent ad3f4ff commit b91e06a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ a[ng-click] {

:root[theme='dark'] .bootbox-checkbox-list,
:root[theme='highcontrast'] .bootbox-checkbox-list {
background-color: var(--black-color);
background-color: var(--bg-modal-content-color);
}

.small-select {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
</div>
<div class="small vertical-center" ng-if="$ctrl.model.RepositoryAutomaticUpdates">
<pr-icon icon="'alert-triangle'" mode="'warning'" feather="true"></pr-icon>
<span class="text-muted">Any changes to this stack or application made locally in Portainer will be overridden, which may cause service interruption.</span>
<span class="text-muted"
>Any changes to this stack or application made locally in Portainer will be overridden, which may cause service interruption. Do you wish to continue?</span
>
</div>
<div class="form-group mt-2" ng-if="$ctrl.model.RepositoryAutomaticUpdates">
<label for="repository_mechanism" class="col-lg-2 col-sm-3 control-label text-left"> Mechanism </label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ class StackRedeployGitFormController {

async submit() {
const tplCrop =
'<div>Any changes to this stack or application made locally in Portainer will be overridden, which may cause service interruption.</div>' +
'<div"><div style="position: absolute; right: 110px; top: 68px; z-index: 999">' +
'<div>Any changes to this stack or application made locally in Portainer will be overridden, which may cause service interruption. Do you wish to continue?</div>' +
'<div"><div style="position: absolute; right: 5px; top: 84px; z-index: 999">' +
'<be-feature-indicator feature="stackPullImageFeature"></be-feature-indicator></div></div>';
const template = angular.element(tplCrop);
const html = this.$compile(template)(this.$scope);
Expand Down
7 changes: 4 additions & 3 deletions app/portainer/services/modal.service/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ export function confirmStackUpdate(
confirmButtonClassName: string | undefined,
callback: PromptCallback
) {
const sanitizedMessage = sanitize(message);

const sanitizedMessage =
typeof message === 'string' ? sanitize(message) : message;
const box = prompt({
title: buildTitle('Are you sure?'),
inputType: 'checkbox',
Expand Down Expand Up @@ -197,7 +197,8 @@ export function confirmStackUpdate(
'position: relative; display: block; margin-top: 10px; margin-bottom: 10px;'
);
const checkboxLabel = box.find('.form-check-label');
checkboxLabel.addClass('switch box-selector-item limited business');
checkboxLabel.addClass('switch box-selector-item limited business mt-4');
checkboxLabel.prop('style', 'width: 100%');
const switchEle = checkboxLabel.find('i');
switchEle.prop('style', 'margin-left:20px');
}
Expand Down
2 changes: 1 addition & 1 deletion app/portainer/views/stacks/edit/stackController.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ angular.module('portainer.app').controller('StackController', [
const stack = $scope.stack;
const tplCrop =
'<div>Do you want to force an update of the stack?</div>' +
'<div style="position: absolute; right: 110px; top: 48px; z-index: 999"><be-feature-indicator feature="stackPullImageFeature"></be-feature-indicator></div>';
'<div style="position: absolute; right: 5px; top: 50px; z-index: 999"><be-feature-indicator feature="stackPullImageFeature"></be-feature-indicator></div>';
const template = angular.element(tplCrop);
const html = $compile(template)($scope);
// 'Do you want to force an update of the stack?'
Expand Down

0 comments on commit b91e06a

Please sign in to comment.