Skip to content

Commit

Permalink
fix httpgateway jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Oct 18, 2023
1 parent 2096bcf commit 5fe5288
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Pyro5/utils/httpgateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def redirect(start_response, target):
</style>
</head>
<body>
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
"use strict";
function pyro_call(name, method, params) {{
Expand Down Expand Up @@ -130,25 +130,25 @@ def redirect(start_response, target):
{name_server_contents_list}
<p>Name server examples: (these examples are working if you expose the Pyro.NameServer object)</p>
<ul>
<li><a href="Pyro.NameServer/$meta" onclick="pyro_call('Pyro.NameServer','$meta'); return false;">Pyro.NameServer/$meta</a>
<li><a href="javascript:void();" onclick="pyro_call('Pyro.NameServer','$meta'); return false;">Pyro.NameServer/$meta</a>
-- gives meta info of the name server (methods)</li>
<li><a href="Pyro.NameServer/list" onclick="pyro_call('Pyro.NameServer','list'); return false;">Pyro.NameServer/list</a>
<li><a href="javascript:void();" onclick="pyro_call('Pyro.NameServer','list'); return false;">Pyro.NameServer/list</a>
-- lists the contents of the name server</li>
<li><a href="Pyro.NameServer/list?prefix=test."
<li><a href="javascript:void();"
onclick="pyro_call('Pyro.NameServer','list', {{'prefix':'test.'}}); return false;">
Pyro.NameServer/list?prefix=test.</a> -- lists the contents of the name server starting with 'test.'</li>
<li><a href="Pyro.NameServer/lookup?name=Pyro.NameServer"
<li><a href="javascript:void();"
onclick="pyro_call('Pyro.NameServer','lookup', {{'name':'Pyro.NameServer'}}); return false;">
Pyro.NameServer/lookup?name=Pyro.NameServer</a> -- perform lookup method of the name server</li>
<li><a href="Pyro.NameServer/lookup?name=test.echoserver"
<li><a href="javascript:void();"
onclick="pyro_call('Pyro.NameServer','lookup', {{'name':'test.echoserver'}}); return false;">
Pyro.NameServer/lookup?name=test.echoserver</a> -- perform lookup method of the echo server</li>
</ul>
<p>Echoserver examples: (these examples are working if you expose the test.echoserver object)</p>
<ul>
<li><a href="test.echoserver/error" onclick="pyro_call('test.echoserver','error'); return false;">test.echoserver/error</a>
<li><a href="javascript:void();" onclick="pyro_call('test.echoserver','error'); return false;">test.echoserver/error</a>
-- perform error call on echoserver</li>
<li><a href="test.echoserver/echo?message=Hi there, browser script!"
<li><a href="javascript:void();"
onclick="pyro_call('test.echoserver','echo', {{'message':'Hi there, browser script!'}}); return false;">
test.echoserver/echo?message=Hi there, browser script!</a> -- perform echo call on echoserver</li>
</ul>
Expand Down Expand Up @@ -182,7 +182,7 @@ def return_homepage(environ, start_response):
proxy._pyroBind()
methods = " &nbsp; ".join(proxy._pyroMethods) or "-"
attributes = [
"<a href=\"{name}/{attribute}\" onclick=\"pyro_call('{name}','{attribute}'); return false;\">{attribute}</a>"
"<a href=\"javascript:void();\" onclick=\"pyro_call('{name}','{attribute}'); return false;\">{attribute}</a>"
.format(name=name, attribute=attribute)
for attribute in proxy._pyroAttrs
]
Expand All @@ -193,7 +193,7 @@ def return_homepage(environ, start_response):
traceback.print_exc(file=stderr)
methods = "??error:%s??" % str(x)
nslist.append(
"<tr><td><a href=\"{name}/$meta\" onclick=\"pyro_call('{name}','$meta'); "
"<tr><td><a href=\"javascript:void();\" onclick=\"pyro_call('{name}','$meta'); "
"return false;\">{name}</a></td><td>{methods}</td><td>{attributes}</td></tr>"
.format(name=name, methods=methods, attributes=attributes))
nslist.append("</table>")
Expand Down

0 comments on commit 5fe5288

Please sign in to comment.