Skip to content

Commit

Permalink
updated hostname for batch files #633
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Letter committed Oct 10, 2016
1 parent e1889fe commit b175123
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/slycat/web/server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2023,8 +2023,8 @@ def post_remote_launch():

@cherrypy.tools.json_in(on=True)
@cherrypy.tools.json_out(on=True)
def post_submit_batch():
sid = cherrypy.request.json["sid"]
def post_submit_batch(hostname):
sid = get_sid(hostname)
filename = cherrypy.request.json["filename"]
with slycat.web.server.remote.get_session(sid) as session:
return session.submit_batch(filename)
Expand Down
2 changes: 1 addition & 1 deletion web-server/js/slycat-remote-interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ define('slycat-remote-interface', ['knockout', 'knockout-mapping', 'slycat-serve
var uid = generateUniqueId();

client.post_submit_batch({
sid: vm.remote.sid(),
hostname: vm.remote.hostname(),
filename: vm.batch(),
success: function(results) {
if (results.errors) {
Expand Down
3 changes: 1 addition & 2 deletions web-server/js/slycat-web-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,11 +864,10 @@ define("slycat-web-client", ["slycat-server-root", "jquery", "URI"], function(se
$.ajax({
contentType: 'application/json',
data: JSON.stringify({
sid: params.sid,
filename: params.filename
}),
type: 'POST',
url: server_root + 'remotes/submit-batch',
url: server_root + 'remotes/'+params.hostname+'submit-batch',
success: function(result) {
if (params.success)
params.success(result);
Expand Down

0 comments on commit b175123

Please sign in to comment.