geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1300182 - /geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
Date Tue, 13 Mar 2012 15:22:25 GMT
Author: xiaming
Date: Tue Mar 13 15:22:25 2012
New Revision: 1300182

URL: http://svn.apache.org/viewvc?rev=1300182&view=rev
Log:
GERONIMO-6135 Add javascript to auto reload the page after 1 second, provided by xie zhi,
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=1300182&r1=1300181&r2=1300182&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 13 15:22:25 2012
@@ -180,6 +180,42 @@ if (collecting == 0) {  // not collectin
 else if (collecting == -1) {  // not collecting statistics
     %>
         <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);
+}
+//-->
+</script>	
     <%if (request.isUserInRole("admin")) {   
         if(node.isEnabled()) {   // enable the links
         



Mime
View raw message