Skip to content

Commit b88a3ea

Browse files
authored
Merge pull request #192 from cmd-ntrf/keep_command_entry_disabled
In JupyterLab, add proxy to command registry even if launcher entry is disabled
2 parents b9b4d22 + 9fcf403 commit b88a3ea

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

jupyterlab-server-proxy/src/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ import '../style/index.css';
77

88
function addLauncherEntries(serverData: any, launcher: ILauncher, app: JupyterFrontEnd) {
99
for (let server_process of serverData.server_processes) {
10-
11-
if (!server_process.launcher_entry.enabled) {
12-
continue;
13-
}
14-
1510
let commandId = 'server-proxy:' + server_process.name;
1611

1712
app.commands.addCommand(commandId, {
@@ -21,14 +16,19 @@ function addLauncherEntries(serverData: any, launcher: ILauncher, app: JupyterFr
2116
window.open(launch_url, '_blank');
2217
}
2318
});
24-
let command : ILauncher.IItemOptions = {
19+
20+
if (!server_process.launcher_entry.enabled) {
21+
continue;
22+
}
23+
24+
let launcher_item : ILauncher.IItemOptions = {
2525
command: commandId,
2626
category: 'Notebook'
2727
};
2828
if (server_process.launcher_entry.icon_url) {
29-
command.kernelIconUrl = server_process.launcher_entry.icon_url;
29+
launcher_item.kernelIconUrl = server_process.launcher_entry.icon_url;
3030
}
31-
launcher.add(command);
31+
launcher.add(launcher_item);
3232
}
3333
}
3434
/**

0 commit comments

Comments
 (0)