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

Commit

Permalink
Add error message about conversion hosts to denied Plan request detai…
Browse files Browse the repository at this point in the history
…ls page
  • Loading branch information
mturley committed Nov 19, 2018
1 parent 3d143c0 commit db8647b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
18 changes: 18 additions & 0 deletions app/javascript/react/screens/App/Plan/Plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,24 @@ class Plan extends React.Component {
)}
{planNotStarted && !isRejectedVms && vmsMutable.length > 0 && <PlanVmsList planVms={vmsMutable} />}
{planNotStarted &&
planRequestDenied && (
<PlanEmptyState
title={__('Migration Failed')}
iconType="pf"
iconName="error-circle-o"
description={
<React.Fragment>
{__('Unable to start migration because no conversion host is configured.')}{' '}
<a href="https://access.redhat.com/documentation/en-us/red_hat_infrastructure_migration_solution/1.0/html/infrastructure_migration_solution_guide/installation#rhv_conversion_hosts">
{__('See the product documentation for information on configuring conversion hosts.')}
</a>
</React.Fragment>
}
descriptionIsNode
/>
)}
{planNotStarted &&
!planRequestDenied &&
vmsMutable.length === 0 && (
<PlanEmptyState
title={__('No VMs')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import React from 'react';
import PropTypes from 'prop-types';
import { EmptyState } from 'patternfly-react';

const PlanEmptyState = ({ title, iconType, iconName, description }) => (
const PlanEmptyState = ({ title, iconType, iconName, description, descriptionIsNode }) => (
<div>
<br />
<EmptyState>
<EmptyState.Icon type={iconType} name={iconName} />
<EmptyState.Title>{sprintf(__('%s'), title)}</EmptyState.Title>
<EmptyState.Info>{sprintf(__('%s'), description)}</EmptyState.Info>
<EmptyState.Info>{descriptionIsNode ? description : sprintf(__('%s'), description)}</EmptyState.Info>
</EmptyState>
</div>
);
Expand All @@ -17,7 +17,8 @@ PlanEmptyState.propTypes = {
title: PropTypes.string,
iconType: PropTypes.string,
iconName: PropTypes.string,
description: PropTypes.string
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
descriptionIsNode: PropTypes.bool
};

export default PlanEmptyState;

0 comments on commit db8647b

Please sign in to comment.