Alexander Wels has posted comments on this change.

Change subject: webadmin: Start/stop progress on async operations
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/35964/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractModelBoundPopupPresenterWidget.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractModelBoundPopupPresenterWidget.java:

Line 150:                 }
Line 151: 
Line 152:                 if (manageProgress && asyncOperationCounter++ == 0) {
Line 153:                     model.startProgress(null);
Line 154:                 }
> Well, it might be alright, I might have been overly-cautious. The idea was 
You make a valid point about the manual startProgress, but you can easily 
bypass that problem by doing

  if (event.getTarget() != model || (model.getProgress() != null && 
asyncOperationCounter == 0)) {
    return
  }

This way we skip this whole thing if a manual startProgress is called and 
properly increment the counter if there is no manual startProgress. Just be 
sure to check for asyncOperationCounter > 0 in the complete handler.
Line 155:             }
Line 156:         });
Line 157:         addRegisteredHandler(AsyncOperationCompleteEvent.getType(), 
new AsyncOperationCompleteHandler() {
Line 158:             @Override


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I24ed80a5453668b37f488e0226f7bdfbf36e503d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to