Total |
- {{ allocation_total.resources.first.name}} |
- {{ allocation_total.path}} |
- {{ allocation_total.allocation_user_count}} |
- {{ allocation_total.size|floatformat:1}} |
- ${{allocation_total.cost|floatformat:2 }} |
+ {{ allocation_total.resources.first.name }} |
+ {{ allocation_total.path }} |
+ {{ allocation_total.allocation_user_count }} |
+ {{ allocation_total.size|floatformat:1 }} |
+ {{ allocation_total.usage|floatformat:1 }} |
+ ${{ allocation_total.cost|floatformat:2 }} |
|
|
diff --git a/coldfront/core/project/views.py b/coldfront/core/project/views.py
index 143d4e89c..ee0c101e2 100644
--- a/coldfront/core/project/views.py
+++ b/coldfront/core/project/views.py
@@ -204,7 +204,7 @@ def get_context_data(self, **kwargs):
allocations = allocations.filter(
status__name__in=['Active', 'Paid', 'Ready for Review','Payment Requested']
).distinct().order_by('-end_date')
- allocation_total = {'allocation_user_count': 0, 'size': 0, 'cost': 0}
+ allocation_total = {'allocation_user_count': 0, 'size': 0, 'cost': 0, 'usage': 0}
for allocation in allocations:
if allocation.cost:
allocation_total['cost'] += allocation.cost
@@ -212,6 +212,7 @@ def get_context_data(self, **kwargs):
allocation.allocationuser_set.count()
)
allocation_total['size'] += float(allocation.size)
+ allocation_total['usage'] += float(allocation.usage)
try:
time_chart_data = generate_usage_history_graph(self.object)