You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2012/11/08 08:46:36 UTC

[PATCH] Fix HTML UI bug, was using hwp.name instead of hwp.id (launch instance)

From: marios <ma...@redhat.com>


Signed-off-by: marios <ma...@redhat.com>
---
 server/views/images/show.html.haml   | 2 +-
 server/views/instances/new.html.haml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/views/images/show.html.haml b/server/views/images/show.html.haml
index 6030a47..181d43e 100644
--- a/server/views/images/show.html.haml
+++ b/server/views/images/show.html.haml
@@ -25,7 +25,7 @@
       %li
         %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
           - @image.hardware_profiles.each do |hwp|
-            %a{ :href => url_for("hardware_profiles/#{hwp.name}"), :'data-role' => "button", :'data-ajax' => 'false'} #{hwp.name}
+            %a{ :href => url_for("hardware_profiles/#{hwp.id}"), :'data-role' => "button", :'data-ajax' => 'false'} #{hwp.name}
     %li{ :'data-role' => 'list-divider'} Actions
     %li
       %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
diff --git a/server/views/instances/new.html.haml b/server/views/instances/new.html.haml
index 6c8e130..5814b5a 100644
--- a/server/views/instances/new.html.haml
+++ b/server/views/instances/new.html.haml
@@ -89,7 +89,7 @@
         %h3 Instance profile
         %fieldset{ :'data-role' => :fieldcontain}
           - @hardware_profiles.each do |profile|
-            %input{ :type => :radio, :name => 'hwp_id', :value => profile.name, :id => profile.name, :'data-theme' => 'b'}/
+            %input{ :type => :radio, :name => 'hwp_id', :value => profile.id, :id => profile.name, :'data-theme' => 'b'}/
             %label{ :for => profile.name, :onclick => "expandHWP('#{profile.name}');"}=profile.name
             %div{ :'data-role' => :fieldcontain, :id => "property_container_#{profile.name}", :class => 'hwp_properties'}
 
-- 
1.7.11.7


RE: [PATCH] Fix HTML UI bug, was using hwp.name instead of hwp.id (launch instance)

Posted by "Koper, Dies" <di...@fast.au.fujitsu.com>.
Was this ACK'ed yet? If not, ACK.

Regards,
Dies Koper


> -----Original Message-----
> From: marios@redhat.com [mailto:marios@redhat.com]
> Sent: Thursday, 8 November 2012 6:47 PM
> To: dev@deltacloud.apache.org
> Subject: [PATCH] Fix HTML UI bug, was using hwp.name instead of hwp.id
> (launch instance)
> 
> From: marios <ma...@redhat.com>
> 
> 
> Signed-off-by: marios <ma...@redhat.com>
> ---
>  server/views/images/show.html.haml   | 2 +-
>  server/views/instances/new.html.haml | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/views/images/show.html.haml
> b/server/views/images/show.html.haml
> index 6030a47..181d43e 100644
> --- a/server/views/images/show.html.haml
> +++ b/server/views/images/show.html.haml
> @@ -25,7 +25,7 @@
>        %li
>          %div{ :'data-role' => 'controlgroup', :'data-type' =>
"horizontal" }
>            - @image.hardware_profiles.each do |hwp|
> -            %a{ :href => url_for("hardware_profiles/#{hwp.name}"),
:'data-role' =>
> "button", :'data-ajax' => 'false'} #{hwp.name}
> +            %a{ :href => url_for("hardware_profiles/#{hwp.id}"),
:'data-role' =>
> "button", :'data-ajax' => 'false'} #{hwp.name}
>      %li{ :'data-role' => 'list-divider'} Actions
>      %li
>        %div{ :'data-role' => 'controlgroup', :'data-type' =>
"horizontal" }
> diff --git a/server/views/instances/new.html.haml
> b/server/views/instances/new.html.haml
> index 6c8e130..5814b5a 100644
> --- a/server/views/instances/new.html.haml
> +++ b/server/views/instances/new.html.haml
> @@ -89,7 +89,7 @@
>          %h3 Instance profile
>          %fieldset{ :'data-role' => :fieldcontain}
>            - @hardware_profiles.each do |profile|
> -            %input{ :type => :radio, :name => 'hwp_id', :value =>
profile.name, :id =>
> profile.name, :'data-theme' => 'b'}/
> +            %input{ :type => :radio, :name => 'hwp_id', :value =>
profile.id, :id =>
> profile.name, :'data-theme' => 'b'}/
>              %label{ :for => profile.name, :onclick =>
> "expandHWP('#{profile.name}');"}=profile.name
>              %div{ :'data-role' => :fieldcontain, :id =>
> "property_container_#{profile.name}", :class => 'hwp_properties'}
> 
> --
> 1.7.11.7
>