diff --git a/app/javascript/react/screens/App/Overview/Overview.scss b/app/javascript/react/screens/App/Overview/Overview.scss index 139324b687..8a5b2ac195 100644 --- a/app/javascript/react/screens/App/Overview/Overview.scss +++ b/app/javascript/react/screens/App/Overview/Overview.scss @@ -6,7 +6,6 @@ @import 'components/ModalWizard/ModalWizard.scss'; @import 'components/AggregateCards/AggregateCards.scss'; @import 'components/OverviewEmptyState/OverviewEmptyState.scss'; -@import 'components/EditPlanNameModal/EditPlanNameModal.scss'; hr { margin-top: 10px; diff --git a/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameActions.js b/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameActions.js index c06eaa54c6..48f7c42803 100644 --- a/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameActions.js +++ b/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameActions.js @@ -1,32 +1,15 @@ -import { - V2V_EDIT_PLAN_TITLE_SHOW_ALERT, - V2V_EDIT_PLAN_TITLE_HIDE_ALERT, - V2V_POST_EDIT_PLAN_TITLE -} from './EditPlanNameConstants'; +import { V2V_POST_EDIT_PLAN_NAME } from './EditPlanNameConstants'; import API from '../../../../../../common/API'; export { fetchTransformationPlansAction } from '../../OverviewActions'; -export const showAlertAction = (alertText, alertType = 'error') => dispatch => { - dispatch({ - type: V2V_EDIT_PLAN_TITLE_SHOW_ALERT, - payload: { alertText, alertType } - }); -}; - -export const hideAlertAction = () => dispatch => { - dispatch({ - type: V2V_EDIT_PLAN_TITLE_HIDE_ALERT - }); -}; - const _editMigrationPlansActionCreator = (url, planId, migrationPlans) => dispatch => { const body = { action: 'edit', resource: { ...migrationPlans } }; return dispatch({ - type: V2V_POST_EDIT_PLAN_TITLE, + type: V2V_POST_EDIT_PLAN_NAME, payload: API.post(`${url}/${planId}`, body) }); }; diff --git a/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameConstants.js b/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameConstants.js index 9352f1ab4a..76fe17eb92 100644 --- a/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameConstants.js +++ b/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameConstants.js @@ -1,3 +1 @@ -export const V2V_EDIT_PLAN_TITLE_SHOW_ALERT = 'V2V_EDIT_PLAN_TITLE_SHOW_ALERT'; -export const V2V_EDIT_PLAN_TITLE_HIDE_ALERT = 'V2V_EDIT_PLAN_TITLE_HIDE_ALERT'; -export const V2V_POST_EDIT_PLAN_TITLE = 'V2V_POST_EDIT_PLAN_TITLE'; +export const V2V_POST_EDIT_PLAN_NAME = 'V2V_POST_EDIT_PLAN_NAME'; diff --git a/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameModal.js b/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameModal.js index 200d09985f..cb4536ee89 100644 --- a/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameModal.js +++ b/app/javascript/react/screens/App/Overview/components/EditPlanNameModal/EditPlanNameModal.js @@ -1,9 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import cx from 'classnames'; import { Field, reduxForm } from 'redux-form'; import { required } from 'redux-form-validators'; -import { Modal, Button, Form, Alert, Spinner, noop } from 'patternfly-react'; +import { Modal, Button, Form, Spinner, noop } from 'patternfly-react'; import { FormField } from '../../../common/forms/FormField'; import { validation } from '../../../../../../common/constants'; import { asyncValidate, onChange } from '../../screens/PlanWizard/components/PlanWizardGeneralStep/helpers'; @@ -38,20 +37,9 @@ class EditPlanNameModal extends React.Component { }; render() { - const { - editPlanNameModalVisible, - hideEditPlanNameModalAction, - editPlanNameModal, - alertType, - alertText, - hideAlertAction, - savingPlan - } = this.props; + const { editPlanNameModalVisible, hideEditPlanNameModalAction, editPlanNameModal, savingPlan } = this.props; const disableConfirmButton = savingPlan || !!editPlanNameModal.syncErrors || !!editPlanNameModal.asyncErrors; - const alertClasses = cx('modal-alert--alert', { - 'is-visible': alertText - }); const formBody = (
@@ -95,14 +83,7 @@ class EditPlanNameModal extends React.Component { {__('Edit Migration Plan')} - - {!savingPlan ? formBody : spinner} -
- - {alertText} - -
-
+ {!savingPlan ? formBody : spinner}