1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(rolling-restart): wording and icon changes [EE-4834] (#8239)

* icon and wording changes

* fix inconsistencies and grammar

* fix(ui/buttons): show tooltip

* Change icon and confirmation dialog

* edit icon

* rename be-only-button to be-teaser-button for consistency

Co-authored-by: Chaim Lev-Ari <chaim.levi-ari@portainer.io>
This commit is contained in:
Matt Hook 2023-01-10 10:02:07 +13:00 committed by GitHub
parent 1d42db93f1
commit 4dc643acd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 36 deletions

View file

@ -223,7 +223,7 @@
style="margin-left: 0"
data-cy="k8sAppDetail-editAppButton"
>
<pr-icon icon="'code'" class="mr-1"></pr-icon>Edit this application
<pr-icon icon="'pencil'" class="mr-1"></pr-icon>Edit this application
</button>
<button
authorization="K8sApplicationDetailsW"
@ -233,15 +233,17 @@
ui-sref="kubernetes.applications.application.edit"
data-cy="k8sAppDetail-editAppButton"
>
<pr-icon icon="'code'" class-name="'mr-1'"></pr-icon>Edit External application
<pr-icon icon="'pencil'" class-name="'mr-1'"></pr-icon>Edit external application
</button>
<be-only-button
<be-teaser-button
icon="'refresh-cw'"
feature-id="ctrl.limitedFeature"
message="'A rolling restart of the application is performed.'"
heading="'Rolling restart'"
button-text="'Rolling restart'"
></be-only-button>
class-name="'be-tooltip-teaser'"
className="'be-tooltip-teaser'"
></be-teaser-button>
<button
ng-if="ctrl.application.ApplicationType !== ctrl.KubernetesApplicationTypes.POD"
type="button"
@ -249,7 +251,7 @@
ng-click="ctrl.redeployApplication()"
data-cy="k8sAppDetail-redeployButton"
>
<pr-icon icon="'rotate-cw'" class="'mr-1'"></pr-icon>Redeploy
<pr-icon icon="'rotate-cw'" class="'mr-1'"></pr-icon>Terminate and restart
</button>
<button
ng-if="!ctrl.isExternalApplication()"

View file

@ -224,7 +224,7 @@ class KubernetesApplicationController {
}
rollbackApplication() {
this.ModalService.confirmUpdate('Rolling back the application to a previous configuration may cause a service interruption. Do you wish to continue?', (confirmed) => {
this.ModalService.confirmUpdate('Rolling back the application to a previous configuration may cause service interruption. Do you wish to continue?', (confirmed) => {
if (confirmed) {
return this.$async(this.rollbackApplicationAsync);
}
@ -234,6 +234,15 @@ class KubernetesApplicationController {
* REDEPLOY
*/
async redeployApplicationAsync() {
const confirmed = await this.ModalService.confirmAsync({
title: 'Are you sure?',
message: 'Terminating and restarting the application will cause service interruption. Do you wish to continue?',
buttons: { confirm: { label: 'Terminate and restart', className: 'btn-primary' } },
});
if (!confirmed) {
return;
}
try {
const promises = _.map(this.application.Pods, (item) => this.KubernetesPodService.delete(item));
await Promise.all(promises);
@ -245,11 +254,7 @@ class KubernetesApplicationController {
}
redeployApplication() {
this.ModalService.confirmUpdate('Redeploying the application may cause a service interruption. Do you wish to continue?', (confirmed) => {
if (confirmed) {
return this.$async(this.redeployApplicationAsync);
}
});
return this.$async(this.redeployApplicationAsync);
}
/**