Skip to content
Snippets Groups Projects
Commit 5ac4c46b authored by Jens Henrik Goebbert's avatar Jens Henrik Goebbert
Browse files

init

parent 75c20bf9
Branches
Tags
No related merge requests found
*.bundle.*
lib/
node_modules/
*.egg-info/
.ipynb_checkpoints
# jupyterlab-control
# jupyterlab-controlpanel
ControlPanel Button for JupyterLab
![screenshot](./doc/screenshot.png)
## Prerequisites
* JupyterLab
## Installation
```bash
jupyter labextension install jupyterlab-controlpanel
```
## Development
For a development install (requires npm version 4 or later), do the following in the repository directory:
```bash
npm install
npm run build
jupyter labextension link .
```
To rebuild the package and the JupyterLab app:
```bash
npm run build
jupyter lab build
```
doc/screenshot.png

9.03 KiB

{
"name": "jupyterlab-controlpanel",
"version": "0.4.0",
"description": "ControlPanel Button for JupyterLab",
"keywords": [
"jupyter",
"jupyterlab",
"jupyterlab-extension"
],
"homepage": "https://github.com/jtpio/jupyterlab-topbar",
"bugs": {
"url": "https://github.com/jtpio/jupyterlab-topbar/issues"
},
"license": "BSD-3-Clause",
"author": "Jeremy Tuloup",
"files": [
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/jtpio/jupyterlab-topbar.git"
},
"scripts": {
"build": "tsc",
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
"prepare": "npm run clean && npm run build",
"watch": "tsc -w"
},
"dependencies": {
"@jupyterlab/application": "^1.0.0",
"@phosphor/widgets": "^1.6.0",
"jupyterlab-topbar": "^0.4.0"
},
"devDependencies": {
"rimraf": "^2.6.1",
"typescript": "~3.5.1"
},
"jupyterlab": {
"extension": true
}
}
import {
JupyterFrontEnd, JupyterFrontEndPlugin, IRouter
} from '@jupyterlab/application';
import { Widget } from '@phosphor/widgets';
import { ITopBar } from "jupyterlab-topbar";
import '@jupyterlab/application/style/buttons.css';
import '../style/index.css';
const extension: JupyterFrontEndPlugin<void> = {
id: 'jupyterlab-controlpanel',
autoStart: true,
requires: [IRouter, ITopBar],
activate: async (
app: JupyterFrontEnd,
router: IRouter,
topBar: ITopBar,
) => {
let controlpanel = document.createElement('a');
controlpanel.id = "controlpanel";
controlpanel.innerHTML = "Control Panel";
controlpanel.addEventListener('click', function () {
router.navigate('/hub/start', { hard: true });
});
const widget = new Widget({node: controlpanel});
widget.addClass('jp-Button-flat');
topBar.addItem("controlpanel-button", widget);
}
};
export default extension;
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"incremental": true,
"module": "esnext",
"moduleResolution": "node",
"noEmitOnError": true,
"noUnusedLocals": true,
"outDir": "lib",
"preserveWatchOutput": true,
"resolveJsonModule": true,
"rootDir": "src",
"strict": true,
"strictNullChecks": false,
"target": "es2017",
"types": []
},
"include": ["src/*"]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment