@@ -33,6 +33,9 @@ const getURLQueryParams = (url: string) => {
3333export const IdeLauncher = ( ) => {
3434 const theme = useTheme ( ) ;
3535 const themeKind = getThemeKind ( theme ) ;
36+ const params = getURLQueryParams ( window . location . search ) ;
37+ const { environmentName, spanDisplayName } = params ;
38+ const action = params [ "plugin.action" ] ;
3639 const [ selectItems , setSelectItems ] = useState < SelectItem [ ] > ( ) ;
3740 const isMobile = [ "Android" , "iPhone" , "iPad" ] . some ( ( x ) =>
3841 window . navigator . userAgent . includes ( x )
@@ -170,7 +173,7 @@ export const IdeLauncher = () => {
170173 </ s . Title >
171174 < s . Description >
172175 Please check that IDE is running and click the{ " " }
173- < s . ButtonName > Try again</ s . ButtonName > button below.
176+ < s . EmphasizedText > Try again</ s . EmphasizedText > button below.
174177 </ s . Description >
175178 </ s . TextContainer >
176179 < NewButton
@@ -194,20 +197,54 @@ export const IdeLauncher = () => {
194197 < s . Title > Failed to find IDEs with Digma plugin running</ s . Title >
195198 < s . Description >
196199 Please open the IDE with Digma plugin installed, check its
197- settings and click the < s . ButtonName > Refresh </ s . ButtonName > button
198- below.
200+ settings and click the{ " " }
201+ < s . EmphasizedText > Refresh </ s . EmphasizedText > button below.
199202 </ s . Description >
200203 </ s . TextContainer >
201204 < NewButton label = { "Refresh" } onClick = { handleRefreshButtonClick } />
202205 </ >
203206 ) ;
204207 }
205208
209+ if ( selectItems . length === 1 ) {
210+ return (
211+ < >
212+ < s . TextContainer >
213+ < s . Title > Opening the IDE...</ s . Title >
214+ < s . Description >
215+ Your IDE client is opening automatically; you can close this tab.
216+ </ s . Description >
217+ </ s . TextContainer >
218+ < s . SelectContainer >
219+ < Select
220+ placeholder = { selectedItem ?. label ?? "Select IDE Project" }
221+ items = { selectItems }
222+ onChange = { ( value ) => {
223+ void handleSelectChange ( value ) ;
224+ } }
225+ />
226+ </ s . SelectContainer >
227+ </ >
228+ ) ;
229+ }
230+
206231 if ( selectItems . length > 0 ) {
207232 return (
208233 < >
209234 < s . TextContainer >
210- < s . Title > Select the IDE project to view issues in Digma</ s . Title >
235+ { action === "OpenReport" ? (
236+ < s . Title >
237+ Select the IDE project to view Metrics report in Digma
238+ </ s . Title >
239+ ) : (
240+ < s . Title >
241+ Select the IDE project to view{ " " }
242+ { spanDisplayName && < > { spanDisplayName } </ > }
243+ issues{ " " }
244+ { environmentName && < > for { environmentName } environment </ > }
245+ in Digma
246+ </ s . Title >
247+ ) }
211248 < s . Description >
212249 Please select the IDE project you'd like to open.
213250 </ s . Description >
0 commit comments