Change in ovirt-engine[master]: userportal: auto-connect selected only works once per browse...

tjelinek at redhat.com tjelinek at redhat.com
Thu Mar 14 10:28:51 UTC 2013


Tomas Jelinek has submitted this change and it was merged.

Change subject: userportal: auto-connect selected only works once per browser session
......................................................................


userportal: auto-connect selected only works once per browser session

Steps to Reproduce:
1. Go to the user portal, where the user only has one VM that is up, have the
   Connect Automatically checkbox selected, and login.
2. Logout and repeat.

The console pops up only once in the extended view (with basic view it works as
expected).

The bug depended on the order of initializing MainTabBasicPresenter and
MainTabExtendedPresenter classes. These classes handle unregistering and
registering listeners for auto-connect on UserPortalModelInit event.
When the MTExtendedPresenter was loaded first, the MTBasicPresenter
unregistered its listeners, so the auto-connect logic could't be invoked (the
auto-connection occured when user clicked on "basic" tab).

There was a flaw in ConnectAutomaticManager. It tried to auto-connect to a
machine, that was strictly in up state, which is correct for basic view. For
extended view, however, the feature must also work when there is a single
running machine (that cannot be strictly in the up state [can be also powering
up, rebooting...]). This patch changes this behavior of
ConnectAutomaticallyManager - now it auto-connects to the machine, which
is running.

Change-Id: If93181166d2e3f63c0074594cb94002802499414
Bug-Url: https://bugzilla.redhat.com/867134
Signed-off-by: Frantisek Kobzik <fkobzik at redhat.com>
---
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/tab/MainTabBasicPresenter.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/utils/ConnectAutomaticallyManager.java
2 files changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Tomas Jelinek: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/13015
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If93181166d2e3f63c0074594cb94002802499414
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <fkobzik at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkobzik at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>



More information about the Engine-commits mailing list