Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

[#786] Handle denied state of a plan request (no conversion hosts configured) #798

Merged
merged 11 commits into from
Nov 21, 2018

Conversation

mturley
Copy link
Contributor

@mturley mturley commented Nov 16, 2018

Fixes #786.
Fixes #739.

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

  • Display an error state in the MigrationsInProgressCard when the request state is denied
  • Add a Cancel Migration button in the card footer
  • Solve weird CSS problems with the card footer and card height matching (@michaelkro I'm giving up on this for today, could use some help if you have time soon)
  • Test with real denied plan requests
  • Handle click on the Cancel Migration button
  • Remove test-denied-state condition
  • Update the DOCS_URL_CONFIGURE_CONVERSION_HOSTS URL, which is now a 404

Screens

A denied plan in the Plans In Progress view:

screenshot 2018-11-19 17 34 06

A denied plan in the Plans Complete view:

screenshot 2018-11-19 17 34 13

A denied plan in the Plan Request Details view:

screenshot 2018-11-19 17 50 06

Recording

ozj4gxxmvz

@mturley
Copy link
Contributor Author

mturley commented Nov 16, 2018

The card currently looks like this, and all attempts I've made so far at fixing that button positioning and footer sizing have caused the height-matching to squash the card height down to a point where the footer goes back to not being tall enough. 😡

screenshot 2018-11-16 16 41 14

Edit: position: relative to the rescue...

@miq-bot miq-bot added the wip label Nov 16, 2018
@mturley mturley self-assigned this Nov 16, 2018
@mturley mturley force-pushed the 786-plan-denied-state branch 2 times, most recently from 24d8fec to cb06944 Compare November 19, 2018 21:38
@mturley mturley changed the title [WIP][#786] Handle denied state of a plan request [WIP][#786] Handle denied state of a plan request (no conversion hosts configured) Nov 19, 2018
@vconzola
Copy link

This will also fix #739.

const cardEmptyState = (
<EmptyState>
<EmptyState.Icon type="pf" name="error-circle-o" />
<EmptyState.Info style={{ marginTop: 10 }}>
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

iconType="pf"
iconName="error-circle-o"
description={
<React.Fragment>
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

@mturley mturley changed the title [WIP][#786] Handle denied state of a plan request (no conversion hosts configured) [#786] Handle denied state of a plan request (no conversion hosts configured) Nov 20, 2018
@miq-bot
Copy link
Member

miq-bot commented Nov 20, 2018

Checked commits mturley/manageiq-v2v@e79794a~...7b6d4ea with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

return (
(mostRecentRequest.request_state === 'finished' && mostRecentRequest.approval_state !== 'denied') ||
mostRecentRequest.request_state === 'failed' ||
(mostRecentRequest.approval_state === 'denied' && mostRecentRequest.options.denial_acknowledged)
Copy link
Contributor

@michaelkro michaelkro Nov 21, 2018

Choose a reason for hiding this comment

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

Methinks we can remove the approval_state === 'denied' check here

Copy link
Contributor

@michaelkro michaelkro left a comment

Choose a reason for hiding this comment

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

This is really great work

@michaelkro michaelkro merged commit e8e89d1 into ManageIQ:master Nov 21, 2018
@mzazrivec
Copy link
Contributor

@simaishi Could this be cherry-picked into hammer please? Thank you.

simaishi pushed a commit that referenced this pull request Nov 26, 2018
[#786] Handle denied state of a plan request (no conversion hosts configured)

(cherry picked from commit e8e89d1)

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

Hammer backport details:

$ git log -1
commit 9b78d0947e0f096e0a6ee8f8d160acef10ebf089
Author: Michael Ro <mikerodev@gmail.com>
Date:   Wed Nov 21 08:19:43 2018 -0800

    Merge pull request #798 from mturley/786-plan-denied-state
    
    [#786] Handle denied state of a plan request (no conversion hosts configured)
    
    (cherry picked from commit e8e89d19159472f48d4d3c1fbd37545142ed541a)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1640816

@mturley mturley deleted the 786-plan-denied-state branch November 26, 2018 21:24
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.

6 participants