Add priority group dividers (#183)
This commit is contained in:
1 parent
77d34a71f7
commit
2363e7a517
3 files changed
+20
-3
No files matched your search
@@ -161,6 +161,12 @@ body, html, main{
|
|||||||
background-color: #171717;
|
background-color: #171717;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#content .table-small-header th {
|
||||||
|
color: var(--color-font3);
|
||||||
|
font-size: small;
|
||||||
|
background-color: #171717;
|
||||||
|
}
|
||||||
|
|
||||||
/* Table Spacer for chaining Tables as a hack */
|
/* Table Spacer for chaining Tables as a hack */
|
||||||
|
|
||||||
#content .table-spacer th, #content .table-spacer tr {
|
#content .table-spacer th, #content .table-spacer tr {
|
||||||
|
|||||||
+10
-2
@@ -251,6 +251,14 @@ def profile_config(request):
|
|||||||
# TEST LIST VIEWS #
|
# TEST LIST VIEWS #
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
def priority_grouped(active):
|
||||||
|
active_grouped = []
|
||||||
|
for t in active:
|
||||||
|
if len(active_grouped) == 0 or active_grouped[-1]["priority"] != t.priority:
|
||||||
|
active_grouped.append({"priority": t.priority, "tests": []})
|
||||||
|
active_grouped[-1]["tests"].append(t)
|
||||||
|
return active_grouped
|
||||||
|
|
||||||
def index(request, page=1):
|
def index(request, page=1):
|
||||||
|
|
||||||
pending = OpenBench.utils.get_pending_tests()
|
pending = OpenBench.utils.get_pending_tests()
|
||||||
@@ -262,7 +270,7 @@ def index(request, page=1):
|
|||||||
|
|
||||||
data = {
|
data = {
|
||||||
'pending' : pending,
|
'pending' : pending,
|
||||||
'active' : active,
|
'active' : priority_grouped(active),
|
||||||
'completed' : completed[start:end],
|
'completed' : completed[start:end],
|
||||||
'awaiting' : awaiting,
|
'awaiting' : awaiting,
|
||||||
'paging' : paging,
|
'paging' : paging,
|
||||||
@@ -282,7 +290,7 @@ def user(request, username, page=1):
|
|||||||
|
|
||||||
data = {
|
data = {
|
||||||
'pending' : pending,
|
'pending' : pending,
|
||||||
'active' : active,
|
'active' : priority_grouped(active),
|
||||||
'completed' : completed[start:end],
|
'completed' : completed[start:end],
|
||||||
'awaiting' : awaiting,
|
'awaiting' : awaiting,
|
||||||
'paging' : paging,
|
'paging' : paging,
|
||||||
|
|||||||
@@ -32,11 +32,14 @@
|
|||||||
<!-- Currently Running tests (Waiting to be completed) -->
|
<!-- Currently Running tests (Waiting to be completed) -->
|
||||||
{% if active %}
|
{% if active %}
|
||||||
<tr class="table-header"><th colspan='6'>Active {{status}}</th></tr>
|
<tr class="table-header"><th colspan='6'>Active {{status}}</th></tr>
|
||||||
{% for test in active %}
|
{% for group in active %}
|
||||||
|
<tr class="table-small-header"><th colspan='6'>Priority {{group.priority}}</th></tr>
|
||||||
|
{% for test in group.tests %}
|
||||||
<tr>
|
<tr>
|
||||||
{% include "OpenBench/Blocks/testsummary.html" %}
|
{% include "OpenBench/Blocks/testsummary.html" %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
<tr class="table-spacer"><th colspan='6'></th></tr>
|
<tr class="table-spacer"><th colspan='6'></th></tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user