This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
[#901] Conversion Host Enablement - List View - Add Retry button with modal for re-entering SSH keys #916
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mturley
added
enhancement
bz
Issues filed by QE or having a BZ
hammer/yes
z-stream
v1.2
labels
Mar 21, 2019
...ings/components/RetryConversionHostConfirmationModal/RetryConversionHostConfirmationModal.js
Show resolved
Hide resolved
...screens/App/Settings/screens/ConversionHostsSettings/components/ConversionHostRetryButton.js
Show resolved
Hide resolved
Checked commits mturley/manageiq-v2v@d29af77~...dead78b with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Weird, https://travis-ci.org/ManageIQ/manageiq-v2v/builds/510050291 passed but didn't update the status on the PR. Closing and reopening one more time to try it again... @mzazrivec I think I'm just going to stop using draft PRs until we have time to figure out why they break Travis. |
mzazrivec
approved these changes
Mar 26, 2019
simaishi
pushed a commit
that referenced
this pull request
Apr 5, 2019
[#901] Conversion Host Enablement - List View - Add Retry button with modal for re-entering SSH keys (cherry picked from commit 4d7e37c) https://bugzilla.redhat.com/show_bug.cgi?id=1696423
Hammer backport details:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of the Conversion Hosts UI feature BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1693339
Closes #901.
Note: this depends on ManageIQ/manageiq#18541 to be tested, but we can merge it ahead since the conversion hosts page is still hidden. The retry button will only appear on tasks that were created with that back end change in place.
While we wait for that back end PR to be ready (I'm not sure it even creates the
request_params
yet), to test this PR you can fake some context data by making a change like this: mturley@0acaab2We can also test against this database which has one failed task at the end of the list (but will require a hack like the above, since the task has no context data): https://drive.google.com/open?id=1l26rbhp36v6lCfpwKGASxEJknKnI32oe
Screens
This PR adds a Retry button to the list view rows on the conversion hosts settings page, which will appear on any failed enablement task row which has
context_data.request_params
in the task object:When clicked, a modal will appear explaining that the user needs to re-enter any SSH private keys they provided the first time through the wizard, as they were not saved. The SSH key fields shown match what was shown in the wizard, depending on their original selection of a transformation method. If SSH was originally selected in the wizard, both the conversion host SSH private key and the vmware hypervisors SSH private key fields will appear:
If VDDK was originally selected in the wizard, only the conversion host SSH private key field will appear:
The fields are required, and when they are filled the "Retry" button at the bottom will become enabled:
When the user clicks Retry, the original properties from the wizard are recovered from the task's context data, combined with these re-entered SSH key(s), and sent to the API with the same action the wizard uses to submit.
Implementation Details
conversionHostDeleteModalVisible
boolean to theshow
prop was sufficient. For this modal however, just like the wizards, if we had used the single boolean as a condition of mounting and always passedshow={true}
, we would lose the animation that happens whenshow
turns to false. So just like the wizards, we needed distinctconversionHostRetryModalMounted
andconversionHostRetryModalVisible
booleans, toggled on by the show action together, and toggled off by the actions we pass toonHide
andonExited
separately.onExited
gets called when the hide animation completes.SSHKeyField
component which wraps aTextFileInput
in a redux-formField
. I also moved the logic for specifying the info popover message of the conversion host SSH private key into a helper function to be reused.vmware_vddk_package_url
in a task'scontext_data.request_params
determines whether the modal should use a VDDK transformation method or SSH transformation method.