More client work .. reports wrong benches.
Just need report NPS after running benches Just need report Results after games
This commit is contained in:
1 parent
009424b616
commit
dcce521447
6 files changed
+236
-214
No files matched your search
+29
-8
@@ -324,7 +324,7 @@ def deleteTest(request, id):
|
||||
|
||||
# Delete the provided test
|
||||
test = Test.objects.get(id=id)
|
||||
test.delete = True
|
||||
test.deleted = True
|
||||
test.save()
|
||||
|
||||
# Log the test deltion
|
||||
@@ -343,7 +343,7 @@ def deleteTest(request, id):
|
||||
def getFiles(request):
|
||||
|
||||
# Core Files should be sitting in framework's repo
|
||||
source = FRAMEWORK_REPO_URL + '/raw/master/CoreFiles/'
|
||||
source = FRAMEWORK_REPO_URL + 'raw/master/CoreFiles/'
|
||||
return HttpResponse(source)
|
||||
|
||||
@csrf_exempt
|
||||
@@ -374,13 +374,34 @@ def getWorkload(request):
|
||||
# Send ID's and test information as a string dictionary
|
||||
return HttpResponse(str(OpenBench.utils.workloadDictionary(machine, result, test)))
|
||||
|
||||
@csrf_exempt
|
||||
def wrongBench(request):
|
||||
|
||||
# Attempt to login in user
|
||||
try: loginUser(request, authenticate(
|
||||
username=request.POST['username'],
|
||||
password=request.POST['password']))
|
||||
except: return HttpResponse('Bad Credentials')
|
||||
|
||||
# Find the engine with the bad bench
|
||||
engineid = int(request.POST['engineid'])
|
||||
engine = Engine.objects.get(id=engineid)
|
||||
|
||||
# Find and stop the test with the bad bench
|
||||
testid = int(request.POST['testid'])
|
||||
test = Test.objects.get(id=testid)
|
||||
test.finished = True
|
||||
test.save()
|
||||
|
||||
# Log the bad bench so we know why the test was stopped
|
||||
LogEvent.objects.create(
|
||||
data='Invalid bench for {0} with {1}'.format(str(test), str(engine)),
|
||||
author=request.POST['username']
|
||||
)
|
||||
|
||||
return HttpResponse('None')
|
||||
|
||||
@csrf_exempt
|
||||
def submitResults(request):
|
||||
pass
|
||||
|
||||
@csrf_exempt
|
||||
def invalidBench(request):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user