Allow disabling DPDK option for bonds in any case.

Change-Id: I1de32c443c83ad6f54562974cd3ddda38e0e6ac4
Closes-Bug: #1570782
This commit is contained in:
ntymtsiv 2016-09-19 15:59:26 +03:00
parent b0049d4bd6
commit 9b6a4deb81
1 changed files with 4 additions and 3 deletions

View File

@ -1610,6 +1610,7 @@ var NodeInterfaceAttributes = React.createClass({
)
:
null;
var cantBeEnabled = isBond && !currentDPDKValue && !newBondType;
return (
<div className='dpdk-panel'>
<div className='description'>{i18n(ns + 'dpdk_description')}</div>
@ -1620,10 +1621,10 @@ var NodeInterfaceAttributes = React.createClass({
name='dpdk.enabled'
onChange={(propertyName, propertyValue) => {
this.onInterfacePropertiesChange('dpdk.enabled', propertyValue);
if (isBond) this.changeBondType(newBondType);
if (isBond && newBondType) this.changeBondType(newBondType);
}}
disabled={this.props.locked || isBond && !newBondType}
tooltipText={isBond && !newBondType && i18n(ns + 'locked_dpdk_bond')}
disabled={this.props.locked || cantBeEnabled}
tooltipText={cantBeEnabled && i18n(ns + 'locked_dpdk_bond')}
wrapperClassName='dpdk-control'
error={errors && errors.common}
/>