Skip to content

Search investigation by observable#2671

Merged
drosetti merged 44 commits intodevelopfrom
search-investigation-by-observable
Feb 24, 2025
Merged

Search investigation by observable#2671
drosetti merged 44 commits intodevelopfrom
search-investigation-by-observable

Conversation

@drosetti
Copy link
Contributor

(Please add to the PR name the issue/s that this PR would close if merged by using a Github keyword. Example: <feature name>. Closes #999. If your PR is made by a single commit, please add that clause in the commit too. This is all required to automate the closure of related issues.)

Description

Please include a summary of the change and link to the related issue.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist

  • I have read and understood the rules about how to Contribute to this project
  • The pull request is for the branch develop
  • A new plugin (analyzer, connector, visualizer, playbook, pivot or ingestor) was added or changed, in which case:
    • I strictly followed the documentation "How to create a Plugin"
    • Usage file was updated. A link to the PR to the docs repo has been added as a comment here.
    • Advanced-Usage was updated (in case the plugin provides additional optional configuration). A link to the PR to the docs repo has been added as a comment here.
    • I have dumped the configuration from Django Admin using the dumpplugin command and added it in the project as a data migration. ("How to share a plugin with the community")
    • If a File analyzer was added and it supports a mimetype which is not already supported, you added a sample of that type inside the archive test_files.zip and you added the default tests for that mimetype in test_classes.py.
    • If you created a new analyzer and it is free (does not require any API key), please add it in the FREE_TO_USE_ANALYZERS playbook by following this guide.
    • Check if it could make sense to add that analyzer/connector to other freely available playbooks.
    • I have provided the resulting raw JSON of a finished analysis and a screenshot of the results.
    • If the plugin interacts with an external service, I have created an attribute called precisely url that contains this information. This is required for Health Checks.
    • If the plugin requires mocked testing, _monkeypatch() was used in its class to apply the necessary decorators.
    • I have added that raw JSON sample to the MockUpResponse of the _monkeypatch() method. This serves us to provide a valid sample for testing.
  • If external libraries/packages with restrictive licenses were used, they were added in the Legal Notice section.
  • Linters (Black, Flake, Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved (see tests folder). All the tests (new and old ones) gave 0 errors.
  • If the GUI has been modified:
    • I have a provided a screenshot of the result in the PR.
    • I have created new frontend tests for the new component or updated existing ones.
  • After you had submitted the PR, if DeepSource, Django Doctors or other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.

Important Rules

  • If you miss to compile the Checklist properly, your PR won't be reviewed by the maintainers.
  • Everytime you make changes to the PR and you think the work is done, you should explicitly ask for a review. After being reviewed and received a "change request", you should explicitly ask for a review again once you have made the requested changes.

Copy link
Contributor

@carellamartina carellamartina left a comment

Choose a reason for hiding this comment

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

I found a bug in the time picker: if I go to the history page, perform a new analysis from the scan page and then return to the history page, the value of the time picker remains the previous one so the new investigation or new jobs are not shown

@github-actions
Copy link

This pull request has been marked as stale because it has had no activity for 10 days. If you are still working on this, please provide some updates or it will be closed in 5 days.

@github-actions github-actions bot added the stale label Feb 18, 2025
Copy link
Contributor

@carellamartina carellamartina left a comment

Choose a reason for hiding this comment

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

I suggest changing the behavior of the time picker on the history page. Now if you visit the page after a scan and in case of refresh the values ​​are not modified but I think it is better that the time picker always updates to the default value (1 day) taking the current time as the final value.
Only in case of manual change is it correct that the value remains fixed.

@github-actions github-actions bot removed the stale label Feb 19, 2025
@drosetti
Copy link
Contributor Author

I did these fixes:

  • Now the default time rage (1 day) is set every time users navigate the history section, the only exception is they pass a time range (what happens from jobs to inspect related investigations)
  • Time range changed to 30 days

I didn't change the refresh behaviour: I think it's correct the time range in the url is preserved (this is the same behaviour of other projects), also I think this could be quite difficult to handle and didn't worth the effort.

@drosetti drosetti merged commit d476812 into develop Feb 24, 2025
11 checks passed
@drosetti drosetti deleted the search-investigation-by-observable branch February 24, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants