fix(ui): card issues selected filters
This commit is contained in:
parent
b1063f336e
commit
181e5a0c84
2 changed files with 19 additions and 10 deletions
|
|
@ -79,7 +79,15 @@ function CardIssues() {
|
|||
return useObserver(() => (
|
||||
<div className='my-8 bg-white rounded p-4 border'>
|
||||
<div className='flex justify-between'>
|
||||
<h1 className='font-medium text-2xl'>Issues</h1>
|
||||
<div className='flex items-center'>
|
||||
<h1 className='font-medium text-2xl'>Issues</h1>
|
||||
{filter.filters.length > 0 && (
|
||||
<div className='text-disabled-text ml-3'>
|
||||
Showing issues of <span className='font-medium'>{filter.filters[0].value}</span> to
|
||||
<span className='font-medium'>{filter.filters[1].value}</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<Button variant='text-primary'>All Sessions</Button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -93,14 +93,6 @@ const SankeyChart: React.FC<Props> = ({
|
|||
const sourceNode = data.nodes[sourceLink.target];
|
||||
|
||||
const filters = [];
|
||||
if (sourceNode) {
|
||||
filters.push({
|
||||
operator: 'is',
|
||||
type: sourceNode.eventType,
|
||||
value: [sourceNode.name],
|
||||
isEvent: true
|
||||
});
|
||||
}
|
||||
|
||||
if (targetNode) {
|
||||
filters.push({
|
||||
|
|
@ -111,6 +103,15 @@ const SankeyChart: React.FC<Props> = ({
|
|||
});
|
||||
}
|
||||
|
||||
if (sourceNode) {
|
||||
filters.push({
|
||||
operator: 'is',
|
||||
type: sourceNode.eventType,
|
||||
value: [sourceNode.name],
|
||||
isEvent: true
|
||||
});
|
||||
}
|
||||
|
||||
onChartClick?.(filters);
|
||||
};
|
||||
|
||||
|
|
@ -138,7 +139,7 @@ const SankeyChart: React.FC<Props> = ({
|
|||
onMouseLeave={() => setHoveredLinks([])}
|
||||
/>
|
||||
)}
|
||||
margin={{ right: 200 }}
|
||||
margin={{ right: 200, bottom: 50 }}
|
||||
>
|
||||
<defs>
|
||||
<linearGradient id={'linkGradient'}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue