Skip to content

Commit

Permalink
[frontend] new attack pattern export filter on stix core objects expo…
Browse files Browse the repository at this point in the history
…rt query (#6824)
  • Loading branch information
ValentinBouzinFiligran committed May 16, 2024
1 parent c93f399 commit 7aefada
Showing 1 changed file with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,26 @@ class StixDomainObjectAttackPatternsKillChainComponent extends Component {
)(data.stixCoreRelationships.edges);
}
const exportDisabled = targetEntities.length > export_max_size;
console.log('exportContext : ', exportContext);
const newExportContext = { ...exportContext, entity_type: 'Stix-Core-Objects' };

const newExportContext = { ...exportContext, entity_type: 'Attack-Pattern' };
const newPaginationOptions = {
orderBy: 'name',
orderMode: 'desc',
filters: {
mode: 'and',
filters: [
{
key: 'regardingOf',
values: [{
key: 'id',
values: [stixDomainObjectId],
}],
},
],
filterGroups: [],
},
};

return (
<>
<div
Expand Down Expand Up @@ -155,10 +173,10 @@ class StixDomainObjectAttackPatternsKillChainComponent extends Component {
</Tooltip>
<Tooltip
title={
currentColorsReversed
? t('Disable invert colors')
: t('Enable invert colors')
}
currentColorsReversed
? t('Disable invert colors')
: t('Enable invert colors')
}
>
<span>
<IconButton
Expand Down Expand Up @@ -316,16 +334,10 @@ class StixDomainObjectAttackPatternsKillChainComponent extends Component {
/>
</Security>
<Security needs={[KNOWLEDGE_KNGETEXPORT]}>
{/* <StixCoreRelationshipsExports */}
{/* open={openExports} */}
{/* handleToggle={handleToggleExports.bind(this)} */}
{/* paginationOptions={paginationOptions} */}
{/* exportContext={exportContext} */}
{/* /> */}
<StixCoreObjectsExports
open={openExports}
handleToggle={handleToggleExports.bind(this)}
paginationOptions={paginationOptions}
paginationOptions={newPaginationOptions}
exportContext={newExportContext}
/>
</Security>
Expand Down

0 comments on commit 7aefada

Please sign in to comment.