From c6092b9e597fe49e545e5062cbde845c170093be Mon Sep 17 00:00:00 2001 From: Milan Zazrivec Date: Wed, 6 Mar 2019 17:49:44 +0100 Subject: [PATCH] Add new options for migration throttling --- .../GeneralSettings/GeneralSettings.js | 87 +++++++++++++++++-- .../screens/App/common/forms/NumberInput.js | 12 ++- 2 files changed, 91 insertions(+), 8 deletions(-) diff --git a/app/javascript/react/screens/App/Settings/screens/GeneralSettings/GeneralSettings.js b/app/javascript/react/screens/App/Settings/screens/GeneralSettings/GeneralSettings.js index ffb7f70a6c..4efd5d241d 100644 --- a/app/javascript/react/screens/App/Settings/screens/GeneralSettings/GeneralSettings.js +++ b/app/javascript/react/screens/App/Settings/screens/GeneralSettings/GeneralSettings.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { reduxForm, Field } from 'redux-form'; -import { Form, Button, Spinner } from 'patternfly-react'; +import { Form, Button, Icon, OverlayTrigger, Popover, Spinner } from 'patternfly-react'; import NumberInput from '../../../common/forms/NumberInput'; export class GeneralSettings extends React.Component { @@ -27,10 +27,41 @@ export class GeneralSettings extends React.Component { return (
-
+ +
+

{__('Concurrent Migrations')}

+
- {__('Maximum concurrent migrations per conversion host')} -
+ + + {__('Maximum concurrent migrations per conversion host')} + + {__( + 'For VDDK transformations the maximum concurrent migrations per conversion host is limited to 20. See the product documentation for more information.' + )} + + } + placement="top" + trigger={['hover']} + delay={500} + rootClose={false} + > + + + + +
+ + {__('Maximum concurrent migrations per provider')} + +
+ +
+
+
+

{__('Resource Utilization Limits for Migrations')}

+
+ + + {__('Max CPU utilization per conversion host')} + +
+ +
+
+ + {__('Total network throughput')} +
+
+ +
{__('MB/s')}
+
+
+
+ -
{isSavingSettings && (
diff --git a/app/javascript/react/screens/App/common/forms/NumberInput.js b/app/javascript/react/screens/App/common/forms/NumberInput.js index 651be9e16b..85f17306db 100644 --- a/app/javascript/react/screens/App/common/forms/NumberInput.js +++ b/app/javascript/react/screens/App/common/forms/NumberInput.js @@ -7,13 +7,17 @@ class NumberInput extends React.Component { const { id, input: { onChange }, - min + min, + max, + postfix } = this.props; const input = $(`#${id}`); input.TouchSpin({ buttondown_class: 'btn btn-default', buttonup_class: 'btn btn-default', - min + min, + max, + postfix }); // bootstrap-touchspin's change event doesn't trigger the rendered input's onChange. input.on('change', event => { @@ -42,7 +46,9 @@ NumberInput.propTypes = { value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), onChange: PropTypes.func }), - min: PropTypes.number + min: PropTypes.number, + max: PropTypes.number, + postfix: PropTypes.string }; NumberInput.defaultProps = {