activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r961204 - in /activemq/sandbox/activemq-apollo-actor/activemq-web/src/main: scala/org/apache/activemq/apollo/web/resources/ webapp/WEB-INF/org/apache/activemq/apollo/web/resources/
Date Wed, 07 Jul 2010 04:19:10 GMT
Author: chirino
Date: Wed Jul  7 04:19:09 2010
New Revision: 961204

URL: http://svn.apache.org/viewvc?rev=961204&view=rev
Log:
starting to flesh out the html interfaces..

Added:
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Broker.index.scaml
Modified:
    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/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=961204&r1=961203&r2=961204&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:09 2010
@@ -19,7 +19,7 @@ package org.apache.activemq.apollo.web.r
 import java.lang.String
 import com.sun.jersey.api.NotFoundException
 import javax.ws.rs._
-import core.{Response, Context}
+import core.{UriInfo, Response, Context}
 import org.fusesource.scalate.util.Logging
 import reflect.{BeanProperty}
 import com.sun.jersey.api.view.ImplicitProduces
@@ -39,6 +39,9 @@ import collection.JavaConversions._
 @Produces(Array("application/json", "application/xml","text/xml"))
 abstract class Resource extends Logging {
 
+  @Context
+  val uri_info:UriInfo = null
+
   def result[T](value:Status, message:Any=null):T = {
     val response = Response.status(value)
     if( message!=null ) {
@@ -56,13 +59,13 @@ abstract class Resource extends Logging 
 class Root() extends Resource {
 
   @GET
-  def brokers: Seq[String] = {
+  def brokers = {
     val rc = new IdListDTO
     val ids = Future[List[String]] { cb=>
       ConfigStore().listBrokers(cb)
     }.toArray[String]
     rc.ids.addAll(Arrays.asList(ids: _*))
-    rc.ids
+    rc
   }
 
   @Path("{id}")

Added: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Broker.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/Broker.index.scaml?rev=961204&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Broker.index.scaml
(added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/Broker.index.scaml
Wed Jul  7 04:19:09 2010
@@ -0,0 +1,19 @@
+!!!
+-@ val it: org.apache.activemq.apollo.web.resources.Broker
+- val broker = it.get
+- import broker._
+
+%html
+  %body
+    %h1 Broker: #{id}
+    - if (configurable)
+      %p
+        %a(href="config") configure
+    - if (manageable)
+      %p
+        %a(href="runtime") manage
+        
+    - if ( it.uri_info == null )
+      %p
+        Oh my... uri_info is null
+    
\ No newline at end of file

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=961204&r1=961203&r2=961204&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:09 2010
@@ -5,6 +5,6 @@
     %h1 Brokers
 
     %ul
-      - for( brokerId <- brokers )
+      - for( brokerId <- brokers.ids )
         %li
           %a(href="brokers/#{brokerId}") #{brokerId}



Mime
View raw message