You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2010/07/07 06:19:01 UTC

svn commit: r961203 - in /activemq/sandbox/activemq-apollo-actor/activemq-web: pom.xml src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Root.index.scaml

Author: chirino
Date: Wed Jul  7 04:19:00 2010
New Revision: 961203

URL: http://svn.apache.org/viewvc?rev=961203&view=rev
Log:
minor tweaks to make the web UI work at http://localhost:8080/brokers

Modified:
    activemq/sandbox/activemq-apollo-actor/activemq-web/pom.xml
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Root.index.scaml

Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/pom.xml?rev=961203&r1=961202&r2=961203&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/pom.xml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/pom.xml Wed Jul  7 04:19:00 2010
@@ -44,6 +44,12 @@
     <!-- Web Framework APIs -->
     <dependency>
       <groupId>org.fusesource.scalate</groupId>
+      <artifactId>scalate-war</artifactId>
+      <version>${scalate-version}</version>
+      <type>war</type>
+    </dependency>
+    <dependency>
+      <groupId>org.fusesource.scalate</groupId>
       <artifactId>scalate-guice</artifactId>
       <version>${scalate-version}</version>
     </dependency>

Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala?rev=961203&r1=961202&r2=961203&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala Wed Jul  7 04:19:00 2010
@@ -30,13 +30,14 @@ import org.apache.activemq.apollo.dto.{I
 import java.util.{Arrays, Collections}
 import org.apache.activemq.apollo.web.ConfigStore
 import org.apache.activemq.apollo.broker.BrokerRegistry
+import collection.JavaConversions._
 
 /**
  * Defines the default representations to be used on resources
  */
 @ImplicitProduces(Array("text/html;qs=5"))
 @Produces(Array("application/json", "application/xml","text/xml"))
-trait Resource extends Logging {
+abstract class Resource extends Logging {
 
   def result[T](value:Status, message:Any=null):T = {
     val response = Response.status(value)
@@ -55,17 +56,17 @@ trait Resource extends Logging {
 class Root() extends Resource {
 
   @GET
-  def brokers = {
+  def brokers: Seq[String] = {
     val rc = new IdListDTO
     val ids = Future[List[String]] { cb=>
       ConfigStore().listBrokers(cb)
     }.toArray[String]
     rc.ids.addAll(Arrays.asList(ids: _*))
-    rc
+    rc.ids
   }
 
   @Path("{id}")
-  def brokers(@PathParam("id") id : String): Broker = new Broker(this, id)
+  def broker(@PathParam("id") id : String): Broker = new Broker(this, id)
 }
 
 /**

Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Root.index.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Root.index.scaml?rev=961203&r1=961202&r2=961203&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Root.index.scaml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Root.index.scaml Wed Jul  7 04:19:00 2010
@@ -5,6 +5,6 @@
     %h1 Brokers
 
     %ul
-      - for( broker <- brokers )
+      - for( brokerId <- brokers )
         %li
-          %a(href="#{broker.id}") #{broker.id}
+          %a(href="brokers/#{brokerId}") #{brokerId}