Skip to content

capa Explorer Web: improve url navigation - #2425

Merged
mr-tz merged 6 commits into
mandiant:masterfrom
fariss:improve-url-navigation
Oct 1, 2024
Merged

capa Explorer Web: improve url navigation#2425
mr-tz merged 6 commits into
mandiant:masterfrom
fariss:improve-url-navigation

Conversation

@fariss

@fariss fariss commented Oct 1, 2024

Copy link
Copy Markdown
Collaborator

closes #2419

This PR enhances the navigation in capa Explorer Web by making sure the links generated are shareable. Preview.

Previously: users browsing to /analysis were always redirected to the homepage /.

With this PR:

  • If a user accesses /analysis without an rdoc query parameter set in the URL, they are still redirected to the homepage.
  • If a user accesses /analysis with the rdoc query parameter set, capa Explorer Web loads from that URL instead of redirecting to homepage.

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed

fariss added 2 commits October 1, 2024 14:45
This commit enhances the navigation guard for the /analysis route to
provide a better user experience when loading data from a URL:

Previously: users browsing to /analysis were always redirected to
the homepage (/).

With this commit:
- If a user accesses /analysis without an rdoc parameter, they are still
  redirected to the homepage.
- If a user accesses /analysis with an rdoc parameter, the following
  occurs:
  The user is redirected to the homepage (/) and the rdoc parameter is
  preserved in the URL, capa Explorer Web then loads the rdoc from URL.
@fariss
fariss requested review from mr-tz and williballenthin and removed request for mr-tz October 1, 2024 15:55
@fariss
fariss marked this pull request as ready for review October 1, 2024 15:56

@mr-tz mr-tz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me, thank you!

Comment thread CHANGELOG.md Outdated
@mr-tz

mr-tz commented Oct 1, 2024

Copy link
Copy Markdown
Collaborator

TODO @s-ff: VirusTotal links have a short lifespan before expiration, add a toast message mentioning this instead of just "HTTP error 400"

will you create a separate PR for this?

@fariss

fariss commented Oct 1, 2024

Copy link
Copy Markdown
Collaborator Author

TODO @s-ff: VirusTotal links have a short lifespan before expiration, add a toast message mentioning this instead of just "HTTP error 400"

will you create a separate PR for this?

Yeah, I just created #2427 for tracking

Comment thread CHANGELOG.md
Comment thread CHANGELOG.md
@mr-tz
mr-tz merged commit 16eae70 into mandiant:master Oct 1, 2024
@mr-tz

mr-tz commented Oct 1, 2024

Copy link
Copy Markdown
Collaborator

Thanks @s-ff!

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.

explorer web: improve URL navigation

2 participants