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

[Workspace][Bug] Fix inspect page url error #8857

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

yubonluo
Copy link
Contributor

@yubonluo yubonluo commented Nov 13, 2024

Description

  1. When workspace and new home page are disable, clicking the inspect button will show 404 error.
image
  1. When workspace and new home page are enabled, clicking the inspect button in the relationship page will go to the global inspect page.
image

Issues Resolved

After solving the issue 1, clicking inspect button will go to the inspect page
image

After solving the issue 2, clicking inspect button in the relationship will go to the workspace inspect page.
image

Screenshot

Testing the changes

Changelog

  • fix: [Workspace][Bug] Fix inspect page url error.

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.39%. Comparing base (76cf823) to head (e190886).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8857      +/-   ##
==========================================
- Coverage   60.86%   56.39%   -4.48%     
==========================================
  Files        3800     1239    -2561     
  Lines       90818    25913   -64905     
  Branches    14307     4437    -9870     
==========================================
- Hits        55276    14613   -40663     
+ Misses      32028    10559   -21469     
+ Partials     3514      741    -2773     
Flag Coverage Δ
Linux_1 ?
Linux_2 56.39% <ø> (ø)
Linux_3 ?
Linux_4 ?
Windows_1 ?
Windows_2 ?
Windows_3 ?
Windows_4 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines -28 to +31
finalEditUrl = finalEditUrl.replace(/^\/management\/opensearch-dashboards/, '/app');
finalEditUrl = finalEditUrl.replace(/^\/management\/opensearch-dashboards/, '');
}
if (finalEditUrl) {
finalEditUrl = `/app${finalEditUrl}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a reason to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In any case, need to add the \app prefix to the url, otherwise user will not be able to access it. According to previous practice, when new home is closed, the URL will miss the \app prefix

@Hailong-am Hailong-am merged commit 66ea096 into opensearch-project:main Nov 14, 2024
67 of 69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 14, 2024
* Fix inspect page url error

Signed-off-by: yubonluo <[email protected]>

* Changeset file for PR #8857 created/updated

---------

Signed-off-by: yubonluo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 66ea096)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants