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:21:23 UTC

svn commit: r961211 - in /activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp: ./ WEB-INF/scalate/ WEB-INF/scalate/errors/ WEB-INF/scalate/layouts/ css/ css/scalate/

Author: chirino
Date: Wed Jul  7 04:21:23 2010
New Revision: 961211

URL: http://svn.apache.org/viewvc?rev=961211&view=rev
Log:
adding more pages

Added:
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/errors/
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/errors/500.scaml
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/layouts/
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/scalate/
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/scalate/errors.css
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/style.css
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/favicon.ico
    activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/index.scaml

Added: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/errors/500.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/errors/500.scaml?rev=961211&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/errors/500.scaml (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/errors/500.scaml Wed Jul  7 04:21:23 2010
@@ -0,0 +1,81 @@
+- import util.parsing.input.Position
+- import org.fusesource.scalate._
+- import org.fusesource.scalate.console._
+- val consoleHelper = new ConsoleHelper(context)
+- import consoleHelper._
+
+-# Wrap in a try catch block so if there is a error on this page it gets logged to the console
+- try
+  %link(href={uri("/css/scalate/errors.css")} rel="stylesheet" type="text/css")
+
+  - def displayError(file:String, pos:Position, message:String)
+    .header.block
+      %h1
+        = message
+
+    .details.block
+      %h2
+        = editLink(file, pos.line, pos.column)
+          in #{shorten(file)} near line #{pos.line} col #{pos.column}
+
+      - for (s <- lines(file, pos))
+        - val ss = s.style(pos.line)
+        = editLink(file, s.line, (if (pos.line == s.line) pos.column else 1))
+          %div(class=ss)
+            %span.lineNumber
+              = s.line
+            - if (pos.line == s.line)
+              - val (prefix, ch, postfix) = s.splitOnCharacter(pos.column - 1)
+              %pre<
+                &~ prefix
+                %span.errorCol><
+                  &~ ch
+                &~ postfix
+            - else
+              %pre<
+                &~ s.source
+
+  - def displayException(e:Throwable)
+    .header.block
+      %h1
+        = e.getMessage
+      %p
+        = e
+    .details.block
+      - for( stack <- e.getStackTrace )
+        = renderStackTraceElement(stack)
+      - if( e.getCause!=null )
+        .nested
+          - displayException(e.getCause)
+
+  #scalate-error
+    - exception match
+      - case e:InvalidSyntaxException =>
+        - displayError( e.template, e.pos, e.brief)
+
+      - case e:CompilerException =>
+        - for ( error <- e.errors )
+          - displayError(error.file, error.pos, error.message)
+          - val o = error.original
+          - if (o != null)
+            .section.block
+              = editLink(o.file, o.pos.line, o.pos.column)
+                from generated #{shorten(o.file)} near line #{o.pos.line} col #{o.pos.line}
+
+      - case e:Throwable =>
+        - displayException(e)
+
+      - case u =>
+        .header.block
+          %h1
+            = errorMessage
+          %p
+            = u
+- catch
+  - case e:Throwable=>
+  - e.printStackTrace
+  -# Fallback to a simple rendering of the error message
+  .header.block
+    %h1
+      = errorMessage
+

Added: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml?rev=961211&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml Wed Jul  7 04:21:23 2010
@@ -0,0 +1,37 @@
+!!! Basic
+-@ var body: String
+-@ var title : String = "ActiveMQ Appollo Web Console"
+- response.setContentType("text/html") 
+%html(lang="en")
+  %head
+    %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
+    %meta(name="description" content="ActiveMQ Apollo Web Console")
+    %meta(name="keywords" content="ActiveMQ,Apollo,Console")
+    %meta(name="author" content="Apache Software Foundation")
+
+    / = include("/org/fusesource/scalate/console/console_head.scaml")
+
+    %link(href={uri("/css/style.css")} rel="stylesheet" type="text/css")
+    / %link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css")
+    %title
+      = title
+  
+  %body
+    #navigation
+      .wrapper
+        %ul
+          %li
+            - if (requestURI.startsWith("/index."))
+              %span Home
+            - else
+              %a(href={uri("/index.scaml")}) Home
+
+    #content
+      .wrapper
+        !~~ body
+    
+    #footer
+      .wrapper
+        %hr
+        / = include("/org/fusesource/scalate/console/console.scaml")
+        
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/scalate/errors.css
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/scalate/errors.css?rev=961211&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/scalate/errors.css (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/scalate/errors.css Wed Jul  7 04:21:23 2010
@@ -0,0 +1,97 @@
+/* based on the PlayFramework's CSS so it looks the same as when folks get errors in Play - thanks folks! */
+html, body {
+    margin: 0;
+    padding: 0;
+    font-family: Helvetica, Arial, Sans;
+    background: #EEEEEE;
+}            
+.block {
+    padding: 20px;
+    border-bottom: 1px solid #aaa;
+}
+#scalate-error .header h1 {
+    font-weight: normal;
+    font-size: 28px;
+    margin: 0;
+}
+#scalate-error .more {
+    color: #666;
+    font-size: 80%;
+    border: none;
+}
+#scalate-error .header {
+    background: #fcd2da;
+}
+#scalate-error .header p {
+    color: #333;
+}
+#scalate-error .details {
+    background: #f6f6f6;
+}
+#scalate-error .details h2 {
+    font-weight: normal;
+    font-size: 18px;
+    margin: 0 0 10px 0;
+}
+#scalate-error .details .lineNumber {
+    float: left;
+    display: block;
+    width: 40px;
+    text-align: right;
+    margin-right: 10px;
+    font-size: 14px;
+    font-family: monospace;
+    background: #333;
+    color: #fff;
+}
+#scalate-error .details .line {
+    clear: both;
+    color: #333;
+    margin-bottom: 1px;
+}
+#scalate-error .details pre {
+    font-size: 14px;
+    margin: 0;
+    overflow-x: hidden;
+}
+#scalate-error .details .error {
+    color: #c00 !important;
+}
+#scalate-error .details .error .lineNumber {
+    background: #c00;
+}
+#scalate-error .details .errorCol {
+    background: #c00;
+    color:#fff;
+}
+#scalate-error .details a {
+    text-decoration: none;
+}
+#scalate-error .details a:hover * {
+    cursor: pointer !important;
+}
+#scalate-error .details a:hover pre {
+    background: #FAFFCF !important;
+}
+
+#scalate-error .details .stacktrace {
+    clear: both;
+    color: #333;
+    margin-bottom: 1px;
+    font-size: 10px;  
+}
+
+#scalate-error .nested {
+  padding-top:10px;
+  padding-left:10px;
+}
+
+#scalate-error .nested .block {
+  padding:10px;
+}
+#scalate-error .nested .header {
+  font-size:10px;
+}
+#scalate-error .nested .header h1 {
+  font-size:16px;
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/style.css
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/style.css?rev=961211&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/style.css (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/css/style.css Wed Jul  7 04:21:23 2010
@@ -0,0 +1,120 @@
+body, html {
+    font-family:Arial,Verdana,Helvetica,sans-serif;
+    color: #666666;
+}
+body, html, table, tr, td, tbody {
+    padding:0;
+    margin:0;
+    vertical-align: top;
+}
+body {
+    padding-top: 20px;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    overflow: visible;
+    color: #993333;
+}
+
+/*
+h1 {
+	margin-top: 0em;
+    margin-bottom: 2em;
+}
+*/
+
+p { margin-bottom:0px; }
+
+a {
+	color: #990000;
+	font-weight:bold;
+	text-decoration: none;
+}
+
+a:hover {
+	color: #ff3333;
+	text-decoration: underline;
+	}
+
+img {
+	border: none;
+/*
+	padding-right:2em
+*/
+}
+
+.wrapper { min-width: 762px; width: 762px; margin: 0 auto; }
+
+#navigation { width: 100%; float: left;
+    font-family: Helvetica,Verdana,Arial,sans-serif;
+    background: black;
+	text-align:center; padding: 8px;
+    color: #b55;
+	font-size: 10pt;
+	font-weight: bold;
+  position: absolute;
+    top: 0px;
+}
+#navigation a { color: white; }
+#navigation ul { display: block; margin:0; padding:0; }
+#navigation li { list-style-type: none; display: inline; margin:0 5px 0 5px;}
+
+#overview { width: 100%; padding-top:20px}
+#overview div.message {
+    font-size: 11pt;
+    margin-top: -20px;
+    padding-left: 120px;
+    width: 350px;
+}
+#overview div.message h1{ margin-bottom: 5px; display:none; }
+#overview div.message p{ margin-top: 0px; padding-bottom:14px; }
+
+#content { width: 100%; float: left; }
+#content .wrapper { min-width: 700px; width: 700px; margin: 0 auto; padding-top: 1em}
+#content div.left {
+  float:left;
+  width:200px;
+  text-align:right;
+  font-size: 18pt;
+  clear:both;
+}
+#content h1 {
+  font-size: 18pt;
+}
+#content div.right {
+  float:right;
+  width:450px;
+  text-align:left;
+}
+
+#blog { width: 100%; float: left; }
+#blog .wrapper { min-width: 600px; width: 600px; margin: 0 auto; }
+#blog h1 {
+  font-family: HelveticaNeue,"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;
+  font-size: 18pt; color: #993333;
+}
+#blog h2 {
+  border-bottom: thin dashed #DDD;
+  font-size: 16pt;
+  margin-bottom: 5px;
+}
+#blog div.post p {
+  padding-left: 10px;
+}
+#blog div.post .details {
+  padding-top: 5px;
+  color: #ccc;
+  font-size: 10pt;
+  font-family: HelveticaNeue,"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;
+}
+
+#content .post h2 {
+  margin-bottom:5px;
+}
+#content .post .details {
+  color: #ccc;
+  font-size: 10pt;
+  font-family: HelveticaNeue,"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;
+  margin-top:0px;
+}
+

Added: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/favicon.ico
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/favicon.ico?rev=961211&view=auto
==============================================================================
Files activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/favicon.ico (added) and activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/favicon.ico Wed Jul  7 04:21:23 2010 differ

Added: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/index.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/index.scaml?rev=961211&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/index.scaml (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/index.scaml Wed Jul  7 04:21:23 2010
@@ -0,0 +1,4 @@
+%h1 ActiveMQ Apollo
+%p
+  %a(href="brokers") Brokers
+