Skip to content
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] template timeline UI #64439

Merged
merged 31 commits into from
May 6, 2020
Merged

Conversation

angorayc
Copy link
Contributor

@angorayc angorayc commented Apr 24, 2020

Summary

https://www.figma.com/proto/98ayxwvfEtP9q0GcsQqwe7/Timeline?node-id=14%3A935&scaling=min-zoom

Implementation details:

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@angorayc
Copy link
Contributor Author

angorayc commented May 4, 2020

Hello @marrasherrier, I have a question for you regarding to tabs for timelines table https://www.figma.com/proto/98ayxwvfEtP9q0GcsQqwe7/Timeline?node-id=14%3A935&scaling=min-zoom
It’s that we have some existing links point to this page like http://localhost:5601/app/siem#/timelines?timeline=(id:'975db7a0-8d6b-11ea-843e-5ff24162d973',isOpen:!t)
but from the url we couldn’t tell whether we should land it on timeline or template timeline’s tab.
Screenshot 2020-05-04 at 13 20 14

Therefore I’m thinking of using filter EuiFilterGroup, so by default it still show all the timelines we have
What do you think?
Screenshot 2020-05-04 at 13 13 17

@marrasherrier
Copy link
Contributor

hi @angorayc, I agree, a filter group like the one used in cases is probably a better choice here. I will update the figma mocks

@angorayc
Copy link
Contributor Author

angorayc commented May 4, 2020

@marrasherrier , after conforming with @XavierM , all the cases we have now are all fine to land at default tab, so we are fine to keep the current design.

@angorayc angorayc marked this pull request as ready for review May 4, 2020 16:12
@angorayc angorayc requested review from a team as code owners May 4, 2020 16:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@angorayc
Copy link
Contributor Author

angorayc commented May 4, 2020

@elasticmachine merge upstream

@patrykkopycinski
Copy link
Contributor

@elasticmachine merge upstream

@@ -98,9 +97,9 @@ export const OpenTimeline = React.memo<OpenTimelineProps>(

const onRefreshBtnClick = useCallback(() => {
if (refetch != null) {
refetch();
refetch(searchResults, totalSearchResultsCount);
Copy link
Contributor Author

@angorayc angorayc May 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to fix the flashing timelines' table while refetching data, not a good fix, so I'm opening an issue to follow it up
https://github.com/elastic/siem-team/issues/647

pinnedEventIds,
globalNotes,
eventNotes,
templateTimelineId,
templateTimelineVersion,
timelineType,
version = null,
} = parsedTimeline;
const parsedTimelineObject = omit(
timelineSavedObjectOmittedFields,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omitting the fields that timeline savedObject doesn't take to avoid failure while creating / updating savedObject.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll manage globalNotes for template timeline down below on Line 159-161

@XavierM
Copy link
Contributor

XavierM commented May 5, 2020

We have an issue when we tried to update a template timeline with a global note.

image
that's the json

{"savedObjectId":null,"version":"WzM5LDFd","timelineType":"template","templateTimelineId":"49188240-6530-11ea-90dd-7d87cXavier","templateTimelineVersion":4,"columns":[{"indexes":null,"name":null,"columnHeaderType":"not-filtered","id":"@timestamp","searchable":null},{"indexes":null,"name":null,"columnHeaderType":"not-filtered","id":"message","searchable":null},{"indexes":null,"name":null,"columnHeaderType":"not-filtered","id":"event.category","searchable":null},{"indexes":null,"name":null,"columnHeaderType":"not-filtered","id":"event.action","searchable":null},{"indexes":null,"name":null,"columnHeaderType":"not-filtered","id":"host.name","searchable":null},{"indexes":null,"name":null,"columnHeaderType":"not-filtered","id":"source.ip","searchable":null},{"indexes":null,"name":null,"columnHeaderType":"not-filtered","id":"destination.ip","searchable":null},{"indexes":null,"name":null,"columnHeaderType":"not-filtered","id":"user.name","searchable":null}],"dataProviders":[],"description":"is Super","eventType":"all","filters":[],"kqlMode":"filter","kqlQuery":{"filterQuery":{"serializedQuery":"{\"bool\":{\"should\":[{\"exists\":{\"field\":\"host.name\"}}],\"minimum_should_match\":1}}","kuery":{"expression":"host.name: *","kind":"kuery"}}},"title":"My template timeline updated","dateRange":{"start":1584020448645,"end":1584106848645},"savedQueryId":null,"sort":{"columnId":"@timestamp","sortDirection":"desc"},"favorite":[{"favoriteDate":1584480703444,"keySearch":"WGF2aWVyTQ==","fullName":"xavier mouligneau","userName":"XavierM"}],"created":1588693289719,"createdBy":"XavierM","updated":1588693315060,"updatedBy":"XavierM","eventNotes":[{"noteId":"e3cf0900-8ee6-11ea-bff9-5be90e832634","version":"WzM0LDFd","eventId":"Cfwg1HABO74GafNORxyF","note":"pinned and event note","timelineId":"e37d8da0-8ee6-11ea-bff9-5be90e832634","created":1588693290295,"createdBy":"XavierM","updated":1588693290295,"updatedBy":"XavierM"},{"noteId":"e3cfcc50-8ee6-11ea-bff9-5be90e832634","version":"WzM1LDFd","eventId":"Cvwg1HABO74GafNORxyF","note":"event note 1","timelineId":"e37d8da0-8ee6-11ea-bff9-5be90e832634","created":1588693290295,"createdBy":"XavierM","updated":1588693290295,"updatedBy":"XavierM"}],"globalNotes":[{"noteId":"e3cebae0-8ee6-11ea-bff9-5be90e832634","version":"WzI2LDFd","note":"Global","timelineId":"e37d8da0-8ee6-11ea-bff9-5be90e832634","created":1588693290295,"createdBy":"XavierM","updated":1588693290295,"updatedBy":"XavierM"},{"noteId":"e3cf3010-8ee6-11ea-bff9-5be90e832634","version":"WzM2LDFd","note":"Note","timelineId":"e37d8da0-8ee6-11ea-bff9-5be90e832634","created":1588693290295,"createdBy":"XavierM","updated":1588693290295,"updatedBy":"XavierM"}],"pinnedEventIds":["Yfwg1HABO74GafNObyFv","Cfwg1HABO74GafNORxyF","Cvwg1HABO74GafNORxyF"]}

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me, but I found some bugs about the importing timeline template and I think we do not cover all the use cases in this PR.

I think that we can move forward since we won't have the full story yet. But we will need a follow-up PR to get all the corner cases resolved.

I can see this implementation has been done thoughtfully, I did appreciate to read this PR and the code in it. Please merge when you got a green light.

@angorayc
Copy link
Contributor Author

angorayc commented May 5, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@XavierM XavierM merged commit a5fe3ce into elastic:master May 6, 2020
angorayc added a commit to angorayc/kibana that referenced this pull request May 6, 2020
* init template timeline's tab

* add template filter

* add routes for timelines tabs

* add tabs hook

* add filter type

* fix unit test

* add breadcrumbs

* fix types error

* fix flashing table

* fix types

* fix flashing table

* fix filter

* add comments for filters

* review X

* review x

* fix create note for template timeline

* rename timelineTypes to timelineType

* update unit test

* fix types

* update filter for timeline savedObject

* fix lint error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
XavierM added a commit that referenced this pull request May 6, 2020
* init template timeline's tab

* add template filter

* add routes for timelines tabs

* add tabs hook

* add filter type

* fix unit test

* add breadcrumbs

* fix types error

* fix flashing table

* fix types

* fix flashing table

* fix filter

* add comments for filters

* review X

* review x

* fix create note for template timeline

* rename timelineTypes to timelineType

* update unit test

* fix types

* update filter for timeline savedObject

* fix lint error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
@angorayc angorayc mentioned this pull request May 6, 2020
7 tasks
gmmorris added a commit to gmmorris/kibana that referenced this pull request May 6, 2020
* master: (72 commits)
  add tsvb tests to Firefox suite (elastic#65425)
  Fix flaky ServerMetricsCollector integration test (elastic#65420)
  [APM] Custom links section inside the Actions menu is showing outside of the menu (elastic#65428)
  [ML] Adds docs_per_second to transform edit form. (elastic#65365)
  update apm index pattern (elastic#65424)
  add direct build command (elastic#65431)
  [ML] Adding daily_model_snapshot_retention_after_days to types and schemas (elastic#65417)
  [chore] Improve request cancelation handling in vis embeddable (elastic#65057)
  [Alerting] migrates acceptance and functional test fixtures to KP (elastic#64888)
  [ML] Fixes reordering in view by selection when overall cell selected (elastic#65290)
  Additional branding updates (elastic#64712)
  Remove redundant formatting of percentage column (elastic#64948)
  [SIEM][CASE] Configuration pages UI redesign (elastic#65355)
  New nav (elastic#64018)
  [Ingest pipelines] Address copy feedback (elastic#65175)
  bug fixing (elastic#65387)
  skip whole suite blocking snapshots (elastic#65377)
  add related event generation to ancestor nodes (fixes a bug) (elastic#64950)
  [Canvas] move files from legacy/plugins to plugins (elastic#65283)
  [SIEM] template timeline UI (elastic#64439)
  ...
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants