Flag tests on the home screen if they have errors
This commit is contained in:
1 parent
b295842066
commit
764b65e755
4 files changed
+10
-4
No files matched your search
@@ -106,6 +106,7 @@ class Test(Model):
|
||||
wins = IntegerField(default=0)
|
||||
draws = IntegerField(default=0)
|
||||
losses = IntegerField(default=0)
|
||||
error = BooleanField(default=False)
|
||||
|
||||
passed = BooleanField(default=False)
|
||||
failed = BooleanField(default=False)
|
||||
|
||||
+6
-2
@@ -561,11 +561,15 @@ def clientSubmitError(request):
|
||||
machine = Machine.objects.get(id=int(request.POST['machineid']))
|
||||
if machine.user != user: return HttpResponse('Bad Machine')
|
||||
|
||||
# Flag the Test as having an error
|
||||
test = Test.objects.get(id=int(request.POST['testid']))
|
||||
test.error = True; test.save()
|
||||
|
||||
# Log the Error into the Events table
|
||||
LogEvent.objects.create(
|
||||
test = test,
|
||||
author = user.username,
|
||||
data = request.POST['error'],
|
||||
test = Test.objects.get(id=int(request.POST['testid'])))
|
||||
data = request.POST['error'])
|
||||
|
||||
return HttpResponse('None')
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ Create a user through the website, then through the Admin interface (found at /
|
||||
|
||||
```
|
||||
sudo apt-get install python3, pip3, git
|
||||
pip3 install Django==2.0.6
|
||||
pip3 install Django==3.0.5
|
||||
pip3 install django-htmlmin
|
||||
git clone https://github.com/AndyGrant/OpenBench
|
||||
cd OpenBench
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{% load mytags %}
|
||||
<tr>
|
||||
<td><a href="/user/{{test.author}}">{{test.author|slice:":6"}}</a></td>
|
||||
<td>{{test.engine}}</td>
|
||||
{% if test.error %} <td>{{test.engine}}<span style="color: red">*</span></td>
|
||||
{% else %} <td>{{test.engine}}</td> {% endif %}
|
||||
<td><a href="/test/{{test.id}}">{{test.dev.name|prettyName}}</a></td>
|
||||
<td class="textcenter"><a href="{{test|gitDiffLink}}">diff</a></td>
|
||||
<td>{{test.timecontrol}}</td>
|
||||
|
||||
Reference in new issue
Block a user