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

Enable (un-hide) the Conversion Hosts tab of the Settings page #922

Merged
merged 1 commit into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions app/javascript/react/screens/App/Settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,23 @@ const Settings = props => {
<Breadcrumb.Item href="#/plans">{__('Migration')}</Breadcrumb.Item>
<Breadcrumb.Item active>{__('Migration Settings')}</Breadcrumb.Item>
</Toolbar>
{props.hideConversionHostSettings ? (
<React.Fragment>
<h2>{__('Migration Throttling')}</h2>
<GeneralSettings />
</React.Fragment>
) : (
<div style={{ marginTop: 10 }}>
<Tabs id="settings-tabs" activeKey={match.path} onSelect={key => redirectTo(key)} unmountOnExit>
<Tab eventKey="/settings" title={__('Migration Throttling')}>
<GeneralSettings />
</Tab>
<Tab eventKey="/settings/conversion_hosts" title={__('Conversion Hosts')}>
<ConversionHostsSettings />
</Tab>
</Tabs>
</div>
)}
<div style={{ marginTop: 10 }}>
<Tabs id="settings-tabs" activeKey={match.path} onSelect={key => redirectTo(key)} unmountOnExit>
<Tab eventKey="/settings" title={__('Migration Throttling')}>
<GeneralSettings />
</Tab>
<Tab eventKey="/settings/conversion_hosts" title={__('Conversion Hosts')}>
<ConversionHostsSettings />
</Tab>
</Tabs>
</div>
</React.Fragment>
);
};

Settings.propTypes = {
match: PropTypes.object,
redirectTo: PropTypes.func,
hideConversionHostSettings: PropTypes.bool // TODO remove this when we are ready to release ConversionHostsSettings
redirectTo: PropTypes.func
};

export default Settings;
4 changes: 1 addition & 3 deletions app/javascript/react/screens/App/Settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import * as RouterActions from '../../../../redux/actions/routerActions';

export const reducers = { settings: reducer };

const mapStateToProps = () => ({
hideConversionHostSettings: true // TODO remove this when we are ready to release ConversionHostsSettings
});
const mapStateToProps = () => ({});

const mergeProps = (stateProps, dispatchProps, ownProps) => Object.assign(stateProps, ownProps.data, dispatchProps);

Expand Down