BZ#719375 hide stopped instances filter not working
The 'hide stopped' filter link was not working. The show method now looks at the instance state and removes it from the display if the state is stopped.
The 'hide stopped' filter link was not working. The show method now looks at the instance state and removes it from the display if the state is stopped --- src/app/controllers/deployments_controller.rb | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb index 98171a9..ec2da6a 100644 --- a/src/app/controllers/deployments_controller.rb +++ b/src/app/controllers/deployments_controller.rb @@ -128,6 +128,10 @@ class DeploymentsController < ApplicationController if filter_view? @view = 'instances/list' @instances = @deployment.instances + @hide_stopped = @viewstate && @viewstate.state['hide_stopped'] == 'true' + if @hide_stopped + @instances.delete_if { |i| i.state == Instance::STATE_STOPPED } + end else @view = 'pretty_view_show' end
On 09/28/2011 11:50 AM, Chris Alfonso wrote:
The 'hide stopped' filter link was not working. The show method now looks at the instance state and removes it from the display if the state is stopped
src/app/controllers/deployments_controller.rb | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb index 98171a9..ec2da6a 100644 --- a/src/app/controllers/deployments_controller.rb +++ b/src/app/controllers/deployments_controller.rb @@ -128,6 +128,10 @@ class DeploymentsController< ApplicationController if filter_view? @view = 'instances/list' @instances = @deployment.instances
@hide_stopped = @viewstate&& @viewstate.state['hide_stopped'] == 'true'
if @hide_stopped
@instances.delete_if { |i| i.state == Instance::STATE_STOPPED }
end else @view = 'pretty_view_show' end
Works for me.
ACK.
m
aeolus-devel@lists.fedorahosted.org