UNPKG

jupyterlab-emrys

Version:

A computational environment for Jupyter. Powered by Emrys

29 lines (28 loc) 1.15 kB
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. "use strict"; var jupyter_js_services_1 = require('jupyter-js-services'); var index_1 = require('./index'); /** * The default running sessions extension. */ exports.runningSessionsExtension = { id: 'jupyter.extensions.running-sessions', requires: [jupyter_js_services_1.ServiceManager], activate: activateRunningSessions }; function activateRunningSessions(app, services) { var running = new index_1.RunningSessions({ manager: services }); running.id = 'jp-running-sessions'; running.title.text = 'Running'; // TODO: replace these with execute calls in new phosphor. running.sessionOpenRequested.connect(function (sender, model) { console.log('requested session', model.notebook.path); }); running.terminalOpenRequested.connect(function (sender, model) { console.log('requested terminal', model.name); }); // Rank has been chosen somewhat arbitrarily to give priority to the running // sessions widget in the sidebar. app.shell.addToRightArea(running, { rank: 1 }); }