Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Add modal for uploading/resetting manifest in UI #36

Merged
merged 10 commits into from Jan 28, 2020

Conversation

mturley
Copy link
Collaborator

@mturley mturley commented Jan 24, 2020

https://bugzilla.redhat.com/show_bug.cgi?id=1788729
https://issues.redhat.com/browse/MIGENG-242
Closes #27.
Needs to be backported after #28.

Needs unit tests, but otherwise ready for review

Screens

The manifest version display in the lower-right now has an "Update" link next to it:

Screenshot 2020-01-24 17 47 39

When clicked, this modal appears:

Screenshot 2020-01-24 17 44 03

Clicking the Upload button opens the file browse dialog (and a user can also just drag-and-drop a file onto the modal), then the modal closes and the following spinner appears in place of the version for a moment:

Screenshot 2020-01-24 17 45 18

If there is a failure (invalid file or API error), a message is displayed under the version:

Screenshot 2020-01-24 17 25 32

If a user-uploaded manifest is present, the Restore button in the modal will be enabled:

Screenshot 2020-01-24 17 50 50

Clicking the Restore button will also close the modal immediately and bring up the same spinner while the manifest is being reset to default.

// If JSON.parse fails or the error above is thrown
dispatch({
type: `${CHANGE_MANIFEST}_REJECTED`,
payload: { data: { error: { message: 'Selected file is not a valid manifest' } } }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the Selected file is not a valid manifest string should be enclosed in gettext as well.

@miq-bot
Copy link

miq-bot commented Jan 27, 2020

Checked commits mturley/cfme-migration_analytics@3492260~...640aae8 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 👍

@mzazrivec mzazrivec merged commit bc44a72 into RedHatCloudForms:master Jan 28, 2020
@mturley mturley deleted the manifest-upload-ui-changes branch January 28, 2020 17:05
simaishi pushed a commit that referenced this pull request Feb 21, 2020
Add modal for uploading/resetting manifest in UI

(cherry picked from commit bc44a72)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1805817
@simaishi
Copy link

Ivanchuk backport details:

$ git log -1
commit 6bcd970dcf4ed2ada1342055e5896a056c353afc
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Tue Jan 28 08:28:46 2020 +0100

    Merge pull request #36 from mturley/manifest-upload-ui-changes

    Add modal for uploading/resetting manifest in UI

    (cherry picked from commit bc44a72b897766f044d87b4ea65049e3e6188368)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1805817

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

Successfully merging this pull request may close these issues.

Allow a user to update manifest on a CF appliance
4 participants