deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH core 1/2] CIMI: Removed HTML error templates
Date Tue, 06 Mar 2012 16:19:08 GMT
ACK...
of course and as we discussed, getting rid of html templates will mean
error for anyone trying to access CIMI via browser. We need to get rid
of all cases where html is generated for client for cimi. may require
defining new application_helper methods under
/lib/cimi/helpers/application_helper (currently report_error in
deltacloud/helpers/application_helper is giving "format.html" which is
now unacceptable for cimi)

On 06/03/12 17:09, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mfojtik@redhat.com>
> 
> 
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> ---
>  server/views/cimi/errors/400.html.haml             |   41 -------------------
>  server/views/cimi/errors/401.html.haml             |   41 -------------------
>  server/views/cimi/errors/403.html.haml             |   42 -------------------
>  server/views/cimi/errors/404.html.haml             |   29 -------------
>  server/views/cimi/errors/405.html.haml             |   29 -------------
>  server/views/cimi/errors/500.html.haml             |   43 --------------------
>  server/views/cimi/errors/502.html.haml             |   43 --------------------
>  .../errors/backend_capability_failure.html.haml    |   29 -------------
>  8 files changed, 0 insertions(+), 297 deletions(-)
>  delete mode 100644 server/views/cimi/errors/400.html.haml
>  delete mode 100644 server/views/cimi/errors/401.html.haml
>  delete mode 100644 server/views/cimi/errors/403.html.haml
>  delete mode 100644 server/views/cimi/errors/404.html.haml
>  delete mode 100644 server/views/cimi/errors/405.html.haml
>  delete mode 100644 server/views/cimi/errors/500.html.haml
>  delete mode 100644 server/views/cimi/errors/502.html.haml
>  delete mode 100644 server/views/cimi/errors/backend_capability_failure.html.haml
> 
> diff --git a/server/views/cimi/errors/400.html.haml b/server/views/cimi/errors/400.html.haml
> deleted file mode 100644
> index 1a135f9..0000000
> --- a/server/views/cimi/errors/400.html.haml
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -%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
> -
> -  %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
> diff --git a/server/views/cimi/errors/401.html.haml b/server/views/cimi/errors/401.html.haml
> deleted file mode 100644
> index 1a135f9..0000000
> --- a/server/views/cimi/errors/401.html.haml
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -%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
> -
> -  %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
> diff --git a/server/views/cimi/errors/403.html.haml b/server/views/cimi/errors/403.html.haml
> deleted file mode 100644
> index 781b6ae..0000000
> --- a/server/views/cimi/errors/403.html.haml
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -%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
> -
> -  - if @error.backtrace
> -    %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
> diff --git a/server/views/cimi/errors/404.html.haml b/server/views/cimi/errors/404.html.haml
> deleted file mode 100644
> index a9bbe34..0000000
> --- a/server/views/cimi/errors/404.html.haml
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -%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
> -
> -  %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
> diff --git a/server/views/cimi/errors/405.html.haml b/server/views/cimi/errors/405.html.haml
> deleted file mode 100644
> index 12e51b0..0000000
> --- a/server/views/cimi/errors/405.html.haml
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -%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
> -
> -  %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
> diff --git a/server/views/cimi/errors/500.html.haml b/server/views/cimi/errors/500.html.haml
> deleted file mode 100644
> index 19cf090..0000000
> --- a/server/views/cimi/errors/500.html.haml
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -%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
> -
> -  %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|
> -        - 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
> diff --git a/server/views/cimi/errors/502.html.haml b/server/views/cimi/errors/502.html.haml
> deleted file mode 100644
> index 19cf090..0000000
> --- a/server/views/cimi/errors/502.html.haml
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -%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
> -
> -  %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|
> -        - 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
> diff --git a/server/views/cimi/errors/backend_capability_failure.html.haml b/server/views/cimi/errors/backend_capability_failure.html.haml
> deleted file mode 100644
> index 3659ac5..0000000
> --- a/server/views/cimi/errors/backend_capability_failure.html.haml
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -%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
> -
> -  %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


Mime
View raw message