Vojtech Szocs has posted comments on this change.
Change subject: webadmin,userportal: Frontend improvements
......................................................................
Patch Set 1:
> Hi, any reference to what I can review? is there any change in behavior?
The only change in behavior is in ClientStorageImpl.java (other changes are
just refactoring of existing code with no impact on current behavior).
> If you already touch this code, maybe better to use map/json of attributes so
> that you request what you want and it is automatically digested instead of
> having per variable logic.
Not sure what you mean exactly, but common JS variables (in GwtHostPage.jsp
above line "WebAdmin specific variables") are already processed in a generic
way, see GwtDynamicHostPageServlet#getMd5Digest method. In GwtHostPage.jsp
these variables are listed one-by-one, for example:
var userInfo = {...}; // object
var ssoToken = "..."; // string
They could be wrapped into some object, for example:
var dynamicData = {
userInfo: {...},
ssoToken: "..."
};
Is this what you meant?
As for WebAdminHostPageServlet the request attribute names are plain string
constants, instead of enum members as in GwtDynamicHostPageServlet. I can
improve this.
As for Einav's comment: agreed with both bullets. For the second bullet, we
could do following improvement:
// when reading value from client storage
if (valueFoundUnderNewKey) return valueFound;
else if (valueFoundUnderOldKey) {
removeValueUnderOldKey();
persistValueUnderNewKey();
return valueFound;
}
Does above make sense?
--
To view, visit http://gerrit.ovirt.org/36536
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4864b2d4703ee548a570799ed3e87674602f5438
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Lior Vernia <[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: No
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches