deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@redhat.com
Subject [PATCH 3/6] Adds display of storage volumes to deltacloud show instance
Date Fri, 23 Dec 2011 16:31:21 GMT
From: marios <marios@redhat.com>


Signed-off-by: marios <marios@redhat.com>
---
 server/views/instances/show.html.haml |    5 +++++
 server/views/instances/show.xml.haml  |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/server/views/instances/show.html.haml b/server/views/instances/show.html.haml
index 6891f1b..b91b71e 100644
--- a/server/views/instances/show.html.haml
+++ b/server/views/instances/show.html.haml
@@ -46,6 +46,11 @@
     - if @instance.firewalls
       %li{ :'data-role' => 'list-divider'} Firewalls
       %li=@instance.firewalls.join(", ")
+    - if @instance.storage_volumes
+      %li{ :'data-role' => 'list-divider'} Attached Storage Volumes
+      -@instance.storage_volumes.each do |vol|
+        %li
+          %p{ :'data-role' => 'fieldcontain'}="#{vol.keys.first} <---> #{vol.values.first}"
     %li{ :'data-role' => 'list-divider'} Actions
     %li
       %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
diff --git a/server/views/instances/show.xml.haml b/server/views/instances/show.xml.haml
index 5b929f4..b2fd5bf 100644
--- a/server/views/instances/show.xml.haml
+++ b/server/views/instances/show.xml.haml
@@ -41,6 +41,10 @@
     %firewalls<
       - @instance.firewalls.each do |firewall|
         %firewall{:href => firewall_url(firewall), :id => firewall }
+  - if @instance.storage_volumes
+    %storage_volumes<
+      - @instance.storage_volumes.each do |volume|
+        %storage_volume{:href=> storage_volume_url(volume.keys.first), :id => volume.keys.first,
:device => volume.values.first}
   - if driver_has_auth_features?
     %authentication{ :type => driver_auth_feature_name }
       - if @instance.authn_feature_failed?
-- 
1.7.6.4


Mime
View raw message