Add help text for vcpu hours

In overview page, disk hours and ram hours has help text.
Also add help text for vcpu hours.

Change-Id: Ic44cf8753a0deebc30f7087e2e54bab6dfde5284
Closes-bug:#1417856
This commit is contained in:
tinytmy 2015-02-04 13:51:16 +08:00
parent 26bddf3841
commit 58cbdb55ec

View File

@ -37,12 +37,15 @@ class BaseUsageTable(tables.DataTable):
verbose_name=_("RAM"), verbose_name=_("RAM"),
filters=(sizeformat.mb_float_format,), filters=(sizeformat.mb_float_format,),
attrs={"data-type": "size"}) attrs={"data-type": "size"})
hours = tables.Column('vcpu_hours', verbose_name=_("VCPU Hours"),
filters=(lambda v: floatformat(v, 2),))
class GlobalUsageTable(BaseUsageTable): class GlobalUsageTable(BaseUsageTable):
project = tables.Column('project_name', verbose_name=_("Project Name")) project = tables.Column('project_name', verbose_name=_("Project Name"))
vcpu_hours = tables.Column('vcpu_hours', verbose_name=_("VCPU Hours"),
help_text=_("Total VCPU usage (Number of "
"VCPU in instance * Hours Used) "
"for the project"),
filters=(lambda v: floatformat(v, 2),))
disk_hours = tables.Column('disk_gb_hours', disk_hours = tables.Column('disk_gb_hours',
verbose_name=_("Disk GB Hours"), verbose_name=_("Disk GB Hours"),
help_text=_("Total disk usage (GB * " help_text=_("Total disk usage (GB * "
@ -62,7 +65,7 @@ class GlobalUsageTable(BaseUsageTable):
hidden_title = False hidden_title = False
verbose_name = _("Usage") verbose_name = _("Usage")
columns = ("project", "vcpus", "disk", "memory", columns = ("project", "vcpus", "disk", "memory",
"hours", "disk_hours", "memory_hours") "vcpu_hours", "disk_hours", "memory_hours")
table_actions = (CSVSummary,) table_actions = (CSVSummary,)
multi_select = False multi_select = False