@@ -53,6 +53,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
5353 activate,
5454 id : PLUGIN_ID ,
5555 requires : [ IConsoleTracker , INotebookTracker , ISettingRegistry , IStateDB ] ,
56+ description : "Manage IPython Parallel clusters from the JupyterLab sidebar." ,
5657 optional : [ ILabShell ] ,
5758 autoStart : true ,
5859} ;
@@ -76,7 +77,7 @@ async function activate(
7677 const id = "ipp-cluster-launcher" ;
7778
7879 const isLab = ! ! labShell ;
79- const isRetroTree = PageConfig . getOption ( "retroPage" ) == "tree" ;
80+ const isRetroTree = PageConfig . getOption ( "retroPage" ) === "tree" ;
8081
8182 const clientCodeInjector = async ( model : IClusterModel ) => {
8283 const editor = await Private . getCurrentEditor (
@@ -177,7 +178,7 @@ async function activate(
177178
178179 // Whether the cluster clients should aggressively inject themselves
179180 // into the current session.
180- let autoStartClient : boolean = false ;
181+ const autoStartClient : boolean = false ;
181182
182183 // Update the existing trackers and signals in light of a change to the
183184 // settings system. In particular, this reacts to a change in the setting
@@ -246,6 +247,7 @@ async function activate(
246247 // If either is not found, it bails.
247248 app . commands . addCommand ( CommandIDs . injectClientCode , {
248249 label : "Inject IPython Client Connection Code" ,
250+ describedBy : { } ,
249251 execute : async ( ) => {
250252 const cluster = Private . clusterFromClick ( app , sidebar . clusterManager ) ;
251253 if ( ! cluster ) {
@@ -258,6 +260,7 @@ async function activate(
258260 // Add a command to launch a new cluster.
259261 app . commands . addCommand ( CommandIDs . newCluster , {
260262 label : ( args ) => ( args [ "isPalette" ] ? "Create New Cluster" : "NEW" ) ,
263+ describedBy : { } ,
261264 execute : ( ) => sidebar . clusterManager . create ( ) ,
262265 iconClass : ( args ) =>
263266 args [ "isPalette" ] ? "" : "jp-AddIcon jp-Icon jp-Icon-16" ,
@@ -273,6 +276,7 @@ async function activate(
273276 // Add a command to launch a new cluster.
274277 app . commands . addCommand ( CommandIDs . startCluster , {
275278 label : "Start Cluster" ,
279+ describedBy : { } ,
276280 execute : ( ) => {
277281 const cluster = Private . clusterFromClick ( app , sidebar . clusterManager ) ;
278282 if ( ! cluster ) {
@@ -285,6 +289,7 @@ async function activate(
285289 // Add a command to stop a cluster.
286290 app . commands . addCommand ( CommandIDs . stopCluster , {
287291 label : "Shutdown Cluster" ,
292+ describedBy : { } ,
288293 execute : ( ) => {
289294 const cluster = Private . clusterFromClick ( app , sidebar . clusterManager ) ;
290295 if ( ! cluster ) {
@@ -297,6 +302,7 @@ async function activate(
297302 // Add a command to resize a cluster.
298303 app . commands . addCommand ( CommandIDs . scaleCluster , {
299304 label : "Scale Cluster…" ,
305+ describedBy : { } ,
300306 execute : ( ) => {
301307 const cluster = Private . clusterFromClick ( app , sidebar . clusterManager ) ;
302308 if ( ! cluster ) {
@@ -361,11 +367,6 @@ async function activate(
361367}
362368
363369namespace Private {
364- /**
365- * A private counter for ids.
366- */
367- export let id = 0 ;
368-
369370 /**
370371 * Whether a kernel should be used. Only evaluates to true
371372 * if it is valid and in python.
438439 ) : Kernel . IKernelConnection | null | undefined {
439440 // Get a handle on the most relevant kernel,
440441 // whether it is attached to a notebook or a console.
441- let current = shell . currentWidget ;
442+ const current = shell . currentWidget ;
442443 let kernel : Kernel . IKernelConnection | null | undefined ;
443444 if ( current && notebookTracker . has ( current ) ) {
444445 kernel = ( current as NotebookPanel ) . sessionContext . session ?. kernel ;
467468 ) : Promise < CodeEditor . IEditor | null | undefined > {
468469 // Get a handle on the most relevant kernel,
469470 // whether it is attached to a notebook or a console.
470- let current = app . shell . currentWidget ;
471+ const current = app . shell . currentWidget ;
471472 let editor : CodeEditor . IEditor | null | undefined ;
472473 if ( current && notebookTracker . has ( current ) ) {
473474 NotebookActions . insertAbove ( ( current as NotebookPanel ) . content ) ;
0 commit comments