diff --git a/batch/batch/front_end/front_end.py b/batch/batch/front_end/front_end.py
index e0726c1f60d..f5998c4ff27 100644
--- a/batch/batch/front_end/front_end.py
+++ b/batch/batch/front_end/front_end.py
@@ -2212,7 +2212,14 @@ async def ui_get_billing_limits(request, userdata):
billing_projects = await query_billing_projects(db, user=user)
- page_context = {'billing_projects': billing_projects, 'is_developer': userdata['is_developer']}
+ open_billing_projects = [bp for bp in billing_projects if bp['status'] == 'open']
+ closed_billing_projects = [bp for bp in billing_projects if bp['status'] == 'closed']
+
+ page_context = {
+ 'open_billing_projects': open_billing_projects,
+ 'closed_billing_projects': closed_billing_projects,
+ 'is_developer': userdata['is_developer'],
+ }
return await render_template('batch', request, userdata, 'billing_limits.html', page_context)
diff --git a/batch/batch/front_end/templates/billing_limits.html b/batch/batch/front_end/templates/billing_limits.html
index 33a1b5ea88c..2f5e1ad21ec 100644
--- a/batch/batch/front_end/templates/billing_limits.html
+++ b/batch/batch/front_end/templates/billing_limits.html
@@ -2,8 +2,10 @@
{% block title %}Billing Limits{% endblock %}
{% block content %}
Billing Project Limits
+{% if open_billing_projects %}
-
+ Open Projects
+
Billing Project |
@@ -12,7 +14,7 @@ Billing Project Limits
- {% for row in billing_projects %}
+ {% for row in open_billing_projects %}
{{ row['billing_project'] }} |
{{ row['accrued_cost'] }} |
@@ -34,4 +36,40 @@ Billing Project Limits
+{% endif %}
+{% if closed_billing_projects %}
+
+
Closed Projects
+
+
+
+ Billing Project |
+ Accrued Cost |
+ Limit |
+
+
+
+ {% for row in closed_billing_projects %}
+
+ {{ row['billing_project'] }} |
+ {{ row['accrued_cost'] }} |
+ {% if is_developer %}
+
+
+ |
+ {% else %}
+ {{ row['limit'] }} |
+ {% endif %}
+
+ {% endfor %}
+
+
+
+{% endif %}
{% endblock %}
\ No newline at end of file