continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r209156 - in /maven/continuum/trunk/continuum-web: ./ src/main/java/org/apache/maven/continuum/web/pipeline/valve/ src/main/resources/forms/ src/main/resources/localization/ src/main/resources/templates/ src/main/resources/templates/screens/
Date Tue, 05 Jul 2005 00:50:18 GMT
Author: jvanzyl
Date: Mon Jul  4 17:50:17 2005
New Revision: 209156

URL: http://svn.apache.org/viewcvs?rev=209156&view=rev
Log:
o making errors display nicely
o putting continumm into the context, just easier for some things
o showing the total number of successful projects

Modified:
    maven/continuum/trunk/continuum-web/pom.xml
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/ContinuumViewContextValve.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java
    maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Error.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm

Modified: maven/continuum/trunk/continuum-web/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/pom.xml?rev=209156&r1=209155&r2=209156&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/pom.xml (original)
+++ maven/continuum/trunk/continuum-web/pom.xml Mon Jul  4 17:50:17 2005
@@ -74,7 +74,7 @@
     <dependency>
       <groupId>ognl</groupId>
       <artifactId>ognl</artifactId>
-      <version>2.5.1</version>
+      <version>2.6.7</version>
     </dependency>
   </dependencies>
 </project>

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/ContinuumViewContextValve.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/ContinuumViewContextValve.java?rev=209156&r1=209155&r2=209156&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/ContinuumViewContextValve.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/ContinuumViewContextValve.java
Mon Jul  4 17:50:17 2005
@@ -20,6 +20,8 @@
 import org.codehaus.plexus.summit.pipeline.valve.ValveInvocationException;
 import org.codehaus.plexus.summit.rundata.RunData;
 import org.codehaus.plexus.summit.view.ViewContext;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.apache.maven.continuum.Continuum;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -31,5 +33,14 @@
     protected void populateViewContext( RunData data, ViewContext context )
     {
         context.put( "data", data );
+
+        try
+        {
+            context.put( "continuum", data.lookup( Continuum.ROLE ) );
+        }
+        catch ( ComponentLookupException e )
+        {
+            // won't happen
+        }
     }
 }

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java?rev=209156&r1=209155&r2=209156&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java
Mon Jul  4 17:50:17 2005
@@ -51,12 +51,12 @@
 
         String formId = data.getParameters().getString( "fid" );
 
-        context.put( "fid", formId );
-
         if ( formId == null )
         {
             formId = defaultFormId;
         }
+
+        context.put( "fid", formId );
 
         Form form;
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml?rev=209156&r1=209155&r2=209156&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml Mon
Jul  4 17:50:17 2005
@@ -4,24 +4,6 @@
   <summary-collection-expression>getProjects()</summary-collection-expression>
   <source-role>org.apache.maven.continuum.Continuum</source-role>
   <type-expression>executorId</type-expression>
-
-  <!--
-  <transformations>
-    <transformation>
-      <id>scmUrl</id>
-      <composition>
-        <expression>"scm" + ":" + #projectScm + ":" + #projectScmUrl</expression>
-      </composition>
-      <decomposition>
-        #projectScm = split( #data, ":" )[1]
-        #projectScm = #data.substring( 0, #data.indexOf( ":", 4 ) )
-        #projectScmUrl = split( #data, ":" )[2+]
-        #projectScmUrl = #data.substring( #data.indexOf( ":", 4 ) )
-      </decomposition>
-    </transformation>
-  </transformations>
-  -->
-
   <elements>
     <element>
       <id>project.name</id>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties?rev=209156&r1=209155&r2=209156&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
Mon Jul  4 17:50:17 2005
@@ -108,3 +108,9 @@
 empty.error = This field is required
 url.error = You must provide a valid url
 urlSource.error = The URL you provided doesn't exist
+
+// ----------------------------------------------------------------------
+// Exceptions
+// ----------------------------------------------------------------------
+
+continuumError = Continuum Error
\ No newline at end of file

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm?rev=209156&r1=209155&r2=209156&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm Mon Jul
 4 17:50:17 2005
@@ -35,7 +35,7 @@
 #if ( $element && $element.attributes && $element.attributes.size > 0
)
 <input type="text" name="$element.id" value="$elementData" size="$element.attributes.size"/>
 #else
-<input type="text" name="$element.id" value="$elementData"/>
+<input type="text" name="$element.id" value="$elementData" size="40"/>
 #end
 #end
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Error.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Error.vm?rev=209156&r1=209155&r2=209156&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Error.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Error.vm Mon
Jul  4 17:50:17 2005
@@ -1,14 +1,9 @@
-<font face="verdana,geneva,helvetica">
-<table id="error">
-   <tr>
-      <td><h2>Error</h2></td>
-   </tr>
-   <tr>
-      <td>
-<pre>
-$exceptionStackTrace
-</pre>
-      </td>
-   </tr>
-</table>
-</font>
+$page.setTitle( $i18n.getString( "continuumError" ) )
+
+<div class="app">
+  <div id="axial" class="h3">
+    <h3>$i18n.getString( "continuumError" )</h3>
+  </div>
+  <pre>$stackTrace</pre>
+</div>
+

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm?rev=209156&r1=209155&r2=209156&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm Mon
Jul  4 17:50:17 2005
@@ -1,5 +1,18 @@
+## 1 = new
+## 2 = ok
+## 3 = failed
+## 4 = error
+## 5 = signalled
+## 6 = building
+## 7 = checking out
+## 8 = updating
+
 $page.setTitle( "Continuum" )
 
+#set( $success = 0 )
+#set( $failures = 0 )
+#set( $errors = 0 )
+
 <div class="app">
   <div id="h3">
     <h3>$i18n.getString( $form.summary.titleKey )</h3>
@@ -12,6 +25,15 @@
       </tr>
       #set ( $items = $formtool.getSummaryItems( $form.id ) )
       #foreach ( $item in $items )
+
+      #if ( $item.state == 2 )
+        #set( $success = $success + 1 )
+      #elseif ( $item.state == 3 )
+        #set( $failures = $failures + 1 )
+      #elseif( $item.state == 4 )
+        #set( $errors = $errors + 1 )
+      #end
+
       <tr class="$css.nextClass">
         #foreach ( $se in $form.summary.summaryElements )
         <td>$formtool.getSummaryItem( $form, $se, $item )</td>
@@ -26,27 +48,28 @@
       </tr>
       #end
     </table>
+
     ##
     ## TODO: This should be made a general feature in formica using the CAM and an option
for an
     ## enable expression to model what we have below.
     <div class="functnbar3">
-      <table>
-        <tr>
-          <td>
-            <form method="post" action="$link">
-            #if ( $items && $items.size() > 0 )
-            #hidden ( "action" "cam" )
-            #hidden ( "cid" "buildAllProjects" )
-            <input type="submit" name="build-all" value="Build All"/>
-            #end
-            </form>
-          </td>
-          <td>
-          <img src="/continuum/images/icon_error_sml.gif" alt="Failed"/> $projectsWithFailures
-          <img src="/continuum/images/icon_warning_sml.gif" alt="Error"/> $projectsWithErrors
-          </td>
-        </tr>
-      </table>
+      <form method="post" action="$link">
+        #if ( $items && $items.size() > 0 )
+        #hidden ( "action" "cam" )
+        #hidden ( "cid" "buildAllProjects" )
+        <input type="submit" name="build-all" value="Build All"/>
+        #end
+      </form>
     </div>
   </div>
 </div>
+
+<table>
+  <tr>
+    <td align="right">
+      <img src="/continuum/images/icon_success_sml.gif" alt="Success"/> $success
+      <img src="/continuum/images/icon_error_sml.gif" alt="Failed"/> $failures
+      <img src="/continuum/images/icon_warning_sml.gif" alt="Error"/> $errors
+    </td>
+  </tr>
+</table>
\ No newline at end of file



Mime
View raw message