geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1305774 - /geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
Date Tue, 27 Mar 2012 08:30:04 GMT
Author: xiaming
Date: Tue Mar 27 08:30:04 2012
New Revision: 1305774

URL: http://svn.apache.org/viewvc?rev=1305774&view=rev
Log:
GERONIMO-6135 revised patch for monitor portlet refresh issue, for trunk

Modified:
    geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp?rev=1305774&r1=1305773&r2=1305774&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
Tue Mar 27 08:30:04 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")) {   



Mime
View raw message