On Mon, Jan 30, 2012 at 03:37:58PM +0100, jzigmund(a)redhat.com wrote:
From: Jozef Zigmund <jzigmund(a)redhat.com>
If pool.statistics[:instances_failed] is empty, it shows 0 now. Before it showed
ActiveRecord object.
https://bugzilla.redhat.com/show_bug.cgi?id=782336
---
src/app/views/pool_families/_pools.html.haml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/views/pool_families/_pools.html.haml
b/src/app/views/pool_families/_pools.html.haml
index 50a8c00..4c635f3 100644
--- a/src/app/views/pool_families/_pools.html.haml
+++ b/src/app/views/pool_families/_pools.html.haml
@@ -4,7 +4,7 @@
%td{:class => 'center'}= pool.deployments.count
%td{:class => 'center'}= pool.statistics[:total_instances]
%td{:class => 'center'}= pool.statistics[:instances_pending]
- %td{:class => 'center'}= pool.statistics[:instances_failed]
+ %td{:class => 'center'}= pool.statistics[:instances_failed].empty? ? 0 :
pool.statistics[:instances_failed]
%td{:class => 'center'}= pool.statistics[:quota_percent]
%td{:class => 'center'}= pool.statistics[:used_quota]
%td{:class => 'center'}= pool.statistics[:available_quota].nil? ?
raw('∞') : pool.statistics[:available_quota]
--
1.7.7.6
I think Scott's just-ACKed patch for 784108 changes what we need to do
here. There's now an :instances_failed_visible_count key, as well as
:instances_failed_count, so we can use that now.
-- Matt