Remove protocol from new test submission, rely on base configuration
This commit is contained in:
1 parent
81e791abec
commit
2f789b5a2e
2 files changed
+5
-12
No files matched your search
+5
-4
@@ -53,19 +53,20 @@ def getSourceLocation(branch, repo):
|
||||
|
||||
def newTest(request):
|
||||
|
||||
test = Test() # New Test, saved only after parsing
|
||||
# New Test saved after parsing
|
||||
test = Test()
|
||||
test.author = request.user.username
|
||||
test.engine = request.POST['enginename']
|
||||
|
||||
# Extract Development Fields
|
||||
devname = request.POST['devbranch']
|
||||
devbench = int(request.POST['devbench'])
|
||||
devprotocol = request.POST['devprotocol']
|
||||
devprotocol = FRAMEWORK_DEFAULTS['config']['engines'][test.engine]['proto']
|
||||
|
||||
# Extract Base Fields
|
||||
basename = request.POST['basebranch']
|
||||
basebench = int(request.POST['basebench'])
|
||||
baseprotocol = request.POST['baseprotocol']
|
||||
baseprotocol = FRAMEWORK_DEFAULTS['config']['engines'][test.engine]['proto']
|
||||
|
||||
# Extract test configuration
|
||||
test.source = request.POST['source']
|
||||
@@ -92,7 +93,7 @@ def newTest(request):
|
||||
basesha, basesource = getSourceLocation(basename, test.source)
|
||||
test.base = getEngine(basename, basesource, baseprotocol, basesha, basebench)
|
||||
|
||||
# Track # of tests by this user
|
||||
# Track number of tests by this user
|
||||
profile = Profile.objects.get(user=request.user)
|
||||
profile.tests += 1
|
||||
profile.save()
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
var configurations = {
|
||||
{% for name, data in config.engines.items %}
|
||||
'{{name}}' : {
|
||||
'proto' : "{{data.proto}}",
|
||||
'stc' : {
|
||||
"threads" : "{{data.stc.threads}}",
|
||||
"hash" : "{{data.stc.hash}}",
|
||||
@@ -44,14 +43,11 @@
|
||||
var threads = configurations[engine][mode]["threads"];
|
||||
var hash = configurations[engine][mode]["hash"];
|
||||
var timecontrol = configurations[engine][mode]["timecontrol"];
|
||||
var protocol = configurations[engine]["proto"];
|
||||
|
||||
// Adjust all the fields to auto-fill the settings
|
||||
document.getElementById("devoptions").value = "Threads=" + threads + " Hash=" + hash;
|
||||
document.getElementById("baseoptions").value = "Threads=" + threads + " Hash=" + hash;
|
||||
document.getElementById("timecontrol").value = timecontrol;
|
||||
document.getElementById("devprotocol").value = protocol;
|
||||
document.getElementById("baseprotocol").value = protocol;
|
||||
}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
@@ -73,16 +69,12 @@
|
||||
<input name="devbench"></br>
|
||||
<label> Dev Options </label>
|
||||
<input id="devoptions" name="devoptions"></br>
|
||||
<label> Dev Protocol </label>
|
||||
<input id="devprotocol" name="devprotocol"></br>
|
||||
<label> Base Branch </label>
|
||||
<input value="master" name="basebranch"></br>
|
||||
<label> Base Bench </label>
|
||||
<input name="basebench"></br>
|
||||
<label> Base Options </label>
|
||||
<input id="baseoptions" name="baseoptions"></br>
|
||||
<label> Base Protocol </label>
|
||||
<input id="baseprotocol" name="baseprotocol"></br>
|
||||
<label> Source </label>
|
||||
<input value="{{profile.repo}}" name="source"></br>
|
||||
<label> Opening Book </label>
|
||||
|
||||
Reference in new issue
Block a user