fix(vm): do not display VDI or VIF disconnect but when VM is not running. Fixes #1470 and fixes #1468
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
disconnectVbd,
|
||||
editVdi,
|
||||
isSrWritable,
|
||||
isVmRunning,
|
||||
migrateVdi,
|
||||
setBootableVbd,
|
||||
setVmBootOrder
|
||||
@@ -445,7 +446,7 @@ export default class TabDisks extends Component {
|
||||
{_('vbdStatusDisconnected')}
|
||||
</span>
|
||||
<ButtonGroup className='pull-xs-right'>
|
||||
{vm.power_state === 'Running' &&
|
||||
{isVmRunning(vm) &&
|
||||
<ActionRowButton
|
||||
btnStyle='default'
|
||||
icon='connect'
|
||||
|
||||
@@ -22,7 +22,8 @@ import {
|
||||
connectVif,
|
||||
createVmInterface,
|
||||
deleteVif,
|
||||
disconnectVif
|
||||
disconnectVif,
|
||||
isVmRunning
|
||||
} from 'xo'
|
||||
|
||||
@propTypes({
|
||||
@@ -191,11 +192,13 @@ export default class TabNetwork extends Component {
|
||||
{_('vifStatusDisconnected')}
|
||||
</span>
|
||||
<ButtonGroup className='pull-xs-right'>
|
||||
{isVmRunning(vm) &&
|
||||
<ActionRowButton
|
||||
icon='connect'
|
||||
handler={connectVif}
|
||||
handlerParam={vif}
|
||||
/>
|
||||
}
|
||||
<ActionRowButton
|
||||
icon='remove'
|
||||
handler={deleteVif}
|
||||
|
||||
Reference in New Issue
Block a user