Lior Vernia has submitted this change and it was merged.
Change subject: webadmin: Simplified failure handling code in Frontend
......................................................................
webadmin: Simplified failure handling code in Frontend
Changed the name of a variable to better represent what it means, and
extracted some common code out of conditional clauses.
This also exposed some dead code - there was some logic setting an
alternative error message in case the failure isn't on canDoAction(),
but it was located in a conditional clause where it had already been
established that the failure had been on canDoAction().
Also took the chance to remove a redundant event flow, where a single
error message was being passed around instead of a list, but which in
the end would perform the same logic.
Change-Id: I19a0fc10841c9d400ad381f5f9f5fbaaf55fe871
Signed-off-by: Lior Vernia <lvernia(a)redhat.com>
---
M
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
M
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/FrontendFailureEventArgs.java
M
frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendActionTest.java
M
frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendTest.java
M
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/ErrorMessageFormatter.java
M
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/FrontendFailureEventListener.java
M
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
7 files changed, 25 insertions(+), 83 deletions(-)
Approvals:
Lior Vernia: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/27804
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I19a0fc10841c9d400ad381f5f9f5fbaaf55fe871
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <lvernia(a)redhat.com>
Gerrit-Reviewer: Alexander Wels <awels(a)redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan(a)redhat.com>
Gerrit-Reviewer: Lior Vernia <lvernia(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server