1 | import { ITranslator } from '@jupyterlab/translation';
|
2 | import { VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
3 | import { ISessionContext } from './sessioncontext';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare function translateKernelStatuses(translator?: ITranslator): Record<ISessionContext.KernelDisplayStatus, string>;
|
12 |
|
13 |
|
14 |
|
15 | export declare class KernelStatus extends VDomRenderer<KernelStatus.Model> {
|
16 | |
17 |
|
18 |
|
19 | constructor(opts: KernelStatus.IOptions, translator?: ITranslator);
|
20 | /**
|
21 | * Render the kernel status item.
|
22 | */
|
23 | render(): JSX.Element | null;
|
24 | translator: ITranslator;
|
25 | private _handleClick;
|
26 | }
|
27 | /**
|
28 | * A namespace for KernelStatus statics.
|
29 | */
|
30 | export declare namespace KernelStatus {
|
31 | |
32 |
|
33 |
|
34 | class Model extends VDomModel {
|
35 | constructor(translator?: ITranslator);
|
36 | /**
|
37 | * The name of the kernel.
|
38 | */
|
39 | get kernelName(): string;
|
40 | /**
|
41 | * The current status of the kernel.
|
42 | */
|
43 | get status(): string | undefined;
|
44 | /**
|
45 | * A display name for the activity.
|
46 | */
|
47 | get activityName(): string;
|
48 | set activityName(val: string);
|
49 | /**
|
50 | * The current client session associated with the kernel status indicator.
|
51 | */
|
52 | get sessionContext(): ISessionContext | null;
|
53 | set sessionContext(sessionContext: ISessionContext | null);
|
54 | /**
|
55 | * React to changes to the kernel status.
|
56 | */
|
57 | private _onKernelStatusChanged;
|
58 | /**
|
59 | * React to changes in the kernel.
|
60 | */
|
61 | private _onKernelChanged;
|
62 | private _getAllState;
|
63 | private _triggerChange;
|
64 | protected translation: ITranslator;
|
65 | private _trans;
|
66 | private _activityName;
|
67 | private _kernelName;
|
68 | private _kernelStatus;
|
69 | private _sessionContext;
|
70 | private readonly _statusNames;
|
71 | }
|
72 | /**
|
73 | * Options for creating a KernelStatus object.
|
74 | */
|
75 | interface IOptions {
|
76 | |
77 |
|
78 |
|
79 |
|
80 | onClick: () => void;
|
81 | }
|
82 | }
|