diff --git a/OpenBench/static/style.css b/OpenBench/static/style.css index c465628..6872910 100644 --- a/OpenBench/static/style.css +++ b/OpenBench/static/style.css @@ -60,7 +60,7 @@ a:link, a:visited, a:hover, a:active { display: inline-block; vertical-align: middle; width: 290px; - background-color: #A7D691; + background-color: #00CCFF; color: black; border: none; border-radius: 8px; @@ -69,12 +69,12 @@ a:link, a:visited, a:hover, a:active { } #content button:hover { - background-color: #6AC63F; + background-color: #FFFFFF; } #content input[type=submit] { - background-color: #15A049; - color: white; + background-color: #00CCFF; + color: #000000; border: none; border-radius: 8px; cursor: pointer; @@ -83,7 +83,7 @@ a:link, a:visited, a:hover, a:active { } #content input[type=submit]:hover { - background-color: #4CAF50; + background-color: #FFFFFF; } #content input:read-only { @@ -99,6 +99,12 @@ a:link, a:visited, a:hover, a:active { margin-top: 20px; } +#content .summarytable th { + padding-right: 10px; + font-size: 20px; + color: #00CCFF; +} + #content .rawtable td { padding-right: 20px; } @@ -117,13 +123,17 @@ a:link, a:visited, a:hover, a:active { } #content #actions .anchorbutton { - color: black; + color: #000000; padding: 8px 8px; - border-radius: 4px; + border-radius: 8px; font-weight: bold; text-align: center; display: inline-block; - width: 20%; + width: 25%; +} + +#content #actions .anchorbutton a:hover { + background-color: #FFFFFF; } #content #actions #approvebutton { @@ -156,10 +166,10 @@ a:link, a:visited, a:hover, a:active { } #content .datatable th { - color: #EAEAEA; + color: #FFFFFF; font-size: 20px; padding: 6px 12px; - background-color: #15A049; + background-color: #2A2A2A; } #content .datatable td { @@ -183,14 +193,14 @@ a:link, a:visited, a:hover, a:active { #content .datatable .embedded h2 { margin: 16px 0px 0px 0px; - pading: 0px; - color: #FFFFFF; + color: #00CCFF; } #content .datatable .statblock { line-height: 70%; color: black; background-color: #AAAAAA; + border-radius: 4px; } #content .datatable .green { @@ -259,12 +269,7 @@ a:link, a:visited, a:hover, a:active { color: #00CCFF; } -#content form #left-settings { - float: left; - padding-bottom: 4px; -} - -#content form #right-settings { +#content form .settings-column { float: left; padding-bottom: 4px; } diff --git a/OpenBench/templatetags/mytags.py b/OpenBench/templatetags/mytags.py index 7add70d..05d7ddc 100644 --- a/OpenBench/templatetags/mytags.py +++ b/OpenBench/templatetags/mytags.py @@ -84,6 +84,13 @@ def testResultColour(test): return 'red' return '' +def sumAttributes(iterable, attribute): + try: return sum([getattr(f, attribute) for f in iterable]) + except: return 0 + +def insertCommas(value): + return '{:,}'.format(int(value)) + register = template.Library() register.filter('oneDigitPrecision', oneDigitPrecision) register.filter('twoDigitPrecision', twoDigitPrecision) @@ -91,4 +98,6 @@ register.filter('gitDiffLink', gitDiffLink) register.filter('shortStatBlock', shortStatBlock) register.filter('longStatBlock', longStatBlock) register.filter('testResultColour', testResultColour) +register.filter('sumAttributes', sumAttributes) +register.filter('insertCommas', insertCommas) diff --git a/OpenBench/views.py b/OpenBench/views.py index cfd5eda..902970d 100644 --- a/OpenBench/views.py +++ b/OpenBench/views.py @@ -309,6 +309,7 @@ def viewTest(request, id): # Build context dictionary for test template test = Test.objects.get(id=id) results = Result.objects.all().filter(test=test) + results = results.order_by('machine_id') data = {'test' : test, 'results' : results} return render(request, 'viewTest.html', data) diff --git a/Templates/OpenBench/index.html b/Templates/OpenBench/index.html index f9a6bb9..2345a28 100644 --- a/Templates/OpenBench/index.html +++ b/Templates/OpenBench/index.html @@ -1,48 +1,27 @@ {% extends "OpenBench/base.html" %} {% load mytags %} {% block content %} + {% if paging.page == 0 and greens == False %} - {% if pending %} - - - - - - - - - - {% endif %} {% for test in pending %} - + - {% endfor %} - {% if active %} - - - - - - - - - + {% endif %} {% for test in active %} - + - @@ -51,22 +30,10 @@ {% endfor %} {% endif %} - {% if completed %} - - - - - - - - - - {% endif %} {% for test in completed %} - + - @@ -74,6 +41,7 @@ {% endfor %}

Pending

DATEENGINEUSERTESTDIFFTIMESTATS
{{test.creation|date:"y-m-d"}}{{test.author}} {{test.engine}}{{test.author}} {{test.dev.name}} diff {{test.timecontrol}} {{test|shortStatBlock|linebreaksbr}}

Active - {{status}}

DATEENGINEUSERTESTDIFFTIMESTATS

Active {{status}}

{{test.creation|date:"y-m-d"}}{{test.author}} {{test.engine}}{{test.author}} {{test.dev.name}} diff {{test.timecontrol}}

Finished

DATEENGINEUSERTESTDIFFTIMESTATS
{{test.creation|date:"y-m-d"}}{{test.author}} {{test.engine}}{{test.author}} {{test.dev.name}} diff {{test.timecontrol}}
+
{% if paging.prev != paging.next %} <-- diff --git a/Templates/OpenBench/newTest.html b/Templates/OpenBench/newTest.html index 9ad3f22..c03402f 100644 --- a/Templates/OpenBench/newTest.html +++ b/Templates/OpenBench/newTest.html @@ -53,7 +53,7 @@ {% block content %}
{% csrf_token %} -
+

Engine


-
+

Game Settings


- +
- +
- +
diff --git a/Templates/OpenBench/users.html b/Templates/OpenBench/users.html index 8385b36..3e625e4 100644 --- a/Templates/OpenBench/users.html +++ b/Templates/OpenBench/users.html @@ -1,37 +1,36 @@ {% extends "OpenBench/base.html" %} +{% load mytags %} + {% block style %} {% load static %} {% endblock %} {% block content %} + + + + + + + +
OVERALL | USERS {{ profiles|length }} | TESTS {{ profiles|sumAttributes:"tests"|insertCommas }}| GAMES {{ profiles|sumAttributes:"games"|insertCommas }}
+
- + - - - + {% for profile in profiles %} - + - {% if profile.enabled %} - - {% else %} - - {% endif %} - {% if profile.approver %} - - {% else %} - - {% endif %} diff --git a/Templates/OpenBench/viewTest.html b/Templates/OpenBench/viewTest.html index 8da86f4..095e16e 100644 --- a/Templates/OpenBench/viewTest.html +++ b/Templates/OpenBench/viewTest.html @@ -144,30 +144,31 @@
+
UsernameLast Seen OnLast Seen Games TestsEnabledApprover EngineRepoSource Repository
{{profile.user.username}}{{profile.updated|date:'Y-m-d H:i'}}{{profile.updated|date:'Y-m-d'}} {{profile.games}} {{profile.tests}}XX{{profile.engine}} {{profile.repo}}
- - - + + + - - - - - + + + + + {% for result in results %} + - - + {% endfor %}
UserMachineUpdatedIDOwnerLast Updated GamesWinLossDrawCrashTimeWinLossDrawTimeCrash
{{result.machine.id}} {{result.machine.owner}}{{result.machine.osname}} {{result.updated|date:'Y-m-d H:i'}} {{result.games}} {{result.wins}} {{result.losses}} {{result.draws}}{{result.crashes}} {{result.timeloss}}{{result.crashes}}