|
|
|
@ -44,10 +44,15 @@ class LogsContainer extends PureComponent<LogsContainerProps> { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
getLogRowContext = async (row: LogRowModel, options?: any): Promise<any> => { |
|
|
|
|
const { datasourceInstance } = this.props; |
|
|
|
|
const { datasourceInstance, logsQueries } = this.props; |
|
|
|
|
|
|
|
|
|
if (hasLogsContextSupport(datasourceInstance)) { |
|
|
|
|
return datasourceInstance.getLogRowContext(row, options); |
|
|
|
|
// we need to find the query, and we need to be very sure that
|
|
|
|
|
// it's a query from this datasource
|
|
|
|
|
const query = (logsQueries ?? []).find( |
|
|
|
|
(q) => q.refId === row.dataFrame.refId && q.datasource != null && q.datasource.type === datasourceInstance.type |
|
|
|
|
); |
|
|
|
|
return datasourceInstance.getLogRowContext(row, options, query); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return []; |
|
|
|
|