Just one issue:
When the label is blank, the instance list does not show the cloud account
username,
It seems that this is caused due to the name method on cloud account:
def name
label.nil? ? username : label
end
This only checks to see if the label is nil, however the value returned from
the edit/create form when label is left blank is an empty string.
Changing this to:
def name
label.nil? || label == "" ? username : label
end
Fixes the problem.
ACK with this change
----- Original Message -----
From: "Scott Seago" <[email protected]>
To: [email protected]
Sent: Saturday, June 5, 2010 1:33:59 PM GMT +00:00 GMT Britain, Ireland,
Portugal
Subject: [deltacloud-devel] [PATCH aggregator 3/3] replaced 'image' with
'template' in UI pages
Signed-off-by: Scott Seago <[email protected]>
---
src/app/models/instance.rb | 2 +-
src/app/views/instance/new.html.erb | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/app/models/instance.rb b/src/app/models/instance.rb
index 66fae6f..591bc62 100644
--- a/src/app/models/instance.rb
+++ b/src/app/models/instance.rb
@@ -67,7 +67,7 @@ class Instance < ActiveRecord::Base
{:id => 'name', :header => 'Name', :opts => {:width => "25%"}},
{:id => 'state', :header => 'State', :opts => {:width => "10%"}},
{:id => 'hwprofile', :header => 'HW profile', :opts => {:width => "15%"}},
- {:id => 'image', :header => 'Image', :opts => {:sortable => false, :width
=> "15%"}},
+ {:id => 'template', :header => 'Template', :opts => {:sortable => false,
:width => "15%"}},
{:id => 'provider', :header => 'Provider', :opts => {:width => "10%"}},
{:id => 'account', :header => 'Account', :opts => {:width => "10%"}},
]
diff --git a/src/app/views/instance/new.html.erb
b/src/app/views/instance/new.html.erb
index 0553a42..86810bc 100644
--- a/src/app/views/instance/new.html.erb
+++ b/src/app/views/instance/new.html.erb
@@ -2,7 +2,7 @@
function showImages(ev) {
$("#images_table_wrapper").css('display', 'block');
images_dialog = $("#images_table_wrapper").dialog({
- title: "Select image for new instance",
+ title: "Select template for new instance",
dialogClass: 'flora',
width: 600,
height: 500,
@@ -34,8 +34,8 @@
<ul>
<li><label>Name<span>Name for this new Instance</span></label><%=
text_field :instance, :name, :class => "txtfield" %></li>
- <li><label>Image<span>Choose a bundled image to use</span></label>
- <input type="button" style="cursor:pointer" onclick="showImages(event)"
name="image_selector" value="<%= @instance.image ? @instance.image.name :
"click to select image"%>"/>
+ <li><label>Template<span>Choose a template to use</span></label>
+ <input type="button" style="cursor:pointer" onclick="showImages(event)"
name="image_selector" value="<%= @instance.image ? @instance.image.name :
"click to select template"%>"/>
</li>
<input type=hidden name="instance[image_id]" value="<%= @instance.image ?
@instance.image.id : '' %>">
--
1.6.2.5
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel