Finalize Priority Group Dividers (#184)
Co-authored-by: MinusKelvin <mark.carlson@minuskelvin.net>
This commit is contained in:
1 parent
2363e7a517
commit
003148abbe
4 files changed
+35
-18
No files matched your search
@@ -174,6 +174,12 @@ body, html, main{
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
#content .table-spacer-small th, #content .table-spacer-small tr {
|
||||
background-color: #171717;
|
||||
height: 0.4rem;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* Generic Table CSS for all Tables */
|
||||
|
||||
#content table {
|
||||
|
||||
@@ -379,4 +379,15 @@ register.filter('git_diff_text', git_diff_text)
|
||||
|
||||
register.filter('test_is_smp_odds' , test_is_smp_odds )
|
||||
register.filter('test_is_time_odds' , test_is_time_odds )
|
||||
register.filter('test_is_fischer' , test_is_fischer )
|
||||
register.filter('test_is_fischer' , test_is_fischer )
|
||||
|
||||
|
||||
@register.filter
|
||||
def next(iterable, index):
|
||||
try: return iterable[int(index) + 1]
|
||||
except: return None
|
||||
|
||||
@register.filter
|
||||
def previous(iterable, index):
|
||||
try: return iterable[int(index) - 1]
|
||||
except: return None
|
||||
+2
-10
@@ -251,14 +251,6 @@ def profile_config(request):
|
||||
# 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):
|
||||
|
||||
pending = OpenBench.utils.get_pending_tests()
|
||||
@@ -270,7 +262,7 @@ def index(request, page=1):
|
||||
|
||||
data = {
|
||||
'pending' : pending,
|
||||
'active' : priority_grouped(active),
|
||||
'active' : active,
|
||||
'completed' : completed[start:end],
|
||||
'awaiting' : awaiting,
|
||||
'paging' : paging,
|
||||
@@ -290,7 +282,7 @@ def user(request, username, page=1):
|
||||
|
||||
data = {
|
||||
'pending' : pending,
|
||||
'active' : priority_grouped(active),
|
||||
'active' : active,
|
||||
'completed' : completed[start:end],
|
||||
'awaiting' : awaiting,
|
||||
'paging' : paging,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{% extends "OpenBench/base.html" %}
|
||||
|
||||
{% load mytags %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<table class="test-list stripes hoverable">
|
||||
@@ -32,13 +34,19 @@
|
||||
<!-- Currently Running tests (Waiting to be completed) -->
|
||||
{% if active %}
|
||||
<tr class="table-header"><th colspan='6'>Active {{status}}</th></tr>
|
||||
{% for group in active %}
|
||||
<tr class="table-small-header"><th colspan='6'>Priority {{group.priority}}</th></tr>
|
||||
{% for test in group.tests %}
|
||||
<tr>
|
||||
{% include "OpenBench/Blocks/testsummary.html" %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for test in active %}
|
||||
|
||||
<!-- Add two empty rows ( for the colouring scheme ) when changing prio -->
|
||||
{% with prev_test=active|previous:forloop.counter0 %}
|
||||
{% if prev_test and prev_test.priority != test.priority %}
|
||||
<tr class="table-spacer-small"><th colspan='6'></th></tr>
|
||||
<tr class="table-spacer-small"><th colspan='6'></th></tr>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<tr>
|
||||
{% include "OpenBench/Blocks/testsummary.html" %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="table-spacer"><th colspan='6'></th></tr>
|
||||
{% endif %}
|
||||
|
||||
Reference in new issue
Block a user