fix(xo-web/vm): restore display of pvhvm virtualization mode (#3662)

Fixes #3576
This commit is contained in:
Enishowk
2018-11-08 17:05:46 +01:00
committed by Julien Fontanet
parent 7dc1a80a83
commit 673475dcb2
4 changed files with 16 additions and 4 deletions

View File

@@ -7,6 +7,7 @@
- [Legacy Backup] Restore and File restore functionalities moved to the Backup NG view [#3499](https://github.com/vatesfr/xen-orchestra/issues/3499) (PR [#3610](https://github.com/vatesfr/xen-orchestra/pull/3610))
- [Backup NG logs] Display warning in case of missing VMs instead of a ghosts VMs tasks (PR [#3647](https://github.com/vatesfr/xen-orchestra/pull/3647))
- [VM] On migration, automatically selects the host and SR when only one is available [#3502](https://github.com/vatesfr/xen-orchestra/issues/3502) (PR [#3654](https://github.com/vatesfr/xen-orchestra/pull/3654))
- [VM] Display VGA and video RAM for PVHVM guests [#3576](https://github.com/vatesfr/xen-orchestra/issues/3576) (PR [#3664](https://github.com/vatesfr/xen-orchestra/pull/3664))
### Bug fixes

View File

@@ -47,6 +47,17 @@ export addSubscriptions from './add-subscriptions'
// ===================================================================
export const getVirtualizationModeLabel = vm => {
const virtualizationMode =
vm.virtualizationMode === 'hvm' && Boolean(vm.xenTools)
? 'pvhvm'
: vm.virtualizationMode
return VIRTUALIZATION_MODE_LABEL[virtualizationMode]
}
// ===================================================================
export const ensureArray = value => {
if (value === undefined) {
return []

View File

@@ -19,8 +19,8 @@ import {
connectStore,
formatSize,
getCoresPerSocketPossibilities,
getVirtualizationModeLabel,
osFamily,
VIRTUALIZATION_MODE_LABEL,
} from 'utils'
import {
cloneVm,
@@ -409,7 +409,7 @@ export default class TabAdvanced extends Component {
<tbody>
<tr>
<th>{_('virtualizationMode')}</th>
<td>{_(VIRTUALIZATION_MODE_LABEL[vm.virtualizationMode])}</td>
<td>{_(getVirtualizationModeLabel(vm))}</td>
</tr>
{vm.virtualizationMode === 'pv' && (
<tr>

View File

@@ -22,8 +22,8 @@ import {
import {
connectStore,
formatSize,
getVirtualizationModeLabel,
osFamily,
VIRTUALIZATION_MODE_LABEL,
} from 'utils'
import {
CpuSparkLines,
@@ -132,7 +132,7 @@ export default connectStore(() => {
)}
</Col>
<Col mediumSize={3}>
<p>{_(VIRTUALIZATION_MODE_LABEL[vm.virtualizationMode])}</p>
<p>{_(getVirtualizationModeLabel(vm))}</p>
{vgpu !== undefined && (
<p>{renderXoItem(vgpuTypes[vgpu.vgpuType])}</p>
)}