Skip to content

Commit

Permalink
updated hostname #633
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Letter committed Oct 10, 2016
1 parent 6521710 commit 583b192
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/slycat/web/server/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def abspath(path):

#TODO: scrub sid
dispatcher.connect("post-checksid", "/remotes/checksid", slycat.web.server.handlers.post_checksid, conditions={ "method": ["POST"] })
dispatcher.connect("post-remote-launch", "/remotes/launch", slycat.web.server.handlers.post_remote_launch, conditions={ "method": ["POST"] })
dispatcher.connect("post-remote-launch", "/remotes/:hostname/launch", slycat.web.server.handlers.post_remote_launch, conditions={ "method": ["POST"] })
dispatcher.connect("post-submit-batch", "/remotes/:hostname/submit-batch", slycat.web.server.handlers.post_submit_batch, conditions={ "method": ["POST"] })
dispatcher.connect("get-checkjob", "/remotes/checkjob/:hostname/:jid", slycat.web.server.handlers.get_checkjob, conditions={ "method": ["GET"] })
dispatcher.connect("delete-job", "/remotes/delete-job/:hostname/:jid", slycat.web.server.handlers.delete_job, conditions={ "method": ["DELETE"] })
Expand Down
4 changes: 2 additions & 2 deletions packages/slycat/web/server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2014,8 +2014,8 @@ def post_checksid():

@cherrypy.tools.json_in(on=True)
@cherrypy.tools.json_out(on=True)
def post_remote_launch():
sid = cherrypy.request.json["sid"]
def post_remote_launch(hostname):
sid = get_sid(hostname)
command = cherrypy.request.json["command"]
with slycat.web.server.remote.get_session(sid) as session:
return session.launch(command)
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 @@ -844,11 +844,10 @@ define("slycat-web-client", ["slycat-server-root", "jquery", "URI"], function(se
$.ajax({
contentType: 'application/json',
data: JSON.stringify({
sid: params.sid,
command: params.command
}),
type: 'POST',
url: server_root + 'remotes/launch',
url: server_root + 'remotes/'+params.hostname+'/launch',
success: function(result) {
if (params.success)
params.success(result);
Expand Down

0 comments on commit 583b192

Please sign in to comment.