Migrate upload license page to Vue

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

This is a follow-up on the comment: !77363 (comment 822190117)

Related to /admin/license/new page:

/admin/license/new page screenshot

Migrating this page to Vue will allow us to fix several issues:

  • the upload license form submits data to /admin/license URL, so that when a user submits a corrupted license key or file — they end up with the form and an error shown on /admin/license URL. The form continues to work fine, but if the user reloads the page — they would get a 404 error. This is not ideal. When we migrate the page to Vue — this issue will automatically resolve

  • to make the upload_dropzone.vue component support Rails forms — two special params and related logic were added to it: inputFieldName and shouldUpdateInputOnFileDrop. See app/assets/javascripts/vue_shared/components/upload_dropzone/upload_dropzone.vue and !77363 (comment 828281402) for more details. Moving this form to Vue would allow us to drop that logic and simplify upload_dropzone component

  • Form logic is defined using raw JS/DOM API in ee/app/assets/javascripts/pages/admin/licenses/new/index.js and lacks some validations (e.g. for a blank license key or absent license file). This would be easier to add using Vue

Goals:

  • Migrate the page (form) to Vue and ensure that user is not navigated to /admin/license URL upon form submission
  • remove inputFieldName and shouldUpdateInputOnFileDrop params and relevant logic from upload_dropzone.vue

Implementation plan

See above. Main idea is to expand ee/app/assets/javascripts/admin/licenses/new/components/license_new_app.vue to contain entire form and submit data via AJAX

Availability & Testing

Many tests will need to be added to account for this change. Changes will include, but are not limited to - Jest frontend specs, View specs, Feature specs, unit specs for license uploading

Edited by 🤖 GitLab Bot 🤖