-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SecuritySolution] Turn prevalence count into a button #133791
[SecuritySolution] Turn prevalence count into a button #133791
Conversation
- Ties in with other parts of the UI where we show counts that are actionable and start a timeline investigation - Uses less space in the flyout
@@ -113,22 +96,4 @@ describe('AddToTimelineCellRenderer', () => { | |||
expect(screen.queryByLabelText(ACTION_INVESTIGATE_IN_TIMELINE)).not.toBeInTheDocument(); | |||
}); | |||
}); | |||
|
|||
describe('When the field is the host status field', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is not required anymore since no prevalence data is returned for this field and the button therefore is not rendered.
@@ -0,0 +1,88 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed this file, so tracking changes in this file is a bit cumbersome. I annotated the changes for y'all's convenience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
React.PropsWithChildren<AlertSummaryRow['description']> | ||
>(({ data, eventId, fieldFromBrowserField, linkValue, timelineId, values, children }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added children
to type and extracted it from props
} | ||
}, [dispatch, clearTimeline, actionCellConfig]); | ||
|
||
const showButton = values != null && !isEmpty(actionCellConfig?.dataProvider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed const fieldHasActionsEnabled = hasHoverOrRowActions(data.field);
since the logic is not required anymore.
<EuiButtonEmpty | ||
aria-label={ACTION_INVESTIGATE_IN_TIMELINE} | ||
onClick={configureAndOpenTimeline} | ||
flush="right" | ||
size="xs" | ||
> | ||
{children} | ||
</EuiButtonEmpty> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uses a different button than it did before
…-ref HEAD~1..HEAD --fix'
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @janmonschke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for doing. LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
desk tested locally, works as expected lgtm 👍
* feat: turn prevalence count into a button - Ties in with other parts of the UI where we show counts that are actionable and start a timeline investigation - Uses less space in the flyout * fix: remove unused variable * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit dd95fa2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…3957) * feat: turn prevalence count into a button - Ties in with other parts of the UI where we show counts that are actionable and start a timeline investigation - Uses less space in the flyout * fix: remove unused variable * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit dd95fa2) Co-authored-by: Jan Monschke <[email protected]>
@janmonschke tested pr on local kibana and targeted issue is now fixed . prevalence count into a button and got added in investigation✔️ 10.0.6.219.-.Remote.Desktop.Connection.2022-06-14.18-21-40.mp4 |
selectedDataViewId: 'security-solution-default', | ||
selectedPatterns: ['.alerts-security.alerts-default'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data view ids are space sensitive. You should just get them off of redux, sourcerer.defaultDataView.id
and sourcerer.signalIndexName
Above, call
import { sourcererSelectors } from '../../store';
const getDataViewsSelector = useMemo(
() => sourcererSelectors.getSourcererDataViewsSelector(), []
);
const {
defaultDataView,
signalIndexName,
} = useDeepEqualSelector((state) => getDataViewsSelector(state));
and then here we would call
selectedDataViewId: defaultDataView.id,
selectedPatterns: [signalIndexName],
Summary
After some feedback with design and product, we decided to remove the
Investigate in timeline
column and make the prevalence count a button that achieves the same thing. Now the interaction ties in better with other parts of the Kibana UI where we show counts to start a timeline investigation and it uses less space in the alert flyout.Checklist