continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r209605 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java...
Date Thu, 07 Jul 2005 14:44:59 GMT
Author: jvanzyl
Date: Thu Jul  7 07:44:57 2005
New Revision: 209605

URL: http://svn.apache.org/viewcvs?rev=209605&view=rev
Log:
o adding support to view and edit notification settings. still needs some work
  but it's a start.

Added:
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewIrcNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewMailNotifier.vm
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/CallApplicationModel.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormicaTool.java
    maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
Thu Jul  7 07:44:57 2005
@@ -25,6 +25,7 @@
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
+import org.apache.maven.continuum.project.ContinuumNotifier;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
 
@@ -159,6 +160,12 @@
     // ----------------------------------------------------------------------
     // Notification
     // ----------------------------------------------------------------------
+
+    ContinuumNotifier getNotifier( String projectId, String notifierType )
+        throws ContinuumException;
+
+    public void updateNotifier( String projectId, String notifierType, Map configuration
)
+        throws ContinuumException;
 
     void addNotifier( String projectId, String notifierType, Map configuration )
         throws ContinuumException;

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
Thu Jul  7 07:44:57 2005
@@ -24,6 +24,7 @@
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
 import org.apache.maven.continuum.scm.UpdateScmResult;
+import org.apache.maven.continuum.ContinuumException;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -91,6 +92,9 @@
     // Notifiers
     // ----------------------------------------------------------------------
 
-    void removeNotifier( Object oid )
+    void removeNotifier( Object notifier )
+        throws ContinuumStoreException;
+
+    void storeNotifier( Object notifier )
         throws ContinuumStoreException;
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Thu Jul  7 07:44:57 2005
@@ -16,44 +16,35 @@
  * limitations under the License.
  */
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
 import org.apache.maven.continuum.core.ContinuumCore;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
+import org.apache.maven.continuum.core.action.AddProjectToCheckOutQueueAction;
 import org.apache.maven.continuum.core.action.CreateProjectsFromMetadata;
 import org.apache.maven.continuum.core.action.StoreProjectAction;
-import org.apache.maven.continuum.core.action.AddProjectToCheckOutQueueAction;
+import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
+import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
+import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
 import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumBuild;
+import org.apache.maven.continuum.project.ContinuumNotifier;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
-import org.apache.maven.continuum.project.ContinuumProjectState;
-import org.apache.maven.continuum.project.ContinuumNotifier;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.project.builder.maven.MavenOneContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjectBuilder;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
-import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
-import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
-import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
-import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
-import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.apache.maven.model.Notifier;
-
 import org.codehaus.plexus.action.ActionManager;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.ExceptionUtils;
 
-import javax.jdo.JDOHelper;
-import javax.jdo.PersistenceManager;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -506,17 +497,45 @@
     // Notification
     // ----------------------------------------------------------------------
 
-    public void addNotifier( String projectId, String notifierType, Map configuration )
+    // This whole section needs a scrub but will need to be dealt with generally
+    // when we add schedules and profiles to the mix.
+
+    public ContinuumNotifier getNotifier( String projectId, String notifierType )
         throws ContinuumException
     {
-        ContinuumNotifier notifier = new ContinuumNotifier();
+        ContinuumProject project = core.getProject( projectId );
 
-        notifier.setType( notifierType );
+        List notifiers = project.getNotifiers();
 
-        // ----------------------------------------------------------------------
-        // Needs to be properties ... but data comes in via a Map
-        // ----------------------------------------------------------------------
+        ContinuumNotifier notifier = null;
+
+        for ( Iterator i = notifiers.iterator(); i.hasNext(); )
+        {
+            notifier = (ContinuumNotifier) i.next();
+
+            if ( notifier.getType().equals( notifierType ) )
+            {
+                break;
+            }
+        }
+
+        return notifier;
+    }
+
+    public void updateNotifier( String projectId, String notifierType, Map configuration
)
+        throws ContinuumException
+    {
+        ContinuumNotifier notifier = getNotifier( projectId, notifierType );
+
+        Properties notifierProperties = createNotifierProperties( configuration );
+
+        notifier.setConfiguration( notifierProperties );
+
+        core.storeNotifier( notifier );
+    }
 
+    private Properties createNotifierProperties( Map configuration )
+    {
         Properties notifierProperties = new Properties();
 
         for ( Iterator i = configuration.keySet().iterator(); i.hasNext(); )
@@ -531,6 +550,22 @@
             }
         }
 
+        return notifierProperties;
+    }
+
+    public void addNotifier( String projectId, String notifierType, Map configuration )
+        throws ContinuumException
+    {
+        ContinuumNotifier notifier = new ContinuumNotifier();
+
+        notifier.setType( notifierType );
+
+        // ----------------------------------------------------------------------
+        // Needs to be properties ... but data comes in via a Map
+        // ----------------------------------------------------------------------
+
+        Properties notifierProperties = createNotifierProperties( configuration );
+
         notifier.setConfiguration( notifierProperties );
 
         ContinuumProject project = core.getProject( projectId );
@@ -543,21 +578,7 @@
     public void removeNotifier( String projectId, String notifierType )
         throws ContinuumException
     {
-        ContinuumProject project = core.getProject( projectId );
-
-        List notifiers = project.getNotifiers();
-
-        ContinuumNotifier n = null;
-
-        for ( Iterator i = notifiers.iterator(); i.hasNext(); )
-        {
-            n = (ContinuumNotifier) i.next();
-
-            if ( n.getType().equals( notifierType ) )
-            {
-                break;
-            }
-        }
+        ContinuumNotifier n = getNotifier( projectId, notifierType );
 
         if ( n != null )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
Thu Jul  7 07:44:57 2005
@@ -60,6 +60,9 @@
     void removeNotifier( Object oid )
         throws ContinuumException;
 
+    void storeNotifier( Object notifier )
+        throws ContinuumException;
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
Thu Jul  7 07:44:57 2005
@@ -175,6 +175,10 @@
         }
     }
 
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
     public void removeNotifier( Object oid )
         throws ContinuumException
     {
@@ -187,6 +191,23 @@
             throw logAndCreateException( "Error while removing notifier.", ex );
         }
     }
+
+    public void storeNotifier( Object oid )
+        throws ContinuumException
+    {
+        try
+        {
+            store.storeNotifier( oid );
+        }
+        catch ( ContinuumStoreException ex )
+        {
+            throw logAndCreateException( "Error while removing notifier.", ex );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
 
     public void updateProject( ContinuumProject project )
         throws ContinuumException

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
Thu Jul  7 07:44:57 2005
@@ -524,4 +524,26 @@
             throw new ContinuumStoreException( "Error while removing a notifier.", e );
         }
     }
+
+    public void storeNotifier( Object notifier )
+        throws ContinuumStoreException
+    {
+        try
+        {
+            store.begin();
+
+            PersistenceManager pm = store.getThreadState().getPersistenceManager();
+
+            notifier = pm.attachCopy( notifier, false );
+
+            store.commit();
+        }
+        catch ( Exception e )
+        {
+            rollback( store );
+
+            throw new ContinuumStoreException( "Error while removing a notifier.", e );
+        }
+    }
+
 }

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/CallApplicationModel.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/CallApplicationModel.java?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/CallApplicationModel.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/CallApplicationModel.java
Thu Jul  7 07:44:57 2005
@@ -67,6 +67,8 @@
 
         String expression = call.getExpression();
 
+        parameters.put( "parameters", parameters );
+
         Ognl.getValue( expression, parameters, application );
     }
 

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormicaTool.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormicaTool.java?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormicaTool.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormicaTool.java
Thu Jul  7 07:44:57 2005
@@ -172,15 +172,6 @@
         return getItem( form, element, getItem( form, id ) );
     }
 
-    // ----------------------------------------------------------------------
-    // Need to use the decomposer here
-    //
-    // Ignore if the expression is passive ... shit how to get the data
-    // from the single piece of data that holds what is needed here ...
-    // I need to have some information at the form level about what
-    // elements are affected by the transformations.
-    // ----------------------------------------------------------------------
-
     public String getItem( Form form, Element element, Object item )
         throws FormToolException
     {

Modified: maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
Thu Jul  7 07:44:57 2005
@@ -139,6 +139,11 @@
       <implementation>org.apache.maven.continuum.web.context.DefaultViewContextPopulator</implementation>
       <configuration>
         <views>
+          <!--
+           |
+           | Project Builds
+           |
+           -->
           <view>
             <id>ProjectBuilds</id>
             <scalars>
@@ -153,6 +158,24 @@
             </scalars>
           </view>
           <view>
+            <id>ProjectBuild</id>
+            <scalars>
+              <scalar>
+                <id>project</id>
+                <expression>getProject(#id)</expression>
+              </scalar>
+              <scalar>
+                <id>build</id>
+                <expression>getBuild(#buildId)</expression>
+              </scalar>
+            </scalars>
+          </view>
+          <!--
+           |
+           | Notification
+           |
+           -->
+          <view>
             <id>ProjectNotifiers</id>
             <scalars>
               <scalar>
@@ -171,15 +194,46 @@
             </scalars>
           </view>
           <view>
-            <id>ProjectBuild</id>
+            <id>ViewIrcNotifier</id>
+            <scalars>
+              <scalar>
+                <id>notifier</id>
+                <expression>getNotifier(#id,#notifierType)</expression>
+              </scalar>
+            </scalars>
+          </view>
+          <view>
+            <id>ViewMailNotifier</id>
             <scalars>
               <scalar>
+                <id>notifier</id>
+                <expression>getNotifier(#id,#notifierType)</expression>
+              </scalar>
+            </scalars>
+          </view>
+          <view>
+            <id>EditIrcNotifier</id>
+            <scalars>
+              <scalar>
+                <id>notifier</id>
+                <expression>getNotifier(#id,#notifierType)</expression>
+              </scalar>
+              <scalar>
                 <id>project</id>
                 <expression>getProject(#id)</expression>
               </scalar>
+            </scalars>
+          </view>
+          <view>
+            <id>EditMailNotifier</id>
+            <scalars>
+              <scalar>
+                <id>notifier</id>
+                <expression>getNotifier(#id,#notifierType)</expression>
+              </scalar>
               <scalar>
-                <id>build</id>
-                <expression>getBuild(#buildId)</expression>
+                <id>project</id>
+                <expression>getProject(#id)</expression>
               </scalar>
             </scalars>
           </view>
@@ -269,9 +323,18 @@
             <cid>checkoutProject</cid>
             <expression>checkoutProject(#id)</expression>
           </call>
+          <!--
+           |
+           | Notifiers
+           |
+           -->
           <call>
             <cid>deleteNotifier</cid>
             <expression>removeNotifier(#id,#notifierType)</expression>
+          </call>
+          <call>
+            <cid>updateNotifier</cid>
+            <expression>updateNotifier(#id,#notifierType,#parameters)</expression>
           </call>
         </calls>
       </configuration>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml Thu Jul
 7 07:44:57 2005
@@ -1,6 +1,7 @@
 <form>
   <id>notificationIrc</id>
   <source-role>org.apache.maven.continuum.Continuum</source-role>
+  <lookup-expression>getNotifier(#id,#notifierType)</lookup-expression>
   <elements>
     <element>
       <id>notifierType</id>
@@ -56,7 +57,8 @@
     <action>updateEntity</action>
     <view>Summary.vm</view>
     <view-on-failure>Edit.vm</view-on-failure>
-    <expression>updateAntProject(#entity)</expression>
+    <fid-on-failure>notificationIrc</fid-on-failure>
+    <expression>updateNotifier(#id,#notifierType,#parameters)</expression>
   </update>
 
 </form>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml Thu
Jul  7 07:44:57 2005
@@ -1,6 +1,7 @@
 <form>
   <id>notificationMail</id>
   <source-role>org.apache.maven.continuum.Continuum</source-role>
+  <lookup-expression>getNotifier(#id,#notifierType)</lookup-expression>  
   <elements>
     <element>
       <id>notifierType</id>

Added: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm?rev=209605&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
(added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
Thu Jul  7 07:44:57 2005
@@ -0,0 +1,39 @@
+$page.setTitle( "Continuum - IRC Notifier" )
+
+<div class="app">
+  <div id="axial" class="h3">
+    <h3>Edit IRC Notifier</h3>
+    <form method="post" action="$link">
+      #hidden ( "action" "cam" )
+      #hidden ( "cid" "updateNotifier" )
+      #hidden ( "view" "ProjectNotifiers.vm" )
+      #hidden ( "id" $project.id )
+      #hidden ( "notifierType" "irc" )
+      <div class="axial">
+        <table border="1" cellspacing="2" cellpadding="3" width="100%">
+          <tr>
+            <th>IRC Host</th>
+            <td>
+              <input type="text" name="host" value="$notifier.configuration.host" size="40"/>
+            </td>
+          </tr>
+          <tr>
+            <th>IRC Port</th>
+            <td>
+              <input type="text" name="port" value="$notifier.configuration.port" size="40"/>
+            </td>
+          </tr>
+          <tr>
+            <th>IRC Channel</th>
+            <td>
+              <input type="text" name="channel" value="$notifier.configuration.channel"
size="40"/>
+            </td>
+            ##field( $i18n $data $element $item $formtool )
+            ##validateField( $fvr $element )
+          </tr>
+        </table>
+        #submitBar( "Submit" )
+      </div>
+    </form>
+  </div>
+</div>

Added: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm?rev=209605&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
(added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
Thu Jul  7 07:44:57 2005
@@ -0,0 +1,27 @@
+$page.setTitle( "Continuum - Mail Notifier" )
+
+<div class="app">
+  <div id="axial" class="h3">
+    <h3>Edit Mail Notifier</h3>
+    <form method="post" action="$link">
+      #hidden ( "action" "cam" )
+      #hidden ( "cid" "updateNotifier" )
+      #hidden ( "view" "ProjectNotifiers.vm" )
+      #hidden ( "id" $project.id )
+      #hidden ( "notifierType" "mail" )
+      <div class="axial">
+        <table border="1" cellspacing="2" cellpadding="3" width="100%">
+          <tr>
+            <th>Mail Address</th>
+            <td>
+              <input type="text" name="address" value="$notifier.configuration.address"
size="40"/>
+            </td>
+            ##field( $i18n $data $element $item $formtool )
+            ##validateField( $fvr $element )
+          </tr>
+        </table>
+        #submitBar( "Submit" )
+      </div>
+    </form>
+  </div>
+</div>
\ No newline at end of file

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm?rev=209605&r1=209604&r2=209605&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm
Thu Jul  7 07:44:57 2005
@@ -2,15 +2,33 @@
 
 <div class="app">
   <div id="h3">
-    <h3>Continuum Projects</h3>
+    <h3>${project.name} Notifiers</h3>
     <table border="1" cellspacing="2" cellpadding="3" width="100%">
       <tr>
         <th>Notifier Type</th>
-        <th colspan="1"></th>
+        <th colspan="3"></th>
       </tr>
       #foreach ( $notifier in $project.notifiers )
       <tr class="$css.nextClass">
-        <td>$notifier.type</td>
+
+        #if ( $notifier.type == "irc" )
+        <td>IRC</td>
+        #elseif ( $notifier.type == "mail" )
+        <td>Mail</td>
+        #end
+
+        #if ( $notifier.type == "irc" )
+        <td><a href="$link.setPage('ViewIrcNotifier.vm').addPathInfo('view','ViewIrcNotifier').addPathInfo('notifierType',
$notifier.type).addPathInfo('id', $project.id)">View</a></td>
+        #elseif ( $notifier.type == "mail" )
+        <td><a href="$link.setPage('ViewMailNotifier.vm').addPathInfo('view','ViewMailNotifier').addPathInfo('notifierType',
$notifier.type).addPathInfo('id', $project.id)">View</a></td>
+        #end
+
+        #if ( $notifier.type == "irc" )
+        <td><a href="$link.setPage('EditIrcNotifier.vm').addPathInfo('view','EditIrcNotifier').addPathInfo('notifierType',
$notifier.type).addPathInfo('id', $project.id)">Edit</a></td>
+        #elseif ( $notifier.type == "mail" )
+        <td><a href="$link.setPage('EditMailNotifier.vm').addPathInfo('view','EditMailNotifier').addPathInfo('notifierType',
$notifier.type).addPathInfo('id', $project.id)">Edit</a></td>
+        #end
+
         <td><a href="$link.setPage('ProjectNotifiers.vm').addPathInfo('notifierType',
$notifier.type).addPathInfo('action','cam').addPathInfo('cid','deleteNotifier').addPathInfo('id',
$project.id)">Delete</a></td>
       </tr>
       #end

Added: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewIrcNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewIrcNotifier.vm?rev=209605&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewIrcNotifier.vm
(added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewIrcNotifier.vm
Thu Jul  7 07:44:57 2005
@@ -0,0 +1,26 @@
+$page.setTitle( "Continuum - IRC Notifier" )
+
+<div class="app">
+  <div id="axial" class="h3">
+    <h3>IRC Notifier</h3>
+    <div class="axial">
+      <table border="1" cellspacing="2" cellpadding="3" width="100%">
+        <tr class="b">
+          <th>IRC Host</th>
+          <td>$notifier.configuration.host</td>
+        </tr>
+        <tr class="b">
+          <th>IRC Port</th>
+          <td>$notifier.configuration.port</td>
+        </tr>
+        <tr class="b">
+          <th>IRC Channel</th>
+          <td>$notifier.configuration.channel</td>
+        </tr>
+      </table>
+    </div>
+    <div class="functnbar3">
+      <a href="$link.setPage('ProjectNotifiers.vm').addPathInfo('view','ProjectNotifiers').addPathInfo('id',$data.parameters.getString("id"))">Back
to Notifiers</a>
+    </div>
+  </div>
+</div>
\ No newline at end of file

Added: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewMailNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewMailNotifier.vm?rev=209605&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewMailNotifier.vm
(added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewMailNotifier.vm
Thu Jul  7 07:44:57 2005
@@ -0,0 +1,18 @@
+$page.setTitle( "Continuum - IRC Notifier" )
+
+<div class="app">
+  <div id="axial" class="h3">
+    <h3>Mail Notifier</h3>
+    <div class="axial">
+      <table border="1" cellspacing="2" cellpadding="3" width="100%">
+        <tr class="b">
+          <th>Address</th>
+          <td>$notifier.configuration.address</td>
+        </tr>
+      </table>
+    </div>
+    <div class="functnbar3">
+      <a href="$link.setPage('ProjectNotifiers.vm').addPathInfo('view','ProjectNotifiers').addPathInfo('id',$data.parameters.getString("
id"))">Back to Notifiers</a>
+    </div>
+  </div>
+</div>
\ No newline at end of file



Mime
View raw message