You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xi...@apache.org on 2012/03/27 10:30:35 UTC
svn commit: r1305776 -
/geronimo/server/branches/3.0-beta/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
Author: xiaming
Date: Tue Mar 27 08:30:35 2012
New Revision: 1305776
URL: http://svn.apache.org/viewvc?rev=1305776&view=rev
Log:
GERONIMO-6135 revised patch for monitor portlet refresh issue, provided by xiezhi
Modified:
geronimo/server/branches/3.0-beta/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
Modified: geronimo/server/branches/3.0-beta/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp?rev=1305776&r1=1305775&r2=1305776&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp (original)
+++ geronimo/server/branches/3.0-beta/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp Tue Mar 27 08:30:35 2012
@@ -182,38 +182,24 @@ else if (collecting == -1) { // not col
<td class="${backgroundClass}" width="15%" align="center"><font color="red"><fmt:message key="monitor.server.stopping"/></font></td>
<script type = "text/javascript">
<!--
-sleep(1000);
-myrefresh();
-
-function myrefresh() {
- var ua = navigator.userAgent.toLowerCase();
-
- if (ua.indexOf("msie") > 0) {//IE
- window.navigate(location);
- }
- else if (ua.indexOf("firefox")>0){//FireFox
- window.location.reload();
- }
- else if (ua.indexOf("chrome")>0) {//Chrome
- window.location.reload();
- }
- else if (ua.indexOf("opera")>=0) {//Opera
- window.location.reload();
- }
- else if (ua.indexOf("safari")>0) {//Safari
- location.reload();
- }else { //Other Browses
- location.reload();
- }
-
-}
-
-function sleep(millis) {
- var startdate = new Date();
- var curDate = null;
- do { curDate = new Date(); }
- while(curDate-startdate < millis);
-}
+ WaitForMonitorStop(1000);
+ refreshForMonitorStatus();
+
+ function refreshForMonitorStatus() {
+ if (window.ActiveXObject) {
+ window.navigate(location);
+ }
+ else {
+ window.location.reload();
+ }
+ }
+
+ function WaitForMonitorStop(millis) {
+ var startTime = new Date();
+ var curTime = null;
+ do { curTime = new Date(); }
+ while(curTime-startTime < millis);
+ }
//-->
</script>
<%if (request.isUserInRole("admin")) {