fix for #14
This commit is contained in:
parent
ff17f23784
commit
146b4c07b3
3 changed files with 8 additions and 3 deletions
|
@ -26,7 +26,7 @@ def load_jupyter_server_extension(nb_server_app):
|
|||
host_pattern = '.*$'
|
||||
base_url = web_app.settings['base_url']
|
||||
|
||||
print('Installing jupyterlab_iframe handler on path %s' % '/iframes')
|
||||
print('Installing jupyterlab_iframe handler on path %s' % url_path_join(base_url, 'iframes'))
|
||||
print('Handling iframes: %s' % sites)
|
||||
|
||||
web_app.add_handlers(host_pattern, [(url_path_join(base_url, '/iframes'), IFrameHandler, {'welcome': welcome, 'sites': sites})])
|
||||
web_app.add_handlers(host_pattern, [(url_path_join(base_url, 'iframes'), IFrameHandler, {'welcome': welcome, 'sites': sites})])
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"dependencies": {
|
||||
"@jupyterlab/application": "^0.16.0",
|
||||
"@jupyterlab/apputils": "^0.16.0",
|
||||
"@jupyterlab/coreutils": "^1.0.2",
|
||||
"@jupyterlab/docmanager": "^0.16.0",
|
||||
"@phosphor/disposable": "^1.1.2"
|
||||
},
|
||||
|
|
|
@ -6,6 +6,10 @@ import {
|
|||
ICommandPalette, showDialog, Dialog
|
||||
} from '@jupyterlab/apputils';
|
||||
|
||||
import {
|
||||
PageConfig
|
||||
} from '@jupyterlab/coreutils'
|
||||
|
||||
import {
|
||||
IDocumentManager
|
||||
} from '@jupyterlab/docmanager';
|
||||
|
@ -129,7 +133,7 @@ function activate(app: JupyterLab, docManager: IDocumentManager, palette: IComma
|
|||
|
||||
// grab sites from serverextension
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "/iframes", true);
|
||||
xhr.open("GET", PageConfig.getBaseUrl() + "iframes", true);
|
||||
xhr.onload = function (e:any) {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200) {
|
||||
|
|
Loading…
Add table
Reference in a new issue