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

Fix reporting discover #190

Merged
merged 4 commits into from
Sep 19, 2023

Conversation

derek-ho
Copy link
Collaborator

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Derek Ho <dxho@amazon.com>
@@ -87,7 +91,7 @@ const generateInContextReport = async (
};

fetch(
`${getApiPath()}/reporting/generateReport?${new URLSearchParams(
`../api/reporting/generateReport?${new URLSearchParams(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is something wrong here - getApiPath is returning two different things for discover 1.0 and discover 2.0, causing reporting to fail when in new discover, need to look into this

Signed-off-by: Derek Ho <dxho@amazon.com>
@joshuali925
Copy link
Member

it doesn't work for me with basepath set

Signed-off-by: Derek Ho <dxho@amazon.com>
@@ -87,7 +91,7 @@ const generateInContextReport = async (
};

fetch(
`${getApiPath()}/reporting/generateReport?${new URLSearchParams(
`../${getApiPath()}/reporting/generateReport?${new URLSearchParams(
Copy link
Member

Choose a reason for hiding this comment

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

instead of this, try adding if (window.location.href.includes('/data-explorer/discover/')) return '../../../api' in line 339 (above the other if)

Signed-off-by: Derek Ho <dxho@amazon.com>
@YANG-DB YANG-DB merged commit 2d643cc into opensearch-project:2.10 Sep 19, 2023
8 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 19, 2023
* Fix reporting discover

Signed-off-by: Derek Ho <dxho@amazon.com>

* Get it to work

Signed-off-by: Derek Ho <dxho@amazon.com>

* Revert api file and add extra quote for regex matching

Signed-off-by: Derek Ho <dxho@amazon.com>

* Add extra condition if coming from dashboards management

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>
(cherry picked from commit 2d643cc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 19, 2023
* Fix reporting discover

Signed-off-by: Derek Ho <dxho@amazon.com>

* Get it to work

Signed-off-by: Derek Ho <dxho@amazon.com>

* Revert api file and add extra quote for regex matching

Signed-off-by: Derek Ho <dxho@amazon.com>

* Add extra condition if coming from dashboards management

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>
(cherry picked from commit 2d643cc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshuali925 pushed a commit that referenced this pull request Sep 19, 2023
(cherry picked from commit 2d643cc)

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshuali925 pushed a commit that referenced this pull request Sep 19, 2023
(cherry picked from commit 2d643cc)

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-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.

4 participants