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
+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,
|
||||
|
||||
Reference in new issue
Block a user