Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(xo-web/disks): add icon for empty metadata VDI snapshots #7970

Merged
merged 4 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

> Users must be able to say: “Nice enhancement, I'm eager to test it”

- [SR/Disks] Display information if the VDI is an empty metadata snapshot (PR [#7970](https://github.com/vatesfr/xen-orchestra/pull/7970))
- **XO 6**:
- [Dashboard] Display backup issues data (PR [#7974](https://github.com/vatesfr/xen-orchestra/pull/7974))

Expand Down Expand Up @@ -39,6 +40,6 @@
- @xen-orchestra/lite minor
- @xen-orchestra/web minor
- @xen-orchestra/web-core minor
- xo-web patch
- xo-web minor

<!--packages-end-->
1 change: 1 addition & 0 deletions packages/xo-web/src/common/intl/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ const messages = {
srReclaimSpaceNotSupported: 'Space reclaim not supported. Only supported on block based/LVM based SRs.',

// ----- SR disks tab -----
isMetadataVdi: 'This snapshot has been purged of its data. It only contains the metadata and changed blocks.',
multipleActiveVdis: '{firstVdi} and {nVdis} more',
noActiveVdi: 'No active VDI',

Expand Down
9 changes: 9 additions & 0 deletions packages/xo-web/src/xo-app/sr/tab-disks.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import PropTypes from 'prop-types'
import React from 'react'
import SortedTable from 'sorted-table'
import TabButton from 'tab-button'
import Tooltip from 'tooltip'
import renderXoItem, { Vdi, Vm } from 'render-xo-item'
import { confirm } from 'modal'
import { injectIntl } from 'react-intl'
Expand Down Expand Up @@ -46,6 +47,7 @@ const COLUMNS = [
name: _('vdiNameLabel'),
itemRenderer: (vdi, { vdisByBaseCopy }) => {
const activeVdis = vdisByBaseCopy[vdi.id]
const isMetadataVdi = vdi.VDI_type === 'cbt_metadata'
return (
<span>
<Text value={vdi.name_label} onChange={value => editVdi(vdi, { name_label: value })} />{' '}
Expand All @@ -54,6 +56,13 @@ const COLUMNS = [
<Icon icon='vm-snapshot' />
</span>
)}
{isMetadataVdi && (
<span className='tag tag-info' style={{ marginLeft: '0.4em' }}>
<Tooltip content={_('isMetadataVdi')}>
<Icon icon='file' />
</Tooltip>
</span>
)}
{vdi.type === 'VDI-unmanaged' &&
(activeVdis !== undefined ? (
<span>
Expand Down
Loading