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
+34
-17
No files matched your search
@@ -174,6 +174,12 @@ body, html, main{
|
|||||||
height: 1rem;
|
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 */
|
/* Generic Table CSS for all Tables */
|
||||||
|
|
||||||
#content table {
|
#content table {
|
||||||
|
|||||||
@@ -380,3 +380,14 @@ register.filter('git_diff_text', git_diff_text)
|
|||||||
register.filter('test_is_smp_odds' , test_is_smp_odds )
|
register.filter('test_is_smp_odds' , test_is_smp_odds )
|
||||||
register.filter('test_is_time_odds' , test_is_time_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 #
|
# 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()
|
||||||
@@ -270,7 +262,7 @@ def index(request, page=1):
|
|||||||
|
|
||||||
data = {
|
data = {
|
||||||
'pending' : pending,
|
'pending' : pending,
|
||||||
'active' : priority_grouped(active),
|
'active' : active,
|
||||||
'completed' : completed[start:end],
|
'completed' : completed[start:end],
|
||||||
'awaiting' : awaiting,
|
'awaiting' : awaiting,
|
||||||
'paging' : paging,
|
'paging' : paging,
|
||||||
@@ -290,7 +282,7 @@ def user(request, username, page=1):
|
|||||||
|
|
||||||
data = {
|
data = {
|
||||||
'pending' : pending,
|
'pending' : pending,
|
||||||
'active' : priority_grouped(active),
|
'active' : active,
|
||||||
'completed' : completed[start:end],
|
'completed' : completed[start:end],
|
||||||
'awaiting' : awaiting,
|
'awaiting' : awaiting,
|
||||||
'paging' : paging,
|
'paging' : paging,
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{% extends "OpenBench/base.html" %}
|
{% extends "OpenBench/base.html" %}
|
||||||
|
|
||||||
|
{% load mytags %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class="test-list stripes hoverable">
|
<table class="test-list stripes hoverable">
|
||||||
@@ -32,13 +34,19 @@
|
|||||||
<!-- 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 group in active %}
|
{% for test in active %}
|
||||||
<tr class="table-small-header"><th colspan='6'>Priority {{group.priority}}</th></tr>
|
|
||||||
{% for test in group.tests %}
|
<!-- Add two empty rows ( for the colouring scheme ) when changing prio -->
|
||||||
<tr>
|
{% with prev_test=active|previous:forloop.counter0 %}
|
||||||
{% include "OpenBench/Blocks/testsummary.html" %}
|
{% if prev_test and prev_test.priority != test.priority %}
|
||||||
</tr>
|
<tr class="table-spacer-small"><th colspan='6'></th></tr>
|
||||||
{% endfor %}
|
<tr class="table-spacer-small"><th colspan='6'></th></tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
{% include "OpenBench/Blocks/testsummary.html" %}
|
||||||
|
</tr>
|
||||||
{% 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