-
Notifications
You must be signed in to change notification settings - Fork 8k
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] Add timeline id in url + refactor code #43943
Conversation
Pinging @elastic/siem |
💚 Build Succeeded |
x-pack/legacy/plugins/siem/public/components/url_state/index_mocked.test.tsx
Outdated
Show resolved
Hide resolved
8d96dd3
to
078a685
Compare
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.
Thanks @XavierM, nicely done! I like the changes, it really makes the flow easier to follow!
Some minor things found but happy to ship it as so and do them as bug fixing:
- The
queryLocation
on link address you just copy doesn't match to what it suppose to be
Steps for reproduce
:
- Go to
Hosts
page - Choose a
host
name and click onfilter for value
- Right click on
Network
tab and clickcopu link address
- Kqlbar is not refreshing after user input:
steps to reproduce
:
- Click on http://localhost:5601/app/siem#/hosts/?kqlQuery=(filterQuery:(expression:'host.name:%20%22beats-ci-immutable-centos-7-1566828754401694040%22',kind:kuery),queryLocation:hosts.page)&timelineId=c8bec320-a7f2-11e9-8950-0f78dfe8d3c9&timerange=(global:(linkTo:!(),timerange:(from:1566829069303,kind:absolute,to:1566829957589)),timeline:(linkTo:!(),timerange:(from:1563304238802,kind:absolute,to:1563305138803)))
- Update kqlbar and hit refresh
- The url remains the same
Yes, it is making sense. I will work on it right now to improve that |
💚 Build Succeeded |
I'm seeing this console warning on page load:
|
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.
Something is wrong with the timeline/global lock. When I visit this url: /app/siem#/network?timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))
it gets changed to this on pageload: /app/siem#/network?timerange=(global:(linkTo:!(),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))
queryLocation: CONSTANTS.hostsDetails, | ||
type: hostsModel.HostsType.details, | ||
}); | ||
const result = isKqlForRoute('/hosts', CONSTANTS.hostsDetails); |
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.
👍
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
@stephmilovic These Cypress tests were great, I now feel comfortable with this PR. Thanks a lot for working hard on these tests. (so Useful!!!) 🍸 🎈 |
5a24a59
to
9490783
Compare
💔 Build Failed |
This was a fun one to figure it out, the problem was that I changed the HomePage component to be a memo but the props from Route component only accept pure function. Therefore, we will need to update our |
9490783
to
57f07b3
Compare
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.
AMAZING work here @XavierM. Great cleanups, and so happy to see those cypress tests running smoothly. Gives me great confidence in our work! LGTM 🚀
Awesome! I played around with it and it works as expected. Thanks for fixing it, |
retest |
💔 Build Failed |
57f07b3
to
673a077
Compare
💚 Build Succeeded |
savedObjectId: duplicate ? null : timelineModel.savedObjectId, | ||
version: duplicate ? null : timelineModel.version, | ||
title: duplicate ? '' : timelineModel.title || '', | ||
} as TimelineModel, |
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.
no more AS
💚 Build Succeeded |
💔 Build Failed |
💚 Build Succeeded |
… at global initialization
…line because of nasty type loop
6fcfb66
to
d2d5da1
Compare
💚 Build Succeeded |
* Add timelineId in URL + refactor url_state to only update redux store at global initialization * add/fix unit test * remove async * wip * new tests for timeline url state * fix tests * rm unused * Add the expected href around global tab * fix conflict * fix console error about Route * fix type + test -- needed to refactor to default the value of the timline because of nasty type loop * add href on detail tab to match
* Add timelineId in URL + refactor url_state to only update redux store at global initialization * add/fix unit test * remove async * wip * new tests for timeline url state * fix tests * rm unused * Add the expected href around global tab * fix conflict * fix console error about Route * fix type + test -- needed to refactor to default the value of the timline because of nasty type loop * add href on detail tab to match
* Add timelineId in URL + refactor url_state to only update redux store at global initialization * add/fix unit test * remove async * wip * new tests for timeline url state * fix tests * rm unused * Add the expected href around global tab * fix conflict * fix console error about Route * fix type + test -- needed to refactor to default the value of the timline because of nasty type loop * add href on detail tab to match
* Add timelineId in URL + refactor url_state to only update redux store at global initialization * add/fix unit test * remove async * wip * new tests for timeline url state * fix tests * rm unused * Add the expected href around global tab * fix conflict * fix console error about Route * fix type + test -- needed to refactor to default the value of the timline because of nasty type loop * add href on detail tab to match
* Add timelineId in URL + refactor url_state to only update redux store at global initialization * add/fix unit test * remove async * wip * new tests for timeline url state * fix tests * rm unused * Add the expected href around global tab * fix conflict * fix console error about Route * fix type + test -- needed to refactor to default the value of the timline because of nasty type loop * add href on detail tab to match
* Add timelineId in URL + refactor url_state to only update redux store at global initialization * add/fix unit test * remove async * wip * new tests for timeline url state * fix tests * rm unused * Add the expected href around global tab * fix conflict * fix console error about Route * fix type + test -- needed to refactor to default the value of the timline because of nasty type loop * add href on detail tab to match
Summary
Checklist
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