diff --git a/openstack_dashboard/dashboards/admin/overview/templates/overview/usage.csv b/openstack_dashboard/dashboards/admin/overview/templates/overview/usage.csv index b13fcc023..87c1296ff 100644 --- a/openstack_dashboard/dashboards/admin/overview/templates/overview/usage.csv +++ b/openstack_dashboard/dashboards/admin/overview/templates/overview/usage.csv @@ -1,9 +1,9 @@ Usage Report For Period:,{{ usage.start|date:"b. d Y" }},/,{{ usage.end|date:"b. d Y" }} Active Instances:,{{ usage.summary.instances }} -CPU-HRs Used:,{{ usage.summary.vcpu_hours }} +CPU-HRs Used:,{{ usage.summary.vcpu_hours|floatformat:2 }} Total Active RAM (MB):,{{ usage.summary.memory_mb }} Total Disk Size:,{{ usage.summary.local_gb }} -Total Disk Usage:,{{ usage.summary.disk_gb_hours }} +Total Disk Usage:,{{ usage.summary.disk_gb_hours|floatformat:2 }} Tenant,VCPUs,RamMB,DiskGB,Usage(Hours) {% for u in usage.usage_list %}{{ u.tenant_id|addslashes }},{{ u.vcpus|addslashes }},{{ u.memory_mb|addslashes }},{{u.local_gb|addslashes }},{{ u.vcpu_hours|floatformat:2}} diff --git a/openstack_dashboard/dashboards/project/overview/templates/overview/usage.csv b/openstack_dashboard/dashboards/project/overview/templates/overview/usage.csv index a3f52bb35..3e2ecd5b2 100644 --- a/openstack_dashboard/dashboards/project/overview/templates/overview/usage.csv +++ b/openstack_dashboard/dashboards/project/overview/templates/overview/usage.csv @@ -1,11 +1,11 @@ Usage Report For Period:,{{ usage.start|date:"b. d Y" }},{{ usage.end|date:"b. d Y" }} Tenant ID:,{{ usage.tenant_id }} Total Active VCPUs:,{{ usage.summary.instances }} -CPU-HRs Used:,{{ usage.summary.vcpu_hours }} +CPU-HRs Used:,{{ usage.summary.vcpu_hours|floatformat:2 }} Total Active Ram (MB):,{{ usage.summary.memory_mb }} Total Disk Size:,{{ usage.summary.local_gb }} -Total Disk Usage:,{{ usage.summary.disk_gb_hours }} +Total Disk Usage:,{{ usage.summary.disk_gb_hours|floatformat:2 }} Name,VCPUs,RamMB,DiskGB,Usage(Hours),Uptime(Seconds),State -{% for s in usage.get_instances %}{{ s.name|addslashes }},{{ s.vcpus|addslashes }},{{ s.memory_mb|addslashes }},{{ s.local_gb|addslashes }},{{ s.hours }},{{ s.uptime }},{{ s.state|capfirst|addslashes }} +{% for s in usage.get_instances %}{{ s.name|addslashes }},{{ s.vcpus|addslashes }},{{ s.memory_mb|addslashes }},{{s.local_gb|addslashes }},{{ s.hours|floatformat:2 }},{{ s.uptime }},{{ s.state|capfirst|addslashes }} {% endfor %}