incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1154878 - in /incubator/deltacloud/trunk/server: lib/deltacloud/helpers/ views/ views/errors/
Date Mon, 08 Aug 2011 09:13:45 GMT
Author: mfojtik
Date: Mon Aug  8 09:13:44 2011
New Revision: 1154878

URL: http://svn.apache.org/viewvc?rev=1154878&view=rev
Log:
New UI for error reporting

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb
    incubator/deltacloud/trunk/server/views/error.html.haml
    incubator/deltacloud/trunk/server/views/errors/400.html.haml
    incubator/deltacloud/trunk/server/views/errors/401.html.haml
    incubator/deltacloud/trunk/server/views/errors/403.html.haml
    incubator/deltacloud/trunk/server/views/errors/404.html.haml
    incubator/deltacloud/trunk/server/views/errors/405.html.haml
    incubator/deltacloud/trunk/server/views/errors/500.html.haml
    incubator/deltacloud/trunk/server/views/errors/502.html.haml
    incubator/deltacloud/trunk/server/views/errors/backend_capability_failure.html.haml

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb Mon Aug
 8 09:13:44 2011
@@ -263,4 +263,17 @@ module ApplicationHelper
     end
   end
 
+  def translate_error_code(code)
+    case code
+      when 400; { :message => "Bad Request" }
+      when 401; { :message => "Unauthorized" }
+      when 403; { :message => "Forbidden" }
+      when 404; { :message => "Not Found" }
+      when 405; { :message => "Method Not Allowed" }
+      when 406; { :message => "Not Acceptable" }
+      when 500; { :message => "Internal Server Error" }
+      when 502; { :message => "Backend Server Error" }
+    end
+  end
+
 end

Modified: incubator/deltacloud/trunk/server/views/error.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/error.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/error.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/error.html.haml Mon Aug  8 09:13:44 2011
@@ -1,31 +1,36 @@
-!!!
-!!! XML
-
+!!!5
 %html
   %head
-    = stylesheet_link_tag '/stylesheets/compiled/screen.css', :media => 'screen, projection'
-    = stylesheet_link_tag '/stylesheets/compiled/print.css', :media => 'print'
-    /[if lt IE 8]
-      = stylesheet_link_tag '/stylesheets/compiled/ie.css', :media => 'screen, projection'
-    = stylesheet_link_tag '/stylesheets/compiled/application.css', :media => 'screen,
projection'
-    %script{:type => "text/javascript", :src => "/javascripts/jquery-1.4.2.min.js"
}
+    %title Deltacloud API #{settings.version}
+    = stylesheet_link_tag '/stylesheets/jquery.mobile-1.0b1.min.css'
+    = stylesheet_link_tag '/stylesheets/new.css'
+    %script{:type => "text/javascript", :src => "/javascripts/jquery.min.js" }
     %script{:type => "text/javascript", :src => "/javascripts/application.js" }
+    %script{:type => "text/javascript", :src => "/javascripts/jquery.mobile-1.0b1.min.js"
}
+    :javascript
+      $(document).ready(function() {
+        $(document).bind("mobileinit", function(){
+          $.mobile.ajaxEnabled = false;
+          $.mobile.hashListeningEnabled = false;
+        });
+      })
   %body
-    #wrapper
-      #header
-        = link_to image_tag( "/images/logo-wide.png" ), root_url
-      = bread_crumb
-      #content{:class => :error}
-        = yield
-      #footer
-        #formats
-          Format:
-          =link_to_format(:xml)
-          |
-          =link_to_format(:json)
-        #driver_info
-          Driver: #{driver_symbol} | API version: #{settings.version}
-        #copyright
-          Copyright 2009-2011
-          %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
-          and individual contributors.
+    %div{ 'data-role' => :page, :'data-theme' => 'e', :class => :error }
+      =header "#{response.status} - #{translate_error_code(response.status)[:message]}"
+      - if @error
+        =subheader @error.message
+      - elsif response.status.to_s =~ /4(\d{2})/
+        =subheader request.env['REQUEST_URI']
+      = yield
+      %div{ 'data-role' => :footer, :'data-theme' => 'a'}
+        %div{ 'data-role' => :navbar}
+          %ul
+            %li
+              %a{ :'data-icon' => 'home', :href => api_url_for(''), :'data-ajax' =>
'false'} Home
+            %li=link_to_format(:xml)
+            %li=link_to_format(:json)
+        %div{ 'data-role' => :header, 'data-theme' => 'a' }
+          #copyright
+            Copyright 2009-2011
+            %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software
Foundation
+            and individual contributors.

Modified: incubator/deltacloud/trunk/server/views/errors/400.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/errors/400.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/errors/400.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/errors/400.html.haml Mon Aug  8 09:13:44 2011
@@ -1,18 +1,41 @@
-%h1 Bad Request
+%div{ :'data-role' => :content, :'data-theme' => 'b'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'e'}
+    %li{ :'data-role' => 'list-divider'} Server message
+    %li
+      %h3=[@error.class.name, @error.message].join(' - ')
+    %li{ :'data-role' => 'list-divider'} Original request URI
+    %li
+      %a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
+        %span=request.env['REQUEST_URI']
+        %span{ :class => 'ui-li-count'} Retry
+    %li{ :'data-role' => 'list-divider'} Error details
+    %li
+      - if @error.class.method_defined? :details
+        %p= @error.details
+      - else
+        %em No details
 
-%p= @error.message
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Backtrace
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      %li
+        %pre=@error.backtrace.join("\n")
 
-%dl
-  %di
-    %dt Request URL
-    %dd= request.env['REQUEST_URI']
-  %di
-    %dt Parameter
-    %dd= @error.name
-  %di
-    %dt Status code
-    %dd= response.status
-  %di
-    %dt Explanation
-    %dd
-      The request could not be understood by the server due to malformed syntax. The client
SHOULD NOT repeat the request without modifications.
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Parameters
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - if params.keys.empty?
+        %li{ :'data-role' => 'list-divider'} No parameters
+      - params.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect
+
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Request details
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - request.env.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect

Modified: incubator/deltacloud/trunk/server/views/errors/401.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/errors/401.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/errors/401.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/errors/401.html.haml Mon Aug  8 09:13:44 2011
@@ -1,11 +1,41 @@
-%h1 Authentication Failure
+%div{ :'data-role' => :content, :'data-theme' => 'b'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'e'}
+    %li{ :'data-role' => 'list-divider'} Server message
+    %li
+      %h3=[@error.class.name, @error.message].join(' - ')
+    %li{ :'data-role' => 'list-divider'} Original request URI
+    %li
+      %a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
+        %span=request.env['REQUEST_URI']
+        %span{ :class => 'ui-li-count'} Retry
+    %li{ :'data-role' => 'list-divider'} Error details
+    %li
+      - if @error.class.method_defined? :details
+        %p= @error.details
+      - else
+        %em No details
 
-%p= @error.message
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Backtrace
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      %li
+        %pre=@error.backtrace.join("\n")
 
-%dl
-  %di
-    %dt Request URL
-    %dd= request.env['REQUEST_URI']
-  %di
-    %dt Status code
-    %dd= response.status
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Parameters
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - if params.keys.empty?
+        %li{ :'data-role' => 'list-divider'} No parameters
+      - params.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect
+
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Request details
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - request.env.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect

Modified: incubator/deltacloud/trunk/server/views/errors/403.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/errors/403.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/errors/403.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/errors/403.html.haml Mon Aug  8 09:13:44 2011
@@ -1,13 +1,41 @@
-%h1 Forbidden
+%div{ :'data-role' => :content, :'data-theme' => 'b'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'e'}
+    %li{ :'data-role' => 'list-divider'} Server message
+    %li
+      %h3=[@error.class.name, @error.message].join(' - ')
+    %li{ :'data-role' => 'list-divider'} Original request URI
+    %li
+      %a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
+        %span=request.env['REQUEST_URI']
+        %span{ :class => 'ui-li-count'} Retry
+    %li{ :'data-role' => 'list-divider'} Error details
+    %li
+      - if @error.class.method_defined? :details
+        %p= @error.details
+      - else
+        %em No details
 
-%dl
-  %di
-    %dt Request URL
-    %dd= request.env['REQUEST_URI']
-  %di
-    %dt Status code
-    %dd= response.status
-  %di
-    %dt Explanation
-    %dd
-      The server understood the request, but is refusing to fulfill it. Authorization will
not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the
server wishes to make public why the request has not been fulfilled, it SHOULD describe the
reason for the refusal in the entity. If the server does not wish to make this information
available to the client, the status code 404 (Not Found) can be used instead.
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Backtrace
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      %li
+        %pre=@error.backtrace.join("\n")
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Parameters
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - if params.keys.empty?
+        %li{ :'data-role' => 'list-divider'} No parameters
+      - params.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect
+
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Request details
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - request.env.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect

Modified: incubator/deltacloud/trunk/server/views/errors/404.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/errors/404.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/errors/404.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/errors/404.html.haml Mon Aug  8 09:13:44 2011
@@ -1,13 +1,29 @@
-%h1 Resource not found
+%div{ :'data-role' => :content, :'data-theme' => 'b'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'e'}
+    %li{ :'data-role' => 'list-divider'} Server message
+    %li
+      %h3 Not Found
+    %li{ :'data-role' => 'list-divider'} Original request URI
+    %li
+      %a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
+        %span=request.env['REQUEST_URI']
+        %span{ :class => 'ui-li-count'} Retry
 
-%dl
-  %di
-    %dt Request URL
-    %dd= request.env['REQUEST_URI']
-  %di
-    %dt Status code
-    %dd= response.status
-  %di
-    %dt Explanation
-    %dd
-      The server has not found anything matching the Request-URI. No indication is given
of whether the condition is temporary or permanent. 
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Parameters
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - if params.keys.empty?
+        %li{ :'data-role' => 'list-divider'} No parameters
+      - params.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect
+
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Request details
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - request.env.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect

Modified: incubator/deltacloud/trunk/server/views/errors/405.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/errors/405.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/errors/405.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/errors/405.html.haml Mon Aug  8 09:13:44 2011
@@ -1,21 +1,29 @@
-%h1 Method Not Allowed
+%div{ :'data-role' => :content, :'data-theme' => 'b'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'e'}
+    %li{ :'data-role' => 'list-divider'} Server message
+    %li
+      %h3 Method not allowed on given resource
+    %li{ :'data-role' => 'list-divider'} Original request URI
+    %li
+      %a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
+        %span=request.env['REQUEST_URI']
+        %span{ :class => 'ui-li-count'} Retry
 
-%p
-  A 405 status code is returned when the client has tried to use a request method that the
server does not allow. Request methods that are allowed should be sent with the response (common
request methods are POST and GET).
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Parameters
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - if params.keys.empty?
+        %li{ :'data-role' => 'list-divider'} No parameters
+      - params.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect
 
-%dl
-  %di
-    %dt Request URL
-    %dd= request.env['REQUEST_URI']
-  %di
-    %dt Request headers
-    %dd
-      %pre
-        =request.env.inspect
-  %di
-    %dt Status code
-    %dd= response.status
-  %di
-    %dt Explanation
-    %dd
-      The method specified in the Request-Line is not allowed for the resource identified
by the Request-URI. The response MUST include an Allow header containing a list of valid methods
for the requested resource.
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Request details
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - request.env.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect

Modified: incubator/deltacloud/trunk/server/views/errors/500.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/errors/500.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/errors/500.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/errors/500.html.haml Mon Aug  8 09:13:44 2011
@@ -1,37 +1,43 @@
-%h1 Internal Server Error
+%div{ :'data-role' => :content, :'data-theme' => 'b'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'e'}
+    %li{ :'data-role' => 'list-divider'} Server message
+    %li
+      %h3=[@error.class.name, @error.message].join(' - ')
+    %li{ :'data-role' => 'list-divider'} Original request URI
+    %li
+      %a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
+        %span=request.env['REQUEST_URI']
+        %span{ :class => 'ui-li-count'} Retry
+    %li{ :'data-role' => 'list-divider'} Error details
+    %li
+      - if @error.class.method_defined? :details
+        %p= @error.details
+      - else
+        %em No details
 
-%p= "#{@error.class}: #{@error.message}"
-- if @error.class.method_defined? :details
-  %p= @error.details
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Backtrace
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      %li
+        %pre=@error.backtrace.join("\n")
 
-%dl
-  %di
-    %dt Request URL
-    %dd= request.env['REQUEST_URI']
-  %di
-    %dt Request headers
-    %dd
-      %pre
-        =request.env.inspect
-  %di
-    %dt Parameters
-    %dd
-      %pre
-        =params.inspect
-  %di
-    %dt Response headers
-    %dd
-      %pre
-        =response.headers.inspect
-  %di
-    %dt Code
-    %dd 500
-  %di
-    %dt Backtrace
-    %dd
-      %pre
-        =@error.backtrace.join("\n")
-  %di
-    %dt Explanation
-    %dd
-      The server encountered an unexpected condition which prevented it from fulfilling the
request.
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Parameters
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - if params.keys.empty?
+        %li{ :'data-role' => 'list-divider'} No parameters
+      - params.each do |key, value|
+        - next if value.inspect.to_s == '#'
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect
+
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Request details
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - request.env.each do |key, value|
+        - next if value.inspect.to_s == '#'
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect

Modified: incubator/deltacloud/trunk/server/views/errors/502.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/errors/502.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/errors/502.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/errors/502.html.haml Mon Aug  8 09:13:44 2011
@@ -1,18 +1,43 @@
-%h1 Backend provider error
+%div{ :'data-role' => :content, :'data-theme' => 'b'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'e'}
+    %li{ :'data-role' => 'list-divider'} Server message
+    %li
+      %h3=[@error.class.name, @error.message].join(' - ')
+    %li{ :'data-role' => 'list-divider'} Original request URI
+    %li
+      %a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
+        %span=request.env['REQUEST_URI']
+        %span{ :class => 'ui-li-count'} Retry
+    %li{ :'data-role' => 'list-divider'} Error details
+    %li
+      - if @error.class.method_defined? :details
+        %p= @error.details
+      - else
+        %em No details
 
-%p= @error.message
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Backtrace
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      %li
+        %pre=@error.backtrace.join("\n")
 
-%dl
-  %di
-    %dt Request URL
-    %dd= request.env['REQUEST_URI']
-  %di
-    %dt Parameters
-    %dd= params.inspect
-  %di
-    %dt Code
-    %dd= @error.code
-  %di
-    %dt Explanation
-    %dd
-      The server, while acting as a gateway or proxy, received an invalid response from the
upstream server it accessed in attempting to fulfill the request.
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Parameters
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - if params.keys.empty?
+        %li{ :'data-role' => 'list-divider'} No parameters
+      - params.each do |key, value|
+        - next if value.inspect.to_s == '#'
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect
+
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Request details
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - request.env.each do |key, value|
+        - next if value.inspect.to_s == '#'
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect

Modified: incubator/deltacloud/trunk/server/views/errors/backend_capability_failure.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/errors/backend_capability_failure.html.haml?rev=1154878&r1=1154877&r2=1154878&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/errors/backend_capability_failure.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/errors/backend_capability_failure.html.haml Mon
Aug  8 09:13:44 2011
@@ -1,11 +1,29 @@
-%h1 Backend Capability Failure
+%div{ :'data-role' => :content, :'data-theme' => 'b'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'e'}
+    %li{ :'data-role' => 'list-divider'} Server message
+    %li
+      %h3 Backend capability failure
+    %li{ :'data-role' => 'list-divider'} Original request URI
+    %li
+      %a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
+        %span=request.env['REQUEST_URI']
+        %span{ :class => 'ui-li-count'} Retry
 
-%p= @error.message
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Parameters
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - if params.keys.empty?
+        %li{ :'data-role' => 'list-divider'} No parameters
+      - params.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect
 
-%dl
-  %di
-    %dt Request URL
-    %dd= request.env['REQUEST_URI']
-  %di
-    %dt Capability
-    %dd= @error.capability
+
+  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+    %h3 Request details
+    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme'
=> 'e'}
+      - request.env.each do |key, value|
+        %li{ :'data-role' => 'list-divider'}=key
+        %li
+          %span{:style => 'font-weight:normal;'}=value.inspect



Mime
View raw message