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 %} +
Pending | |||||||
| DATE | -ENGINE | -USER | -TEST | -DIFF | -TIME | -STATS | -|
|---|---|---|---|---|---|---|---|
| {{test.creation|date:"y-m-d"}} | +{{test.author}} | {{test.engine}} | -{{test.author}} | {{test.dev.name}} | diff | {{test.timecontrol}} | {{test|shortStatBlock|linebreaksbr}} |
Active - {{status}} | |||||||
| DATE | -ENGINE | -USER | -TEST | -DIFF | -TIME | -STATS | -|
Active {{status}} | |||||||
| {{test.creation|date:"y-m-d"}} | +{{test.author}} | {{test.engine}} | -{{test.author}} | {{test.dev.name}} | diff | {{test.timecontrol}} | @@ -51,22 +30,10 @@ {% endfor %} {% endif %}|
Finished | |||||||
| DATE | -ENGINE | -USER | -TEST | -DIFF | -TIME | -STATS | -|
| {{test.creation|date:"y-m-d"}} | +{{test.author}} | {{test.engine}} | -{{test.author}} | {{test.dev.name}} | diff | {{test.timecontrol}} | @@ -74,6 +41,7 @@|