continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r441625 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main: java/org/apache/maven/continuum/web/view/BuildStatusCell.java webapp/groupSummary.jsp
Date Fri, 08 Sep 2006 19:33:22 GMT
Author: carlos
Date: Fri Sep  8 12:33:22 2006
New Revision: 441625

URL: http://svn.apache.org/viewvc?view=rev&rev=441625
Log:
Improve project group listing

Added:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildStatusCell.java
  (with props)
Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp

Added: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildStatusCell.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildStatusCell.java?view=auto&rev=441625
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildStatusCell.java
(added)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildStatusCell.java
Fri Sep  8 12:33:22 2006
@@ -0,0 +1,38 @@
+package org.apache.maven.continuum.web.view;
+
+import org.apache.maven.continuum.project.ContinuumProjectState;
+import org.apache.maven.continuum.web.model.GroupSummary;
+import org.apache.maven.continuum.web.util.StateGenerator;
+import org.extremecomponents.table.bean.Column;
+import org.extremecomponents.table.cell.DisplayCell;
+import org.extremecomponents.table.core.TableModel;
+
+public class BuildStatusCell 
+    extends DisplayCell
+{
+    protected String getCellValue( TableModel tableModel, Column column )
+    {
+        GroupSummary group = (GroupSummary) tableModel.getCurrentRowBean();
+
+        String success = StateGenerator.generate( ContinuumProjectState.OK, tableModel.getContext().getContextPath()
);
+
+        String failed = StateGenerator.generate( ContinuumProjectState.FAILED, tableModel.getContext().getContextPath()
);
+        
+        String error = StateGenerator.generate( ContinuumProjectState.ERROR, tableModel.getContext().getContextPath()
);
+        
+        StringBuffer cellContent = new StringBuffer();
+        cellContent.append( success );
+        cellContent.append( " " );
+        cellContent.append( group.getNumSuccesses() );
+        cellContent.append( "   " );
+        cellContent.append( failed );
+        cellContent.append( " " );
+        cellContent.append( group.getNumFailures() );
+        cellContent.append( "   " );
+        cellContent.append( error );
+        cellContent.append( " " );
+        cellContent.append( group.getNumErrors() );
+        
+        return cellContent.toString();
+    }
+}

Propchange: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildStatusCell.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildStatusCell.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp?view=diff&rev=441625&r1=441624&r2=441625
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp
Fri Sep  8 12:33:22 2006
@@ -1,7 +1,6 @@
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
-<%@ taglib uri="continuum" prefix="c1" %>
 <html>
 <ww:i18n name="localization.Continuum">
   <head>
@@ -19,67 +18,26 @@
       No Project Groups Known.
     </ww:if>
 
-    <c:forEach items="${groups}" var="group">
-
-      <ww:set name="group" value="${group}"/>
-      <ww:url id="projectGroupSummaryUrl" action="projectGroupSummary" namespace="/">
-        <ww:param name="projectGroupId" value="%{'${group.id}'}"/>
-      </ww:url>
-
-      <div class="body">
-      <table border="2" cellspacing="2" cellpadding="3" width="100%">        
-        <tr>
-          <td>Name:</td>
-          <td><ww:a href="%{projectGroupSummaryUrl}">${group.name}</ww:a></td>
-        </tr>
-        <tr>
-          <td>Group Id:</td>
-          <td>${group.groupId}</td>
-        </tr>
-        <tr>
-          <td>Project Type:</td>
-          <td>${group.projectType}</td>
-        </tr>
-        <tr>
-          <td>Number of Projects:</td>
-          <td>${group.numProjects}</td>
-        </tr>
-        <tr>
-          <td>Build Status:</td>
-          <td>
-            <table>
-              <tr>
-                <td><img src="<ww:url value="/images/icon_success_sml.gif"/>"
alt="<ww:text name="message.success"/>"
-                         title="<ww:text name="message.success"/>"/></td>
-                <td><ww:property value="${group.numSuccesses}"/></td>
-              </tr>
-              <tr>
-                <td><img src="<ww:url value="/images/icon_warning_sml.gif"/>"
alt="<ww:text name="message.failed"/>"
-                         title="<ww:text name="message.failed"/>"/></td>
-                <td><ww:property value="${group.numFailures}"/></td>
-              </tr>
-              <tr>
-                <td><img src="<ww:url value="/images/icon_error_sml.gif"/>"
alt="<ww:text name="message.error"/>"
-                         title="<ww:text name="message.error"/>"/></td>
-                <td><ww:property value="${group.numErrors}"/></td>
-              </tr>
-            </table>
-          </td>
-        </tr>
-        <tr>
-          <td>Next Scheduled Build:</td>
-          <td>${group.nextScheduledBuild}</td>
-        </tr>
-        <tr>
-          <td>Status Message:</td>
-          <td>${group.statusMessage}</td>
-        </tr>
-      </table>
-      <hr/>
-      <p/>
-        </div>
-    </c:forEach>
-  </div>
+    <div class="eXtremeTable" >
+    <ec:table items="groups"
+              var="group"
+              showExports="false"
+              showPagination="false"
+              showStatusBar="false"
+              filterable="false">
+      <ec:row highlightRow="true">
+        <ec:column property="name" title="Name" width="20%" style="white-space: nowrap">
+          <a href="<ww:url  action="projectGroupSummary" namespace="/"><ww:param
name="projectGroupId" value="%{'${group.id}'}"/></ww:url>">${group.name}</a>
+        </ec:column>
+        <ec:column property="groupId" title="Group&nbsp;Id" width="20%"/>
+        <ec:column property="projectType" title="Type" width="5%"/>
+        <ec:column property="numProjects" title="Projects" width="1%" style="text-align:
center"/>
+        <ec:column property="numSuccesses" title="Build&nbsp;Status" width="1%" style="white-space:
nowrap" cell="org.apache.maven.continuum.web.view.BuildStatusCell"/>
+        <ec:column property="nextScheduledBuild" title="Next&nbsp;Build" width="1%"
style="white-space: nowrap"/>
+        <ec:column property="statusMessage" title="Status&nbsp;Message"/>
+      </ec:row>
+    </ec:table>
+    </div>        
   </body>
 </ww:i18n>
 </html>



Mime
View raw message