[PATCH conductor] BZ#790832 Don't filter out stopped instances from list view

Tomas Sedovic tsedovic at redhat.com
Tue Feb 21 15:24:41 UTC 2012


On 02/21/2012 04:15 PM, Imre Farkas wrote:
> On 02/21/2012 11:24 AM, tsedovic at redhat.com wrote:
>> From: Tomas Sedovic<tomas at sedovic.cz>
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=790832
>> ---
>> src/app/controllers/deployments_controller.rb | 2 +-
>> src/app/controllers/pools_controller.rb | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/app/controllers/deployments_controller.rb
>> b/src/app/controllers/deployments_controller.rb
>> index e36c483..717bb82 100644
>> --- a/src/app/controllers/deployments_controller.rb
>> +++ b/src/app/controllers/deployments_controller.rb
>> @@ -181,7 +181,7 @@ class DeploymentsController< ApplicationController
>> @failed_instances = @deployment.failed_instances
>> if filter_view?
>> @view = 'instances/list'
>> - params[:instances_preset_filter] = "other_than_stopped" unless
>> params[:instances_preset_filter]
>> + params[:instances_preset_filter] = "" unless
>> params[:instances_preset_filter]
>> @instances = Instance.apply_filters(:preset_filter_id =>
>> params[:instances_preset_filter], :search_filter =>
>> params[:instances_search]).list(sort_column(Instance),
>> sort_direction).where("instances.deployment_id" => @deployment.id)
>> else
>> @view = 'pretty_view_show'
>> diff --git a/src/app/controllers/pools_controller.rb
>> b/src/app/controllers/pools_controller.rb
>> index cb5b1d7..3447e4b 100644
>> --- a/src/app/controllers/pools_controller.rb
>> +++ b/src/app/controllers/pools_controller.rb
>> @@ -47,7 +47,7 @@ class PoolsController< ApplicationController
>> when 'pools'
>> @pools = Pool.apply_filters(:preset_filter_id =>
>> params[:pools_preset_filter], :search_filter =>
>> params[:pools_search]).list_for_user(current_user,
>> Privilege::VIEW).list(sort_column(Pool), sort_direction)
>> when 'instances'
>> - params[:instances_preset_filter] = "other_than_stopped" unless
>> params[:instances_preset_filter]
>> + params[:instances_preset_filter] = "" unless
>> params[:instances_preset_filter]
>> @instances = Instance.apply_filters(:preset_filter_id =>
>> params[:instances_preset_filter], :search_filter =>
>> params[:instances_search]).list_for_user(current_user,
>> Privilege::VIEW).list(sort_column(Instance), sort_direction)
>> when 'deployments'
>> @deployments = Deployment.apply_filters(:preset_filter_id =>
>> params[:deployments_preset_filter], :search_filter =>
>> params[:deployments_search]).list_for_user(current_user,
>> Privilege::VIEW).list(sort_column(Deployment), sort_direction)
>
> An attempt like this was NACKed in
> https://fedorahosted.org/pipermail/aeolus-devel/2012-January/007993.html
>
> But I don't know if the requirements has changed.

Oh, I didn't notice it then.

Yeah, the requirements changed (in that Athomas decreed this change ;-) 
) but I think this should have been acked back then.

We used to hide stopped instances back when there was no way of deleting 
them. We hid the stopped ones because you couldn't have done anything 
with them anyway and they cluttered up the view.

But now they can be deleted. And most the time, users see the pretty 
view of instances when they click a deployment -- where all the 
instances are shown.

This will make things more consistent.



More information about the aeolus-devel mailing list