Skip to content

Commit

Permalink
[frontend] fix bulk indicators generation (#6274)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archidoit committed Mar 12, 2024
1 parent 7c74b00 commit 607b674
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1323,15 +1323,15 @@ class ToolBar extends Component {
{({ bannerSettings, schema }) => {
// region promote filters
const stixCyberObservableTypes = schema.scos.map((sco) => sco.id);
const promotionTypes = stixCyberObservableTypes.concat(['Indicator']);
const promotionTypes = stixCyberObservableTypes.concat(['Indicator', 'Stix-Cyber-Observable']);
const observablesFiltered = entityTypeFilterValues.length > 0
&& entityTypeFilterValues.every((id) => stixCyberObservableTypes.includes(id));
const promotionTypesFiltered = entityTypeFilterValues.length > 0
&& entityTypeFilterValues.every((id) => promotionTypes.includes(id));
const isManualPromoteSelect = !selectAll
&& selectedTypes.length > 0
&& selectedTypes.every((type) => promotionTypes.includes(type));
const promoteDisable = !isManualPromoteSelect && !promotionTypesFiltered;
const promoteEnabled = isManualPromoteSelect || promotionTypesFiltered;
const filterKeysMap = new Map();
entityTypeFilterValues.forEach((entityType) => {
const currentMap = schema.filterKeysSchema.get(entityType);
Expand Down Expand Up @@ -1460,7 +1460,7 @@ class ToolBar extends Component {
</span>
</Tooltip>
)}
{!promoteDisable && (
{promoteEnabled && (
<Tooltip title={t('Indicators/observables generation')}>
<span>
<IconButton
Expand Down

0 comments on commit 607b674

Please sign in to comment.