File tree 4 files changed +39
-5
lines changed
4 files changed +39
-5
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,11 @@ import {
3
3
JupyterFrontEndPlugin
4
4
} from '@jupyterlab/application' ;
5
5
import { INotebookTracker } from '@jupyterlab/notebook' ;
6
+ import { LabIcon } from '@jupyterlab/ui-components' ;
6
7
import { ICommandPalette } from '@jupyterlab/apputils' ;
7
8
import { ILauncher } from '@jupyterlab/launcher' ;
8
- import { jupyterIcon as icon } from '@jupyterlab/ui-components' ;
9
9
import { KernelUsagePanel } from './panel' ;
10
+ import tachometer from '../style/tachometer.svg' ;
10
11
11
12
namespace CommandIDs {
12
13
export const getKernelUsage = 'kernel-usage:get' ;
@@ -41,7 +42,10 @@ const plugin: JupyterFrontEndPlugin<void> = {
41
42
commands . addCommand ( CommandIDs . getKernelUsage , {
42
43
label : 'Kernel Usage' ,
43
44
caption : 'Kernel Usage' ,
44
- icon : icon ,
45
+ icon : new LabIcon ( {
46
+ name : 'jupyterlab-kernel-usage:icon' ,
47
+ svgstr : tachometer
48
+ } ) ,
45
49
execute : createPanel
46
50
} ) ;
47
51
Original file line number Diff line number Diff line change 1
1
import { Message } from '@lumino/messaging' ;
2
2
import { ISignal } from '@lumino/signaling' ;
3
3
import { StackedPanel } from '@lumino/widgets' ;
4
- import { KernelUsageWidget } from './widget' ;
5
- import { jupyterIcon as icon } from '@jupyterlab/ui-components' ;
4
+ import { LabIcon } from '@jupyterlab/ui-components' ;
6
5
import { INotebookTracker , NotebookPanel } from '@jupyterlab/notebook' ;
6
+ import { KernelUsageWidget } from './widget' ;
7
+ import tachometer from '../style/tachometer.svg' ;
7
8
8
9
const PANEL_CLASS = 'jp-kernelusage-view' ;
9
10
@@ -16,7 +17,10 @@ export class KernelUsagePanel extends StackedPanel {
16
17
this . addClass ( PANEL_CLASS ) ;
17
18
this . id = 'kernelusage-panel-id' ;
18
19
this . title . caption = 'Kernel Usage' ;
19
- this . title . icon = icon ;
20
+ this . title . icon = new LabIcon ( {
21
+ name : 'jupyterlab-kernel-usage:icon' ,
22
+ svgstr : tachometer
23
+ } ) ;
20
24
this . title . closable = true ;
21
25
const widget = new KernelUsageWidget ( {
22
26
widgetAdded : props . widgetAdded ,
Original file line number Diff line number Diff line change
1
+ declare module '*.svg' {
2
+ const value : string ;
3
+ export default value ;
4
+ }
You can’t perform that action at this time.
0 commit comments