parent
bdf3497387
commit
0fcce28d16
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{page_config['appName'] | e}} - Running Sessions</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{# Copy so we do not modify the page_config with updates. #}
|
||||
{% set page_config_full = page_config.copy() %}
|
||||
|
||||
{# Set a dummy variable - we just want the side effect of the update. #}
|
||||
{% set _ = page_config_full.update(baseUrl=base_url, wsUrl=ws_url) %}
|
||||
|
||||
{# Sentinel value to say that we are on the tree page #}
|
||||
{% set _ = page_config_full.update(classicPage='running') %}
|
||||
|
||||
<script id="jupyter-config-data" type="application/json">
|
||||
{{ page_config_full | tojson }}
|
||||
</script>
|
||||
<script src="{{page_config['fullStaticUrl'] | e}}/bundle.js" main="index"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* Remove token from URL. */
|
||||
(function () {
|
||||
var parsedUrl = new URL(window.location.href);
|
||||
if (parsedUrl.searchParams.get('token')) {
|
||||
parsedUrl.searchParams.delete('token');
|
||||
window.history.replaceState({ }, '', parsedUrl.href);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "@jupyterlab-classic/running-extension",
|
||||
"version": "0.1.0",
|
||||
"description": "JupyterLab Classic - Running Extension",
|
||||
"homepage": "https://github.com/jtpio/jupyterlab-classic",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jtpio/jupyterlab-classic/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jtpio/jupyterlab-classic.git"
|
||||
},
|
||||
"license": "BSD-3-Clause",
|
||||
"author": "Project Jupyter",
|
||||
"sideEffects": [
|
||||
"style/**/*.css"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"style": "style/index.css",
|
||||
"directories": {
|
||||
"lib": "lib/"
|
||||
},
|
||||
"files": [
|
||||
"lib/*.d.ts",
|
||||
"lib/*.js.map",
|
||||
"lib/*.js",
|
||||
"schema/*.json",
|
||||
"style/**/*.css"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc -b",
|
||||
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
|
||||
"docs": "typedoc src",
|
||||
"prepublishOnly": "npm run build",
|
||||
"watch": "tsc -b --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jupyterlab/application": "^3.0.0-rc.12",
|
||||
"@jupyterlab/running": "^3.0.0-rc.12",
|
||||
"@jupyterlab/translation": "^3.0.0-rc.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rimraf": "~3.0.0",
|
||||
"typescript": "~4.0.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"jupyterlab": {
|
||||
"extension": true
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
// Copyright (c) Jupyter Development Team.
|
||||
// Distributed under the terms of the Modified BSD License.
|
||||
|
||||
import {
|
||||
JupyterFrontEnd,
|
||||
JupyterFrontEndPlugin
|
||||
} from '@jupyterlab/application';
|
||||
|
||||
import { IRunningSessionManagers, RunningSessions } from '@jupyterlab/running';
|
||||
|
||||
import { ITranslator } from '@jupyterlab/translation';
|
||||
|
||||
/**
|
||||
* The default running sessions extension.
|
||||
*/
|
||||
const plugin: JupyterFrontEndPlugin<void> = {
|
||||
id: '@jupyterlab-classic/running-extension:plugin',
|
||||
requires: [IRunningSessionManagers],
|
||||
autoStart: true,
|
||||
activate: (
|
||||
app: JupyterFrontEnd,
|
||||
manager: IRunningSessionManagers,
|
||||
translator: ITranslator
|
||||
): void => {
|
||||
const running = new RunningSessions(manager, translator);
|
||||
running.id = 'jp-running-sessions';
|
||||
|
||||
// re-add the widget to the main area
|
||||
app.shell.add(running, 'main');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Export the plugin as default.
|
||||
*/
|
||||
export default plugin;
|
||||
@ -0,0 +1,3 @@
|
||||
.jp-RunningSessions {
|
||||
height: 100%;
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
@import url('~@jupyterlab/running/style/index.css');
|
||||
|
||||
@import url('./base.css');
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../../tsconfigbase",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
||||
Loading…
Reference in new issue