integr8ly / tutorial-web-app

Solution Explorer provides the front door into the Integreatly initiative. It hosts the various Solution Patterns, as well as providing a dashboard of installed applications/products/services.
Apache License 2.0
36 stars 54 forks source link

INTLY-1285: Custom walkthroughs via Solution Explorer settings UI #474

Closed mfrances17 closed 5 years ago

mfrances17 commented 5 years ago

Motivation

https://issues.jboss.org/browse/INTLY-1285

What

Add a new Settings UI to the Solution Explorer which allows users to add github URLs to their own walkthrough content. On Save, the UI will show valid walkthroughs in the same way that editing the old walkthroughs environment variable did.

Why

Make it easier for users to add custom walkthroughs without going to the OpenShift environment variables.

Verification Steps

General steps: 1) Click the new Settings cog in the masthead.

2) Type or paste the above repo into the ‘List URLs…’ text area and click Save. You’ll bounce to the Home page automatically. Here’s a github URL you can use as a custom repo addition: https://www.github.com/integr8ly/example-customisations

3) Refresh your browser. Walkthroughs from the entered repo will now be listed on the Home page.

4) Click the Settings cog.

5) Clear the ‘List URLs…’ text area and click Save, which will bring you back to the Home page.

6) Refresh your browser. Walkthroughs from the custom repo will be removed from the Home page.

Checklist:

Progress

Additional Notes

The Home page will not list any repos if you do any of the following: • List the same custom repo twice • Enter a valid github URL but does not contain valid walkthrough configuration Errors for these situations display in the OpenShift logs, just as they do now when doing either of the above using the environment variable.

You are free to use my server to test the changes, if you want: https://tutorial-web-app-webapp.apps.uxddev-0c8d.openshiftworkshop.com

Or if you prefer, you can also deploy this webapp image on your own OpenShift instance: docker.io/mfrances17/dev-tutorial-web-app:latest

Screen cap of new Settings page: Screen Shot 2019-06-26 at 2 18 52 PM

pb82 commented 5 years ago

@mfrances17 When i add https://www.github.com/integr8ly/tutorial-web-app-walkthroughs to the list and then refresh the page, all walkthroughs disappear.

Also it seems like the value is only accepted if there is a newline after the last entry. Maybe we should mention this on the settings page?

mfrances17 commented 5 years ago

@mfrances17 When i add https://www.github.com/integr8ly/tutorial-web-app-walkthroughs to the list and then refresh the page, all walkthroughs disappear. @pb82 I think that's because it's a duplicate of the default walkthroughs repo, it will fail and show an error in the log on OpenShift.

Also it seems like the value is only accepted if there is a newline after the last entry. Maybe we should mention this on the settings page? I will test it again, I thought it was working without needing this.

mfrances17 commented 5 years ago

@mfrances17 When i add https://www.github.com/integr8ly/tutorial-web-app-walkthroughs to the list and then refresh the page, all walkthroughs disappear. @pb82 I think that's because it's a duplicate of the default walkthroughs repo, it will fail and show an error in the log on OpenShift.

Also it seems like the value is only accepted if there is a newline after the last entry. Maybe we should mention this on the settings page? I will test it again, I thought it was working without needing this.

Update: I re-tested using the following repositories:

https://www.github.com/integr8ly/example-customisationshttps://www.github.com/finp/walk-about

Both repositories' walkthroughs displayed on the Home page, in addition to the default repos, without requiring a newline char after the last entry.