diff options
Diffstat (limited to 'openstack_dashboard/dashboards/project/databases/tables.py')
-rw-r--r-- | openstack_dashboard/dashboards/project/databases/tables.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openstack_dashboard/dashboards/project/databases/tables.py b/openstack_dashboard/dashboards/project/databases/tables.py index 69e7f8401..389df0e3b 100644 --- a/openstack_dashboard/dashboards/project/databases/tables.py +++ b/openstack_dashboard/dashboards/project/databases/tables.py @@ -133,6 +133,12 @@ def get_size(instance): return _("Not available") +def get_volume_size(instance): + if hasattr(instance, "volume"): + return sizeformat.diskgbformat(instance.volume.get("size")) + return _("Not available") + + def get_databases(user): if hasattr(user, "access"): databases = [db.name for db in user.access] @@ -156,6 +162,9 @@ class InstancesTable(tables.DataTable): size = tables.Column(get_size, verbose_name=_("Size"), attrs={'data-type': 'size'}) + volume = tables.Column(get_volume_size, + verbose_name=_("Volume Size"), + attrs={'data-type': 'size'}) status = tables.Column("status", filters=(title, filters.replace_underscores), verbose_name=_("Status"), |