felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r707580 - in /felix/trunk/webconsole/src/main: java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java resources/res/ui/events.js
Date Fri, 24 Oct 2008 08:04:31 GMT
Author: cziegeler
Date: Fri Oct 24 01:04:31 2008
New Revision: 707580

URL: http://svn.apache.org/viewvc?rev=707580&view=rev
Log:
FELIX-790 - Display events in reverse order.

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java
    felix/trunk/webconsole/src/main/resources/res/ui/events.js

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java?rev=707580&r1=707579&r2=707580&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java
Fri Oct 24 01:04:31 2008
@@ -19,7 +19,8 @@
 
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -100,7 +101,7 @@
                 this.events.add(event);
                 if ( events.size() > this.maxSize )
                 {
-                    events.remove(1);
+                    events.remove(0);
                 }
             }
         }
@@ -137,11 +138,10 @@
             {
                 copiedEvents = new ArrayList(this.events);
             }
-            int index = 0;
-            final Iterator i = copiedEvents.iterator();
-            while ( i.hasNext() )
+            // display list in reverse order
+            for(int index = copiedEvents.size() -1; index >= 0; index--)
             {
-                eventJson( jw, (Event)i.next(), index );
+                eventJson( jw, (Event)copiedEvents.get(index), index );
                 index++;
             }
 

Modified: felix/trunk/webconsole/src/main/resources/res/ui/events.js
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/ui/events.js?rev=707580&r1=707579&r2=707580&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/res/ui/events.js (original)
+++ felix/trunk/webconsole/src/main/resources/res/ui/events.js Fri Oct 24 01:04:31 2008
@@ -24,7 +24,7 @@
     document.write( "</tr>" );
 
     document.write( "<tr class='content'>" );
-    document.write( "<th class='content'>Topic</th>" );
+    document.write( "<th class='content' width='20%'>Topic</th>" );
     document.write( "<th class='content'>Properties</th>" );
     document.write( "</tr>" );
 



Mime
View raw message