-
Notifications
You must be signed in to change notification settings - Fork 603
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
Get processing timeline events #3241
base: master
Are you sure you want to change the base?
Get processing timeline events #3241
Conversation
42403d9
to
de22d67
Compare
Thanks for adding a draft PR for early feedback. If I see this correctly, you are also having the changes submitted in your PR #3226 in this PR. Can you please separate this out and only commit the changes relevant to the issue #3219 in this PR? This would make reviewing the code much easier, thanks. |
de22d67
to
281bb34
Compare
@jkppr, I removed the work of the other PR. The only change I made for now is at the backend side: It unlocks the desired behaviour: Getting timeline events while in the processing status. At the frontend side, for now, all timeline events appear even if some of them are is in the processing state. However, I face difficulties when attempting to change the timeline chip so that a processing one behaves like a ready/failed one, with an additional spinning wheel as the only visual difference. The complementarity between Do you think someone can help me to accomplish this precise part? |
Now one thing to be careful about is that TimelineComponent.vue is used by Explore/TimelineChip.vue and Analyzer/TimelineChip.vue and whatever you change in TimelineComponen.vue will impact both types of timeline chips. |
7aad31c
to
0177d57
Compare
Hi @jkppr, I have made progress, but still WIP. For now:
I am currently developing the following:
Feel free to give me advice or instructions to fine tune my change, if necessary. |
e5e1caf
to
901a0b6
Compare
Hi @jkppr, I just pushed a first version of the feature. Changes are:
I will try to deploy those changes in my company in order to let the PO check the feature. I'll update the current code in the case we find a bug or the PO wants to change something. |
901a0b6
to
a3d287e
Compare
bd02f79
to
a308002
Compare
a308002
to
91be24c
Compare
b0b1266
to
2f41b26
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.
This feature turned out great already during testing, thanks for all the effort!
Here is the first part of a partial review. It covers all files except some files in components/Explore/
.
Some general topics I noticed:
- With the current implementation the decision if the feature will be used is solely on the user. What I'm missing is an option for a server admin to control the functionality. So adding a config option to
data/timesketch.conf
that allows admins to disable/enable the feature for their instance. Check server side functionality against that setting and handle accordingly. This does not only give the admin of an instance the decision what features they want to support on the deployment but also allows us later to easily add default settings for all users.- E.g.
SEARCH_PROCESSING_TIMELINES = True
- E.g.
- There seems to be no processing progress shown anymore on the Data Source dialog, when the feature is turned on. Is this on purpose?
Otherwise I just noticed some errors and added suggestions or questions below.
timesketch/frontend-ng/src/components/Explore/EventActionMenu.vue
Outdated
Show resolved
Hide resolved
@@ -438,7 +441,8 @@ export default { | |||
xTitle: this.selectedXTitle, | |||
yTitle: this.selectedYTitle, | |||
}, | |||
} | |||
}, | |||
include_processing_timelines: !!this.settings.showProcessingTimelineEvents, |
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.
What is this change supposed to do? I did not notice any effect on the VisualizationEditor.
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.
It adds the "processing yes/no" boolean for a further backend API call (to propagate the user setting up to the API call).
timesketch/frontend-ng/src/components/Visualization/SavedVisualization.vue
Outdated
Show resolved
Hide resolved
timesketch/frontend-ng/src/components/Visualization/SavedVisualization.vue
Outdated
Show resolved
Hide resolved
timesketch/frontend-ng/src/components/LeftPanel/TimelinesTable.vue
Outdated
Show resolved
Hide resolved
// least one enabled timeline is the "processing" state. | ||
this.showBanner = | ||
!!this.settings.showProcessingTimelineEvents && | ||
this.$store.state.sketch.active_timelines |
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.
optional: you can simplify this by using this.sketch()
instead of this.$store.state.sketch
.
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.
Done (rebased).
2f41b26
to
38a69c9
Compare
38a69c9
to
b8b2507
Compare
b8b2507
to
e749a4f
Compare
The POST /sketches/{sketchId}/explore/ endpoint can now be parameterized to include processing timeline indices.
Default value is "false" (legacy behaviour).
User settings must be loaded before the sketch to transmit the new parameter to POST /sketches/{id}/aggregation/explore/.
The setting name is SEARCH_PROCESSING_TIMELINES. The related user setting (showProcessingTimelineEvents) only appears when this system setting is enabled.
e749a4f
to
f2c14b6
Compare
IMPORTANT: All Pull Requests should be connected to an issue, if you don't
have an issue, please start by creating an issue and link it to the PR.
Please provide enough information so that others can review your pull request:
Sketch
model, theactive_timelines
property includes timelines with a status set toprocessing
,utils.py
, theget_validated_indices
function includes timelines with a status set toprocessing
,POST /sketches/{{sketch_id}}/aggregation/explore/
endpoint includes indices which timeline has a status set toprocessing
.Checks
Closing issues
Closes #3219.