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(log explorer): show PPL errors in toasts correctly #2154

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

joshuali925
Copy link
Member

Description

This PR has these fixes

  • fix(log explorer): set loading state to false if query failed
  • update fetch call to pass in data source id
    • data source id is always undefined because log explorer doesn't support multi-datasource. passing undefined fixes the parameters so UI shows PPL errors in toasts
  • revert icon to use prepend
    • using prepend property the icon will be smaller than its original size, but since the text field is now compact and original size doesn't fit anymore, we can revert back to use prepend.

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: Joshua Li <joshuali925@gmail.com>
data source id is always undefined because log explorer doesn't support
multi-datasource. passing undefined fixes the parameters so UI shows PPL
errors in toasts

Signed-off-by: Joshua Li <joshuali925@gmail.com>
using `prepend` property the icon will be smaller than its original
size, but since the text field is now `compact` and original size
doesn't fit anymore, we can revert back to use `prepend`.

Signed-off-by: Joshua Li <joshuali925@gmail.com>
@@ -52,7 +52,7 @@ export const useFetchEvents = ({ pplService, requestParams }: IFetchEventsParams
) => {
setIsEventsLoading(true);
return pplService
.fetch({ query, format }, errorHandler)
.fetch({ query, format }, undefined, errorHandler)
Copy link
Collaborator

Choose a reason for hiding this comment

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

?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's regression from MDS PR, see description and 7b5cc9f commit message:

  • update fetch call to pass in data source id
    • data source id is always undefined because log explorer doesn't support multi-datasource. passing undefined fixes the parameters so UI shows PPL errors in toasts

@joshuali925 joshuali925 merged commit 7aa554a into opensearch-project:main Sep 10, 2024
16 of 24 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 10, 2024
Signed-off-by: Joshua Li <joshuali925@gmail.com>
(cherry picked from commit 7aa554a)
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 10, 2024
Signed-off-by: Joshua Li <joshuali925@gmail.com>
(cherry picked from commit 7aa554a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshuali925 pushed a commit that referenced this pull request Sep 10, 2024
(cherry picked from commit 7aa554a)

Signed-off-by: Joshua Li <joshuali925@gmail.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 10, 2024
(cherry picked from commit 7aa554a)

Signed-off-by: Joshua Li <joshuali925@gmail.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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants