Skip to content

Commit 19b7187

Browse files
committed
fix widgets 7
1 parent a6edad3 commit 19b7187

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

packages/voila/src/plugins/outputs/plugins.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ export const renderOutputsProgressivelyPlugin: JupyterFrontEndPlugin<void> = {
117117
el.getElementsByClassName('jp-CodeCell').item(0) ||
118118
el.getElementsByClassName('code_cell').item(0); // for classic template;
119119
if (codeCell) {
120-
121120
const { area } = createOutputArea({ rendermime, parent: codeCell });
122121
const source = `${cellIdx}`;
123122
executeCode(source, area, widgetManager.kernel).then((future) => {

packages/widgets_manager7/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
JupyterFrontEnd,
2626
JupyterFrontEndPlugin
2727
} from '@jupyterlab/application';
28-
import { PageConfig } from '@jupyterlab/coreutils';
28+
import { PageConfig, URLExt } from '@jupyterlab/coreutils';
2929
import { IRenderMime, IRenderMimeRegistry } from '@jupyterlab/rendermime';
3030
import { KernelAPI, ServerConnection } from '@jupyterlab/services';
3131
import { KernelConnection } from '@jupyterlab/services/lib/kernel/default';
@@ -70,7 +70,7 @@ const widgetManager: JupyterFrontEndPlugin<IJupyterWidgetRegistry> = {
7070
'The Voila Widget Manager plugin must be activated in a VoilaApp'
7171
);
7272
}
73-
const baseUrl = PageConfig.getBaseUrl();
73+
const baseUrl = URLExt.join(PageConfig.getBaseUrl(), 'voila/');
7474
const kernelId = PageConfig.getOption('kernelId');
7575
const serverSettings = ServerConnection.makeSettings({ baseUrl });
7676

@@ -185,7 +185,7 @@ const widgetManager: JupyterFrontEndPlugin<IJupyterWidgetRegistry> = {
185185
const xsrfToken = (matches && matches[1]) || '';
186186
data.append('_xsrf', xsrfToken);
187187
window.navigator.sendBeacon(
188-
`${baseUrl}voila/api/shutdown/${kernel.id}?_xsrf=${xsrfToken}`,
188+
URLExt.join(baseUrl, `api/shutdown/${kernel.id}?_xsrf=${xsrfToken}`),
189189
data
190190
);
191191
kernel.dispose();

packages/widgets_manager8/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
JupyterFrontEnd,
1616
JupyterFrontEndPlugin
1717
} from '@jupyterlab/application';
18-
import { PageConfig } from '@jupyterlab/coreutils';
18+
import { PageConfig, URLExt } from '@jupyterlab/coreutils';
1919
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
2020
import { KernelAPI, ServerConnection } from '@jupyterlab/services';
2121
import { KernelConnection } from '@jupyterlab/services/lib/kernel/default';
@@ -41,8 +41,8 @@ const widgetManager: JupyterFrontEndPlugin<IJupyterWidgetRegistry> = {
4141
'The Voila Widget Manager plugin must be activated in a VoilaApp'
4242
);
4343
}
44-
const baseUrl = PageConfig.getBaseUrl() + 'voila/';
45-
console.log('bsssase url', baseUrl);
44+
const baseUrl = URLExt.join(PageConfig.getBaseUrl(), 'voila/');
45+
4646
const kernelId = PageConfig.getOption('kernelId');
4747
const serverSettings = ServerConnection.makeSettings({ baseUrl });
4848

@@ -74,7 +74,7 @@ const widgetManager: JupyterFrontEndPlugin<IJupyterWidgetRegistry> = {
7474
const xsrfToken = (matches && matches[1]) || '';
7575
data.append('_xsrf', xsrfToken);
7676
window.navigator.sendBeacon(
77-
`${baseUrl}api/shutdown/${kernel.id}`,
77+
URLExt.join(baseUrl, `api/shutdown/${kernel.id}?_xsrf=${xsrfToken}`),
7878
data
7979
);
8080
kernel.dispose();

voila/handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ async def get_generator(self, path=None):
205205
**page_config_kwargs,
206206
notebook_path=notebook_path,
207207
)
208-
print("vvvvvvvssvv", page_config)
209208

210209
gen = NotebookRenderer(
211210
request_handler=self,

voila/server_extension.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def _load_jupyter_server_extension(server_app: ServerApp):
130130
labextensions_path = get_voila_labextensions_path(
131131
voila_configuration.extra_labextensions_path
132132
)
133-
print("conteit", server_app.config)
134133
handlers = [
135134
(
136135
url_path_join(base_url, r"/voila/api/kernels/%s" % _kernel_id_regex),

voila/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def get_page_config(
138138
"mathjax_url",
139139
None,
140140
)
141-
print("cvvvvvvvvcccccccccc", settings, mathjax_config, mathjax_url)
141+
142142
page_config.setdefault("mathjaxConfig", mathjax_config)
143143
page_config.setdefault("fullMathjaxUrl", mathjax_url)
144144
labextensions_path = get_voila_labextensions_path(

0 commit comments

Comments
 (0)