mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[8.9] [Security Solution] Modal says "duplicating 0 rules" when you duplicate an individual rule (#163908) (#164687)
# Backport This will backport the following commits from `main` to `8.9`: - [[Security Solution] Modal says "duplicating 0 rules" when you duplicate an individual rule (#163908)](https://github.com/elastic/kibana/pull/163908) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"GitStart","email":"1501599+gitstart@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-08-24T07:13:17Z","message":"[Security Solution] Modal says \"duplicating 0 rules\" when you duplicate an individual rule (#163908)\n\n ## What does this PR do?\r\n * It fixes the count on the duplicate modal when duplicating an individual rule.\r\n \r\n ## Issue References\r\nFixes #162035\r\n \r\n ## Video/Screenshot Demo\r\n ##### Steps to reproduce & Fix:\r\nhttps://www.loom.com/share/931e42c1490d4483958b8f98dc0ba534?sid=07c67df5-b380-41a5-90f1-f64f326a12d9\r\n\r\n___\r\n \r\n This code was written and reviewed by GitStart Community. Growing future engineers, one PR at a time.","sha":"59f20582605d5dcb489b6534b027ec19475e7136","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","💝community","Team:Detections and Resp","Team: SecuritySolution","Feature:Rule Management","Team:Detection Rule Management","v8.10.0","v8.9.2"],"number":163908,"url":"https://github.com/elastic/kibana/pull/163908","mergeCommit":{"message":"[Security Solution] Modal says \"duplicating 0 rules\" when you duplicate an individual rule (#163908)\n\n ## What does this PR do?\r\n * It fixes the count on the duplicate modal when duplicating an individual rule.\r\n \r\n ## Issue References\r\nFixes #162035\r\n \r\n ## Video/Screenshot Demo\r\n ##### Steps to reproduce & Fix:\r\nhttps://www.loom.com/share/931e42c1490d4483958b8f98dc0ba534?sid=07c67df5-b380-41a5-90f1-f64f326a12d9\r\n\r\n___\r\n \r\n This code was written and reviewed by GitStart Community. Growing future engineers, one PR at a time.","sha":"59f20582605d5dcb489b6534b027ec19475e7136"}},"sourceBranch":"main","suggestedTargetBranches":["8.10","8.9"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com>
This commit is contained in:
parent
993447864a
commit
128fde2748
1 changed files with 2 additions and 2 deletions
|
@ -242,7 +242,7 @@ export const RulesTables = React.memo<RulesTableProps>(({ selectedTab }) => {
|
|||
|
||||
const shouldShowLinearProgress = (isFetched && isRefetching) || isUpgradingSecurityPackages;
|
||||
const shouldShowLoadingOverlay = (!isFetched && isRefetching) || isPreflightInProgress;
|
||||
const numberOfSelectedRules = isAllSelected ? pagination.total : selectedRuleIds?.length ?? 1;
|
||||
const rulesCount = Math.max(isAllSelected ? pagination.total : selectedRuleIds?.length ?? 0, 1);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -284,7 +284,7 @@ export const RulesTables = React.memo<RulesTableProps>(({ selectedTab }) => {
|
|||
<BulkActionDuplicateExceptionsConfirmation
|
||||
onCancel={cancelRuleDuplication}
|
||||
onConfirm={confirmRuleDuplication}
|
||||
rulesCount={numberOfSelectedRules}
|
||||
rulesCount={rulesCount}
|
||||
/>
|
||||
)}
|
||||
{isBulkEditFlyoutVisible && bulkEditActionType !== undefined && (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue