whole-tale / dashboard

Whole Tale Dashboard
http://wholetale.org
MIT License
7 stars 2 forks source link

Check for e.message in Create New Tale Modal #591

Closed ThomasThelen closed 4 years ago

ThomasThelen commented 4 years ago

Fixes https://github.com/whole-tale/dashboard/issues/585 and https://github.com/whole-tale/dashboard/issues/524

I originally had this as a fix for 585 but realized the root issue is that girder will send errors back as e.message. Checking for this gets us the desired message.

Note that the error message isn't removed when the user selects an environment. We don't know what kind of error we get back, so we have no way to know when to clear the error message. For example, we wouldn't want to clear an authentication error when the user selects a valid environment.

To Test:

  1. Deploy locally
  2. Make sure you have 2 Tales running
  3. Visit https://dashboard.local.wholetale.org/browse?uri=https%3A%2F%2Fdoi.org%2F10.5281%2Fzenodo.1215988&name=weecology%2FPortalData&environment=XXX
  4. Note that you see an error about the environment not found
  5. Pick an environment
  6. Also note that you can still interact with the modal
  7. Create and launch the Tale
  8. See the notification about having two instances
craig-willis commented 4 years ago

This looks good. Similar to @bodom0015's comment on https://github.com/whole-tale/dashboard/pull/593#pullrequestreview-359998329, when I get too many instances I have to refresh to see the Tale.