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/11/04 02:55:03 UTC

svn commit: r1030798 - in /activemq/activemq-apollo/trunk/apollo-web/src/main: scala/org/apache/activemq/apollo/web/resources/ webapp/WEB-INF/ webapp/WEB-INF/org/apache/activemq/apollo/dto/ webapp/WEB-INF/org/apache/activemq/apollo/web/resources/

Author: chirino
Date: Thu Nov  4 01:55:03 2010
New Revision: 1030798

URL: http://svn.apache.org/viewvc?rev=1030798&view=rev
Log:
- .json and .xml extensions will access the .json and .xml versions of the data.
- all pages now have a back button to navigate up.

Removed:
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/IndexResource.index.scaml
Modified:
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerSummaryDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectionStatusDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/HawtDBStoreStatusDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/QueueStatusDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/BrokerResource.index.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/ConfigurationResource.index.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RuntimeResource.index.scaml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala Thu Nov  4 01:55:03 2010
@@ -56,7 +56,7 @@ case class ConfigurationResource(parent:
   def post(@PathParam("rev") rev:Int, @FormParam("config") config:String) = {
     val dto = XmlCodec.unmarshalBrokerDTO(new ByteArrayInputStream(config.getBytes("UTF-8")))
     put(rev, dto)
-    seeOther(path("../"+dto.rev)).build
+    result(path("../"+dto.rev))
   }
 
   @PUT @Path("{rev}")

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala Thu Nov  4 01:55:03 2010
@@ -28,12 +28,13 @@ import org.apache.activemq.apollo.broker
 import org.apache.activemq.apollo.broker.BrokerRegistry
 import collection.JavaConversions._
 import com.sun.jersey.api.core.ResourceContext
-import org.fusesource.scalate.RenderContext
 import java.util.concurrent.TimeUnit
 import org.apache.activemq.apollo.dto._
 import java.util.{Arrays, Collections}
 import org.apache.activemq.apollo.util.Logging
 import org.fusesource.hawtdispatch._
+import java.net.URI
+import org.fusesource.scalate.{NoValueSetException, RenderContext}
 
 /**
  * Defines the default representations to be used on resources
@@ -57,6 +58,10 @@ abstract class Resource(private val pare
     throw new WebApplicationException(response.build)
   }
 
+  def result[T](uri:URI):T = {
+    throw new WebApplicationException(seeOther(uri).build)
+  }
+
   def path(value:Any) = uri_info.getAbsolutePathBuilder().path(value.toString).build()
 
 }
@@ -79,12 +84,24 @@ object ViewHelper {
 class ViewHelper {
   import ViewHelper._
 
-  lazy val uri_info = RenderContext().attribute[UriInfo]("uri_info")
+  lazy val uri_info = {
+    try {
+      RenderContext().attribute[UriInfo]("uri_info")
+    } catch {
+      case x:NoValueSetException =>
+        RenderContext().attribute[Resource]("it").uri_info
+    }
+  }
 
   def path(value:Any) = {
     uri_info.getAbsolutePathBuilder().path(value.toString).build()
   }
 
+  def strip_resolve(value:String) = {
+    uri_info.getAbsolutePath.resolve(value).toString.stripSuffix("/")
+  }
+
+
   def memory(value:Int):String = memory(value.toLong)
   def memory(value:Long):String = {
 
@@ -123,15 +140,32 @@ class ViewHelper {
  * Index resource
  */
 @Path("/")
+@Produces(Array("application/json", "application/xml","text/xml", "text/html;qs=5"))
 class IndexResource() extends Resource {
+
+  @GET
+  def get = {
+    val cs = ConfigStore()
+    val brokers = cs.dispatchQueue.sync {
+      cs.listBrokers
+    }
+    if( brokers.size==1 ) {
+      result(path("brokers/"+brokers.head+"/runtime"))
+    } else {
+      result(path("brokers"))
+    }
+  }
+
+  @Path("brokers{x:/?}")
+  def brokers = new RootResource(this)
+
 }
 
 
 /**
  * Manages a collection of broker resources.
  */
-@Path("/brokers")
-class RootResource() extends Resource {
+class RootResource(parent:Resource) extends Resource(parent) {
 
   @GET
   def brokers = {
@@ -154,7 +188,7 @@ class RootResource() extends Resource {
 /**
  * Resource that identifies a managed broker.
  */
-case class BrokerResource(parent:RootResource, @BeanProperty id: String) extends Resource(parent) {
+case class BrokerResource(parent:Resource, @BeanProperty id: String) extends Resource(parent) {
 
   @GET
   def get = {

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerDTO.scaml Thu Nov  4 01:55:03 2010
@@ -18,6 +18,9 @@
 - import org.fusesource.hawtbuf._
 - import org.apache.activemq.apollo.dto.XmlCodec._
 
+.breadcumbs
+  %a(href={strip_resolve("..")}) Back
+
 %form(method="post" action={it.rev+1})
   %div
     %input(type="submit" value="Update")

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml Thu Nov  4 01:55:03 2010
@@ -17,6 +17,10 @@
 - val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
 - import helper._
 
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
+
 %p state: #{state} for #{ uptime(state_since) }
 
 %h2 Virtual Hosts

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerSummaryDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerSummaryDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerSummaryDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerSummaryDTO.scaml Thu Nov  4 01:55:03 2010
@@ -13,6 +13,9 @@
 -# See the License for the specific language governing permissions and
 -# limitations under the License.
 
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
 -# - import it._
 -# - val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
 -# - import helper._

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectionStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectionStatusDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectionStatusDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectionStatusDTO.scaml Thu Nov  4 01:55:03 2010
@@ -17,6 +17,9 @@
 - val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
 - import helper._
 
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
 %p state: #{state} for #{ uptime(state_since) }
 %p remote address: #{remote_address}
 %p protocol: #{protocol}

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml Thu Nov  4 01:55:03 2010
@@ -12,11 +12,13 @@
 -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -# See the License for the specific language governing permissions and
 -# limitations under the License.
-
 - import it._
 - val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
 - import helper._
 
+.breadcumbs
+  %a(href={strip_resolve("..")}) Back
+
 %h1 Connector: #{config.id}
 
 %p state: #{state} for #{ uptime(state_since) }

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml Thu Nov  4 01:55:03 2010
@@ -17,6 +17,9 @@
 - val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
 - import helper._
 
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
 %h1 Destination: #{name}
 
 %h2 Queues

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/HawtDBStoreStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/HawtDBStoreStatusDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/HawtDBStoreStatusDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/HawtDBStoreStatusDTO.scaml Thu Nov  4 01:55:03 2010
@@ -18,6 +18,9 @@
 - import helper._
 - import java.util.concurrent.TimeUnit._
 
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
 %p state: #{state} for #{ uptime(state_since) }
 
 %h2 Cancel Stats

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/QueueStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/QueueStatusDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/QueueStatusDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/QueueStatusDTO.scaml Thu Nov  4 01:55:03 2010
@@ -17,6 +17,9 @@
 - val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
 - import helper._
 
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
 %h1 Queue: #{label}
 
 %h2 Current Size

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.scaml Thu Nov  4 01:55:03 2010
@@ -17,6 +17,9 @@
 - val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
 - import helper._
 
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
 %p state: #{state} for #{ uptime(state_since) }
 %p remote address: #{remote_address}
 %p protocol: #{protocol}

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml Thu Nov  4 01:55:03 2010
@@ -17,6 +17,9 @@
 - val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
 - import helper._
 
+.breadcumbs
+  %a(href={strip_resolve("..")}) Back
+
 %h1 Virtual Host: #{config.id}
 
 %p state: #{state} for #{ uptime(state_since) }

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/BrokerResource.index.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/BrokerResource.index.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/BrokerResource.index.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/BrokerResource.index.scaml Thu Nov  4 01:55:03 2010
@@ -15,13 +15,16 @@
 
 -@ import val it: org.apache.activemq.apollo.web.resources.BrokerResource
 - val broker = it.get
+- val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
+- import helper._
 
-%html
-  %body
-    %h1 Broker: #{broker.id}
-    - if (broker.configurable)
-      %p
-        %a(href={it.path("config")}) configure
-    - if (broker.manageable)
-      %p
-        %a(href={it.path("runtime")}) manage
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
+%h1 Broker: #{broker.id}
+- if (broker.configurable)
+  %p
+    %a(href={it.path("config")}) configure
+- if (broker.manageable)
+  %p
+    %a(href={it.path("runtime")}) manage

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/ConfigurationResource.index.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/ConfigurationResource.index.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/ConfigurationResource.index.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/ConfigurationResource.index.scaml Thu Nov  4 01:55:03 2010
@@ -14,7 +14,10 @@
 -# limitations under the License.
 
 -@ import val it: org.apache.activemq.apollo.web.resources.ConfigurationResource
+- val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
+- import helper._
 
-%html
-  %body
-    %h1 Broker: #{parent.id}
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
+%h1 Broker: #{parent.id}

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml Thu Nov  4 01:55:03 2010
@@ -14,11 +14,9 @@
 -# limitations under the License.
 
 -@ import val it: org.apache.activemq.apollo.web.resources.RootResource
-%html
-  %body
-    %h1 Brokers
+%h1 Brokers
 
-    %ul
-      - for( x <- brokers.items )
-        %li
-          %a(href="brokers/#{x.id}") #{x.label}
+%ul
+  - for( x <- brokers.items )
+    %li
+      %a(href="brokers/#{x.id}") #{x.label}

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RuntimeResource.index.scaml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RuntimeResource.index.scaml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RuntimeResource.index.scaml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RuntimeResource.index.scaml Thu Nov  4 01:55:03 2010
@@ -15,8 +15,11 @@
 
 -@ import val it: org.apache.activemq.apollo.web.resources.RuntimeResource
 - val broker = it.get
+- val helper = new org.apache.activemq.apollo.web.resources.ViewHelper
+- import helper._
 
-%html
-  %body
-    %h1 Broker: #{broker.config.id}
-    %p state: #{broker.state}
+.breadcumbs
+  %a(href={strip_resolve(".")}) Back
+
+%h1 Broker: #{broker.config.id}
+%p state: #{broker.state}

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml?rev=1030798&r1=1030797&r2=1030798&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml Thu Nov  4 01:55:03 2010
@@ -60,6 +60,11 @@
       <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
       <param-value>true</param-value>
     </init-param>
+    <init-param>
+      <param-name>com.sun.jersey.config.property.MediaTypeMappings</param-name>
+      <param-value>html : text/html, xml : application/xml, json : application/json</param-value>
+    </init-param>
+
   </filter>
 
   <filter-mapping>
@@ -76,10 +81,6 @@
     <url-pattern>/*</url-pattern>
   </filter-mapping>
 
-  <welcome-file-list>
-    <welcome-file>index</welcome-file>
-  </welcome-file-list>
-
   <error-page>
     <error-code>500</error-code>
     <location>/WEB-INF/scalate/errors/500.scaml</location>