Host aggregates missing the metadata column

When the Host Aggregates table was moved to its own panel, we lost the
'metadata' column. Bringing it back. It contains useful information and should
be displayed in the table.

Change-Id: Ic87c31904ead459cbee2283268f8b30ce7d47acf
Closes-Bug: 1289466
This commit is contained in:
Luis de Bethencourt 2014-03-07 14:51:50 -05:00
parent ce7eb3ec4c
commit 685ffa4723
1 changed files with 9 additions and 0 deletions

View File

@ -72,6 +72,11 @@ def get_aggregate_hosts(aggregate):
return [host for host in aggregate.hosts]
def get_metadata(aggregate):
return [' = '.join([key, val]) for key, val
in aggregate.metadata.iteritems()]
def get_available(zone):
return zone.zoneState['available']
@ -94,6 +99,10 @@ class HostAggregatesTable(tables.DataTable):
verbose_name=_("Hosts"),
wrap_list=True,
filters=(filters.unordered_list,))
metadata = tables.Column(get_metadata,
verbose_name=_("Metadata"),
wrap_list=True,
filters=(filters.unordered_list,))
class Meta:
name = "host_aggregates"