Add missing Disk unit to Overview Usage
Added unit to the Summary table and the csv report Change-Id: I91a0bdd13384098cd2e306413bfc103c99bbc418 Closes-Bug: #1346389
This commit is contained in:
parent
d846d02955
commit
a6cd12f24d
@ -1,6 +1,6 @@
|
||||
{% load i18n %}{% trans "Usage Report For Period" %}:,{{ usage.start|date:"b. d Y" }},{{ usage.end|date:"b. d Y" }}
|
||||
{% trans "Active Instances" %}:,{{ usage.summary.instances }}
|
||||
{% trans "CPU-HRs Used" %}:,{{ usage.summary.vcpu_hours|floatformat:2 }}
|
||||
{% trans "Total VCPU Usage (Hours)" %}:,{{ usage.summary.vcpu_hours|floatformat:2 }}
|
||||
{% trans "Total Active RAM (MB)" %}:,{{ usage.summary.memory_mb }}
|
||||
{% trans "Total Disk Size" %}:,{{ usage.summary.local_gb }}
|
||||
{% trans "Total Disk Usage" %}:,{{ usage.summary.disk_gb_hours|floatformat:2 }}
|
||||
{% trans "Total Disk Size (GB)" %}:,{{ usage.summary.local_gb }}
|
||||
{% trans "Total Disk Usage (Hours)" %}:,{{ usage.summary.disk_gb_hours|floatformat:2 }}
|
||||
|
Can't render this file because it contains an unexpected character in line 1 and column 25.
|
@ -111,7 +111,7 @@ class UsageViewTests(test.BaseAdminViewTests):
|
||||
<td class="sortable normal_column">%.2f</td>
|
||||
</tr>
|
||||
''' % (usage_list[0].vcpus,
|
||||
usage_list[0].disk_gb_hours,
|
||||
sizeformat.diskgbformat(usage_list[0].disk_gb_hours),
|
||||
sizeformat.mbformat(usage_list[0].memory_mb),
|
||||
usage_list[0].vcpu_hours,
|
||||
usage_list[0].total_local_gb_usage)
|
||||
@ -128,7 +128,7 @@ class UsageViewTests(test.BaseAdminViewTests):
|
||||
<td class="sortable normal_column">%.2f</td>
|
||||
</tr>
|
||||
''' % (usage_list[1].vcpus,
|
||||
usage_list[1].disk_gb_hours,
|
||||
sizeformat.diskgbformat(usage_list[1].disk_gb_hours),
|
||||
sizeformat.mbformat(usage_list[1].memory_mb),
|
||||
usage_list[1].vcpu_hours,
|
||||
usage_list[1].total_local_gb_usage)
|
||||
|
@ -1593,7 +1593,7 @@ class UsageViewTests(test.BaseAdminViewTests):
|
||||
|
||||
self.assertTrue(isinstance(res.context['usage'], usage.ProjectUsage))
|
||||
hdr = ('Instance Name,VCPUs,RAM (MB),Disk (GB),Usage (Hours),'
|
||||
'Uptime(Seconds),State')
|
||||
'Uptime (Seconds),State')
|
||||
self.assertContains(res, '%s\r\n' % hdr)
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% load i18n %}{% trans "Usage Report For Period" %}:,{{ usage.start|date:"b. d Y" }},{{ usage.end|date:"b. d Y" }}
|
||||
{% trans "Project ID" %}:,{{ usage.project_id }}
|
||||
{% trans "Active Instances" %}:,{{ usage.summary.instances }}
|
||||
{% trans "CPU-HRs Used" %}:,{{ usage.summary.vcpu_hours|floatformat:2 }}
|
||||
{% trans "Total VCPU Usage (Hours)" %}:,{{ usage.summary.vcpu_hours|floatformat:2 }}
|
||||
{% trans "Total Active RAM (MB)" %}:,{{ usage.summary.memory_mb }}
|
||||
{% trans "Total Disk Size" %}:,{{ usage.summary.local_gb }}
|
||||
{% trans "Total Disk Usage" %}:,{{ usage.summary.disk_gb_hours|floatformat:2 }}
|
||||
{% trans "Total Disk Size (GB)" %}:,{{ usage.summary.local_gb }}
|
||||
{% trans "Total Disk Usage (Hours)" %}:,{{ usage.summary.disk_gb_hours|floatformat:2 }}
|
||||
|
Can't render this file because it contains an unexpected character in line 1 and column 25.
|
@ -31,7 +31,7 @@ class ProjectUsageCsvRenderer(csvbase.BaseCsvResponse):
|
||||
|
||||
columns = [_("Instance Name"), _("VCPUs"), _("RAM (MB)"),
|
||||
_("Disk (GB)"), _("Usage (Hours)"),
|
||||
_("Uptime(Seconds)"), _("State")]
|
||||
_("Uptime (Seconds)"), _("State")]
|
||||
|
||||
def get_row_data(self):
|
||||
|
||||
|
@ -31,7 +31,8 @@ class CSVSummary(tables.LinkAction):
|
||||
|
||||
class BaseUsageTable(tables.DataTable):
|
||||
vcpus = tables.Column('vcpus', verbose_name=_("VCPUs"))
|
||||
disk = tables.Column('local_gb', verbose_name=_("Disk"))
|
||||
disk = tables.Column('local_gb', verbose_name=_("Disk"),
|
||||
filters=(sizeformat.diskgbformat,))
|
||||
memory = tables.Column('memory_mb',
|
||||
verbose_name=_("RAM"),
|
||||
filters=(sizeformat.mbformat,),
|
||||
|
Loading…
x
Reference in New Issue
Block a user