[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at b866592d0512043423876b0f670acfba1275ea39
Scott Seago
sseago at redhat.com
Wed May 2 18:39:03 UTC 2007
Hello,
This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.
Updating branch, master,
via b866592d0512043423876b0f670acfba1275ea39 (commit)
from 018a4c03948cad1ed2351abd7bacc936f93fc6a1 (commit)
- Log -----------------------------------------------------------------
commit b866592d0512043423876b0f670acfba1275ea39
Author: Scott Seago <sseago at redhat.com>
Date: Wed May 2 14:38:52 2007 -0400
WUI deployment edit fix.
-----------------------------------------------------------------------
Diffstat:
wui/src/app/models/deployment.rb | 6 ++++--
wui/src/app/models/managed_object.rb | 2 +-
wui/src/app/views/deployment/edit.rhtml | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/wui/src/app/models/deployment.rb b/wui/src/app/models/deployment.rb
index f6aa48a..8d5b423 100755
--- a/wui/src/app/models/deployment.rb
+++ b/wui/src/app/models/deployment.rb
@@ -30,11 +30,13 @@ class Deployment < ManagedObject
# FIXME: is this the name used for display purposes in the GUI?
def objname()
- self.get_machine().hostname + ": " + self.get_profile().name
+ machine = self.get_machine()
+ profile = self.get_profile()
+ (machine.nil? ? "no machine" : machine.hostname) + ": " + (profile.nil? ? "no profile" : profile.name)
end
def __virt_call(id, op)
- ManagedObject.call_server(op, session[:login], { "id" => id }, id.to_s)
+ ManagedObject.call_server(op, self.login, { "id" => id }, id.to_s)
end
def pause
diff --git a/wui/src/app/models/managed_object.rb b/wui/src/app/models/managed_object.rb
index bb2203c..6e81c36 100755
--- a/wui/src/app/models/managed_object.rb
+++ b/wui/src/app/models/managed_object.rb
@@ -51,7 +51,7 @@ class ManagedObject
if !instance_variable_get(attr_symbol)
id = instance_variable_get(id_symbol)
- if (id >= 0)
+ if (!id.nil? && id >= 0)
object = ManagedObject.retrieve(metadata[:type], self.login, id)
instance_variable_set(attr_symbol, object)
end
diff --git a/wui/src/app/views/deployment/edit.rhtml b/wui/src/app/views/deployment/edit.rhtml
index 73030de..e837377 100755
--- a/wui/src/app/views/deployment/edit.rhtml
+++ b/wui/src/app/views/deployment/edit.rhtml
@@ -5,6 +5,7 @@
<% form_for :form, @item, :url => { :action => "edit_submit" } do |f| %>
<%= f.hidden_field :id %>
<%= f.hidden_field :profile_id if @operation == "edit" %>
+ <%= f.hidden_field :machine_id if @operation == "edit" %>
<TABLE BORDER=0>
<TR>
<TD>Machine</TD>
hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
018a4c03948cad1ed2351abd7bacc936f93fc6a1 \
b866592d0512043423876b0f670acfba1275ea39
More information about the Et-mgmt-commits-list
mailing list