Skip to content

Commit

Permalink
Make our instances xml match what deltacloud provides
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrowning committed Dec 17, 2010
1 parent bfd2a8b commit d517b39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/helpers/instances_helper.rb
Expand Up @@ -37,8 +37,8 @@ def instance_status_for_environment_row(instance)
end

def dc_hardware_profile_url(instance)
return unless instance.cloud_instance
tag('hardware_profile', :href=>instance.cloud_instance.hardware_profile.url)
profile_path = pathify(instance.hardware_profile)
tag('hardware_profile', :href => hardware_profile_url(profile_path), :id => profile_path)
end

def instance_details_link(instance)
Expand Down
10 changes: 5 additions & 5 deletions app/views/instances/_instance.xml.haml
@@ -1,10 +1,10 @@
%instance{:href=>environment_instance_url(instance.environment, instance), :'proxy-for'=>instance.cloud_instance_url, :id => instance.friendly_id}
%owner=instance.environment.user.email
%name=instance.image.name
%image{:href=>environment_image_url(instance.environment, instance.image)}
%owner_id=instance.environment.user.email
%name=instance.name
%image{:href=>environment_image_url(instance.environment, instance.image), :id=>instance.image.friendly_id}
= dc_hardware_profile_url(instance)
%realm=instance.realm
%state= instance.deltacloud_state
%realm{:href=>realm_url(instance.realm), :id=>instance.realm}
%state= instance.deltacloud_state.upcase
%actions
- if instance.can_stop?
%link{:rel=>'stop', :href=>stop_environment_instance_url(instance.environment, instance), :method => 'POST'}
Expand Down

0 comments on commit d517b39

Please sign in to comment.