added table class to get bootstrap style

- import models.Person
- val people = List(Person("James", "Denver"), Person("Hiram", "Lakewood"), Person("Bob", "Lancaster"))
%table.table
	%tr
		%th Name
		%th Location
	- for (person <- people)
		%tr
			%td = person.name
			%td = person.location

- import models.Person
- val people = List(Person("James", "Denver"), Person("Hiram", "Lakewood"), Person("Bob", "Lancaster"))
%table
	%tr
		%th Name
		%th Location
	- for (person <- people)
		%tr
			%td = person.name
			%td = person.location


Update 500.scaml to import scala.util.parsing.input.Position by full name instead of relative package.

-#
-# Copyright (C) 2009-2011 the original author or authors.
-# See the notice.md file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-#
- if ( !engine.isDevelopmentMode )
  .scalate-error-500
    %h1 Server Error: We're sorry, but something went wrong.
    %p We've been notified about this issue and we'll take a look at it shortly.

- else
  - import scala.util.parsing.input.Position
  - import org.fusesource.scalate._
  - import org.fusesource.scalate.console._
  - val consoleHelper = new ConsoleHelper(context)
  - import consoleHelper._
  - response.setContentType("text/html")
  - attributes("layout") = ""
  !!! Basic
  %html(lang="en")
    %head
      %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
      %meta(name="keywords" content="error")
      %title Unexpected Failure
      %style(type="text/css")
        :plain
          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;
          }
    %body
      #content
        .wrapper
          -# 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

-#
-# Copyright (C) 2009-2011 the original author or authors.
-# See the notice.md file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-#
- if ( !engine.isDevelopmentMode )
  .scalate-error-500
    %h1 Server Error: We're sorry, but something went wrong.
    %p We've been notified about this issue and we'll take a look at it shortly.

- else
  - import util.parsing.input.Position
  - import org.fusesource.scalate._
  - import org.fusesource.scalate.console._
  - val consoleHelper = new ConsoleHelper(context)
  - import consoleHelper._
  - response.setContentType("text/html")
  - attributes("layout") = ""
  !!! Basic
  %html(lang="en")
    %head
      %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
      %meta(name="keywords" content="error")
      %title Unexpected Failure
      %style(type="text/css")
        :plain
          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;
          }
    %body
      #content
        .wrapper
          -# 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


update menu model

update menu model

- import models.Menu
- import services.MenuService
- val test = MenuService.getMenuJson("header")

- val navbar = List(Menu(0,"About", "#about"), Menu(1,"Contact", "#contact"), Menu(2,"More", "#more"))

-# TODO: Use service at /menu/:menuName.json to get header menu

.navbar.navbar-fixed-top.navbar-inverse{:role => "navigation"}
	.container
		/ #{test}
		.navbar-header
			%button.navbar-toggle{:type => "button", "data-toggle" => "collapse", "data-target" => ".nav-collapse"}
				%span.sr-only Toggle navigation
				%span.icon-bar
				%span.icon-bar
				%span.icon-bar
			%a.navbar-brand{:href => "/"} Test Project
		.navbar-collapse.collapse
			%ul.nav.navbar-nav
				- for (item <- navbar)
					%li
						%a{:href => {item.url}} = item.displayName

- import models.Menu
- import services.MenuService
- val test = MenuService.getMenuJson("header")

- val navbar = List(Menu("About", "#about"), Menu("Contact", "#contact"), Menu("More", "#more"))

-# TODO: Use service at /menu/:menuName.json to get header menu

.navbar.navbar-fixed-top.navbar-inverse{:role => "navigation"}
	.container
		/ #{test}
		.navbar-header
			%button.navbar-toggle{:type => "button", "data-toggle" => "collapse", "data-target" => ".nav-collapse"}
				%span.sr-only Toggle navigation
				%span.icon-bar
				%span.icon-bar
				%span.icon-bar
			%a.navbar-brand{:href => "/"} Test Project
		.navbar-collapse.collapse
			%ul.nav.navbar-nav
				- for (item <- navbar)
					%li
						%a{:href => {item.url}} = item.displayName


Fix "intended too shallow" error.

Fix "intended too shallow" error.

%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}

-@ val content: String

<p>#{content}</p>

- for(i <- 1 to 3)
  %p= i


removed bootstrap.css - now in main.css

removed bootstrap.css - now in main.css

-@ var title: String = "Defaul Title"
-@ var headline: String = title
-@ var body: String
-@ var zip: String = "Home Zip"

!!!
%html
	%head
		%title #{title}
		%meta{:charset => "utf-8"}
		%meta{"http-equiv" => "X-UA-Compatible", :content => "IE=edge"}
		%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
		%link{:href => "css/compiled/main.css", :rel => "stylesheet"}
		%link{:href => "css/starter-template.css", :rel => "stylesheet"}
		/ HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries
		/[if lt IE 9]
			%script{:type => "text/javascript",:src  => "https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"}
			%script{:type => "text/javascript",:src  => "https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"}
	%body
		- render("/layouts/navbar.scaml")
		.container
			%header
				%h1
					#{headline}
					%span.glyphicon.glyphicon-glass
			%section
				!= body
			%footer #{zip}
		/ jQuery (necessary for Bootstrap's JavaScript plugins)
		%script{:type => "text/javascript",:src  => "https://code.jquery.com/jquery.js"}
		/ Include all compiled plugins (below), or include individual files as needed
		%script{:type => "text/javascript",:src  => "js/compiled/bootstrap.js"}
		%script
			$('a').tooltip()

-@ var title: String = "Defaul Title"
-@ var headline: String = title
-@ var body: String
-@ var zip: String = "Home Zip"

!!!
%html
	%head
		%title #{title}
		%meta{:charset => "utf-8"}
		%meta{"http-equiv" => "X-UA-Compatible", :content => "IE=edge"}
		%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
		%link{:href => "css/compiled/bootstrap.css", :rel => "stylesheet"}
		%link{:href => "css/starter-template.css", :rel => "stylesheet"}
		/ HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries
		/[if lt IE 9]
			%script{:type => "text/javascript",:src  => "https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"}
			%script{:type => "text/javascript",:src  => "https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"}
	%body
		- render("/layouts/navbar.scaml")
		.container
			%header
				%h1
					#{headline}
					%span.glyphicon.glyphicon-glass
			%section
				!= body
			%footer #{zip}
		/ jQuery (necessary for Bootstrap's JavaScript plugins)
		%script{:type => "text/javascript",:src  => "https://code.jquery.com/jquery.js"}
		/ Include all compiled plugins (below), or include individual files as needed
		%script{:type => "text/javascript",:src  => "js/compiled/bootstrap.js"}
		%script
			$('a').tooltip()


Started to add some html

Started to add some html

- attributes("title") = "Gregory Boucher - Web: [Product, Engineering], Problem Solver, Project Specialist"
- attributes("headline") = "Gregory Boucher"
- attributes("tagline") = "Solving problems for users and companies"

%section.first
    %dl
        %dt Gregory Boucher (\ˈgre-g(ə-)rē\  \bü-ˈshā\)
        %dd Adaptable...
        %dd Problem solver can ...
        %dd Engineer with experience in...
        %dd Cultural leader
        %dt ex of Gregory Boucher
        %dd I need to better understand the viability of this business line
        %dd I want someone who can come in and quickly get up to speed
        %dd I am looking for a utility player who can fill multiple roles.
        %dd I want to make sure the people we hire fit culturally

.box
    - render("/views/show-table.scaml")

- attributes("title") = "More Complex"
- attributes("headline") = "Calling another tempalte"

%a{:href => "#", :title => "First Tooltip", "data-toggle" => "tooltip"} Tooltip

.box
	- render("/views/show-table.scaml")


SAMZA-290; refreshing yarn am keeps page now

-#
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, 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.
-@ val state: org.apache.samza.job.yarn.SamzaAppMasterState
-@ val config: scala.collection.immutable.TreeMap[String, String]
-@ val rmHttpAddress: String
-@ val jobName: String = config.get("job.name").getOrElse("MISSING JOB NAME")
-@ val username: String = org.apache.hadoop.security.UserGroupInformation.getCurrentUser.getShortUserName
- attributes("title") = jobName

%div.col-xs-2.menu
  %ul.nav.nav-pills.nav-stacked
    %li.active
      %a(href="#application-master" data-toggle="tab") Application Master
    %li
      %a(href="#containers" data-toggle="tab") Containers
    %li
      %a(href="#task-groups" data-toggle="tab") Task Groups
    %li
      %a(href="#config" data-toggle="tab") Config

%div.col-xs-10
  %div.page-header
    %h1= jobName

  %div.tab-content
    %div.tab-pane.active#application-master
      %h2 Application Master
      %table.table.table-striped.table-bordered
        %tbody
          %tr
            %td.key Hostname
            %td
              %a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}")= state.nodeHost
          %tr
            %td.key User
            %td= username
          %tr
            %td.key Tracking port
            %td= state.trackingPort.toString
          %tr
            %td.key RPC port
            %td= state.rpcPort.toString
          %tr
            %td.key Attempt ID
            %td= state.appAttemptId
          %tr
            %td.key Application master task ID
            %td= state.taskId
          %tr
            %td.key Application master container
            %td
              %a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}/node/containerlogs/#{state.containerId.toString}/#{username}")= state.containerId.toString

    %div.tab-pane#containers
      %h2 Containers
      %table.table.table-bordered.table-striped
        %tr
          %tr
            %td.key Completed
            %td= state.completedTasks.toString
          %tr
            %td.key Needed
            %td= state.neededContainers.toString
          %tr
            %td.key Failed
            %td= state.failedContainers.toString
          %tr
            %td.key Released
            %td= state.releasedContainers.toString

      %h2 Running Containers
      %table.table.table-striped.table-bordered.tablesorter#containers-table
        %thead
          %tr
            %th Task Group
            %th Container
            %th Node
            %th Start Time
            %th Up Time
        %tbody
          - for((taskId, container) <- state.runningTasks)
            %tr
              %td #{taskId.toString}
              %td
                %a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString
              %td
                %a(target="_blank" href="http://#{container.nodeHttpAddress}")= container.nodeHttpAddress
              %td
                Start time: #{container.startTimeStr()}
              %td
                Up time: #{container.upTimeStr()}

    %div.tab-pane#task-groups
      %h2 Task Groups
      %table.table.table-striped.table-bordered
        %tbody
          %tr
            %td.key Total
            %td= state.taskCount.toString
          %tr
            %td.key Unclaimed
            %td= state.unclaimedTasks.size.toString
          %tr
            %td.key Finished
            %td= state.finishedTasks.size.toString

      %h3 TaskName Assignment
      %table.table.table-striped.table-bordered.tablesorter#taskids-table
        %thead
          %tr
            %th Task ID
            %th TaskName
            %th SystemStreamPartitions
            %th Container
        %tbody
          - for((taskId, taskNames) <- state.taskToTaskNames)
            - for((taskName, ssps) <- taskNames)
              %tr
                %td= taskId
                %td= taskName
                %td= ssps.map(_.toString).toList.sorted.mkString(", ")
                %td
                  - val container = state.runningTasks(taskId)
                  %a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString

    %div.tab-pane#config
      %h2 Config
      %div.panel.panel-default
        %div.panel-heading
          %input.form-control#config-table-filter(type="text" placeholder="Type '/' to search")
        %table.table.table-striped.table-bordered.tablesorter#config-table
          %thead
            %tr
              %th Key
              %th Value
          %tbody.searchable
            - for(entrySet <- new java.util.TreeMap[String, String](config.asInstanceOf[Map[String, String]]).entrySet)
              %tr
                %td.key= entrySet.getKey
                %td= entrySet.getValue

    :javascript
      $(document).ready(function() {
        // Persist tabs.
        if (location.hash !== '') {
          $('a[href="' + location.hash + '"]').tab('show');
        }
        $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
          return location.hash = $(e.target).attr('href').substr(1);
        });

        // Make tables sortable.
        $('#containers-table').tablesorter();
        $('#taskids-table').tablesorter();
        $('#config-table').tablesorter();

        // Type '/' to search.
        $(document).keyup(function(e) {
          if (e.keyCode == 191 && $('#config').is(':visible')) {
            $('#config-table-filter').focus();
          }
        });

        // Make config table searchable.
        $('#config-table-filter').keyup(function(e) {
          // Press ESC to exit search box.
          if (e.keyCode == 27) {
            $('#config-table-filter').blur();
          }
          var regex = new RegExp($(this).val(), 'i');
          $('.searchable tr').hide();
          $('.searchable tr').filter(function() {
            return regex.test($(this).text());
          }).show();
        });
      });

-#
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, 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.
-@ val state: org.apache.samza.job.yarn.SamzaAppMasterState
-@ val config: scala.collection.immutable.TreeMap[String, String]
-@ val rmHttpAddress: String
-@ val jobName: String = config.get("job.name").getOrElse("MISSING JOB NAME")
-@ val username: String = org.apache.hadoop.security.UserGroupInformation.getCurrentUser.getShortUserName
- attributes("title") = jobName

%div.col-xs-2.menu
  %ul.nav.nav-pills.nav-stacked
    %li.active
      %a(href="#application-master" data-toggle="tab") Application Master
    %li
      %a(href="#containers" data-toggle="tab") Containers
    %li
      %a(href="#task-groups" data-toggle="tab") Task Groups
    %li
      %a(href="#config" data-toggle="tab") Config

%div.col-xs-10
  %div.page-header
    %h1= jobName

  %div.tab-content
    %div.tab-pane.active#application-master
      %h2 Application Master
      %table.table.table-striped.table-bordered
        %tbody
          %tr
            %td.key Hostname
            %td
              %a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}")= state.nodeHost
          %tr
            %td.key User
            %td= username
          %tr
            %td.key Tracking port
            %td= state.trackingPort.toString
          %tr
            %td.key RPC port
            %td= state.rpcPort.toString
          %tr
            %td.key Attempt ID
            %td= state.appAttemptId
          %tr
            %td.key Application master task ID
            %td= state.taskId
          %tr
            %td.key Application master container
            %td
              %a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}/node/containerlogs/#{state.containerId.toString}/#{username}")= state.containerId.toString

    %div.tab-pane#containers
      %h2 Containers
      %table.table.table-bordered.table-striped
        %tr
          %tr
            %td.key Completed
            %td= state.completedTasks.toString
          %tr
            %td.key Needed
            %td= state.neededContainers.toString
          %tr
            %td.key Failed
            %td= state.failedContainers.toString
          %tr
            %td.key Released
            %td= state.releasedContainers.toString

      %h2 Running Containers
      %table.table.table-striped.table-bordered.tablesorter#containers-table
        %thead
          %tr
            %th Task Group
            %th Container
            %th Node
            %th Start Time
            %th Up Time
        %tbody
          - for((taskId, container) <- state.runningTasks)
            %tr
              %td #{taskId.toString}
              %td
                %a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString
              %td
                %a(target="_blank" href="http://#{container.nodeHttpAddress}")= container.nodeHttpAddress
              %td
                Start time: #{container.startTimeStr()}
              %td
                Up time: #{container.upTimeStr()}

    %div.tab-pane#task-groups
      %h2 Task Groups
      %table.table.table-striped.table-bordered
        %tbody
          %tr
            %td.key Total
            %td= state.taskCount.toString
          %tr
            %td.key Unclaimed
            %td= state.unclaimedTasks.size.toString
          %tr
            %td.key Finished
            %td= state.finishedTasks.size.toString

      %h3 TaskName Assignment
      %table.table.table-striped.table-bordered.tablesorter#taskids-table
        %thead
          %tr
            %th Task ID
            %th TaskName
            %th SystemStreamPartitions
            %th Container
        %tbody
          - for((taskId, taskNames) <- state.taskToTaskNames)
            - for((taskName, ssps) <- taskNames)
              %tr
                %td= taskId
                %td= taskName
                %td= ssps.map(_.toString).toList.sorted.mkString(", ")
                %td
                  - val container = state.runningTasks(taskId)
                  %a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString

    %div.tab-pane#config
      %h2 Config
      %div.panel.panel-default
        %div.panel-heading
          %input.form-control#config-table-filter(type="text" placeholder="Type '/' to search")
        %table.table.table-striped.table-bordered.tablesorter#config-table
          %thead
            %tr
              %th Key
              %th Value
          %tbody.searchable
            - for(entrySet <- new java.util.TreeMap[String, String](config.asInstanceOf[Map[String, String]]).entrySet)
              %tr
                %td.key= entrySet.getKey
                %td= entrySet.getValue

    :javascript
      $(document).ready(function() {
        $('#containers-table').tablesorter();
        $('#taskids-table').tablesorter();
        $('#config-table').tablesorter();

        // Type '/' to search.
        $(document).keyup(function(e) {
          if (e.keyCode == 191 && $('#config').is(':visible')) {
            $('#config-table-filter').focus();
          }
        });

        $('#config-table-filter').keyup(function(e) {
          // Press ESC to exit search box.
          if (e.keyCode == 27) {
            $('#config-table-filter').blur();
          }
          var regex = new RegExp($(this).val(), 'i');
          $('.searchable tr').hide();
          $('.searchable tr').filter(function() {
            return regex.test($(this).text());
          }).show();
        });
      });


Fix layout

Fix layout

!!!
%html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en")
  %head
    %meta(content="text/html; charset=utf-8" http-equiv="content-type")

    %title= at("title")

    %link(type="image/vnd.microsoft.icon" rel="shortcut icon" href="/static/img/favicon.ico")

    %link(type="text/css" rel="stylesheet" media="all" href="/static/css/960/reset.css")
    %link(type="text/css" rel="stylesheet" media="all" href="/static/css/960/text.css")
    %link(type="text/css" rel="stylesheet" media="all" href="/static/css/960/960.css")
    %link(type="text/css" rel="stylesheet" media="all" href="/static/css/application.css")

    %script(type="text/javascript" src="/static/js/jquery-1.4.2.min.js")

  %body
    .container_12
      #header
        %h1 Colinh

      #content.grid_9
        != at("content_for_layout")

      #menu.grid_3
        Menu goes here

      .clear

      #footer Powered by Colinh & Xitrum

!!!
%html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en")
  %head
    %meta(content="text/html; charset=utf-8" http-equiv="content-type")

    %title= at("title")

    %link(type="image/vnd.microsoft.icon" rel="shortcut icon" href="/static/img/favicon.ico")

    %link(type="text/css" rel="stylesheet" media="all" href="/static/css/960/reset.css")
    %link(type="text/css" rel="stylesheet" media="all" href="/static/css/960/text.css")
    %link(type="text/css" rel="stylesheet" media="all" href="/static/css/960/960.css")
    %link(type="text/css" rel="stylesheet" media="all" href="/static/css/application.css")

    %script(type="text/javascript" src="/static/js/jquery-1.4.2.min.js")

  %body
    .container_12
      #header
        %h1 Colinh

      #content.container_9
        != at("content_for_layout")

      #menu.container_3
        Menu goes here

      #footer Powered by Colinh & Xitrum


SAMZA-396; add slash for search shortcut in AM UI

-#
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, 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.
-@ val state: org.apache.samza.job.yarn.SamzaAppMasterState
-@ val config: scala.collection.immutable.TreeMap[String, String]
-@ val rmHttpAddress: String
-@ val jobName: String = config.get("job.name").getOrElse("MISSING JOB NAME")
-@ val username: String = org.apache.hadoop.security.UserGroupInformation.getCurrentUser.getShortUserName
- attributes("title") = jobName

%div.col-xs-2.menu
  %ul.nav.nav-pills.nav-stacked
    %li.active
      %a(href="#application-master" data-toggle="tab") Application Master
    %li
      %a(href="#containers" data-toggle="tab") Containers
    %li
      %a(href="#task-groups" data-toggle="tab") Task Groups
    %li
      %a(href="#config" data-toggle="tab") Config

%div.col-xs-10
  %div.page-header
    %h1= jobName

  %div.tab-content
    %div.tab-pane.active#application-master
      %h2 Application Master
      %table.table.table-striped.table-bordered
        %tbody
          %tr
            %td.key Hostname
            %td
              %a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}")= state.nodeHost
          %tr
            %td.key User
            %td= username
          %tr
            %td.key Tracking port
            %td= state.trackingPort.toString
          %tr
            %td.key RPC port
            %td= state.rpcPort.toString
          %tr
            %td.key Attempt ID
            %td= state.appAttemptId
          %tr
            %td.key Application master task ID
            %td= state.taskId
          %tr
            %td.key Application master container
            %td
              %a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}/node/containerlogs/#{state.containerId.toString}/#{username}")= state.containerId.toString

    %div.tab-pane#containers
      %h2 Containers
      %table.table.table-bordered.table-striped
        %tr
          %tr
            %td.key Completed
            %td= state.completedTasks.toString
          %tr
            %td.key Needed
            %td= state.neededContainers.toString
          %tr
            %td.key Failed
            %td= state.failedContainers.toString
          %tr
            %td.key Released
            %td= state.releasedContainers.toString

      %h2 Running Containers
      %table.table.table-striped.table-bordered.tablesorter#containers-table
        %thead
          %tr
            %th Task Group
            %th Container
            %th Node
            %th Start Time
            %th Up Time
        %tbody
          - for((taskId, container) <- state.runningTasks)
            %tr
              %td #{taskId.toString}
              %td
                %a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString
              %td
                %a(target="_blank" href="http://#{container.nodeHttpAddress}")= container.nodeHttpAddress
              %td
                Start time: #{container.startTimeStr()}
              %td
                Up time: #{container.upTimeStr()}

    %div.tab-pane#task-groups
      %h2 Task Groups
      %table.table.table-striped.table-bordered
        %tbody
          %tr
            %td.key Total
            %td= state.taskCount.toString
          %tr
            %td.key Unclaimed
            %td= state.unclaimedTasks.size.toString
          %tr
            %td.key Finished
            %td= state.finishedTasks.size.toString

      %h3 TaskName Assignment
      %table.table.table-striped.table-bordered.tablesorter#taskids-table
        %thead
          %tr
            %th Task ID
            %th TaskName
            %th SystemStreamPartitions
            %th Container
        %tbody
          - for((taskId, taskNames) <- state.taskToTaskNames)
            - for((taskName, ssps) <- taskNames)
              %tr
                %td= taskId
                %td= taskName
                %td= ssps.map(_.toString).toList.sorted.mkString(", ")
                %td
                  - val container = state.runningTasks(taskId)
                  %a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString

    %div.tab-pane#config
      %h2 Config
      %div.panel.panel-default
        %div.panel-heading
          %input.form-control#config-table-filter(type="text" placeholder="Type '/' to search")
        %table.table.table-striped.table-bordered.tablesorter#config-table
          %thead
            %tr
              %th Key
              %th Value
          %tbody.searchable
            - for(entrySet <- new java.util.TreeMap[String, String](config.asInstanceOf[Map[String, String]]).entrySet)
              %tr
                %td.key= entrySet.getKey
                %td= entrySet.getValue

    :javascript
      $(document).ready(function() {
        $('#containers-table').tablesorter();
        $('#taskids-table').tablesorter();
        $('#config-table').tablesorter();

        // Type '/' to search.
        $(document).keyup(function(e) {
          if (e.keyCode == 191 && $('#config').is(':visible')) {
            $('#config-table-filter').focus();
          }
        });

        $('#config-table-filter').keyup(function(e) {
          // Press ESC to exit search box.
          if (e.keyCode == 27) {
            $('#config-table-filter').blur();
          }
          var regex = new RegExp($(this).val(), 'i');
          $('.searchable tr').hide();
          $('.searchable tr').filter(function() {
            return regex.test($(this).text());
          }).show();
        });
      });

-#
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, 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.
-@ val state: org.apache.samza.job.yarn.SamzaAppMasterState
-@ val config: scala.collection.immutable.TreeMap[String, String]
-@ val rmHttpAddress: String
-@ val jobName: String = config.get("job.name").getOrElse("MISSING JOB NAME")
-@ val username: String = org.apache.hadoop.security.UserGroupInformation.getCurrentUser.getShortUserName
- attributes("title") = jobName

%div.col-xs-2.menu
  %ul.nav.nav-pills.nav-stacked
    %li.active
      %a(href="#application-master" data-toggle="tab") Application Master
    %li
      %a(href="#containers" data-toggle="tab") Containers
    %li
      %a(href="#task-groups" data-toggle="tab") Task Groups
    %li
      %a(href="#config" data-toggle="tab") Config

%div.col-xs-10
  %div.page-header
    %h1= jobName

  %div.tab-content
    %div.tab-pane.active#application-master
      %h2 Application Master
      %table.table.table-striped.table-bordered
        %tbody
          %tr
            %td.key Hostname
            %td
              %a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}")= state.nodeHost
          %tr
            %td.key User
            %td= username
          %tr
            %td.key Tracking port
            %td= state.trackingPort.toString
          %tr
            %td.key RPC port
            %td= state.rpcPort.toString
          %tr
            %td.key Attempt ID
            %td= state.appAttemptId
          %tr
            %td.key Application master task ID
            %td= state.taskId
          %tr
            %td.key Application master container
            %td
              %a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}/node/containerlogs/#{state.containerId.toString}/#{username}")= state.containerId.toString

    %div.tab-pane#containers
      %h2 Containers
      %table.table.table-bordered.table-striped
        %tr
          %tr
            %td.key Completed
            %td= state.completedTasks.toString
          %tr
            %td.key Needed
            %td= state.neededContainers.toString
          %tr
            %td.key Failed
            %td= state.failedContainers.toString
          %tr
            %td.key Released
            %td= state.releasedContainers.toString

      %h2 Running Containers
      %table.table.table-striped.table-bordered.tablesorter#containers-table
        %thead
          %tr
            %th Task Group
            %th Container
            %th Node
            %th Start Time
            %th Up Time
        %tbody
          - for((taskId, container) <- state.runningTasks)
            %tr
              %td #{taskId.toString}
              %td
                %a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString
              %td
                %a(target="_blank" href="http://#{container.nodeHttpAddress}")= container.nodeHttpAddress
              %td
                Start time: #{container.startTimeStr()}
              %td
                Up time: #{container.upTimeStr()}

    %div.tab-pane#task-groups
      %h2 Task Groups
      %table.table.table-striped.table-bordered
        %tbody
          %tr
            %td.key Total
            %td= state.taskCount.toString
          %tr
            %td.key Unclaimed
            %td= state.unclaimedTasks.size.toString
          %tr
            %td.key Finished
            %td= state.finishedTasks.size.toString

      %h3 TaskName Assignment
      %table.table.table-striped.table-bordered.tablesorter#taskids-table
        %thead
          %tr
            %th Task ID
            %th TaskName
            %th SystemStreamPartitions
            %th Container
        %tbody
          - for((taskId, taskNames) <- state.taskToTaskNames)
            - for((taskName, ssps) <- taskNames)
              %tr
                %td= taskId
                %td= taskName
                %td= ssps.map(_.toString).toList.sorted.mkString(", ")
                %td
                  - val container = state.runningTasks(taskId)
                  %a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString

    %div.tab-pane#config
      %h2 Config
      %div.panel.panel-default
        %div.panel-heading
          %input.form-control#config-table-filter(type="text" placeholder="Filter")
        %table.table.table-striped.table-bordered.tablesorter#config-table
          %thead
            %tr
              %th Key
              %th Value
          %tbody.searchable
            - for(entrySet <- new java.util.TreeMap[String, String](config.asInstanceOf[Map[String, String]]).entrySet)
              %tr
                %td.key= entrySet.getKey
                %td= entrySet.getValue

    :javascript
      $(document).ready(function() {
        $("#containers-table").tablesorter();
        $("#taskids-table").tablesorter();
        $("#config-table").tablesorter();
        $("#config-table-filter").keyup(function() {
          var regex = new RegExp($(this).val(), 'i');
          $('.searchable tr').hide();
          $('.searchable tr').filter(function() {
            return regex.test($(this).text());
          }).show();
        });
      });


tooltip test

tooltip test

- attributes("title") = "More Complex"
- attributes("headline") = "Calling another tempalte"

%a{:href => "#", :title => "First Tooltip", "data-toggle" => "tooltip"} Tooltip

.box
	- render("/views/show-table.scaml")

- attributes("title") = "More Complex"
- attributes("headline") = "Calling another tempalte"

%p
	The Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque at est erat. Fusce ut justo sit amet ante hendrerit adipiscing. Duis lobortis urna nec 	luctus pharetra. Fusce ac odio vel lorem rutrum mattis. Sed id odio et nisl placerat hendrerit ac non risus. Phasellus tincidunt massa ut ullamcorper 	convallis. Nulla facilisi.
%p
	Sed facilisis id dui ac tempor. Nunc malesuada commodo elit, lacinia ullamcorper lorem ornare ut. Praesent nec condimentum velit. Sed faucibus mauris 	justo, vel euismod lectus dapibus in. Etiam tincidunt ullamcorper ligula, vel laoreet tellus rutrum ac. Duis sed feugiat erat, a hendrerit ipsum. Aenean 	massa tellus, tristique ac arcu vitae, lobortis vulputate urna. Nulla ullamcorper velit in dolor hendrerit lacinia. Ut ut turpis eros. In rhoncus 	condimentum sem. Aenean non risus vel leo semper tempor non a quam. Maecenas molestie fringilla tempor. Nullam adipiscing lacus id velit vehicula, nec 	rutrum lacus consectetur. Sed eu malesuada mi.
%p
	Integer vitae massa eu quam tincidunt accumsan. Cras tristique fermentum blandit. Cras ultricies egestas pharetra. Nunc eget tincidunt nulla. Cras ac 	lectus quis mi luctus consectetur. Mauris id libero in eros cursus tincidunt eu quis felis. Vestibulum a vestibulum mi. Praesent id tincidunt lacus. 	Nunc elit nisi, commodo ut mattis vitae, posuere nec est. Etiam dapibus orci in cursus pellentesque. Phasellus vitae felis scelerisque, accumsan erat 	sed, egestas magna. Aliquam condimentum, ipsum in commodo sagittis, sapien leo faucibus magna, vel ultrices tellus enim et mauris. Fusce rutrum sit amet 	risus at consequat. Cras non varius arcu. Suspendisse dictum, sem in dignissim lobortis, neque enim accumsan justo, eu commodo lacus lorem ut turpis.
%p
	Sed est diam, commodo vitae venenatis non, commodo eget libero. Pellentesque sodales consectetur faucibus. Duis tincidunt sodales velit eget venenatis. 	In magna purus, dapibus sed enim auctor, facilisis porta orci. Donec nec velit eget dui dapibus fermentum. Nulla vitae dolor urna. Maecenas ultricies 	sem congue mauris commodo vehicula. Sed mollis adipiscing augue, a laoreet elit feugiat non. Vivamus bibendum vestibulum est sit amet sagittis. Maecenas 	vestibulum tellus ac eros luctus, quis vulputate neque viverra. Nulla sed lacus condimentum, euismod neque ac, egestas magna. Aliquam venenatis ornare leo, vestibulum eleifend enim sagittis eget. Sed sagittis massa in scelerisque lacinia. Donec nec mattis lorem.
%p
	Sed facilisis id dui ac tempor. Nunc malesuada commodo elit, lacinia ullamcorper lorem ornare ut. Praesent nec condimentum velit. Sed faucibus mauris 	justo, vel euismod lectus dapibus in. Etiam tincidunt ullamcorper ligula, vel laoreet tellus rutrum ac. Duis sed feugiat erat, a hendrerit ipsum. Aenean 	massa tellus, tristique ac arcu vitae, lobortis vulputate urna. Nulla ullamcorper velit in dolor hendrerit lacinia. Ut ut turpis eros. In rhoncus 	condimentum sem. Aenean non risus vel leo semper tempor non a quam. Maecenas molestie fringilla tempor. Nullam adipiscing lacus id velit vehicula, nec 	rutrum lacus consectetur. Sed eu malesuada mi.
%p
	Integer vitae massa eu quam tincidunt accumsan. Cras tristique fermentum blandit. Cras ultricies egestas pharetra. Nunc eget tincidunt nulla. Cras ac 	lectus quis mi luctus consectetur. Mauris id libero in eros cursus tincidunt eu quis felis. Vestibulum a vestibulum mi. Praesent id tincidunt lacus. 	Nunc elit nisi, commodo ut mattis vitae, posuere nec est. Etiam dapibus orci in cursus pellentesque. Phasellus vitae felis scelerisque, accumsan erat 	sed, egestas magna. Aliquam condimentum, ipsum in commodo sagittis, sapien leo faucibus magna, vel ultrices tellus enim et mauris. Fusce rutrum sit amet 	risus at consequat. Cras non varius arcu. Suspendisse dictum, sem in dignissim lobortis, neque enim accumsan justo, eu commodo lacus lorem ut turpis.
%p
	Sed est diam, commodo vitae venenatis non, commodo eget libero. Pellentesque sodales consectetur faucibus. Duis tincidunt sodales velit eget venenatis. 	In magna purus, dapibus sed enim auctor, facilisis porta orci. Donec nec velit eget dui dapibus fermentum. Nulla vitae dolor urna. Maecenas ultricies 	sem congue mauris commodo vehicula. Sed mollis adipiscing augue, a laoreet elit feugiat non. Vivamus bibendum vestibulum est sit amet sagittis. Maecenas 	vestibulum tellus ac eros luctus, quis vulputate neque viverra. Nulla sed lacus condimentum, euismod neque ac, egestas magna. Aliquam venenatis ornare leo, vestibulum eleifend enim sagittis eget. Sed sagittis massa in scelerisque lacinia. Donec nec mattis lorem.
.box
	- render("/views/show-table.scaml")


CAMEL-3991. Fix for href generation

CAMEL-3991. Fix for href generation

git-svn-id: 11f3c9e1d08a13a4be44fe98a6d63a9c00f6ab23@1124497 13f79535-47bb-0310-9956-ffa450edef68

-#
-# Copyright (C) 2009-2010 the original author or authors.
-# See the notice.md file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-#

!!! Basic
-@ var body: String
-@ var title : String = "Camel 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="Apache Camel Console")
    %meta(name="keywords" content="camel,eip,web")

    = include("/org/fusesource/scalate/console/console_head.scaml")

    %link(href={uri("/css/site.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/sorttable.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/type-settings.css")} rel="stylesheet" type="text/css")

    - if (attributes.get("noJavaScript").isEmpty)
      %script(src={uri("/js/common.js")} type="text/javascript")
      %script(src={uri("/js/css.js")} type="text/javascript")
      %script(src={uri("/js/standardista-table-sorting.js")} type="text/javascript")

    %title
      = title

  %body
    .white_box
      .header
        .header_l
          .header_r
      .content
        .content_l
          .content_r
            %div
              / Banner
              #asf_logo
                #activemq_logo
                  %a{:href => "http://camel.apache.org/", :style => "float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Camel
                  %a{:href => "http://www.apache.org/", :style => "float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;", :title => "The Apache Software Foundation"} ASF
              .top_red_bar
                #site-breadcrumbs
                  - if (requestUri.startsWith("/index"))
                    %span Home
                  - else
                    %a{:href => {uri("/index")}, :title => "Home"} Home
                  |
                  %a{:href => {uri("/endpoints")}, :title => "View current endpoints or create new ones"} Endpoints
                  |
                  %a{:href => {uri("/routes")}, :title => "View current routes"} Routes
                #site-quicklinks
                  %P
                    %a{:href => "http://camel.apache.org/support.html", :title => "Get help and support using Apache Camel"} Support

              %table{:border => "0"}
                %tbody
                  %tr
                    %td{:style => "overflow:hidden;", :valign => "top", :width => "100%"}
                      .body-content
                        !~~ body
                    %td{:valign => "top"}
                      .navigation
                        .navigation_bottomon_top
                          .navigation_bottom
                            %H3 Useful Links
                            %ul.alternate{:type => "square"}
                              %li
                                %a{:href => "http://camel.apache.org/documentation.html", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Documentation
                              %li
                                %a{:href => "http://camel.apache.org/web-console.html", :title => "more help on using the Web Console"} Console Help
                              %li
                                %a{:href => "http://camel.apache.org/faq.html"} FAQ
                              %li
                                %a{:href => {uri("/api")}, :title => "View the REST API details"} API
                              %li
                                %a{:href => "http://camel.apache.org/download.html"} Downloads
                              %li
                                %a{:href => "http://camel.apache.org/discussion-forums.html"} Forums
              .bottom_red_bar
      .black_box
        .footer
          .footer_l
            .footer_r
              %div
                Copyright 2005-2011 The Apache Software Foundation.
                (
                %a{:href => "?printable=true"}> printable version
                )
                = include("/org/fusesource/scalate/console/console.scaml")

    .design_attribution
      %a{:href => "http://hiramchirino.com/"} Graphic Design By Hiram

-#
-# Copyright (C) 2009-2010 the original author or authors.
-# See the notice.md file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-#

!!! Basic
-@ var body: String
-@ var title : String = "Camel 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="Apache Camel Console")
    %meta(name="keywords" content="camel,eip,web")

    = include("/org/fusesource/scalate/console/console_head.scaml")

    %link(href={uri("/css/site.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/sorttable.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/type-settings.css")} rel="stylesheet" type="text/css")

    - if (attributes.get("noJavaScript").isEmpty)
      %script(src={uri("/js/common.js")} type="text/javascript")
      %script(src={uri("/js/css.js")} type="text/javascript")
      %script(src={uri("/js/standardista-table-sorting.js")} type="text/javascript")

    %title
      = title

  %body
    .white_box
      .header
        .header_l
          .header_r
      .content
        .content_l
          .content_r
            %div
              / Banner
              #asf_logo
                #activemq_logo
                  %a{:href => "http://camel.apache.org/", :style => "float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Camel
                  %a{:href => "http://www.apache.org/", :style => "float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;", :title => "The Apache Software Foundation"} ASF
              .top_red_bar
                #site-breadcrumbs
                  - if (requestUri.startsWith("/index"))
                    %span Home
                  - else
                    %a{:href => {uri("/index")}, title => "Home"} Home
                  |
                  %a{:href => {uri("/endpoints")}, :title => "View current endpoints or create new ones"} Endpoints
                  |
                  %a{:href => {uri("/routes")}, :title => "View current routes"} Routes
                #site-quicklinks
                  %P
                    %a{:href => "http://camel.apache.org/support.html", :title => "Get help and support using Apache Camel"} Support

              %table{:border => "0"}
                %tbody
                  %tr
                    %td{:style => "overflow:hidden;", :valign => "top", :width => "100%"}
                      .body-content
                        !~~ body
                    %td{:valign => "top"}
                      .navigation
                        .navigation_bottomon_top
                          .navigation_bottom
                            %H3 Useful Links
                            %ul.alternate{:type => "square"}
                              %li
                                %a{:href => "http://camel.apache.org/documentation.html", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Documentation
                              %li
                                %a{:href => "http://camel.apache.org/web-console.html", :title => "more help on using the Web Console"} Console Help
                              %li
                                %a{:href => "http://camel.apache.org/faq.html"} FAQ
                              %li
                                %a{:href => {uri("/api")}, :title => "View the REST API details"} API
                              %li
                                %a{:href => "http://camel.apache.org/download.html"} Downloads
                              %li
                                %a{:href => "http://camel.apache.org/discussion-forums.html"} Forums
              .bottom_red_bar
      .black_box
        .footer
          .footer_l
            .footer_r
              %div
                Copyright 2005-2011 The Apache Software Foundation.
                (
                %a{:href => "?printable=true"}> printable version
                )
                = include("/org/fusesource/scalate/console/console.scaml")

    .design_attribution
      %a{:href => "http://hiramchirino.com/"} Graphic Design By Hiram


few more things on the agent page

few more things on the agent page

-@ import val it: AgentResource
-@ import val helper: ViewHelper = new ViewHelper
- attributes("title") = "Agent"

%h2
  Agent: #{agent.getAgentId}
%table
  %tr
    %td Website
    %td
      %a.agentSite{:href => {details.getHref}}
        = details.getHref
  %tr
    %td Host Name
    %td
      = details.getHostname
  %tr
    %td PID
    %td
      = details.getPid
  %tr
    %td Profile
    %td
      %agent:profile/
  %tr
    %td Operating System
    %td
      %agent:os/
  %tr
    %td Container
    %td
      %agent:containerType/
  %tr
    %td ID
    %td
      %agent:id/
  %tr
    %td Maximum Features
    %td
      %agent:maximumFeatures/
  %tr
    %td{:colspan => "2"}
      %table
        %tr
          %th System Property
          %th Value
        %agent:systemProperty
          %tr
            %td
              %systemProperty:name/
            %td
              %systemProperty:value/

-@ import val it: AgentResource
-@ import val helper: ViewHelper = new ViewHelper
- attributes("title") = "Agent"

%h2
  Agent: #{agent.getAgentId}
%table
  %tr
    %td Website
    %td
      %a.agentSite{"agent:siteLink" => "na"}
        %agent:site/
  %tr
    %td Host Name
    %td
      %agent:hostname/
  %tr
    %td PID
    %td
      %agent:pid/
  %tr
    %td Profile
    %td
      %agent:profile/
  %tr
    %td Operating System
    %td
      %agent:os/
  %tr
    %td Container
    %td
      %agent:containerType/
  %tr
    %td ID
    %td
      %agent:id/
  %tr
    %td Maximum Features
    %td
      %agent:maximumFeatures/
  %tr
    %td{:colspan => "2"}
      %table
        %tr
          %th System Property
          %th Value
        %agent:systemProperty
          %tr
            %td
              %systemProperty:name/
            %td
              %systemProperty:value/


fix for navbar toggle issue

fix for navbar toggle issue

- import models.Menu
- import services.MenuService
- val test = MenuService.getMenuJson("header")

- val navbar = List(Menu(0,"About", "#about"), Menu(1,"Contact", "#contact"), Menu(2,"More", "#more"))

-# TODO: Use service at /menu/:menuName.json to get header menu

.navbar.navbar-fixed-top.navbar-inverse{:role => "navigation"}
	.container
		/ #{test}
		.navbar-header
			%button.navbar-toggle{:type => "button", "data-toggle" => "collapse", "data-target" => ".navbar-collapse"}
				%span.sr-only Toggle navigation
				%span.icon-bar
				%span.icon-bar
				%span.icon-bar
			%a.navbar-brand{:href => "/"} Test Project
		.navbar-collapse.collapse
			%ul.nav.navbar-nav
				- for (item <- navbar)
					%li
						%a{:href => {item.url}} = item.displayName

- import models.Menu
- import services.MenuService
- val test = MenuService.getMenuJson("header")

- val navbar = List(Menu(0,"About", "#about"), Menu(1,"Contact", "#contact"), Menu(2,"More", "#more"))

-# TODO: Use service at /menu/:menuName.json to get header menu

.navbar.navbar-fixed-top.navbar-inverse{:role => "navigation"}
	.container
		/ #{test}
		.navbar-header
			%button.navbar-toggle{:type => "button", "data-toggle" => "collapse", "data-target" => ".nav-collapse"}
				%span.sr-only Toggle navigation
				%span.icon-bar
				%span.icon-bar
				%span.icon-bar
			%a.navbar-brand{:href => "/"} Test Project
		.navbar-collapse.collapse
			%ul.nav.navbar-nav
				- for (item <- navbar)
					%li
						%a{:href => {item.url}} = item.displayName


Scaml templates should use \!~~ to include body parts

!!! Basic
-@ var body: String
-@ var title : String = "Scalate Sample"
- response.setContentType("text/html")
%html(lang="en")
  %head
    %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
    %meta(name="description" content="description goes here")
    %meta(name="keywords" content="keywords,goes,here")
    %meta(name="author" content="Your Name")

    = 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
          - if (requestURI.startsWith("/index."))
            %li(class="webgen-menu-level1 webgen-menu-item-selected")
              %span Home
          - else
            %li(class="webgen-menu-level1 webgen-menu-submenu")
              %a(href={uri("/")})
                Home
          %li(class="webgen-menu-level1 webgen-menu-submenu")
            %a(href="http://scalate.fusesource.org/")
              Documentation

    #content
      .wrapper
        !~~ body

    #footer
      .wrapper
        %hr
        = include("/org/fusesource/scalate/console/console.scaml")

!!! Basic
-@ var body: String
-@ var title : String = "Scalate Sample"
- response.setContentType("text/html")
%html(lang="en")
  %head
    %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
    %meta(name="description" content="description goes here")
    %meta(name="keywords" content="keywords,goes,here")
    %meta(name="author" content="Your Name")

    = 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
          - if (requestURI.startsWith("/index."))
            %li(class="webgen-menu-level1 webgen-menu-item-selected")
              %span Home
          - else
            %li(class="webgen-menu-level1 webgen-menu-submenu")
              %a(href={uri("/")})
                Home
          %li(class="webgen-menu-level1 webgen-menu-submenu")
            %a(href="http://scalate.fusesource.org/")
              Documentation

    #content
      .wrapper<
        ! #{"\n"+body}

    #footer
      .wrapper
        %hr
        = include("/org/fusesource/scalate/console/console.scaml")


Fixed repositories package name in templates.

- import org.noorg.fink.admin.support.Theming._
- response.setContentType("text/html")

-@ var pages : org.noorg.fink.data.repositories.PageRepository
-@ var media : org.noorg.fink.data.repositories.MediaRepository
-@ var rootPage : org.noorg.fink.data.entities.Page

-@ var body: String
-@ var title : String = "fink Sample Page"

!!! Basic
%html(lang="en")
  %head
    %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")

    %meta(name="description" content="description goes here")
    %meta(name="keywords" content="keywords,goes,here")
    %meta(name="author" content="Your Name")

    %link(href={themeBase("/css/style.css")} rel="stylesheet" type="text/css")
    %link(href="http://fonts.googleapis.com/css?family=Mako|Anton|News+Cycle|Nobile&v2" rel="stylesheet" type="text/css")

    %script(type="text/javascript" src={themeBase("/js/jquery-1.5.1.min.js")})

    %title
      = title

  %body
    #navigation
      .wrapper
        %a(href={uri("/")})
          %img(src={themeBase("/images/fink.png")})
        .menu
          .up
            %ul
              - for ( collection <- media.findCollections() )
                %li
                  %a(href={uri("/collections/" + collection.getShortlink())}) #{collection.getTitle()}
          .down
            %ul
              -for( page <- pages.findPagesByTag("sub-menu") )
                %li
                  %a(href={uri("/pages/"+page.getShortlink)}) #{page.getTitle}
          %div(style="clear:both")

    #content
      .wrapper
        !~~ body

    #footer
      .wrapper
        %br

- import org.noorg.fink.admin.support.Theming._
- response.setContentType("text/html")

-@ var pages : org.noorg.fink.data.repository.PageRepository
-@ var media : org.noorg.fink.data.repository.MediaRepository
-@ var rootPage : org.noorg.fink.data.entities.Page

-@ var body: String
-@ var title : String = "fink Sample Page"

!!! Basic
%html(lang="en")
  %head
    %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")

    %meta(name="description" content="description goes here")
    %meta(name="keywords" content="keywords,goes,here")
    %meta(name="author" content="Your Name")

    %link(href={themeBase("/css/style.css")} rel="stylesheet" type="text/css")
    %link(href="http://fonts.googleapis.com/css?family=Mako|Anton|News+Cycle|Nobile&v2" rel="stylesheet" type="text/css")

    %script(type="text/javascript" src={themeBase("/js/jquery-1.5.1.min.js")})

    %title
      = title

  %body
    #navigation
      .wrapper
        %a(href={uri("/")})
          %img(src={themeBase("/images/fink.png")})
        .menu
          .up
            %ul
              - for ( collection <- media.findCollections() )
                %li
                  %a(href={uri("/collections/" + collection.getShortlink())}) #{collection.getTitle()}
          .down
            %ul
              -for( page <- pages.findPagesByTag("sub-menu") )
                %li
                  %a(href={uri("/pages/"+page.getShortlink)}) #{page.getTitle}
          %div(style="clear:both")

    #content
      .wrapper
        !~~ body

    #footer
      .wrapper
        %br


added a link to the generated source error line/col/file when there is a scala compile error

- import util.parsing.input.Position
- import org.fusesource.scalate._
- import org.fusesource.scalate.console._
- val consoleHelper = new ConsoleHelper(context)
- import consoleHelper._
- val exception = attributes("javax.servlet.error.exception")
- val olderror = attributeOrElse("javax.servlet.error.olderror", "")
- val errorRequestUri = attributeOrElse("javax.servlet.error.request_uri", "")
- val errorCode = attributeOrElse("javax.servlet.error.status_code", 500)

%link(href={uri("/css/scalate/errors.css")} rel="stylesheet" type="text/css")

- def displayError(file:String, pos:Position, message:String)
  #header.block
    %h1
      = message

  #source.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)
            - println("prefix: " + prefix + " ch: " + ch + " postfix: " + postfix)
            %pre<
              &~ prefix
              %span.errorCol><
                &~ ch
              &~ postfix
          - else
            %pre<
              &~ s.source

- 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)
        #source.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 u =>
    #header.block
      %h1
        = olderror
      %p
        = u

- import util.parsing.input.Position
- import org.fusesource.scalate._
- import org.fusesource.scalate.console._
- val consoleHelper = new ConsoleHelper(context)
- import consoleHelper._
- val exception = attributes("javax.servlet.error.exception")
- val olderror = attributeOrElse("javax.servlet.error.olderror", "")
- val errorRequestUri = attributeOrElse("javax.servlet.error.request_uri", "")
- val errorCode = attributeOrElse("javax.servlet.error.status_code", 500)

%link(href={uri("/css/scalate/errors.css")} rel="stylesheet" type="text/css")

- def displayError(file:String, pos:Position, message:String)
  #header.block
    %h1
      = message

  #source.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)
            - println("prefix: " + prefix + " ch: " + ch + " postfix: " + postfix)
            %pre<
              &~ prefix
              %span.errorCol><
                &~ ch
              &~ postfix
          - else
            %pre<
              &~ s.source

- 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)

  - case u =>
    #header.block
      %h1
        = olderror
      %p
        = u


Fixed null pointer.

Fixed null pointer.


added js needed for tooltip added glyphicon-glass to h1

-@ var title: String = "Defaul Title"
-@ var headline: String = title
-@ var body: String
-@ var zip: String = "Home Zip"

!!!
%html
	%head
		%title #{title}
		%meta{:charset => "utf-8"}
		%meta{"http-equiv" => "X-UA-Compatible", :content => "IE=edge"}
		%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
		%link{:href => "css/bootstrap.css", :rel => "stylesheet"}
		%link{:href => "css/starter-template.css", :rel => "stylesheet"}
		/ HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries
		/[if lt IE 9]
			%script{:type => "text/javascript",:src  => "https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"}
			%script{:type => "text/javascript",:src  => "https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"}
	%body
		- render("/layouts/navbar.scaml")
		.container
			%header
				%h1
					#{headline}
					%span.glyphicon.glyphicon-glass
			%section
				!= body
			%footer #{zip}
		/ jQuery (necessary for Bootstrap's JavaScript plugins)
		%script{:type => "text/javascript",:src  => "https://code.jquery.com/jquery.js"}
		/ Include all compiled plugins (below), or include individual files as needed
		%script{:type => "text/javascript",:src  => "js/compiled/bootstrap.js"}
		%script
			$('a').tooltip()

-@ var title: String = "Defaul Title"
-@ var headline: String = title
-@ var body: String
-@ var zip: String = "Home Zip"

!!!
%html
	%head
		%title #{title}
		%meta{:charset => "utf-8"}
		%meta{"http-equiv" => "X-UA-Compatible", :content => "IE=edge"}
		%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
		%link{:href => "css/bootstrap.css", :rel => "stylesheet"}
		%link{:href => "css/starter-template.css", :rel => "stylesheet"}
		/ HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries
		/[if lt IE 9]
			%script{:type => "text/javascript",:src  => "https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"}
			%script{:type => "text/javascript",:src  => "https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"}
	%body
		- render("/layouts/navbar.scaml")
		.container
			%header
				%h1 #{headline}
			%section
				!= body
			%footer #{zip}
		/ jQuery (necessary for Bootstrap's JavaScript plugins)
		%script{:type => "text/javascript",:src  => "https://code.jquery.com/jquery.js"}
		/ Include all compiled plugins (below), or include individual files as needed
		%script{:type => "text/javascript",:src  => "js/compiled/bootstrap.js"}


Fixed some bugs in quickstart.

Fixed some bugs in quickstart.

- import org.noorg.fink.admin.support.Theming._
- response.setContentType("text/html")

-@ var pages : org.noorg.fink.data.repository.PageRepository

-@ var body: String
-@ var title : String = "fink quickstart"

!!! Basic
%html(lang="en")
  %head
    %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")

    %meta(name="description" content="description goes here")
    %meta(name="keywords" content="keywords,goes,here")
    %meta(name="author" content="Your Name")

    %link(href={themeBase("/css/style.css")} rel="stylesheet" type="text/css")
    %link(href="http://fonts.googleapis.com/css?family=Mako|Anton|News+Cycle|Nobile&v2" rel="stylesheet" type="text/css")

    %script(type="text/javascript" src={themeBase("/js/jquery-1.5.1.min.js")})

    %title
      = title

  %body
    #navigation
      .wrapper
        %img(src={themeBase("/images/fink.png")})
        .menu
          .up
            %ul
              %li
                %a(href={uri("/")}) Index
              %li
                %a(href={uri("/fink-admin/")}) Admin
          .down
            %ul
              -for( page <- pages.findPagesByTag("sub-menu") )
                %li
                  %a(href={uri("/pages/"+page.getShortlink)}) #{page.getTitle}
          %div(style="clear:both")

    #content
      .wrapper
        !~~ body

    #footer
      .wrapper
        %br

- import org.noorg.fink.admin.support.Theming._
- response.setContentType("text/html")

-@ var pages : org.noorg.fink.data.repository.PageRepository
-@ var rootPage : org.noorg.fink.data.entities.Page

-@ var body: String
-@ var title : String = "fink Sample Page"

!!! Basic
%html(lang="en")
  %head
    %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")

    %meta(name="description" content="description goes here")
    %meta(name="keywords" content="keywords,goes,here")
    %meta(name="author" content="Your Name")

    %link(href={themeBase("/css/style.css")} rel="stylesheet" type="text/css")
    %link(href="http://fonts.googleapis.com/css?family=Mako|Anton|News+Cycle|Nobile&v2" rel="stylesheet" type="text/css")

    %script(type="text/javascript" src={themeBase("/js/jquery-1.5.1.min.js")})

    %title
      = title

  %body
    #navigation
      .wrapper
        %img(src={themeBase("/images/fink.png")})
        .menu
          .up
            %ul
              - if (requestUri.startsWith("/index."))
                %li
                  %span People
              - else
                %li
                  %a(href={uri("/collections/nature")}) Nature
              %li
                %a(href={uri("/collections/city")}) City
              %li
                %a(href={uri("/dates")}) Dates
              %li
                %a(href={uri("/posts")}) Posts
              %li
                %a(href={uri("/admin/")}) Admin
          .down
            %ul
              -for( page <- pages.findPagesByTag("sub-menu") )
                %li
                  %a(href={uri("/pages/"+page.getShortlink)}) #{page.getTitle}
          %div(style="clear:both")

    #content
      .wrapper
        !~~ body

    #footer
      .wrapper
        %br


removed / prefix from view to look more consistent with other edit links

-@ import val consoleHelper: ConsoleHelper = new ConsoleHelper(context)

- if (optionEnabled("console"))
  %h2 Scalate Console

  - if (newTemplateName.isDefined && resourceClassName.isDefined)
    - val newName = newTemplateName.get
    %h3 Create New Custom Template
    %p Create a new template called #{newName} from archetype
    %ul
      - for (a <- archetypes)
        %li
          %form(action={uri("/scalate/createTemplate")} method="post")
            %input(type="hidden" name="archetype" value={a.archetype})
            %input(type="hidden" name="newTemplateName" value={newName})
            %input(type="hidden" name="resourceClass" value={resourceClassName.get})
            %input(type="submit" value={a.name})

  %table#templates
    %tr
      %td#name Resource
      %td
        - val sourceFile = resourceSourceFile
        - if (sourceFile.isDefined)
          - val file = resourceSourceFile.get
          %ul
            %li
              = editFileLink(file.getAbsolutePath)
                = file.getPath
    %tr
      %td#name Templates
      %td
        %ul
          - for (template <- templates)
            %li
              = editLink(template)
                = template.stripPrefix("/")
    %tr
      %td Layouts
      %td
        %ul
          - for (layout <- layouts)
            %li
              = editLink(layout)
                = layout.stripPrefix("/")

  %a(href={disableLink("console")} title="Hide the Scalate Console")
    Hide Scalate Console
  - if (optionEnabled("attributes"))
    %a(href={disableLink("attributes")} title="Hide the Attributes")
      Hide Attributes
    %table#attributes
      %tr
        %th Attribute
        %th Value
        - for (k <- attributeKeys)
          %tr
            %td#name
              = k
            %td#value
              - if (k == "body")
                - if (optionEnabled("body"))
                  %a(href={disableLink("body")} title="Hide the Body")
                    Hide Body
                  = attributes(k)
                - else
                  %a(href={enableLink("body")} title="Show the Body")
                    Show Body
              - else
                = attributes(k)
  - else
    %a(href={enableLink("attributes")} title="Show the Attributes")
      Show Attributes

- else
  %a(href={enableLink("console")} title="Show the Scalate Console")
    Show Scalate Console

-@ import val consoleHelper: ConsoleHelper = new ConsoleHelper(context)

- if (optionEnabled("console"))
  %h2 Scalate Console

  - if (newTemplateName.isDefined && resourceClassName.isDefined)
    - val newName = newTemplateName.get
    %h3 Create New Custom Template
    %p Create a new template called #{newName} from archetype
    %ul
      - for (a <- archetypes)
        %li
          %form(action={uri("/scalate/createTemplate")} method="post")
            %input(type="hidden" name="archetype" value={a.archetype})
            %input(type="hidden" name="newTemplateName" value={newName})
            %input(type="hidden" name="resourceClass" value={resourceClassName.get})
            %input(type="submit" value={a.name})

  %table#templates
    %tr
      %td#name Resource
      %td
        - val sourceFile = resourceSourceFile
        - if (sourceFile.isDefined)
          - val file = resourceSourceFile.get
          %ul
            %li
              = editFileLink(file.getAbsolutePath)
                = file.getPath
    %tr
      %td#name Templates
      %td
        %ul
          - for (template <- templates)
            %li
              = editLink(template)
                = template
    %tr
      %td Layouts
      %td
        %ul
          - for (layout <- layouts)
            %li
              = editLink(layout)
                = layout

  %a(href={disableLink("console")} title="Hide the Scalate Console")
    Hide Scalate Console
  - if (optionEnabled("attributes"))
    %a(href={disableLink("attributes")} title="Hide the Attributes")
      Hide Attributes
    %table#attributes
      %tr
        %th Attribute
        %th Value
        - for (k <- attributeKeys)
          %tr
            %td#name
              = k
            %td#value
              - if (k == "body")
                - if (optionEnabled("body"))
                  %a(href={disableLink("body")} title="Hide the Body")
                    Hide Body
                  = attributes(k)
                - else
                  %a(href={enableLink("body")} title="Show the Body")
                    Show Body
              - else
                = attributes(k)
  - else
    %a(href={enableLink("attributes")} title="Show the Attributes")
      Show Attributes

- else
  %a(href={enableLink("console")} title="Show the Scalate Console")
    Show Scalate Console


Fixed compilation error

Fixed compilation error

git-svn-id: 11f3c9e1d08a13a4be44fe98a6d63a9c00f6ab23@1003947 13f79535-47bb-0310-9956-ffa450edef68

-#
-# Copyright (C) 2009-2010 the original author or authors.
-# See the notice.md file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-#

!!! Basic
-@ var body: String
-@ var title : String = "Camel 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="Apache Camel Console")
    %meta(name="keywords" content="camel,eip,web")

    = include("/org/fusesource/scalate/console/console_head.scaml")

    %link(href={uri("/css/site.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/sorttable.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/type-settings.css")} rel="stylesheet" type="text/css")

    - if (attributes.get("noJavaScript").isEmpty)
      %script(src={uri("/js/common.js")} type="text/javascript")
      %script(src={uri("/js/css.js")} type="text/javascript")
      %script(src={uri("/js/standardista-table-sorting.js")} type="text/javascript")

    %title
      = title

  %body
    .white_box
      .header
        .header_l
          .header_r
      .content
        .content_l
          .content_r
            %div
              / Banner
              #asf_logo
                #activemq_logo
                  %a{:href => "http://camel.apache.org/", :style => "float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Camel
                  %a{:href => "http://www.apache.org/", :style => "float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;", :title => "The Apache Software Foundation"} ASF
              .top_red_bar
                #site-breadcrumbs
                  - if (requestUri.startsWith("/index"))
                    %span Home
                  - else
                    %a{:href => {uri("/index")}, title => "Home"} Home
                  |
                  %a{:href => {uri("/endpoints")}, :title => "View current endpoints or create new ones"} Endpoints
                  |
                  %a{:href => {uri("/routes")}, :title => "View current routes"} Routes
                #site-quicklinks
                  %P
                    %a{:href => "http://camel.apache.org/support.html", :title => "Get help and support using Apache Camel"} Support

              %table{:border => "0"}
                %tbody
                  %tr
                    %td{:style => "overflow:hidden;", :valign => "top", :width => "100%"}
                      .body-content
                        !~~ body
                    %td{:valign => "top"}
                      .navigation
                        .navigation_bottomon_top
                          .navigation_bottom
                            %H3 Useful Links
                            %ul.alternate{:type => "square"}
                              %li
                                %a{:href => "http://camel.apache.org/documentation.html", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Documentation
                              %li
                                %a{:href => "http://camel.apache.org/web-console.html", :title => "more help on using the Web Console"} Console Help
                              %li
                                %a{:href => "http://camel.apache.org/faq.html"} FAQ
                              %li
                                %a{:href => {uri("/api")}, :title => "View the REST API details"} API
                              %li
                                %a{:href => "http://camel.apache.org/download.html"} Downloads
                              %li
                                %a{:href => "http://camel.apache.org/discussion-forums.html"} Forums
              .bottom_red_bar
      .black_box
        .footer
          .footer_l
            .footer_r
              %div
                Copyright 2005-2009 The Apache Software Foundation.
                (
                %a{:href => "?printable=true"}> printable version
                )
                = include("/org/fusesource/scalate/console/console.scaml")

    .design_attribution
      %a{:href => "http://hiramchirino.com/"} Graphic Design By Hiram

-#
-# Copyright (C) 2009-2010 the original author or authors.
-# See the notice.md file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-#

!!! Basic
-@ var body: String
-@ var title : String = "Camel 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="Apache Camel Console")
    %meta(name="keywords" content="camel,eip,web")

    = include("/org/fusesource/scalate/console/console_head.scaml")

    %link(href={uri("/css/site.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/sorttable.css")} rel="stylesheet" type="text/css")
    %link(href={uri("/css/type-settings.css")} rel="stylesheet" type="text/css")

    - if (attributes.get("noJavaScript").isEmpty)
      %script(src={uri("/js/common.js")} type="text/javascript")
      %script(src={uri("/js/css.js")} type="text/javascript")
      %script(src={uri("/js/standardista-table-sorting.js")} type="text/javascript")

    %title
      = title

  %body
    .white_box
      .header
        .header_l
          .header_r
      .content
        .content_l
          .content_r
            %div
              / Banner
              #asf_logo
                #activemq_logo
                  %a{:href => "http://camel.apache.org/", :style => "float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Camel
                  %a{:href => "http://www.apache.org/", :style => "float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;", :title => "The Apache Software Foundation"} ASF
              .top_red_bar
                #site-breadcrumbs
                  - if (requestURI.startsWith("/index"))
                    %span Home
                  - else
                    %a{:href => {uri("/index")}, title => "Home"} Home
                  |
                  %a{:href => {uri("/endpoints")}, :title => "View current endpoints or create new ones"} Endpoints
                  |
                  %a{:href => {uri("/routes")}, :title => "View current routes"} Routes
                #site-quicklinks
                  %P
                    %a{:href => "http://camel.apache.org/support.html", :title => "Get help and support using Apache Camel"} Support

              %table{:border => "0"}
                %tbody
                  %tr
                    %td{:style => "overflow:hidden;", :valign => "top", :width => "100%"}
                      .body-content
                        !~~ body
                    %td{:valign => "top"}
                      .navigation
                        .navigation_bottomon_top
                          .navigation_bottom
                            %H3 Useful Links
                            %ul.alternate{:type => "square"}
                              %li
                                %a{:href => "http://camel.apache.org/documentation.html", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Documentation
                              %li
                                %a{:href => "http://camel.apache.org/web-console.html", :title => "more help on using the Web Console"} Console Help
                              %li
                                %a{:href => "http://camel.apache.org/faq.html"} FAQ
                              %li
                                %a{:href => {uri("/api")}, :title => "View the REST API details"} API
                              %li
                                %a{:href => "http://camel.apache.org/download.html"} Downloads
                              %li
                                %a{:href => "http://camel.apache.org/discussion-forums.html"} Forums
              .bottom_red_bar
      .black_box
        .footer
          .footer_l
            .footer_r
              %div
                Copyright 2005-2009 The Apache Software Foundation.
                (
                %a{:href => "?printable=true"}> printable version
                )
                = include("/org/fusesource/scalate/console/console.scaml")

    .design_attribution
      %a{:href => "http://hiramchirino.com/"} Graphic Design By Hiram


added links to template / scala with errors

- import org.fusesource.scalate._
- import org.fusesource.scalate.console._
- val consoleHelper = new ConsoleHelper(context)
- import consoleHelper._
- val exception = attributes("javax.servlet.error.exception")
- val message = attributeOrElse("javax.servlet.error.message", "")
- val errorRequestUri = attributeOrElse("javax.servlet.error.request_uri", "")
- val errorCode = attributeOrElse("javax.servlet.error.status_code", 500)

%link(href={uri("/css/scalate/errors.css")} rel="stylesheet" type="text/css")

- exception match
  - case e:InvalidSyntaxException =>
    - val template = e.template
    - val pos = e.pos

    #header.block
      %h1
        = message

    #source.block
      %h2
        = editLink(template, pos.line, pos.column)
          In #{template} near line #{pos.line} col #{pos.column}

      -# TODO show snippet of file here...

  - case e:CompilerException =>
    - val template = e.template
    -# - val pos = e.pos

    #header.block
      %h1
        = message

    #source.block
      %h2
        = editLink(template)
          In #{template}

      -# TODO show snippet of file here...

  - case u =>
    #header.block
      %h1
        = message
      %p
        = u

- import org.fusesource.scalate._
- import org.fusesource.scalate.console._
- val consoleHelper = new ConsoleHelper(context)
- import consoleHelper._
- val exception = attributes("javax.servlet.error.exception")
- val message = attributeOrElse("javax.servlet.error.message", "")
- val errorRequestUri = attributeOrElse("javax.servlet.error.request_uri", "")
- val errorCode = attributeOrElse("javax.servlet.error.status_code", 500)

%link(href={uri("/css/scalate/errors.css")} rel="stylesheet" type="text/css")

- exception match
  - case e:InvalidSyntaxException =>
    - val template = "/scaml/errors/templateCompileError.scaml"
    - val pos = e.pos

    #header.block
      %h1
        = message

    #source.block
      %h2
        = editLink(template, pos.line, pos.column)
          In #{template} near line #{pos.line} col #{pos.column}

      -# TODO show snippet of file here...

  - case u =>
    #header.block
      %h1
        = message