File tree 2 files changed +14
-1
lines changed
src/datascience-ui/interactive-common
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change
1
+ Make Jupyter Server name clickable to select Jupyter server
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export class JupyterInfo extends React.Component<IJupyterInfoProps> {
33
33
constructor ( prop : IJupyterInfoProps ) {
34
34
super ( prop ) ;
35
35
this . selectKernel = this . selectKernel . bind ( this ) ;
36
+ this . selectServer = this . selectServer . bind ( this ) ;
36
37
}
37
38
38
39
public render ( ) {
@@ -59,11 +60,18 @@ export class JupyterInfo extends React.Component<IJupyterInfoProps> {
59
60
maxWidth : getMaxWidth ( displayNameTextSize )
60
61
} ;
61
62
63
+ const ariaDisabled = this . props . isNotebookTrusted === undefined ? false : this . props . isNotebookTrusted ;
62
64
return (
63
65
< div className = "kernel-status" style = { dynamicFont } >
64
66
{ this . renderTrustMessage ( ) }
65
67
< div className = "kernel-status-section kernel-status-server" style = { serverTextWidth } role = "button" >
66
- < div className = "kernel-status-text" title = { jupyterServerDisplayName } >
68
+ < div
69
+ className = "kernel-status-text kernel-status-section-hoverable"
70
+ style = { serverTextWidth }
71
+ onClick = { this . selectServer }
72
+ role = "button"
73
+ aria-disabled = { ariaDisabled }
74
+ >
67
75
{ getLocString ( 'DataScience.jupyterServer' , 'Jupyter Server' ) } : { jupyterServerDisplayName }
68
76
</ div >
69
77
< Image
@@ -153,4 +161,8 @@ export class JupyterInfo extends React.Component<IJupyterInfoProps> {
153
161
154
162
return res [ 1 ] ;
155
163
}
164
+
165
+ private selectServer ( ) : void {
166
+ this . props . selectServer ( ) ;
167
+ }
156
168
}
You can’t perform that action at this time.
0 commit comments