[Ovirt-devel] [PATCH server] removed obsolete @attach_to_pool references
Scott Seago
sseago at redhat.com
Mon May 11 19:07:17 UTC 2009
Signed-off-by: Scott Seago <sseago at redhat.com>
---
src/app/controllers/storage_controller.rb | 23 ++++++-----------------
src/app/views/host/_list.rhtml | 3 ---
src/app/views/host/list.rhtml | 4 ----
src/app/views/storage/_list.rhtml | 5 -----
src/app/views/storage/list.rhtml | 4 ----
5 files changed, 6 insertions(+), 33 deletions(-)
diff --git a/src/app/controllers/storage_controller.rb b/src/app/controllers/storage_controller.rb
index 2cb5464..3cd969d 100644
--- a/src/app/controllers/storage_controller.rb
+++ b/src/app/controllers/storage_controller.rb
@@ -43,26 +43,15 @@ class StorageController < ApplicationController
:redirect_to => { :action => :list }
def list
- @attach_to_pool=params[:attach_to_pool]
- if @attach_to_pool
- pool = HardwarePool.find(@attach_to_pool)
- set_perms(pool)
- if authorize_view
- conditions = "hardware_pool_id is null"
- conditions += " or hardware_pool_id=#{pool.parent_id}" if pool.parent
- @storage_pools = StoragePool.find(:all, :conditions => conditions)
- end
- else
- #no permissions here yet -- do we disable raw volume list
- conditions = []
- EQ_ATTRIBUTES.each { |attr|
- conditions << "#{attr} = :#{attr}" if params[attr]
- }
+ #no permissions here yet -- do we disable raw volume list
+ conditions = []
+ EQ_ATTRIBUTES.each { |attr|
+ conditions << "#{attr} = :#{attr}" if params[attr]
+ }
- @storage_pools = StoragePool.find(:all,
+ @storage_pools = StoragePool.find(:all,
:conditions => [conditions.join(" and "), params],
:order => "id")
- end
end
def show
diff --git a/src/app/views/host/_list.rhtml b/src/app/views/host/_list.rhtml
index 2d68957..2ff2924 100644
--- a/src/app/views/host/_list.rhtml
+++ b/src/app/views/host/_list.rhtml
@@ -17,9 +17,6 @@
"Yes"
end
%></td>
-<%if @attach_to_pool -%>
- <td><%= link_to 'Choose', { :action => 'attach_to_pool', :id => host, :hardware_pool_id => @attach_to_pool }, { :class => "choose" } %></td>
-<% end -%>
</tr>
<% end %>
<tbody>
diff --git a/src/app/views/host/list.rhtml b/src/app/views/host/list.rhtml
index c1386bb..04846f3 100644
--- a/src/app/views/host/list.rhtml
+++ b/src/app/views/host/list.rhtml
@@ -19,11 +19,7 @@
</div>
<%- content_for :title do -%>
- <%if @attach_to_pool -%>
- <%= _("Choose a Host") %>
- <% else -%>
<%= _("Listing Hosts") %>
- <% end -%>
<%- end -%>
diff --git a/src/app/views/storage/_list.rhtml b/src/app/views/storage/_list.rhtml
index 652d659..ccb0dbe 100644
--- a/src/app/views/storage/_list.rhtml
+++ b/src/app/views/storage/_list.rhtml
@@ -29,14 +29,9 @@
<%elsif type == StoragePool::NFS -%>
<td><%= storage_pool[:export_path] %></td>
<% end -%>
-<%if @attach_to_pool -%>
- <td><%= link_to 'Choose', { :action => 'attach_to_pool', :id => storage_pool, :hardware_pool_id => @attach_to_pool }, { :class => "choose" } %></td>
-<% else -%>
-<!-- <td><%= link_to 'Edit', { :controller => "storage", :action => 'edit', :id => storage_pool }, { :class => "edit" } %></td> -->
<%- if defined?(remove_from_pool) && remove_from_pool -%>
<td><%= link_to( 'detach', { :controller => "storage", :action => 'remove_from_pool', :id => storage_pool, :hardware_pool_id => hardware_pool }, :confirm => 'Are you sure?', :method => :post, :class => "remove") %></td>
<%- end -%>
-<% end -%>
</tr>
<% end %>
</table>
diff --git a/src/app/views/storage/list.rhtml b/src/app/views/storage/list.rhtml
index 8f4ee6e..35731c3 100644
--- a/src/app/views/storage/list.rhtml
+++ b/src/app/views/storage/list.rhtml
@@ -24,9 +24,5 @@
</td>
<%- content_for :title do -%>
- <%if @attach_to_pool -%>
- <%= _("Choose a Storage Pool") %>
- <% else -%>
<%= _("Listing Storage Pools") %>
- <% end -%>
<%- end -%>
--
1.6.0.6
More information about the ovirt-devel
mailing list