1 | import { ServiceManager } from '@jupyterlab/services';
|
2 | import { ITranslator } from '@jupyterlab/translation';
|
3 | import { VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
4 | import { KeyboardEvent } from 'react';
|
5 |
|
6 |
|
7 |
|
8 | export declare class RunningSessions extends VDomRenderer<RunningSessions.Model> {
|
9 | |
10 |
|
11 |
|
12 | constructor(opts: RunningSessions.IOptions);
|
13 | /**
|
14 | * Render the running sessions widget.
|
15 | */
|
16 | render(): JSX.Element | null;
|
17 | /**
|
18 | * Dispose of the status item.
|
19 | */
|
20 | dispose(): void;
|
21 | /**
|
22 | * Set the number of kernel sessions when the list changes.
|
23 | */
|
24 | private _onSessionsRunningChanged;
|
25 | /**
|
26 | * Set the number of terminal sessions when the list changes.
|
27 | */
|
28 | private _onTerminalsRunningChanged;
|
29 | protected translator: ITranslator;
|
30 | private _trans;
|
31 | private _handleClick;
|
32 | private _handleKeyDown;
|
33 | private _serviceManager;
|
34 | }
|
35 | /**
|
36 | * A namespace for RunningSessions statics.
|
37 | */
|
38 | export declare namespace RunningSessions {
|
39 | |
40 |
|
41 |
|
42 | class Model extends VDomModel {
|
43 | |
44 |
|
45 |
|
46 | get sessions(): number;
|
47 | set sessions(sessions: number);
|
48 | |
49 |
|
50 |
|
51 | get terminals(): number;
|
52 | set terminals(terminals: number);
|
53 | private _terminals;
|
54 | private _sessions;
|
55 | }
|
56 | |
57 |
|
58 |
|
59 | interface IOptions {
|
60 | |
61 |
|
62 |
|
63 | serviceManager: ServiceManager.IManager;
|
64 | |
65 |
|
66 |
|
67 |
|
68 | onClick: () => void;
|
69 | |
70 |
|
71 |
|
72 |
|
73 | onKeyDown: (event: KeyboardEvent<HTMLImageElement>) => void;
|
74 | |
75 |
|
76 |
|
77 | translator?: ITranslator;
|
78 | }
|
79 | }
|