Signed-off-by: Francesco Vollero <[email protected]>
---
server/views/addresses/_address.html.haml | 6 ++--
server/views/addresses/associate.html.haml | 6 ++--
server/views/addresses/index.html.haml | 2 +-
server/views/addresses/show.html.haml | 14 +++++-----
server/views/api/show.html.haml | 2 +-
server/views/blobs/new.html.haml | 2 +-
server/views/blobs/show.html.haml | 16 +++++------
server/views/buckets/index.html.haml | 2 +-
server/views/buckets/show.html.haml | 14 +++++-----
server/views/docs/collection.html.haml | 12 ++++----
server/views/docs/operation.html.haml | 10 +++----
server/views/drivers/index.html.haml | 2 +-
server/views/firewalls/index.html.haml | 2 +-
server/views/firewalls/new_rule.html.haml | 2 +-
server/views/firewalls/show.html.haml | 16 +++++------
server/views/hardware_profiles/index.html.haml | 2 +-
server/views/hardware_profiles/show.html.haml | 6 ++--
server/views/images/index.html.haml | 2 +-
server/views/images/new.html.haml | 4 +--
server/views/images/show.html.haml | 28 +++++++++----------
server/views/instance_states/show.html.haml | 2 +-
server/views/instances/new.html.haml | 28 +++++++++----------
server/views/keys/index.html.haml | 2 +-
server/views/keys/show.html.haml | 20 +++++++-------
server/views/load_balancers/index.html.haml | 2 +-
server/views/load_balancers/new.html.haml | 6 ++--
server/views/load_balancers/show.html.haml | 20 +++++++-------
server/views/metrics/index.html.haml | 2 +-
server/views/metrics/show.html.haml | 4 +--
server/views/realms/index.html.haml | 2 +-
server/views/realms/show.html.haml | 10 +++----
server/views/storage_snapshots/index.html.haml | 2 +-
server/views/storage_snapshots/show.html.haml | 12 ++++----
server/views/storage_volumes/attach.html.haml | 4 +--
server/views/storage_volumes/index.html.haml | 2 +-
server/views/storage_volumes/show.html.haml | 38 +++++++++++++-------------
36 files changed, 153 insertions(+), 153 deletions(-)
diff --git a/server/views/addresses/_address.html.haml
b/server/views/addresses/_address.html.haml
index 28420a1..4a75311 100644
--- a/server/views/addresses/_address.html.haml
+++ b/server/views/addresses/_address.html.haml
@@ -1,6 +1,6 @@
%li
- %a{ :href => address_url(@address.id), :'data-ajax' => 'false'}
+ %a{ :href => address_url(address.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/address.png'}
- %h3= @address.id
+ %h3= address.id
%span{ :class => 'ui-li-count'}
- = @address.instance_id ? @address.instance_id : 'Free'
+ = address.instance_id ? address.instance_id : 'Free'
diff --git a/server/views/addresses/associate.html.haml
b/server/views/addresses/associate.html.haml
index b4fb707..cc8b300 100644
--- a/server/views/addresses/associate.html.haml
+++ b/server/views/addresses/associate.html.haml
@@ -1,12 +1,12 @@
=header "Associate to instance"
-=subheader @address.id
+=subheader address.id
%div{ :'data-role' => :content, :'data-theme' => 'c', :class =>
'middle-dialog'}
- %form{ :action => "#{address_url(@address.id)}/associate", :method => :post}
+ %form{ :action => "#{address_url(address.id)}/associate", :method => :post}
%div{ 'data-role' => :fieldcontain }
%label{ :for => :name} Instance:
%select{:name => 'instance_id'}
%option
- - @instances.each do |inst|
+ - instances.each do |inst|
%option{ :value => inst.id } #{inst.id} - #{inst.name}
%button{ :type => :submit} Associate
diff --git a/server/views/addresses/index.html.haml
b/server/views/addresses/index.html.haml
index 7c72735..0f3e22d 100644
--- a/server/views/addresses/index.html.haml
+++ b/server/views/addresses/index.html.haml
@@ -6,4 +6,4 @@
%ul#address_list{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- @elements.each do |address|
- = haml :"addresses/_address", :locals => { :@address => address,
:partial => true }
+ = haml :"addresses/_address", :locals => { :address => address, :partial
=> true }
diff --git a/server/views/addresses/show.html.haml
b/server/views/addresses/show.html.haml
index d4d146c..4883d83 100644
--- a/server/views/addresses/show.html.haml
+++ b/server/views/addresses/show.html.haml
@@ -1,20 +1,20 @@
=header "Address"
-=subheader @address.id
+=subheader address.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Address
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=address.id
%li{ :'data-role' => 'list-divider'} Associated to instance
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]_id || "Not
associated yet"
+ %p{ :'data-role' => 'fieldcontain'}=address.instance_id || "Not
associated yet"
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- - if @address.associated?
- =link_to_action 'Disassociate',
"#{address_url(@address.id)}/disassociate", :post
+ - if address.associated?
+ =link_to_action 'Disassociate',
"#{address_url(address.id)}/disassociate", :post
- else
- if driver.respond_to?(:associate_address)
- =link_to_action
'Associate...',"#{address_url(@address.id)}/associate", :get
- =link_to_action "Destroy", destroy_address_url(@address.id), :delete
+ =link_to_action
'Associate...',"#{address_url(address.id)}/associate", :get
+ =link_to_action "Destroy", destroy_address_url(address.id), :delete
diff --git a/server/views/api/show.html.haml b/server/views/api/show.html.haml
index 57f32b6..60f29ac 100644
--- a/server/views/api/show.html.haml
+++ b/server/views/api/show.html.haml
@@ -22,7 +22,7 @@
- unless driver.configured_providers.empty?
%div{ :'data-role' => :footer, :'data-theme' => 'a'}
%form{ :action => settings.root_url, :method => :post, :'data-ajax' =>
'false'}
- - if @driver_name
+ - if driver_name
%input{ :name => :driver, :type => :hidden, :value => driver.name }/
%fieldset{ :'data-type' => "horizontal", :'data-role' => "controlgroup",
:id => "providers" }
%select{:name => 'provider', :'data-inline' => 'true',
:'data-native-menu' => 'false'}
diff --git a/server/views/blobs/new.html.haml b/server/views/blobs/new.html.haml
index 93cd9c7..62f9263 100644
--- a/server/views/blobs/new.html.haml
+++ b/server/views/blobs/new.html.haml
@@ -1,7 +1,7 @@
=header "Create new blob"
%div{ :'data-role' => :content, :'data-theme' => 'c', :class =>
'middle-dialog'}
- %form{ :action => bucket_url(@bucket_id), :method => :post, :enctype =>
'multipart/form-data', "data-ajax" => "false"}
+ %form{ :action => bucket_url(bucket_id), :method => :post, :enctype =>
'multipart/form-data', "data-ajax" => "false"}
%div{ 'data-role' => :fieldcontain }
%label
Blob Name:
diff --git a/server/views/blobs/show.html.haml
b/server/views/blobs/show.html.haml
index b037ed8..0a4fefe 100644
--- a/server/views/blobs/show.html.haml
+++ b/server/views/blobs/show.html.haml
@@ -1,31 +1,31 @@
=header "Blob"
-=subheader @blob.id
+=subheader blob.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Bucket
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=blob.bucket
%li{ :'data-role' => 'list-divider'} Content length
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]_length
+ %p{ :'data-role' => 'fieldcontain'}=blob.content_length
%li{ :'data-role' => 'list-divider'} Content type
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]_type
+ %p{ :'data-role' => 'fieldcontain'}=blob.content_type
%li{ :'data-role' => 'list-divider'} Last modified
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]_modified
+ %p{ :'data-role' => 'fieldcontain'}=blob.last_modified
%li{ :'data-role' => 'list-divider'} Content
%li
- %a{ :href => bucket_url(@blob.bucket) + '/' + @blob.id + '/content'
}="Download"
+ %a{ :href => bucket_url(blob.bucket) + '/' + blob.id + '/content'
}="Download"
%li{ :'data-role' => 'list-divider'} User meta-data
%li
%p{ :'data-role' => 'fieldcontain'}
- - @blob.user_metadata.each do |k,v|
+ - blob.user_metadata.each do |k,v|
%b #{k} :
#{v}
%br
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- =link_to_action 'Delete',bucket_url(@blob.bucket) + '/' + @blob.id,
:delete
+ =link_to_action 'Delete',bucket_url(blob.bucket) + '/' + blob.id,
:delete
diff --git a/server/views/buckets/index.html.haml
b/server/views/buckets/index.html.haml
index 48dc699..0db02ec 100644
--- a/server/views/buckets/index.html.haml
+++ b/server/views/buckets/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
- - @buckets.each do |bucket|
+ - elements.each do |bucket|
%li
%a{ :href => bucket_url(bucket.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/bucket.png'}
diff --git a/server/views/buckets/show.html.haml
b/server/views/buckets/show.html.haml
index 0ea89dc..c440954 100644
--- a/server/views/buckets/show.html.haml
+++ b/server/views/buckets/show.html.haml
@@ -1,23 +1,23 @@
=header "Bucket"
-=subheader @bucket.id
+=subheader bucket.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=bucket.name
%li{ :'data-role' => 'list-divider'} Size
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=bucket.size
%li{ :'data-role' => 'list-divider'}
Blobs
- - @bucket.blob_list.each do |blob|
+ - bucket.blob_list.each do |blob|
%li
- %a{ :href => bucket_url(@bucket.name) + "/" + blob, :'data-ajax' =>
'false'}
+ %a{ :href => bucket_url(bucket.name) + "/" + blob, :'data-ajax' =>
'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/blob.png'}
%h3=blob
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- %a{ :href => new_blob_form_url(@bucket), :'data-role' => "button",
:'data-ajax' => 'false'} Create new blob...
- =link_to_action 'Delete bucket', destroy_bucket_url(@bucket.name),
:delete
+ %a{ :href => new_blob_form_url(bucket), :'data-role' => "button",
:'data-ajax' => 'false'} Create new blob...
+ =link_to_action 'Delete bucket', destroy_bucket_url(bucket.name),
:delete
diff --git a/server/views/docs/collection.html.haml
b/server/views/docs/collection.html.haml
index 7485b60..a973b4f 100644
--- a/server/views/docs/collection.html.haml
+++ b/server/views/docs/collection.html.haml
@@ -1,5 +1,5 @@
=header "Deltacloud API #{settings.version} documentation", :back => 'false'
-=subheader @collection.name.to_s.titlecase
+=subheader collection.name.to_s.titlecase
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
@@ -8,18 +8,18 @@
Collection description:
%li
%br
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=collection.description
%li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
%h3 Operations:
- - @operations.keys.sort_by { |k| k.to_s }.each do |operation|
+ - operations.keys.sort_by { |k| k.to_s }.each do |operation|
%li{ :'data-role' => 'list-divider'}
- %a{:href => url_for("docs/#{@collection.name.to_s}/#{operation}"),
:'data-ajax' => 'false'} #{operation}
+ %a{:href => url_for("docs/#{collection.name.to_s}/#{operation}"),
:'data-ajax' => 'false'} #{operation}
%li
%br
- %p=@operations[operation].description
+ %p=operations[operation].description
%li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
%h3 Defined features:
- - @features.sort_by { |f| f.name.to_s }.each do |feature|
+ - features.sort_by { |f| f.name.to_s }.each do |feature|
%li{ :'data-role' => 'list-divider'}=feature.name
%li
%br
diff --git a/server/views/docs/operation.html.haml
b/server/views/docs/operation.html.haml
index b63d36c..6baed0b 100644
--- a/server/views/docs/operation.html.haml
+++ b/server/views/docs/operation.html.haml
@@ -1,5 +1,5 @@
=header "Deltacloud API #{settings.version} documentation", :back => 'false'
-=subheader "#{action_method(@operation.name, @collection.name).to_s.upcase}
/api/#{@collection.name}/#{@operation.name}"
+=subheader "#{action_method(operation.name, collection.name).to_s.upcase}
/api/#{collection.name}/#{operation.name}"
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
@@ -8,12 +8,12 @@
Description:
%li
%br
- %[email protected]
+ %p=operation.description
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
%h3 Parameters:
- - @operation.each_param do |p|
+ - operation.each_param do |p|
%li{ :'data-role' => 'list-divider'}
=p.name
%span{ :class => 'ui-li-count'}
@@ -21,8 +21,8 @@
%li
%br
%p=p.description.empty? ? '<strong>FIXME:</strong> No description for
this parameter' : p.description
- - @features.sort { |a,b| a.name.to_s <=> b.name.to_s }.each do |f|
- - f.decl.operation(@operation.name).each_param do |p|
+ - features.sort { |a,b| a.name.to_s <=> b.name.to_s }.each do |f|
+ - f.decl.operation(operation.name).each_param do |p|
%li{ :'data-role' => 'list-divider'}
=p.name
%span{ :class => 'ui-li-count'}
diff --git a/server/views/drivers/index.html.haml
b/server/views/drivers/index.html.haml
index 6a9d866..3f8156a 100644
--- a/server/views/drivers/index.html.haml
+++ b/server/views/drivers/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
- - @drivers.each do |id, details|
+ - drivers.each do |id, details|
%li
%a{ :href => driver_url(id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/cloud.png'}
diff --git a/server/views/firewalls/index.html.haml
b/server/views/firewalls/index.html.haml
index f497b59..5862e4b 100644
--- a/server/views/firewalls/index.html.haml
+++ b/server/views/firewalls/index.html.haml
@@ -5,7 +5,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @firewalls.each do |firewall|
+ - firewalls.each do |firewall|
%li
%a{ :href => firewall_url(firewall.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/firewall.png'}
diff --git a/server/views/firewalls/new_rule.html.haml
b/server/views/firewalls/new_rule.html.haml
index cfa3cef..ecac451 100644
--- a/server/views/firewalls/new_rule.html.haml
+++ b/server/views/firewalls/new_rule.html.haml
@@ -1,7 +1,7 @@
=header "New firewall rule"
%div{ :'data-role' => :content, :'data-theme' => 'c', :class =>
'middle-dialog', :id => "new_rule_form"}
- %form{ :action => "#{firewall_url(@firewall_name)}/rules", :method => :post,
:'data-ajax' => 'false'}
+ %form{ :action => "#{firewall_url(firewall_name)}/rules", :method => :post,
:'data-ajax' => 'false'}
%div{ 'data-role' => :fieldcontain }
%label{ :for => :name} Protocol:
%input{ :type => :text, :id => :protocol, :name => :protocol, :value =>
'', :size => 10 }
diff --git a/server/views/firewalls/show.html.haml
b/server/views/firewalls/show.html.haml
index c2fd5d0..c56ce33 100644
--- a/server/views/firewalls/show.html.haml
+++ b/server/views/firewalls/show.html.haml
@@ -1,27 +1,27 @@
=header "Firewall"
-=subheader @firewall.id
+=subheader firewall.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Identifier
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=firewall.id
%li{ :'data-role' => 'list-divider'} Description
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=firewall.description
%li{ :'data-role' => 'list-divider'} Owner
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]_id
+ %p{ :'data-role' => 'fieldcontain'}=firewall.owner_id
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- =link_to_action "Destroy", destroy_firewall_url(@firewall.id), :delete
+ =link_to_action "Destroy", destroy_firewall_url(firewall.id), :delete
=header "Rules", :back => 'false' do
- %a{ :href => url_for("firewalls/#{@firewall.id}/new_rule"), :'data-icon' =>
:plus, :'data-role' => :button, :class => 'ui-btn-right', :'data-ajax' =>
'false'} Add new rule
+ %a{ :href => url_for("firewalls/#{firewall.id}/new_rule"), :'data-icon' =>
:plus, :'data-role' => :button, :class => 'ui-btn-right', :'data-ajax' =>
'false'} Add new rule
%div{ :'data-role' => :content, :'data-theme' => 'c'}
- - @firewall.rules.each do |rule|
+ - firewall.rules.each do |rule|
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'}
%strong=rule.id
@@ -39,4 +39,4 @@
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- =link_to_action "Delete",
"#{firewall_url(@firewall.id)}/#{rule.id}", :delete
+ =link_to_action "Delete", "#{firewall_url(firewall.id)}/#{rule.id}",
:delete
diff --git a/server/views/hardware_profiles/index.html.haml
b/server/views/hardware_profiles/index.html.haml
index f02cb53..c3c7342 100644
--- a/server/views/hardware_profiles/index.html.haml
+++ b/server/views/hardware_profiles/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview, :'data-inset' => :true }
- - for profile in order_hardware_profiles(@hardware_profiles)
+ - for profile in order_hardware_profiles(elements)
%li{ :'data-theme' => 'c'}
%a{ :href => hardware_profile_url(profile.id)}
%img{ :class => 'ui-link-thumb', :src => '/images/profile.png'}
diff --git a/server/views/hardware_profiles/show.html.haml
b/server/views/hardware_profiles/show.html.haml
index 3fbb16f..c879779 100644
--- a/server/views/hardware_profiles/show.html.haml
+++ b/server/views/hardware_profiles/show.html.haml
@@ -1,12 +1,12 @@
=header "Hardware profiles"
-=subheader @hardware_profile.name || @hardware_profile.id
+=subheader hardware_profile.name || hardware_profile.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@hardware_profile.name ||
@hardware_profile.id
- - @hardware_profile.each_property do |p|
+ %p{ :'data-role' => 'fieldcontain'}=hardware_profile.name ||
hardware_profile.id
+ - hardware_profile.each_property do |p|
%li{ :'data-role' => 'list-divider'} #{p.name.to_s.titlecase}
%li
%p{ :'data-role' => 'fieldcontain'}
diff --git a/server/views/images/index.html.haml
b/server/views/images/index.html.haml
index adcad43..bb201a3 100644
--- a/server/views/images/index.html.haml
+++ b/server/views/images/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @images.each do |image|
+ - elements.each do |image|
%li
%a{ :href => image_url(image.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/image.png'}
diff --git a/server/views/images/new.html.haml
b/server/views/images/new.html.haml
index 263caf2..d2c6256 100644
--- a/server/views/images/new.html.haml
+++ b/server/views/images/new.html.haml
@@ -1,9 +1,9 @@
=header "Create new image"
-=subheader "#{@instance.id}"
+=subheader "#{instance.id}"
%div{ :'data-role' => :content, :'data-theme' => 'c', :class =>
'middle-dialog'}
%form{ :action => images_url, :method => :post}
- %input{ :type => :hidden, :name => :instance_id, :value => @instance.id}
+ %input{ :type => :hidden, :name => :instance_id, :value => instance.id}
%div{ 'data-role' => :fieldcontain }
%label{ :for => :name} Name:
%input{ :type => :text, :id => :name, :name => :name, :value => '' }
diff --git a/server/views/images/show.html.haml
b/server/views/images/show.html.haml
index d33b3e7..fab3723 100644
--- a/server/views/images/show.html.haml
+++ b/server/views/images/show.html.haml
@@ -1,40 +1,40 @@
=header "Image"
-=subheader @image.id
+=subheader image.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=image.name
%li{ :'data-role' => 'list-divider'} Description
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=image.description
%li{ :'data-role' => 'list-divider'} Owner
%li
%p{ :'data-role' => 'fieldcontain'}
- %a{ :href => images_url + "?owner_id=#{@image.owner_id}"}
- [email protected]_id
+ %a{ :href => images_url + "?owner_id=#{image.owner_id}"}
+ =image.owner_id
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
- - if @image.creation_time
+ %p{ :'data-role' => 'fieldcontain'}=image.state
+ - if image.creation_time
%li{ :'data-role' => 'list-divider'} Creation Time
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]_time
+ %p{ :'data-role' => 'fieldcontain'}=image.creation_time
%li{ :'data-role' => 'list-divider'} Root Device Type
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]_type
+ %p{ :'data-role' => 'fieldcontain'}=image.root_type
%li{ :'data-role' => 'list-divider'} Architecture
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
- - if @image.hardware_profiles
+ %p{ :'data-role' => 'fieldcontain'}=image.architecture
+ - if image.hardware_profiles
%li{ :'data-role' => 'list-divider'} Compatible Hardware Profiles
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- - @image.hardware_profiles.each do |hwp|
+ - image.hardware_profiles.each do |hwp|
%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" }
- %a{ :href => url_for("instances/new?image_id=#{@image.id}"),
:'data-role' => "button", :'data-ajax' => 'false'} Launch...
- = link_to_action 'Destroy', destroy_image_url(@image.id), :delete
+ %a{ :href => url_for("instances/new?image_id=#{image.id}"),
:'data-role' => "button", :'data-ajax' => 'false'} Launch...
+ = link_to_action 'Destroy', destroy_image_url(image.id), :delete
diff --git a/server/views/instance_states/show.html.haml
b/server/views/instance_states/show.html.haml
index 2a94801..2f5b1d6 100644
--- a/server/views/instance_states/show.html.haml
+++ b/server/views/instance_states/show.html.haml
@@ -5,7 +5,7 @@
%img{ :src => url_for('instance_states?format=png') }
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-theme' =>
'a'}
- - @machine.states.each do |state|
+ - machine.states.each do |state|
%li{ :'data-role' => 'list-divider', :'class' => 'ui-bar-a',
:'data-theme' => 'a'}=state
- if state.transitions.empty?
%li{ :'data-role' => 'list-divider'} Action
diff --git a/server/views/instances/new.html.haml
b/server/views/instances/new.html.haml
index f6f674e..acba973 100644
--- a/server/views/instances/new.html.haml
+++ b/server/views/instances/new.html.haml
@@ -1,8 +1,8 @@
=header "Launch new instance"
-=subheader "#{@image.id}"
+=subheader "#{image.id}"
.hidden_content
- - @image.hardware_profiles.each do |profile|
+ - image.hardware_profiles.each do |profile|
%div{ :'data-role' => :fieldcontain, :id =>
"hwp_properties_#{profile.name}", :class => 'property_block'}
- profile.properties.reject { |prop| prop.fixed? }.each do |prop|
%label{ :for => "#{prop.param}_#{profile.name}", :class =>
'ui-input-text' }=prop.name
@@ -19,7 +19,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c', :class =>
'middle-dialog'}
%form{ :action => instances_url, :method => :post, :class => :new_instance,
:enctype => 'multipart/form-data', :'data-ajax' => 'false'}
- %input{ :name => :image_id, :type => :hidden, :value => @instance.image_id
}/
+ %input{ :name => :image_id, :type => :hidden, :value => instance.image_id
}/
- if driver.class.has_feature?(:instances, :user_name)
%div{ 'data-role' => :fieldcontain }
@@ -52,7 +52,7 @@
%label{ :for => :keyname, :class => 'ui-input-text'} Instance SSH
key:
%select{:name => 'keyname', :'data-native-menu' => "true" }
%option{ :value => ''} None
- - @keys.each do |key|
+ - keys.each do |key|
%option{ :value => key.id } #{key.id}
- if driver.class.has_feature?(:instances, :register_to_load_balancer)
@@ -60,20 +60,20 @@
%label{ :for => :load_balancer_id, :class => 'ui-input-text'}
Register to loadbalancer:
%select{:name => 'load_balancer_id', :'data-native-menu' => "true"
}
%option{ :value => ''} None
- - @load_balancers.each do |load_balancer|
+ - load_balancers.each do |load_balancer|
%option{:value => load_balancer.id} #{load_balancer.id}
- if driver.class.has_feature?(:instances, :firewalls)
%div{ 'data-role' => :fieldcontain }
%fieldset{ :'data-role' => 'controlgroup'}
%legend Register to firewall:
- - @firewalls.each_index do |i|
- - if @firewalls[i].name == 'default'
- %input{:type => :checkbox, :value => @firewalls[i].name,
:name => "firewalls#{i}", :checked => :true, :id => "firewalls#{i}"}/
+ - firewalls.each_index do |i|
+ - if firewalls[i].name == 'default'
+ %input{:type => :checkbox, :value => firewalls[i].name,
:name => "firewalls#{i}", :checked => :true, :id => "firewalls#{i}"}/
%label{:for => "firewalls#{i}"} Default
- else
- %input{:type => :checkbox, :value => @firewalls[i].name,
:name => "firewalls#{i}", :id => "firewalls#{i}"}/
- %label{:for => "firewalls#{i}"}=@firewalls[i].name
+ %input{:type => :checkbox, :value => firewalls[i].name,
:name => "firewalls#{i}", :id => "firewalls#{i}"}/
+ %label{:for => "firewalls#{i}"}=firewalls[i].name
- if driver.class.has_feature?(:instances, :user_files)
%div{ 'data-role' => :fieldcontain }
@@ -84,21 +84,21 @@
%input{ :type => :text, :id => "path#{i}", :name => "path#{i}",
:value => ""} Path #{i}
%input{ :type => "file", :name => "content#{i}", :size => 50 }
- - if !@hardware_profiles.empty?
+ - if !hardware_profiles.empty?
%div{ 'data-role' => :fieldcontain }
%h3 Instance profile
%fieldset{ :'data-role' => :fieldcontain}
- - @hardware_profiles.each do |profile|
+ - hardware_profiles.each do |profile|
%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} - #{profile.memory} MB"
%div{ :'data-role' => :fieldcontain, :id =>
"property_container_#{profile.name}", :class => 'hwp_properties'}
- - if [email protected]?
+ - if !realms.empty?
%div{ 'data-role' => :fieldcontain }
%h3 Where do you want it?
%fieldset{ :'data-role' => :fieldcontain}
%legend
- - @realms.each do |realm|
+ - realms.each do |realm|
%div{ :'data-role' => :fieldcontain}
%label{ :for => realm.id }= "#{realm.name}, #{realm.limit}"
%input{ :type => :radio, :name => 'realm_id', :value =>
realm.id, :id => realm.id, :'data-theme' => 'b' }/
diff --git a/server/views/keys/index.html.haml
b/server/views/keys/index.html.haml
index 43efd76..ec83f68 100644
--- a/server/views/keys/index.html.haml
+++ b/server/views/keys/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
- - @elements.each do |key|
+ - elements.each do |key|
%li
%a{ :href => key_url(key.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/key.png'}
diff --git a/server/views/keys/show.html.haml b/server/views/keys/show.html.haml
index 2b2a11e..bfd8287 100644
--- a/server/views/keys/show.html.haml
+++ b/server/views/keys/show.html.haml
@@ -1,31 +1,31 @@
=header "Key"
-=subheader @key.id
+=subheader key.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Identifier
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=key.id
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
- - if @key.is_password?
+ %p{ :'data-role' => 'fieldcontain'}=key.name
+ - if key.is_password?
%li{ :'data-role' => 'list-divider'} Username
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=key.username
%li{ :'data-role' => 'list-divider'} Password
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=key.password
- else
- - if @key.fingerprint
+ - if key.fingerprint
%li{ :'data-role' => 'list-divider'} Fingerprint
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=key.fingerprint
%li{ :'data-role' => 'list-divider'} PEM key
%li
%p{ :'data-role' => 'fieldcontain'}
- %pre{:style=> 'width:600px;overflow:auto;'}[email protected]_rsa_key
+ %pre{:style=> 'width:600px;overflow:auto;'}=key.pem_rsa_key
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- =link_to_action "Destroy", destroy_key_url(@key.id), :delete
+ =link_to_action "Destroy", destroy_key_url(key.id), :delete
diff --git a/server/views/load_balancers/index.html.haml
b/server/views/load_balancers/index.html.haml
index 789cd57..8b2f41f 100644
--- a/server/views/load_balancers/index.html.haml
+++ b/server/views/load_balancers/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
- - @elements.each do |balancer|
+ - elements.each do |balancer|
%li
%a{ :href => load_balancer_url(balancer.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/balancer.png'}
diff --git a/server/views/load_balancers/new.html.haml
b/server/views/load_balancers/new.html.haml
index 6dffedd..e3b4016 100644
--- a/server/views/load_balancers/new.html.haml
+++ b/server/views/load_balancers/new.html.haml
@@ -6,18 +6,18 @@
%label
Name:
%input{ :name => 'name', :size => 30 }/
- -if @instances
+ -if instances
%p
%label
Running instance:
%select{ :name => 'instance_id'}
- - @instances.select{|i| i.state=="RUNNING"}.each do |instance|
+ - instances.select{|i| i.state=="RUNNING"}.each do |instance|
%option{ :value => instance.id } #{instance.id}
%p
%label
Realm:
%select{ :name => 'realm_id'}
- - @realms.each do |realm|
+ - realms.each do |realm|
%option{ :value => realm.id } #{realm.id} - #{realm.name}
%hr
%p
diff --git a/server/views/load_balancers/show.html.haml
b/server/views/load_balancers/show.html.haml
index 7123319..063d271 100644
--- a/server/views/load_balancers/show.html.haml
+++ b/server/views/load_balancers/show.html.haml
@@ -1,39 +1,39 @@
=header "Load balancer"
-=subheader @load_balancer.id
+=subheader load_balancer.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Created at
%li
- %p{ :'data-role' => 'fieldcontain'}=@load_balancer.created_at
+ %p{ :'data-role' => 'fieldcontain'}=load_balancer.created_at
%li{ :'data-role' => 'list-divider'} Public addresses
- - @load_balancer.public_addresses.each do |address|
+ - load_balancer.public_addresses.each do |address|
%li
%p{ :'data-role' => 'fieldcontain'}=address
%li{ :'data-role' => 'list-divider'} Realms
- - @load_balancer.realms.each do |realm|
+ - load_balancer.realms.each do |realm|
%li
%a{ :href => realm_url(realm.id), :'data-ajax' => 'false'}
%h3=realm.name
%li{ :'data-role' => 'list-divider'} Registered Instances
- - @registered_instances.each do |instance|
+ - registered_instances.each do |instance|
%li
%a{ :href => instance_url(instance[:id]), :'data-ajax' => 'false'}
%h3=instance[:name]
- =link_to_action "Unregister",
url_for("load_balancers/#{@load_balancer.id}/unregister?instance_id=#{instance[:id]}"),
:post
+ =link_to_action "Unregister",
url_for("load_balancers/#{load_balancer.id}/unregister?instance_id=#{instance[:id]}"),
:post
%li{ :'data-role' => 'list-divider'} Unregistered Instances
- - @unregistered_instances.each do |instance|
+ - unregistered_instances.each do |instance|
%li
%a{:href => instance_url(instance[:id]), :'data-ajax' => 'false'}
%h3=instance[:name]
- =link_to_action "Register",
url_for("load_balancers/#{@load_balancer.id}/register?instance_id=#{instance[:id]}"),
:post
+ =link_to_action "Register",
url_for("load_balancers/#{load_balancer.id}/register?instance_id=#{instance[:id]}"),
:post
%li{ :'data-role' => 'list-divider'} Actions
%li
- =link_to_action "Destroy",
url_for("load_balancers/#{@load_balancer.id}"), :delete
+ =link_to_action "Destroy",
url_for("load_balancers/#{load_balancer.id}"), :delete
=header "Listeners", :back => 'false'
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
- - @load_balancer.listeners.each do |listener|
+ - load_balancer.listeners.each do |listener|
%li{ :'data-role' => 'list-divider'} Load balancer port
%li
%p{ :'data-role' => 'fieldcontain'}=listener.load_balancer_port
diff --git a/server/views/metrics/index.html.haml
b/server/views/metrics/index.html.haml
index 21a9015..e4277ae 100644
--- a/server/views/metrics/index.html.haml
+++ b/server/views/metrics/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @metrics.each do |metric|
+ - metrics.each do |metric|
%li
%a{ :href => metric_url(metric.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/metric.png'}
diff --git a/server/views/metrics/show.html.haml
b/server/views/metrics/show.html.haml
index 648ba33..403c0fd 100644
--- a/server/views/metrics/show.html.haml
+++ b/server/views/metrics/show.html.haml
@@ -1,9 +1,9 @@
=header Metric
-=subheader @metric.id
+=subheader metric.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%div{ :'data-role' => :'collapsible-set'}
- - @metric.properties.each do |p|
+ - metric.properties.each do |p|
%div{ :'data-role' => :'collapsible', :'data-collapse' => 'true'}
%h3=p.name
%table{ :summary => "#{p.name} values"}
diff --git a/server/views/realms/index.html.haml
b/server/views/realms/index.html.haml
index 5e91e56..b041003 100644
--- a/server/views/realms/index.html.haml
+++ b/server/views/realms/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @realms.each do |realm|
+ - elements.each do |realm|
%li
%a{ :href => realm_url(realm.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/realm.png'}
diff --git a/server/views/realms/show.html.haml
b/server/views/realms/show.html.haml
index f2c52f7..a2acd4d 100644
--- a/server/views/realms/show.html.haml
+++ b/server/views/realms/show.html.haml
@@ -1,17 +1,17 @@
=header Realm
-=subheader @realm.id
+=subheader realm.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Identifier
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=realm.id
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=realm.name
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=realm.state
%li{ :'data-role' => 'list-divider'} Limit
%li
- %p{ :'data-role' => 'fieldcontain'}[email protected]
+ %p{ :'data-role' => 'fieldcontain'}=realm.limit
diff --git a/server/views/storage_snapshots/index.html.haml
b/server/views/storage_snapshots/index.html.haml
index 4443141..3b94b67 100644
--- a/server/views/storage_snapshots/index.html.haml
+++ b/server/views/storage_snapshots/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @storage_snapshots.each do |snapshot|
+ - elements.each do |snapshot|
%li
%a{ :href => storage_snapshot_url(snapshot.id), :'data-ajax' =>
'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/snapshot.png'}
diff --git a/server/views/storage_snapshots/show.html.haml
b/server/views/storage_snapshots/show.html.haml
index 069e452..a23b677 100644
--- a/server/views/storage_snapshots/show.html.haml
+++ b/server/views/storage_snapshots/show.html.haml
@@ -1,22 +1,22 @@
=header "Storage snapshot"
-=subheader @storage_snapshot.id
+=subheader storage_snapshot.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.id
+ %p{ :'data-role' => 'fieldcontain'}=storage_snapshot.id
%li{ :'data-role' => 'list-divider'} Storage volume
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.storage_volume_id
+ %p{ :'data-role' => 'fieldcontain'}=storage_snapshot.storage_volume_id
%li{ :'data-role' => 'list-divider'} Created
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.created
+ %p{ :'data-role' => 'fieldcontain'}=storage_snapshot.created
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.state
+ %p{ :'data-role' => 'fieldcontain'}=storage_snapshot.state
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- if driver.respond_to?(:destroy_storage_snapshot)
- =link_to_action "Delete",
url_for("storage_snapshots/#{@storage_snapshot.id}"), :delete
+ =link_to_action "Delete",
url_for("storage_snapshots/#{storage_snapshot.id}"), :delete
diff --git a/server/views/storage_volumes/attach.html.haml
b/server/views/storage_volumes/attach.html.haml
index 073cc2a..0deb638 100644
--- a/server/views/storage_volumes/attach.html.haml
+++ b/server/views/storage_volumes/attach.html.haml
@@ -4,12 +4,12 @@
%p
%label
Instance ID:
- - if @instances.empty?
+ - if instances.empty?
%select
%option There are no instances
- else
%select{ :name => 'instance_id' }
- - @instances.each do |i|
+ - instances.each do |i|
%option{ :value => "#{i.id}"} #{i.name}
%p
%label
diff --git a/server/views/storage_volumes/index.html.haml
b/server/views/storage_volumes/index.html.haml
index 2cc8794..2a3570c 100644
--- a/server/views/storage_volumes/index.html.haml
+++ b/server/views/storage_volumes/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @storage_volumes.each do |volume|
+ - elements.each do |volume|
%li
%a{ :href => storage_volume_url(volume.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/volume.png'}
diff --git a/server/views/storage_volumes/show.html.haml
b/server/views/storage_volumes/show.html.haml
index e7a0d69..8630daa 100644
--- a/server/views/storage_volumes/show.html.haml
+++ b/server/views/storage_volumes/show.html.haml
@@ -1,43 +1,43 @@
=header "Storage volume"
-=subheader @storage_volume.id
+=subheader storage_volume.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true,
:'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.id
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.id
%li
- %p{ :'data-role' => 'fieldcontain'}=(@storage_volume.name ?
@storage_volume.name : @storage_volume.id)
+ %p{ :'data-role' => 'fieldcontain'}=(storage_volume.name ?
storage_volume.name : storage_volume.id)
%li{ :'data-role' => 'list-divider'} Created
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.created
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.created
%li{ :'data-role' => 'list-divider'} Capacity
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.capacity
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.capacity
%li{ :'data-role' => 'list-divider'} Realm
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.realm_id
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.realm_id
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.state
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.state
%li{ :'data-role' => 'list-divider'} Attached to
%li
- - if @storage_volume.instance_id
- %a{ :href => instance_url( @storage_volume.instance_id)}
- = @storage_volume.instance_id
- - elsif @storage_volume.state and @storage_volume.state != "IN-USE"
+ - if storage_volume.instance_id
+ %a{ :href => instance_url( storage_volume.instance_id)}
+ = storage_volume.instance_id
+ - elsif storage_volume.state and storage_volume.state != "IN-USE"
%p{ :'data-role' => 'fieldcontain'}= 'none (detached)'
-else
%p{ :'data-role' => 'fieldcontain'}= 'unknown'
%li{ :'data-role' => 'list-divider'} Device
%li
- %p{ :'data-role' => 'fieldcontain'}= @storage_volume.device
+ %p{ :'data-role' => 'fieldcontain'}= storage_volume.device
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- - if ["AVAILABLE", "IN-USE"].include?(@storage_volume.state)
- =link_to_action "Snapshot...",
url_for("storage_snapshots/new?volume_id=#{@storage_volume.id}"), :get
- - unless @storage_volume.instance_id
- =link_to_action "Delete",
url_for("storage_volumes/#{@storage_volume.id}"), :delete
- =link_to_action "Attach...",
url_for("storage_volumes/#{@storage_volume.id}/attach_instance"), :get
- - if @storage_volume.instance_id
- =link_to_action "Detach",
url_for("storage_volumes/#{@storage_volume.id}/detach"), :post
+ - if ["AVAILABLE", "IN-USE"].include?(storage_volume.state)
+ =link_to_action "Snapshot...",
url_for("storage_snapshots/new?volume_id=#{storage_volume.id}"), :get
+ - unless storage_volume.instance_id
+ =link_to_action "Delete",
url_for("storage_volumes/#{storage_volume.id}"), :delete
+ =link_to_action "Attach...",
url_for("storage_volumes/#{storage_volume.id}/attach_instance"), :get
+ - if storage_volume.instance_id
+ =link_to_action "Detach",
url_for("storage_volumes/#{storage_volume.id}/detach"), :post
--
1.8.1.4