Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #922 from mturley/enable-conversion-hosts-page
Browse files Browse the repository at this point in the history
Enable (un-hide) the Conversion Hosts tab of the Settings page

(cherry picked from commit c0da5af)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1703104
  • Loading branch information
mturley authored and simaishi committed Apr 25, 2019
1 parent b74dc63 commit c949f5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
30 changes: 11 additions & 19 deletions app/javascript/react/screens/App/Settings/Settings.js
Expand Up @@ -17,31 +17,23 @@ const Settings = props => {
<strong>{__('Migration Settings')}</strong>
</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
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

0 comments on commit c949f5b

Please sign in to comment.