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

Implement URL Management Feature in Universal Migration Tool #31

Open
wants to merge 2 commits into
base: react
Choose a base branch
from

Conversation

wgeorge1990
Copy link

Implement URL Management Feature in Universal Migration Tool

This pull request introduces the functionality to allow users to either enter a URL or select from available saved URLs on the initial screen of the Universal Migration Tool. The React-based component manages the saved URLs, and it interacts with the Cascade CMS URL field. To be clear this code is still in progress and does NOT introduce a complete working solution due to request mapping issues between the react component and struts application. I am continuing to work on this and will update this accordingly.

New controller endpoints for creating, listing, updating, and deleting saved URLs have been added to ProjectPropertiesAction. The persistence of the saved URLs is handled by a server-side in-memory data structure called urls which is an ArrayList

Changes

  1. Implemented a new React component for URL management under ./src/components/UrlManagementComponent. This component allows users to add, edit, delete, and select from previously saved URLs.

  2. Updated ProjectProperties.jsp to include the new React component as well as a select option that is populated dynamically from the React form upon saving an entered url.

  3. Added new controller endpoints in ProjectPropertiesAction for creating, listing, updating, and deleting saved URLs.

  4. Introduced a new server-side static data structure in ProjectPropertiesAction for persisting the saved URLs.

  5. Updated struts.xml to include the new endpoints.

Please review the code and provide feedback. I am open to making any necessary changes.

CC: @tomusiaka, @rgriffith, @bradical


How to view changes

You can view the changes in this PR by checking out the branch in your local environment. Follow the steps below:

  1. Clone the project (if you haven't already)
  2. Checkout to the new branch: git checkout wgeorge1990-react
  3. Follow the README’s “Deploying locally for development” section to set up the project.
  4. Navigate to the first screen of the application to see the new functionality in action.

Please let me know if you encounter any issues or have any questions.

   - The client side fetch requests seem to be mapping to a fallback action and returning the jsp xml instead of expected json, even after updating the method and name attributes. I Plan on continue working on a solution, after getting some rest and coming back with a fresh set of eyes! :)
…s using a space instead of a comma, and then trimming the whitespace on either side of each url to avoid errors in url parsing. TODO: add urlencoding for safer handling down the line.
@tomusiaka tomusiaka changed the base branch from master to react May 11, 2023 13:57
@wgeorge1990
Copy link
Author

@tomusiaka , Thank you for Switching that branch over!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant