geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r575775 - in /geronimo/plugins/console/trunk: console-base-portlets/src/main/java/org/apache/geronimo/console/logmanager/ console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ console-base-portlets/src/main/webapp/W...
Date Fri, 14 Sep 2007 18:48:21 GMT
Author: pmcmahan
Date: Fri Sep 14 11:47:08 2007
New Revision: 575775

URL: http://svn.apache.org/viewvc?rev=575775&view=rev
Log:
GERONIMO-3453 fix log and shutdown portlets.  patch submitted by Viet Nguyen.

Modified:
    geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/logmanager/WebAccessLogViewerPortlet.java
    geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java
    geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/servermanager/normal.jsp
    geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/js/forms.js

Modified: geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/logmanager/WebAccessLogViewerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/logmanager/WebAccessLogViewerPortlet.java?rev=575775&r1=575774&r2=575775&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/logmanager/WebAccessLogViewerPortlet.java
(original)
+++ geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/logmanager/WebAccessLogViewerPortlet.java
Fri Sep 14 11:47:08 2007
@@ -278,7 +278,24 @@
 
     public void processAction(ActionRequest actionRequest,
             ActionResponse actionResponse) throws PortletException, IOException {
-        //todo: according to portlet spec, all forms should submit to Action not Render
+        String[] paramNames = {"action",
+                               "fromDate", 
+                               "toDate", 
+                               "ignoreDates", 
+                               "requestHost", 
+                               "authUser", 
+                               "requestMethod", 
+                               "requestedURI", 
+                               "startResult", 
+                               "maxResult"};
+        // copy all action parameters to render parameters
+        for(int i = 0; i < paramNames.length; i++) {
+            if(actionRequest.getParameter(paramNames[i]) != null) {
+                actionResponse.setRenderParameter(
+                        paramNames[i], 
+                        actionRequest.getParameter(paramNames[i]));
+            }
+        }
     }
     private static class Criteria implements Serializable {
         Integer maxResult = new Integer(DEFAULT_MAX_RESULTS);

Modified: geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java?rev=575775&r1=575774&r2=575775&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java
(original)
+++ geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java
Fri Sep 14 11:47:08 2007
@@ -60,6 +60,8 @@
                     Daemon.main(new String[0]);
                 }
             }.start();
+        } else if(actionRequest.getParameter("shutdown") != null) {
+            actionResponse.setRenderParameter("shutdown", actionRequest.getParameter("shutdown"));
         }
     }
 

Modified: geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/servermanager/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/servermanager/normal.jsp?rev=575775&r1=575774&r2=575775&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/servermanager/normal.jsp
(original)
+++ geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/servermanager/normal.jsp
Fri Sep 14 11:47:08 2007
@@ -30,7 +30,7 @@
 --%>
 <br />
 <table width="100%">
-<form action="<portlet:renderURL/>">
+<form action="<portlet:actionURL/>">
 <tr><td align="center"><input type="submit" value="Shutdown" name="shutdown"
 onClick="return confirm('Are you sure you want to shutdown the server (last chance)?');"/></td></tr>
 </form>

Modified: geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/js/forms.js
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/js/forms.js?rev=575775&r1=575774&r2=575775&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/js/forms.js (original)
+++ geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/js/forms.js Fri Sep
14 11:47:08 2007
@@ -44,6 +44,10 @@
 }
 
 function isIntegral(value){
+    // trim off the negative sign if present
+    if(value.length>1 && value.charAt(0) == "-") {
+        value = value.substring(1);
+    }
     if(value.length < 1) return false;
     var ints = "1234567890";
     for(i = 0; i < value.length; i++){



Mime
View raw message