Skip to content

Conversation

eddiesarevalo
Copy link
Member

@eddiesarevalo eddiesarevalo commented Apr 16, 2022

🗒️ Summary

-Added a message that appears at the top of the app if the app can not connect to the api.
-A test is sent on startup of the app.
-Every time a call is made to the api the api is tested.
-The message has a link to the pds-operator page.

⚙️ Test Data and/or Report

Testing on start up:
Start up the app using npm start
Connect to pds-dev3 and refresh the app. There will not be an error at the top.
Disconnect from pds-dev3 then refresh the app. There will be an error message at the top.

During Run:
Running search, creation, reservation while disconnected from pds-dev3 will show the error message at the top. Being connected will not show the error message.

Click on the PDS Operator link to make sure it links to the PDS operator page.

On Build:

  1. Build the app using npm run build
  2. Place the built files into a server. For example use python -m SimpleHTTPServer 9001 Then go to localhost:9001 the app should not show any misplaced styling.

♻️ Related Issues

-Added a message that appears at the top of the app if the app can not connect to the api.
-A test is sent on startup of the app.
-Every time a call is made to the api the api is tested.
Copy link
Member

@tloubrieu-jpl tloubrieu-jpl left a comment

Choose a reason for hiding this comment

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

Thanks @eddiesarevalo , that looks good. I lie the red banner on top.
But it does not disappear if the API is up again.

See the screenshot.
image

The test scenario is:

  1. start to use the UI without the API
  2. start the API
  3. re-do the same reserve action

Thomas Loubrieu and others added 3 commits April 18, 2022 16:47
-Fixed an issue where the api error message was not being removed once the api would be connected again.
@eddiesarevalo
Copy link
Member Author

@tloubrieu-jpl Good catch! I wasn't setting the error message off when a successful connection was made. I was only setting if off on a successful search.

-Fixed a bug where the component stylings would over write each other. This occurred because the theme provider was missing.
-Removed the banner component as this should deployed separately from the doi ui app.
-The banner component would also interfere with the styling since it uses withStyles while the rest of the app would use makeStyles.
-Added missing styling for the home call to action buttons.
@eddiesarevalo
Copy link
Member Author

@tloubrieu-jpl I applied the fix for the odd styling bug after the app is built. It was occuring because the theme provider was missing. So every component would interfere with each other's styling.

I also added some missing styling for the call to action buttons on the home menu.

The pds app bar has also been removed. Since it should be deployed separately from the doi-ui rather then be embedded into it.

I added the testing instructions to the pull request description.

Copy link
Member

@tloubrieu-jpl tloubrieu-jpl left a comment

Choose a reason for hiding this comment

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

@tloubrieu-jpl tloubrieu-jpl merged commit 5c37f64 into main May 27, 2022
@tloubrieu-jpl tloubrieu-jpl deleted the api-unavailable-message-#92 branch May 27, 2022 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants