mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix: where query param populated on metrics -> log correlation (#729)
Fixes: HDX-1538
This commit is contained in:
parent
eaa6bfa966
commit
6dafb87a6a
2 changed files with 21 additions and 3 deletions
5
.changeset/thirty-ghosts-drop.md
Normal file
5
.changeset/thirty-ghosts-drop.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
fix: View Events not shown for multiple series; grabs where clause when single series
|
||||
|
|
@ -149,10 +149,20 @@ export function DBTimeChart({
|
|||
const to = add(clickedActiveLabelDate, {
|
||||
seconds: convertGranularityToSeconds(granularity),
|
||||
}).getTime();
|
||||
let where = config.where;
|
||||
let whereLanguage = config.whereLanguage || 'lucene';
|
||||
if (
|
||||
where.length === 0 &&
|
||||
Array.isArray(config.select) &&
|
||||
config.select.length === 1
|
||||
) {
|
||||
where = config.select[0].aggCondition ?? '';
|
||||
whereLanguage = config.select[0].aggConditionLanguage ?? 'lucene';
|
||||
}
|
||||
return new URLSearchParams({
|
||||
source: (isMetricChart ? source?.logSourceId : source?.id) ?? '',
|
||||
where: config.where,
|
||||
whereLanguage: config.whereLanguage || 'lucene',
|
||||
where: where,
|
||||
whereLanguage: whereLanguage,
|
||||
filters: JSON.stringify(config.filters),
|
||||
from: from.toString(),
|
||||
to: to.toString(),
|
||||
|
|
@ -213,7 +223,10 @@ export function DBTimeChart({
|
|||
top: 0,
|
||||
}}
|
||||
>
|
||||
{activeClickPayload != null && qparams != null ? (
|
||||
{activeClickPayload != null &&
|
||||
qparams != null &&
|
||||
// only View Events for single series
|
||||
(!Array.isArray(config.select) || config.select.length === 1) ? (
|
||||
<div
|
||||
className="bg-grey px-3 py-2 rounded fs-8"
|
||||
style={{
|
||||
|
|
|
|||
Loading…
Reference in a new issue