From ef19c6bef794461b56761c1c4e089abafef97f5e Mon Sep 17 00:00:00 2001 From: lvydra Date: Wed, 5 Jun 2024 10:25:34 +0200 Subject: [PATCH] [HAL-1980][JBEAP-27111] Installation Manager Web Console does not use the expected revert revision --- .../java/org/jboss/hal/client/installer/UpdateColumn.java | 5 +++-- .../src/main/java/org/jboss/hal/resources/Constants.java | 1 + .../resources/org/jboss/hal/resources/Constants.properties | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/jboss/hal/client/installer/UpdateColumn.java b/app/src/main/java/org/jboss/hal/client/installer/UpdateColumn.java index 3141794161..2e0786256f 100644 --- a/app/src/main/java/org/jboss/hal/client/installer/UpdateColumn.java +++ b/app/src/main/java/org/jboss/hal/client/installer/UpdateColumn.java @@ -164,9 +164,10 @@ public HTMLElement element() { @Override public List> actions() { List> actions = new ArrayList<>(); - if (item.getUpdateKind() == UpdateItem.UpdateType.UPDATE) { + if ((!item.equals(getCurrentItems().get(0)) && (item.getUpdateKind() == UpdateItem.UpdateType.UPDATE + || item.getUpdateKind() == UpdateItem.UpdateType.INSTALL))) { actions.add(new ItemAction.Builder() - .title(resources.constants().revert()) + .title(resources.constants().revertTo()) .handler(itm -> revert(itm)) .constraint(Constraint.executable(INSTALLER_TEMPLATE, PREPARE_REVERT)) .build()); diff --git a/resources/src/main/java/org/jboss/hal/resources/Constants.java b/resources/src/main/java/org/jboss/hal/resources/Constants.java index 26d974f986..ac70644bd0 100644 --- a/resources/src/main/java/org/jboss/hal/resources/Constants.java +++ b/resources/src/main/java/org/jboss/hal/resources/Constants.java @@ -517,6 +517,7 @@ public interface Constants extends com.google.gwt.i18n.client.Constants { String results(); String resume(); String revert(); + String revertTo(); String revertUpdatePreviousState(); String review(); String revoke(); diff --git a/resources/src/main/resources/org/jboss/hal/resources/Constants.properties b/resources/src/main/resources/org/jboss/hal/resources/Constants.properties index 742b652c60..a1979b7448 100644 --- a/resources/src/main/resources/org/jboss/hal/resources/Constants.properties +++ b/resources/src/main/resources/org/jboss/hal/resources/Constants.properties @@ -529,6 +529,7 @@ restricted=The permissions for your role don\u0027t allow to access this data. results=Results resume=Resume revert=Revert +revertTo=Revert to revertUpdatePreviousState=Revert update to previous state review=Review revoke=Revoke