-
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
[SIEM] Fix bug on url + inspect functionality on hosts/hostDetails page #44671
Conversation
Pinging @elastic/siem |
💔 Build Failed |
x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_network.tsx
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/pages/hosts/hosts_navigations.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/url_state/helpers.ts
Outdated
Show resolved
Hide resolved
…se-url-state Fix inspect in hosts/host details page Fix some url state issue too
90a4559
to
ecfe07a
Compare
💚 Build Succeeded |
ecfe07a
to
7bb962a
Compare
💚 Build Succeeded |
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.
Checked out, tested locally, ran cypress tests, and performed code review. There are a few comments I'd like addressed, but nothing blocking. Great work and nice 🐛 squashing! LGTM 🚀
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/url_state/url_state.spec.ts
Show resolved
Hide resolved
RouteComponentProps & TabNavigationProps | ||
> { | ||
public shouldComponentUpdate(nextProps: Readonly<RouteComponentProps>): boolean { | ||
export class SiemNavigationComponent extends React.Component<TabNavigationProps & RouteSpyState> { |
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.
We could refactor this to use hooks
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 am not sure about that because we still need to be connected to the redux connect. I think that it can be converted to a hook when will update our redux to use hook
x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/cypress/integration/lib/util/helpers.ts
Outdated
Show resolved
Hide resolved
: '' | ||
: convertKueryToElasticSearchQuery( | ||
`${filterQueryExpression} ${ | ||
hostName ? `and host.name: "${escapeQueryValue(hostName)}"` : '' |
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.
we're going to have to look out for conflicts between this and my escape query PR: #43030
</> | ||
)} | ||
/> | ||
<Route |
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.
is there a way we can simplify this? it's a lot of repeated code. perhaps put all this route data in an object and map over that object, returning the <Route>
s you need
…se-url-state Fix inspect in hosts/host details page Fix some url state issue too
7bb962a
to
0ee232a
Compare
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
Nice clean up and thanks for fixing the bug! Sorry that I did a fix for cyclic deps without asking for your permission, please feel free to fix in other solution. I just found it might be upset to see the red light in the morning... |
💚 Build Succeeded |
@angorayc Please do not be sorry I appreciate it the help. |
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 worked off this branch personally and have nothing but the nicest things to say about it. Appreciate all the effort from all the people that have gone into this and the Cypress tests as well.
Using my best Hermione voice, I approve using this latin phrase
Haec est magna viverra enim omnis petitionem habere!
💚 Build Succeeded |
💚 Build Succeeded |
…ge (elastic#44671) * refactor code to use react-router params instead of regex inside of use-url-state Fix inspect in hosts/host details page Fix some url state issue too * add search in breadcrumb + fix existing unit testing * refactor code to use react-router params instead of regex inside of use-url-state Fix inspect in hosts/host details page Fix some url state issue too * add search in breadcrumb + fix existing unit testing * fix bug by doing cypress test * clean up + unit testing * review I * [SIEM] Fixes the Anomalies table paging to work again * Updated to look more like the PR in flight to have a smaller diff * fix cyclic deps * remove redundant comment * review II * review II + fix circular dependency * fix host url
…ge (elastic#44671) * refactor code to use react-router params instead of regex inside of use-url-state Fix inspect in hosts/host details page Fix some url state issue too * add search in breadcrumb + fix existing unit testing * refactor code to use react-router params instead of regex inside of use-url-state Fix inspect in hosts/host details page Fix some url state issue too * add search in breadcrumb + fix existing unit testing * fix bug by doing cypress test * clean up + unit testing * review I * [SIEM] Fixes the Anomalies table paging to work again * Updated to look more like the PR in flight to have a smaller diff * fix cyclic deps * remove redundant comment * review II * review II + fix circular dependency * fix host url
…ge (#44671) (#44911) * refactor code to use react-router params instead of regex inside of use-url-state Fix inspect in hosts/host details page Fix some url state issue too * add search in breadcrumb + fix existing unit testing * refactor code to use react-router params instead of regex inside of use-url-state Fix inspect in hosts/host details page Fix some url state issue too * add search in breadcrumb + fix existing unit testing * fix bug by doing cypress test * clean up + unit testing * review I * [SIEM] Fixes the Anomalies table paging to work again * Updated to look more like the PR in flight to have a smaller diff * fix cyclic deps * remove redundant comment * review II * review II + fix circular dependency * fix host url
…ge (#44671) (#44912) * refactor code to use react-router params instead of regex inside of use-url-state Fix inspect in hosts/host details page Fix some url state issue too * add search in breadcrumb + fix existing unit testing * refactor code to use react-router params instead of regex inside of use-url-state Fix inspect in hosts/host details page Fix some url state issue too * add search in breadcrumb + fix existing unit testing * fix bug by doing cypress test * clean up + unit testing * review I * [SIEM] Fixes the Anomalies table paging to work again * Updated to look more like the PR in flight to have a smaller diff * fix cyclic deps * remove redundant comment * review II * review II + fix circular dependency * fix host url
…ete-for-distance_feature * 'master' of github.com:elastic/kibana: (89 commits) Replace TSVB timeseries charts with elastic-charts (elastic#33558) [TSVB][Top N aggregation] Unable to deal with negative values (elastic#43581) [alerting] Adds Action Type configuration support and whitelisting (elastic#44483) FTR: fix WebDriver Actions calls (elastic#44605) [Code] add NodeRepositoriesService to watch new repositories on local node (elastic#44677) [skip-ci][Maps] Improve Maps intro page (elastic#44721) [Maps] Update titles and descriptions for data sources (elastic#44833) Types + Extract Integration Util (elastic#44433) Downgrade log level from info to debug for cases when we cannot handle authentication attempt. (elastic#44933) [Reporting] Remove Chome stdout/stderr observables, Add Browser Logger observable (elastic#44359) Update Jest script to output coverage (elastic#44447) [ftr] support --kibana-install-dir flag (elastic#44552) [WATCHER] Allow user to set a threshold value of 0 (elastic#44810) Remove injectI18n in dashboard plugin. (elastic#44580) [Graph] Save modal (elastic#44261) Use external script for the OIDC Implicit flow handler page. (elastic#44866) disable router prefixing with pluginId (elastic#44855) [SIEM] Fix bug on url + inspect functionality on hosts/hostDetails page (elastic#44671) [ML] File data viz limiting uploaded doc chunk size (elastic#44768) [code] Append go env variable 'GOCACHE' to go lsp spawn command. (elastic#44864) ...
…plate * 'master' of github.com:elastic/kibana: (91 commits) [APM] Make number of x ticks responsive to the plot width (elastic#44870) [ML] Single metric viewer: Fix top nav refresh behaviour. (elastic#44860) Replace TSVB timeseries charts with elastic-charts (elastic#33558) [TSVB][Top N aggregation] Unable to deal with negative values (elastic#43581) [alerting] Adds Action Type configuration support and whitelisting (elastic#44483) FTR: fix WebDriver Actions calls (elastic#44605) [Code] add NodeRepositoriesService to watch new repositories on local node (elastic#44677) [skip-ci][Maps] Improve Maps intro page (elastic#44721) [Maps] Update titles and descriptions for data sources (elastic#44833) Types + Extract Integration Util (elastic#44433) Downgrade log level from info to debug for cases when we cannot handle authentication attempt. (elastic#44933) [Reporting] Remove Chome stdout/stderr observables, Add Browser Logger observable (elastic#44359) Update Jest script to output coverage (elastic#44447) [ftr] support --kibana-install-dir flag (elastic#44552) [WATCHER] Allow user to set a threshold value of 0 (elastic#44810) Remove injectI18n in dashboard plugin. (elastic#44580) [Graph] Save modal (elastic#44261) Use external script for the OIDC Implicit flow handler page. (elastic#44866) disable router prefixing with pluginId (elastic#44855) [SIEM] Fix bug on url + inspect functionality on hosts/hostDetails page (elastic#44671) ...
Summary
react-router
to figure out where we are in the apphttp://localhost:5601/app/siem#/hosts/MatBook-Pro.local
unit
testunit
andcypress
testChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
[ ] This was checked for breaking API changes and was labeled appropriately[ ] This includes a feature addition or change that requires a release note and was labeled appropriately