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

Consider adding a QueryResultOptions component for actions on query results #876

Open
1 of 4 tasks
yankovs opened this issue Sep 21, 2023 · 0 comments · May be fixed by #878
Open
1 of 4 tasks

Consider adding a QueryResultOptions component for actions on query results #876

yankovs opened this issue Sep 21, 2023 · 0 comments · May be fixed by #878
Labels
type:feature New feature description e.g. which involves implementation of new components zone:frontend MWDB frontend tasks

Comments

@yankovs
Copy link
Contributor

yankovs commented Sep 21, 2023

Feature Category

  • Correctness
  • User Interface / User Experience
  • Performance
  • Other (please explain)

Describe the problem

Today in MWDB, after a query is done, the user doesn't have many ways to interact with the results. Sometimes, a user may want to do some post processing on the results they've found. For example, this can include:

  • Download a JSON containing all of the samples they've found, or just a list of hashes, for whatever reason
  • Batch Karton reanalysis of all of the results of the query. For example, some analyst may want to reanalyze all Emotet samples that entered MWDB between the 8th and the 21st of May this year. With this feature, he could do a simple query and be done
  • Users of MWDB developing a custom plugin that can send query results to further processing on internal systems

Describe the solution you'd like

There are a couple of steps I think are logical in such implementation:

  • Make a QueryResultOptions component that is essentially a list of actions to be performed after a query is complete. Make sure this list is extendable so it can be used by plugins 😉
  • Each action should be a custom component, similar to actions in ObjectView
  • Place this component in RecentView with conditional rendering only if the query is submitted and done, and make any changes necessary for it in RecentView
  • Since each item in QueryResultOptions would need to know the actual result of the query, consider making a QueryContext similar to ObjectContext. When a query is complete, it can return an iterator to the results. Not sure this is the best solution react-wise, since if no query is submitted it can still probably be accessed, but maybe returning null when accessing the iterator in such a case is enough

Another, maybe better and more straightforward approach, would be to add this QueryResultOptions as part of RecentViewList. This way there's no need for a context, since this now has access to the elements. Also, I believe this would make it render only after a query is done like needed.

@yankovs yankovs linked a pull request Sep 24, 2023 that will close this issue
3 tasks
@psrok1 psrok1 added type:feature New feature description e.g. which involves implementation of new components zone:frontend MWDB frontend tasks labels Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature description e.g. which involves implementation of new components zone:frontend MWDB frontend tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants