opensearch-project / security-dashboards-plugin

🔐 Manage your internal users, roles, access control, and audit logs from OpenSearch Dashboards
https://opensearch.org/docs/latest/security-plugin/index/
Apache License 2.0
66 stars 148 forks source link

Fix bugs where pages were stuck in error state #1944

Closed derek-ho closed 2 months ago

derek-ho commented 2 months ago

Description

For Auth page, renders the picker so that the datasource gets updated, for other tabs sets error to false when the fetch data call succeeds.

Category

Bug Fix

Why these changes are required?

State is not updated after datasource gets updated

What is the old behavior before changes and new behavior after changes?

When no datasource passed in url, it would get stuck in an error state

Issues Resolved

Fix: https://github.com/opensearch-project/security-dashboards-plugin/issues/1932

Testing

Existing tests pass, local testing

Check List

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.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.94%. Comparing base (9d0f262) to head (44b2b26).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1944 +/- ## ========================================== + Coverage 69.90% 69.94% +0.03% ========================================== Files 97 97 Lines 2502 2505 +3 Branches 336 343 +7 ========================================== + Hits 1749 1752 +3 Misses 672 672 Partials 81 81 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

derek-ho commented 2 months ago

Before:

https://github.com/opensearch-project/security-dashboards-plugin/assets/26328171/022f434a-917f-4b14-8d48-38333ea107ce

After:

https://github.com/opensearch-project/security-dashboards-plugin/assets/26328171/ff675180-3194-4526-9054-bfa2ff2352de