Skip to content

Commit

Permalink
feat(xo-web): display more notes on backup main page (#7977)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-Nollet authored Sep 24, 2024
1 parent 7e9b444 commit d3414a9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- **XO 6**:
- [Dashboard] Display backup issues data (PR [#7974](https://github.com/vatesfr/xen-orchestra/pull/7974))
- [REST API] Add S3 backup repository information in the `/rest/v0/dashboard` endpoint (PR [#7978](https://github.com/vatesfr/xen-orchestra/pull/7978))
- [Backups] Display more informations in the _Notes_ column of the backup page (PR [#7977](https://github.com/vatesfr/xen-orchestra/pull/7977))

### Bug fixes

Expand Down
2 changes: 2 additions & 0 deletions packages/xo-web/src/common/intl/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1962,6 +1962,8 @@ const messages = {
vmsTags: 'VMs tags',
tagNoBak: 'VMs with this tag will not be backed up {reason, select, null {} other {({reason})}}',
tagNotifyOnSnapshot: 'An email will be sent when a VM with this tag is snapshotted',
nbdConnections: `NBD connections`,
speedLimitNoUnit: 'Speed limit',

// ----- Restore files view -----
restoreFiles: 'Restore backup files',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ import pickBy from 'lodash/pickBy.js'
const DEFAULTS = {
__proto__: null,

backupReportTpl: 'mjml',
cbtDestroySnapshotData: false,
checkpointSnapshot: false,
compression: '',
concurrency: 0,
fullInterval: 0,
nbdConcurrency: 1,
offlineBackup: false,
offlineSnapshot: false,
preferNbd: false,
reportWhen: 'failure',
timeout: 0,
}
Expand Down
25 changes: 24 additions & 1 deletion packages/xo-web/src/xo-app/backup/overview/tab-jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import SortedTable from 'sorted-table'
import StateButton from 'state-button'
import Tooltip from 'tooltip'
import { confirm } from 'modal'
import { connectStore } from 'utils'
import { connectStore, formatSpeed } from 'utils'
import { createFilter, createGetObjectsOfType, createSelector } from 'selectors'
import { createPredicate } from 'value-matcher'
import { get } from '@xen-orchestra/defined'
Expand Down Expand Up @@ -316,13 +316,18 @@ class JobsTable extends React.Component {
{
itemRenderer: job => {
const {
backupReportTpl,
cbtDestroySnapshotData,
checkpointSnapshot,
compression,
concurrency,
fullInterval,
maxExportRate,
nbdConcurrency,
nRetriesVmBackupFailures,
offlineBackup,
offlineSnapshot,
preferNbd,
proxyId,
reportWhen,
timeout,
Expand All @@ -338,9 +343,27 @@ class JobsTable extends React.Component {
{reportWhen in REPORT_WHEN_LABELS && (
<Li>{_.keyValue(_('reportWhen'), _(REPORT_WHEN_LABELS[reportWhen]))}</Li>
)}
{backupReportTpl !== undefined && (
<Li>
{_.keyValue(
_('shorterBackupReports'),
_(backupReportTpl === 'compactMjml' ? 'stateEnabled' : 'stateDisabled')
)}
</Li>
)}
{concurrency !== undefined && <Li>{_.keyValue(_('concurrency'), concurrency)}</Li>}
{preferNbd && <Li>{_.keyValue(_('nbdConnections'), nbdConcurrency ?? 1)}</Li>}
{preferNbd && cbtDestroySnapshotData !== undefined && (
<Li>
{_.keyValue(
_('cbtDestroySnapshotData'),
_(cbtDestroySnapshotData ? 'stateEnabled' : 'stateDisabled')
)}
</Li>
)}
{timeout !== undefined && <Li>{_.keyValue(_('timeout'), timeout / 3600e3)} hours</Li>}
{fullInterval !== undefined && <Li>{_.keyValue(_('fullBackupInterval'), fullInterval)}</Li>}
{maxExportRate > 0 && <Li>{_.keyValue(_('speedLimitNoUnit'), formatSpeed(maxExportRate, 1000))}</Li>}
{offlineBackup !== undefined && (
<Li>{_.keyValue(_('offlineBackup'), _(offlineBackup ? 'stateEnabled' : 'stateDisabled'))}</Li>
)}
Expand Down

0 comments on commit d3414a9

Please sign in to comment.