Fix Network downloads + Machines view

Renamed function argument from action to target, was missing for Client connections.
Machines.html needs to use a different template tag to handle workload-id to test resolution
This commit is contained in:
andrew committed 2023-06-11 04:29:13 -04:00
1 parent 1ed71cb4a9
commit 48e3b14c1b
2 files changed
+11 -3

No files matched your search

+2 -2
View File
@@ -547,7 +547,7 @@ def scripts(request):
login(request) # All requests are attached to a User
if request.POST['action'] == 'UPLOAD':
return networks(request, action='UPLOAD')
return networks(request, target='UPLOAD')
if request.POST['action'] == 'CREATE_TEST':
return newTest(request)
@@ -663,7 +663,7 @@ def client_get_network(request, identifier, engine=None):
except: return HttpResponse('Unable to find associated Network')
# Return the requested Neural Network file for the Client
return networks(request, action='DOWNLOAD', sha256=identifier, client=True)
return networks(request, target='DOWNLOAD', sha256=identifier, client=True)
@csrf_exempt
def client_wrong_bench(request):
+9 -1
View File
@@ -22,7 +22,15 @@
<td>{{machine.user.username|capfirst}}</td>
<td>{{machine.info.os_name}}</td>
<td>{{machine.info.cpu_name}}</td>
<td> <a href="/test/{{machine.workload.id}}">{{machine.workload.dev.name|prettyName}}</a></td>
<td>
{% if machine.workload %}
<a href="/test/{{machine.workload}}">
{{machine.workload|testIdToPrettyName}}
</a>
{% else %}
None
{% endif %}
</td>
<td class="numeric">{{machine.info.concurrency}}</td>
<td class="numeric">{{machine.mnps|twoDigitPrecision}}</td>
</tr>