Add units in overview project page (limit summary)
Since liberty, there is no unit in the overview project page. Trying to fix it. Closes-bug: #1589523 Change-Id: I82710d7157b0b8b3cc8128283cd0bfa2f075db71
This commit is contained in:
parent
5424cf2932
commit
4570413773
@ -12,9 +12,19 @@
|
|||||||
<div class="quota_title" title="{{ quota.name }}" data-toggle="tooltip"> {{ quota.name }}</div>
|
<div class="quota_title" title="{{ quota.name }}" data-toggle="tooltip"> {{ quota.name }}</div>
|
||||||
<div class="quota_subtitle">
|
<div class="quota_subtitle">
|
||||||
{% if quota.max|quotainf != '-1' %}
|
{% if quota.max|quotainf != '-1' %}
|
||||||
{% blocktrans trimmed with used=quota.used|intcomma available=quota.max|quotainf|intcomma %}
|
{% if quota.type == "totalRAMUsed" %}
|
||||||
Used <span> {{ used }} </span>of<span> {{ available }} </span>
|
{% blocktrans trimmed with used=quota.used|mb_float_format available=quota.max|quotainf|mb_float_format %}
|
||||||
{% endblocktrans %}
|
Used <span> {{ used }} </span>of<span> {{ available }} </span>
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% elif quota.type == "totalGigabytesUsed" %}
|
||||||
|
{% blocktrans trimmed with used=quota.used|diskgbformat available=quota.max|quotainf|diskgbformat %}
|
||||||
|
Used <span> {{ used }} </span>of<span> {{ available }} </span>
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% else %}
|
||||||
|
{% blocktrans trimmed with used=quota.used|intcomma available=quota.max|quotainf|intcomma %}
|
||||||
|
Used <span> {{ used }} </span>of<span> {{ available }} </span>
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% blocktrans trimmed with used=quota.used|intcomma %}
|
{% blocktrans trimmed with used=quota.used|intcomma %}
|
||||||
Used <span> {{ used }} </span>(No Limit)
|
Used <span> {{ used }} </span>(No Limit)
|
||||||
|
@ -84,6 +84,7 @@ class UsageView(tables.DataTableView):
|
|||||||
if len(t) > 3:
|
if len(t) > 3:
|
||||||
text = t[3]
|
text = t[3]
|
||||||
context['charts'].append({
|
context['charts'].append({
|
||||||
|
'type': t[0],
|
||||||
'name': t[2],
|
'name': t[2],
|
||||||
'used': self.usage.limits[t[0]],
|
'used': self.usage.limits[t[0]],
|
||||||
'max': self.usage.limits[t[1]],
|
'max': self.usage.limits[t[1]],
|
||||||
|
Loading…
Reference in New Issue
Block a user