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

feat: Add new feature to handle possible statuses retrieval #6878

Closed
wants to merge 1 commit into from

Conversation

athy125
Copy link

@athy125 athy125 commented Aug 2, 2023

A new feature to the getPossibleStatuses method in the StatusAPI class. The method has been updated to cache the retrieved possible statuses locally using a private field #cachedPossibleStatuses.

This change improves performance by reducing unnecessary API calls and allows faster access to the possible statuses when needed, the getPossibleStatuses method now returns the cached statuses if available, and only fetches from the provider when the cache is empty or invalidated.

This commit introduces a new feature to the getPossibleStatuses method in the StatusAPI class. The method has been updated to cache the retrieved possible statuses locally using a private field #cachedPossibleStatuses.
@ozyx ozyx added the source:community Community contribution or request label Aug 2, 2023
@ozyx
Copy link
Member

ozyx commented Aug 2, 2023

Thank you so much for your contribution! If you haven't already, please complete and submit a Contributor License Agreement (CLA). This is required before we can approve/merge your code. Thanks again, we will be taking a look at this shortly!

@ozyx ozyx self-requested a review August 9, 2023 17:01
Copy link
Member

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

Looks like this is failing due to a build-time error:

ERROR in ./src/api/user/StatusAPI.js 32:9
Module parse failed: Private field '#cachedPossibleStatuses' must be declared in an enclosing class (32:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     this.#userAPI = userAPI;
|     this.#openmct = openmct;
>     this.#cachedPossibleStatuses = null;
| 
|     this.onProviderStatusChange = this.onProviderStatusChange.bind(this);

@ozyx
Copy link
Member

ozyx commented Nov 14, 2023

Please resolve the build errors and re-open the PR. Closing for now.

@ozyx ozyx closed this Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source:community Community contribution or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants