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

UI fixes for loading state, empty tree, added toast for error, fixed no indicies error #176

Merged
merged 10 commits into from
Oct 25, 2023

Conversation

sumukhswamy
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.

paulstn and others added 5 commits October 24, 2023 14:15
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
…, added badge for no indicies

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
Comment on lines 503 to 504
<>
<EuiFlexGroup>
<>
Copy link
Member

Choose a reason for hiding this comment

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

Do we need double fragments?

Copy link
Collaborator

Choose a reason for hiding this comment

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

removed the double fragments

Comment on lines 539 to 540
icon={<EuiIcon type="database" size="m" />}
iconColor="subdued"
Copy link
Member

Choose a reason for hiding this comment

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

Should the banner change on error from the backend?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is for the initial databases loading, when error comes there is a text saying Error fetching data as we discussed on call

}}
>
<EuiFlexGroup direction="column">
<EuiFlexItem>
<EuiFlexItem grow={false}>
Copy link
Member

Choose a reason for hiding this comment

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

Is this flex item needed here? I don't see it part of any flex group

Copy link
Collaborator

Choose a reason for hiding this comment

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

Removed it

<EuiFlexItem
grow={false}
onClick={() =>
this.props.updatePPLQueries('source = <datasource>.<database>.<table> | head 10')
Copy link
Member

Choose a reason for hiding this comment

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

Should move the query to common/constants

Copy link
Collaborator

Choose a reason for hiding this comment

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

moved query to constants

@@ -50,14 +50,15 @@ export const pollQueryStatus = (id: string, http: CoreStart['http'], callback) =
callback({ status: status });
setTimeout(() => pollQueryStatus(id, http, callback), POLL_INTERVAL_MS);
} else if (status === 'failed') {
callback({ status: 'FAILED', results: [] });
const results = res.data.resp;
callback({ status: 'FAILED', error: results.error });
Copy link
Member

Choose a reason for hiding this comment

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

Have we tested the acceleration flyout with the function change here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not able to test anything, right now

@ps48
Copy link
Member

ps48 commented Oct 25, 2023

@paulstn @sumukhswamy Can you please update the tests?

paulstn and others added 2 commits October 24, 2023 17:32
paulstn and others added 2 commits October 24, 2023 18:49
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #176 (a47f644) into main (a5aa2d2) will decrease coverage by 0.18%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
- Coverage   58.39%   58.21%   -0.18%     
==========================================
  Files          32       33       +1     
  Lines        1507     1546      +39     
  Branches      260      270      +10     
==========================================
+ Hits          880      900      +20     
- Misses        605      622      +17     
- Partials       22       24       +2     
Flag Coverage Δ
dashboards-query-workbench 58.21% <ø> (-0.18%) ⬇️

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

see 5 files with indirect coverage changes

@ps48 ps48 merged commit 015cab8 into opensearch-project:main Oct 25, 2023
10 of 11 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 25, 2023
…no indicies error (#176)

* sample query button

Signed-off-by: Paul Sebastian <[email protected]>

* added toasts for failure cases

Signed-off-by: Paul Sebastian <[email protected]>

* added changes for error loading message, fixed initial loading screen, added badge for no indicies

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

* ui changes to curb sidebar

Signed-off-by: Paul Sebastian <[email protected]>

* added fix for error from async query

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

* updated snapshots

Signed-off-by: Paul Sebastian <[email protected]>

* added changes for for mocking toasts, changed table test

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

* pr requested changes

Signed-off-by: Paul Sebastian <[email protected]>

* fix main.tsx tests

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Shenoy Pratik <[email protected]>
(cherry picked from commit 015cab8)
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 Oct 25, 2023
…no indicies error (#176)

* sample query button

Signed-off-by: Paul Sebastian <[email protected]>

* added toasts for failure cases

Signed-off-by: Paul Sebastian <[email protected]>

* added changes for error loading message, fixed initial loading screen, added badge for no indicies

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

* ui changes to curb sidebar

Signed-off-by: Paul Sebastian <[email protected]>

* added fix for error from async query

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

* updated snapshots

Signed-off-by: Paul Sebastian <[email protected]>

* added changes for for mocking toasts, changed table test

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

* pr requested changes

Signed-off-by: Paul Sebastian <[email protected]>

* fix main.tsx tests

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Shenoy Pratik <[email protected]>
(cherry picked from commit 015cab8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ps48 added a commit that referenced this pull request Oct 25, 2023
…no indicies error (#176) (#178)

* sample query button



* added toasts for failure cases



* added changes for error loading message, fixed initial loading screen, added badge for no indicies



* ui changes to curb sidebar



* added fix for error from async query



* updated snapshots



* added changes for for mocking toasts, changed table test



* pr requested changes



* fix main.tsx tests



---------






(cherry picked from commit 015cab8)

Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
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>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Shenoy Pratik <[email protected]>
ps48 added a commit that referenced this pull request Oct 25, 2023
…no indicies error (#176) (#177)

* sample query button



* added toasts for failure cases



* added changes for error loading message, fixed initial loading screen, added badge for no indicies



* ui changes to curb sidebar



* added fix for error from async query



* updated snapshots



* added changes for for mocking toasts, changed table test



* pr requested changes



* fix main.tsx tests



---------






(cherry picked from commit 015cab8)

Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
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>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Shenoy Pratik <[email protected]>
mengweieric added a commit to mengweieric/dashboards-query-workbench that referenced this pull request Nov 8, 2023
mengweieric added a commit to mengweieric/dashboards-query-workbench that referenced this pull request Nov 8, 2023
mengweieric added a commit that referenced this pull request Nov 13, 2023
* Revert "Fix error handling for user w/o proper permissions (#195) (#197)"

This reverts commit 26ed0dc.

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

* Revert "Increment version to 2.11.1.0 (#186)"

This reverts commit b18f5f4.

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

* Revert "added fix for loading spinner issue for other database (#189) (#192)"

This reverts commit 94805c5.

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

* Revert "UI-bug fixes, added create query for MV (#182) (#188)"

This reverts commit 4187b6d.

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

* Revert "Add backticks and remove ckpt for manual refresh in acceleration flyout (#183) (#185)"

This reverts commit f96c5d9.

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

* Revert "Session update, minor fixes for acceleration flyout (#179) (#181)"

This reverts commit 257fb53.

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

* Revert "UI fixes for loading state, empty tree, added toast for error, fixed no indicies error (#176) (#178)"

This reverts commit 3c47d47.

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

* Revert "Make checkpoint mandatory, add watermark delay, minor UI fixes (#173) (#175)"

This reverts commit 0198fa7.

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

* Revert "design changes for loading, changed the banner, updated tests (#170) (#172)"

This reverts commit 786c7c7.

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

* Revert "Support dark mode and session for sql, minor bug fixes (#165) (#169)"

This reverts commit 0f5673a.

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

* Revert "Added changes for making tree view persistent, made changes for bugs for loading screen (#153) (#167)"

This reverts commit 2269d1d.

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

* Revert "fixed create table async query bug (#158) (#163)"

This reverts commit 1964008.

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

---------

Signed-off-by: Eric <[email protected]>
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