@@ -27,7 +22,7 @@ const DeleteConversionHostConfirmationModal = ({
{conversionHostToDelete &&
- sprintf(__('Are you sure you want to delete conversion host %s ?'), conversionHostToDelete.name)}
+ sprintf(__('Are you sure you want to remove conversion host %s ?'), conversionHostToDelete.name)}
@@ -37,17 +32,12 @@ const DeleteConversionHostConfirmationModal = ({
{
- onClickHandler(
- conversionHostToDelete,
- deleteConversionHostAction,
- deleteConversionHostActionUrl,
- fetchConversionHostsAction,
- fetchConversionHostsUrl
- );
+ deleteConversionHostAction(deleteConversionHostActionUrl, conversionHostToDelete);
}}
>
- {__('Delete')}
+ {__('Remove')}
@@ -57,10 +47,9 @@ DeleteConversionHostConfirmationModal.propTypes = {
conversionHostToDelete: PropTypes.object,
deleteConversionHostAction: PropTypes.func,
deleteConversionHostActionUrl: PropTypes.string,
- fetchConversionHostsAction: PropTypes.func,
- fetchConversionHostsUrl: PropTypes.string,
hideConversionHostDeleteModalAction: PropTypes.func,
- showConversionHostDeleteModal: PropTypes.bool
+ conversionHostDeleteModalVisible: PropTypes.bool,
+ isDeletingConversionHost: PropTypes.bool
};
export default DeleteConversionHostConfirmationModal;
diff --git a/app/javascript/react/screens/App/Settings/screens/ConversionHostsSettings/index.js b/app/javascript/react/screens/App/Settings/screens/ConversionHostsSettings/index.js
index 1cd19e2219..6f5489aca2 100644
--- a/app/javascript/react/screens/App/Settings/screens/ConversionHostsSettings/index.js
+++ b/app/javascript/react/screens/App/Settings/screens/ConversionHostsSettings/index.js
@@ -1,12 +1,45 @@
import { connect } from 'react-redux';
import ConversionHostsSettings from './ConversionHostsSettings';
-import * as SettingsActions from '../../SettingsActions';
-import * as ProvidersActions from '../../../../../../redux/common/providers/providersActions';
+import { fetchProvidersAction } from '../../../../../../redux/common/providers/providersActions';
+import {
+ fetchConversionHostsAction,
+ fetchConversionHostTasksAction,
+ showConversionHostWizardAction,
+ setHostToDeleteAction,
+ deleteConversionHostAction,
+ showConversionHostDeleteModalAction,
+ hideConversionHostDeleteModalAction
+} from '../../SettingsActions';
-const mapStateToProps = ({ settings, providers }, ownProps) => ({
- ...settings,
- ...providers,
+import { getCombinedConversionHostListItems } from '../../helpers';
+
+const mapStateToProps = (
+ {
+ providers: { isFetchingProviders, hasSufficientProviders },
+ settings: {
+ conversionHosts,
+ conversionHostTasks,
+ conversionHostTasksByResource,
+ conversionHostWizardMounted,
+ conversionHostDeleteModalVisible,
+ conversionHostToDelete,
+ isDeletingConversionHost
+ }
+ },
+ ownProps
+) => ({
+ isFetchingProviders,
+ hasSufficientProviders,
+ combinedListItems: getCombinedConversionHostListItems(
+ conversionHosts,
+ conversionHostTasks,
+ conversionHostTasksByResource
+ ),
+ conversionHostWizardMounted,
+ conversionHostDeleteModalVisible,
+ conversionHostToDelete,
+ isDeletingConversionHost,
...ownProps.data
});
@@ -14,6 +47,15 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => Object.assign(stateP
export default connect(
mapStateToProps,
- { ...SettingsActions, ...ProvidersActions },
+ {
+ fetchProvidersAction,
+ fetchConversionHostsAction,
+ fetchConversionHostTasksAction,
+ showConversionHostWizardAction,
+ setHostToDeleteAction,
+ deleteConversionHostAction,
+ showConversionHostDeleteModalAction,
+ hideConversionHostDeleteModalAction
+ },
mergeProps
)(ConversionHostsSettings);