Change in ovirt-engine[master]: webadmin, userportal: fix Events tabs sorting
yzaslavs at redhat.com
yzaslavs at redhat.com
Sun Feb 24 09:04:16 UTC 2013
Yair Zaslavsky has submitted this change and it was merged.
Change subject: webadmin,userportal: fix Events tabs sorting
......................................................................
webadmin,userportal: fix Events tabs sorting
As a result of commit 2c5d00aac4f588260bb36f7a28d7be5e856a8474
the webadmin gets stuck (must be refreshed) when trying to
navigate back from any events tab/sub-tab.
The problem is that the method setItems is updated with
null when switching tabs - causing a NPE in the sort method.
The method setItems is actually redundant in EventListModel
and should be added instead to UserPortalVmEventListModel
and UserPortalTemplateEventListModel.
EventListModel -> SyncSearch calls setItems with an empty list.
It uses the refreshModel method for fetching events and
UpdateItems for reverse sorting them; i.e. the sorting in setItems
is effective only for classes that override the refreshModel
method. Therefore, moved the sorting to these classes and
added the nullity check.
[ToDo: the reverse sorting in EventListModel -> UpdateItems
should probably be re-factored in a way that allows sorting
for all inherited classes without overrides...]
Change-Id: Ibefebeea4dd804f6f930ed61e5899fe460996a70
RelatedTo-Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=907421
Signed-off-by: Daniel Erez <derez at redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/events/EventListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/UserPortalTemplateEventListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UserPortalVmEventListModel.java
3 files changed, 27 insertions(+), 10 deletions(-)
Approvals:
Gilad Chaplik: Looks good to me, approved
Yair Zaslavsky: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/12367
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibefebeea4dd804f6f930ed61e5899fe460996a70
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
More information about the Engine-commits
mailing list