Alexander Wels has posted comments on this change.
Change subject: userportal, webadmin: Added caching
......................................................................
Patch Set 11: Looks good to me, but someone else must approve
(3 inline comments)
....................................................
File
frontend/webadmin/modules/frontend-overlay/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GwtCachingFilter.java
Line 143: protected String getYesterdayHttpDate(Calendar calendar) {
Line 144: // Subtract a day, so it is in the past.
Line 145: calendar.add(Calendar.DAY_OF_MONTH, -1);
Line 146: // Format in the correct format.
Line 147: SimpleDateFormat dateFormat = new
SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US);
I don't think I did this in the original patch, but we can extract these three
lines into a formatUsLocaleGMTZone method, as both the getNowPlusYearHttpDate
and getYesterdayHttpData do the exact same thing.
Line 148: dateFormat.setTimeZone(TimeZone.getTimeZone(GMT));
Line 149: return dateFormat.format(calendar.getTime());
Line 150: }
Line 151:
....................................................
File frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
Line 5:
Line 6: <filter-mapping>
Line 7: <filter-name>GwtCachingFilter</filter-name>
Line 8: <url-pattern>/webadmin/*</url-pattern>
Line 9: </filter-mapping>
Shouldn't we define the mapping in the web fragment as well? Or as an
annotation on the servlet itself?
Line 10:
Line 11: <servlet-mapping>
Line 12: <servlet-name>WebAdminHostPageServlet</servlet-name>
Line 13: <url-pattern>/webadmin/WebAdmin.html</url-pattern>
Line 12: <servlet-name>WebAdminHostPageServlet</servlet-name>
Line 13: <url-pattern>/webadmin/WebAdmin.html</url-pattern>
Line 14: </servlet-mapping>
Line 15:
Line 16: <servlet-mapping>
Same for the servlet mapping.
Line 17: <servlet-name>GenericApiServlet</servlet-name>
Line 18:
<url-pattern>/webadmin/GenericApiGWTService</url-pattern>
Line 19: </servlet-mapping>
Line 20:
--
To view, visit http://gerrit.ovirt.org/10449
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d8e02ae542a4aa37bd421bde5582c0f3e9820ad
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches