File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
public/app/features/logs/components Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,14 @@ class UnThemedLogDetailsRow extends PureComponent<Props, State> {
304304 const isMultiParsedValueWithNoContent =
305305 ! singleVal && parsedValues != null && ! parsedValues . every ( ( val ) => val === '' ) ;
306306
307+ // Check if this is an OpsPilot field without links and create synthetic link
308+ const isOpsPilotField = parsedKeys ?. [ 0 ] === "OpsPilot" && singleVal ;
309+ const syntheticOpsPilotLink = isOpsPilotField ? {
310+ title : "OpsPilot AI" ,
311+ href : parsedValues [ 0 ] , // The log content
312+ url : parsedValues [ 0 ]
313+ } : null ;
314+
307315 const toggleFieldButton =
308316 displayedFields && parsedKeys != null && displayedFields . includes ( parsedKeys [ 0 ] ) ? (
309317 < IconButton
@@ -366,6 +374,12 @@ class UnThemedLogDetailsRow extends PureComponent<Props, State> {
366374 { singleVal ? parsedValues [ 0 ] : this . generateMultiVal ( parsedValues , true ) }
367375 { singleVal && this . generateClipboardButton ( parsedValues [ 0 ] ) }
368376 < div className = { cx ( ( singleVal || isMultiParsedValueWithNoContent ) && styles . adjoiningLinkButton ) } >
377+ { /* Render synthetic OpsPilot button for OpsPilot fields without formal links */ }
378+ { syntheticOpsPilotLink && (
379+ < span key = "synthetic-opspilot" >
380+ < OpspilotDataLinkButton link = { syntheticOpsPilotLink } />
381+ </ span >
382+ ) }
369383 { links ?. map ( ( link , i ) => {
370384 if ( link . onClick && onPinLine ) {
371385 const originalOnClick = link . onClick ;
You can’t perform that action at this time.
0 commit comments