From 7a53d280bff6e9d5992b788c2ee2e8b9cad39e64 Mon Sep 17 00:00:00 2001 From: Gabriel Hurley Date: Wed, 11 Apr 2012 15:32:01 -0700 Subject: [PATCH] Made quota names prettier. Fixed bug 979417. Change-Id: Iaf87fa6d18d4c7c9309d1e60c3d8daf77f7ddfca --- horizon/dashboards/syspanel/quotas/tables.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/horizon/dashboards/syspanel/quotas/tables.py b/horizon/dashboards/syspanel/quotas/tables.py index 18b52922f4..9ca936e36b 100644 --- a/horizon/dashboards/syspanel/quotas/tables.py +++ b/horizon/dashboards/syspanel/quotas/tables.py @@ -20,8 +20,12 @@ class QuotaFilterAction(tables.FilterAction): return filter(comp, tenants) +def get_quota_name(quota): + return quota.name.replace("_", " ").title() + + class QuotasTable(tables.DataTable): - name = tables.Column('name', verbose_name=_('Quota Name')) + name = tables.Column(get_quota_name, verbose_name=_('Quota Name')) limit = tables.Column("limit", verbose_name=_('Limit')) def get_object_id(self, obj):