@jupyterlab/filebrowser
Advanced tools
Comparing version 0.1.3 to 0.2.0
@@ -195,5 +195,8 @@ // Copyright (c) Jupyter Development Team. | ||
var preference = this._manager.registry.getKernelPreference(this._ext, widgetName); | ||
var specs = this._manager.services.specs; | ||
var sessions = this._manager.services.sessions.running(); | ||
Private.updateKernels(this.kernelDropdownNode, { preference: preference, specs: specs, sessions: sessions }); | ||
var services = this._manager.services; | ||
apputils_1.ClientSession.populateKernelSelect(this.kernelDropdownNode, { | ||
specs: services.specs, | ||
sessions: services.sessions.running(), | ||
preference: preference | ||
}); | ||
}; | ||
@@ -308,13 +311,15 @@ return OpenWithHandler; | ||
// Handle the kernel preferences. | ||
var preference = registry.getKernelPreference(ext, widgetName); | ||
if (preference.canStartKernel) { | ||
var specs = this._manager.services.specs; | ||
var sessions = this._manager.services.sessions.running(); | ||
var preferredKernel = kernelName; | ||
Private.updateKernels(this.kernelDropdownNode, { specs: specs, sessions: sessions, preferredKernel: preferredKernel, preference: preference }); | ||
} | ||
else { | ||
var preference = registry.getKernelPreference(ext, widgetName, { name: kernelName }); | ||
if (!preference.canStart) { | ||
this.node.removeChild(this.kernelDropdownNode.previousSibling); | ||
this.node.removeChild(this.kernelDropdownNode); | ||
} | ||
else { | ||
var services = this._manager.services; | ||
apputils_1.ClientSession.populateKernelSelect(this.kernelDropdownNode, { | ||
specs: services.specs, | ||
sessions: services.sessions.running(), | ||
preference: preference | ||
}); | ||
} | ||
return model.newUntitled({ ext: ext, type: type }).then(function (contents) { | ||
@@ -550,5 +555,8 @@ var value = _this.inputNode.value = contents.name; | ||
var preference = manager.registry.getKernelPreference(ext, widgetName); | ||
var specs = manager.services.specs; | ||
var sessions = manager.services.sessions.running(); | ||
Private.updateKernels(this.kernelDropdownNode, { preference: preference, sessions: sessions, specs: specs }); | ||
var services = this._manager.services; | ||
apputils_1.ClientSession.populateKernelSelect(this.kernelDropdownNode, { | ||
specs: services.specs, | ||
sessions: services.sessions.running(), | ||
preference: preference | ||
}); | ||
}; | ||
@@ -631,27 +639,2 @@ return CreateNewHandler; | ||
Private.createCreateFromNode = createCreateFromNode; | ||
/** | ||
* Update a kernel listing based on a kernel preference. | ||
*/ | ||
function updateKernels(node, options) { | ||
var preference = options.preference, specs = options.specs, sessions = options.sessions, preferredKernel = options.preferredKernel; | ||
if (!preference.canStartKernel) { | ||
while (node.firstChild) { | ||
node.removeChild(node.firstChild); | ||
} | ||
node.disabled = true; | ||
return; | ||
} | ||
// Bail if there are no kernel specs. | ||
if (!specs) { | ||
return; | ||
} | ||
var preferredLanguage = preference.language; | ||
node.disabled = false; | ||
docregistry_1.populateKernels(node, { specs: specs, sessions: sessions, preferredLanguage: preferredLanguage, preferredKernel: preferredKernel }); | ||
// Select the "null" valued kernel if we do not prefer a kernel. | ||
if (!preference.preferKernel) { | ||
node.value = 'null'; | ||
} | ||
} | ||
Private.updateKernels = updateKernels; | ||
})(Private || (Private = {})); |
{ | ||
"name": "@jupyterlab/filebrowser", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "JupyterLab - FileBrowser Widget", | ||
@@ -16,16 +16,16 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@jupyterlab/apputils": "^0.1.1", | ||
"@jupyterlab/coreutils": "^0.1.1", | ||
"@jupyterlab/docmanager": "^0.1.3", | ||
"@jupyterlab/docregistry": "^0.1.4", | ||
"@jupyterlab/services": "^0.40.1", | ||
"@phosphor/algorithm": "^0.1.1", | ||
"@phosphor/commands": "^0.1.5", | ||
"@phosphor/coreutils": "^0.1.5", | ||
"@phosphor/disposable": "^0.1.1", | ||
"@phosphor/domutils": "^0.1.2", | ||
"@phosphor/dragdrop": "^0.1.4", | ||
"@phosphor/messaging": "^0.1.2", | ||
"@phosphor/signaling": "^0.1.2", | ||
"@phosphor/widgets": "^0.3.0" | ||
"@jupyterlab/apputils": "^0.2.0", | ||
"@jupyterlab/coreutils": "^0.2.0", | ||
"@jupyterlab/docmanager": "^0.2.0", | ||
"@jupyterlab/docregistry": "^0.2.0", | ||
"@jupyterlab/services": "^0.41.0", | ||
"@phosphor/algorithm": "^1.0.0", | ||
"@phosphor/commands": "^1.0.0", | ||
"@phosphor/coreutils": "^1.0.0", | ||
"@phosphor/disposable": "^1.0.0", | ||
"@phosphor/domutils": "^1.0.0", | ||
"@phosphor/dragdrop": "^1.0.0", | ||
"@phosphor/messaging": "^1.0.0", | ||
"@phosphor/signaling": "^1.0.0", | ||
"@phosphor/widgets": "^1.0.0" | ||
}, | ||
@@ -32,0 +32,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174185
5108
+ Added@jupyterlab/application@0.2.0(transitive)
+ Added@jupyterlab/apputils@0.2.0(transitive)
+ Added@jupyterlab/codeeditor@0.2.0(transitive)
+ Added@jupyterlab/codemirror@0.2.0(transitive)
+ Added@jupyterlab/coreutils@0.2.0(transitive)
+ Added@jupyterlab/docmanager@0.2.0(transitive)
+ Added@jupyterlab/docregistry@0.2.0(transitive)
+ Added@jupyterlab/services@0.41.0(transitive)
+ Added@phosphor/algorithm@1.2.0(transitive)
+ Added@phosphor/application@1.7.3(transitive)
+ Added@phosphor/collections@1.2.0(transitive)
+ Added@phosphor/commands@1.7.2(transitive)
+ Added@phosphor/coreutils@1.3.1(transitive)
+ Added@phosphor/disposable@1.3.1(transitive)
+ Added@phosphor/domutils@1.1.4(transitive)
+ Added@phosphor/dragdrop@1.4.1(transitive)
+ Added@phosphor/keyboard@1.1.3(transitive)
+ Added@phosphor/messaging@1.3.0(transitive)
+ Added@phosphor/properties@1.1.3(transitive)
+ Added@phosphor/signaling@1.3.1(transitive)
+ Added@phosphor/virtualdom@1.2.0(transitive)
+ Added@phosphor/widgets@1.9.3(transitive)
- Removed@jupyterlab/application@0.1.3(transitive)
- Removed@jupyterlab/apputils@0.1.3(transitive)
- Removed@jupyterlab/codeeditor@0.1.4(transitive)
- Removed@jupyterlab/codemirror@0.1.4(transitive)
- Removed@jupyterlab/coreutils@0.1.3(transitive)
- Removed@jupyterlab/docmanager@0.1.3(transitive)
- Removed@jupyterlab/docregistry@0.1.4(transitive)
- Removed@jupyterlab/services@0.40.4(transitive)
- Removed@phosphor/algorithm@0.1.1(transitive)
- Removed@phosphor/application@0.3.1(transitive)
- Removed@phosphor/collections@0.1.1(transitive)
- Removed@phosphor/commands@0.1.5(transitive)
- Removed@phosphor/coreutils@0.1.5(transitive)
- Removed@phosphor/disposable@0.1.1(transitive)
- Removed@phosphor/domutils@0.1.2(transitive)
- Removed@phosphor/dragdrop@0.1.4(transitive)
- Removed@phosphor/keyboard@0.1.1(transitive)
- Removed@phosphor/messaging@0.1.2(transitive)
- Removed@phosphor/properties@0.1.1(transitive)
- Removed@phosphor/signaling@0.1.2(transitive)
- Removed@phosphor/virtualdom@0.1.1(transitive)
- Removed@phosphor/widgets@0.3.1(transitive)
Updated@jupyterlab/apputils@^0.2.0
Updated@jupyterlab/coreutils@^0.2.0
Updated@jupyterlab/services@^0.41.0
Updated@phosphor/algorithm@^1.0.0
Updated@phosphor/commands@^1.0.0
Updated@phosphor/coreutils@^1.0.0
Updated@phosphor/disposable@^1.0.0
Updated@phosphor/domutils@^1.0.0
Updated@phosphor/dragdrop@^1.0.0
Updated@phosphor/messaging@^1.0.0
Updated@phosphor/signaling@^1.0.0
Updated@phosphor/widgets@^1.0.0