-
Notifications
You must be signed in to change notification settings - Fork 25
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
584 dynamic load custom profiles from query param url #593
584 dynamic load custom profiles from query param url #593
Conversation
This change is temporary and needs to be overwritten once mdProfiles changes are available in the master branch.
NGGDPP profiles have been isolated from the core profiles in mdProfiles (not yet in master branch). Using the query parameter "loadProfilesFrom" with a URL to the profiles list file, this change will load those profiles in the same way as the core profiles are loaded.
Loading the custom profile into the store needed to be wrapped in a config object.
Change URLs to base URLs. Add manifestPath variable. Update loadVocabularies to use async/await.
Not done yet, but major improvements here. Profiles is now just loading core profiles. Custom-profiles is loading profiles from the query paramter.
When adding custom profiles from a url query parameter, the store is checked for existing records before adding new profiles.
@hmaier-fws Fixed the bugs and redeployed the test container on :8002 so that's good to go for testing. |
@jwaspin There is a problem reading the name and description of existing custom profiles. Steps to recreate:
The title and definitions should be obtained from the mdEditor JSON object of type A Custom profile is a combination of a profile definition and schema. If a schema is not provided (as in the case of the test query parameter) then the default schema is applied. A single profile definition can be used in combination with multiple schemas, resulting in multiple custom profiles. |
Reverting back did not solve the problem of importing profiles from a uri. That issue is much older.
@hmaier-fws I went all the way back to v0.11.0-dev.2 and found that this issue has existed for a while and is not being introduced by this commit. |
…of github.com:adiwg/mdEditor into 584-dynamic-load-custom-profiles-from-query-param-url
@hmaier-fws I'm closing this PR because the PR from branch feature/load-profiles-from-url is replacing it and the feature is no longer loading from a query parameter, I added an input box and a button instead. Importantly, I did more than just fix the issue you mentioned here, the bug was deeper so I fixed it completely. |
Replaced by #697 |
Closes
#584
Testing
http://23.23.4.125:8002/ [DOWN FOR MAINTENANCE]
Query Parameter Usage
http://23.23.4.125:8002/dashboard?loadProfilesFrom=https://raw.githubusercontent.com/USGS-NGGDPP/mdEditor-profiles/main/manifest.json
OR for hashed URLs
http://23.23.4.125:8002/#/dashboard?loadProfilesFrom=https://raw.githubusercontent.com/USGS-NGGDPP/mdEditor-profiles/main/manifest.json
Changes
Increase minor version number
Breaking Changes
By removing the functionality to automatically load NGGDPP profiles, anyone using those profiles will need to re-load them using the query parameter. The profiles in the NGGDPP repository have a slightly different format because of other changes being made, but if the user re-selects a profile after loading them from the query parameter, that should, in theory, fix the record. This should also be a limited impact because the profiles have not existed as core profiles for very long.