From aa5b3dc4260d52d887f9fc9b59621eb51f4868b4 Mon Sep 17 00:00:00 2001 From: Enishowk Date: Wed, 17 Oct 2018 17:24:47 +0000 Subject: [PATCH] chore(xo-web/backup-ng): timeout is in hours (#3553) Fixes #3550 --- CHANGELOG.md | 1 + packages/xo-web/src/common/intl/messages.js | 3 ++- packages/xo-web/src/xo-app/backup-ng/new/index.js | 8 ++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 235620927..005e9338a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - [Settings/logs] Homogenize action buttons in table and enable bulk deletion [#3179](https://github.com/vatesfr/xen-orchestra/issues/3179) (PR [#3528](https://github.com/vatesfr/xen-orchestra/pull/3528)) - [Settings/acls] Add bulk deletion [#3179](https://github.com/vatesfr/xen-orchestra/issues/3179) (PR [#3536](https://github.com/vatesfr/xen-orchestra/pull/3536)) - [Home] Improve search usage: raw numbers also match in names [#2906](https://github.com/vatesfr/xen-orchestra/issues/2906) (PR [#3552](https://github.com/vatesfr/xen-orchestra/pull/3552)) +- [Backup NG] Timeout of a job is now in hours [#3550](https://github.com/vatesfr/xen-orchestra/issues/3550) (PR [#3553](https://github.com/vatesfr/xen-orchestra/pull/3553)) ### Bug fixes diff --git a/packages/xo-web/src/common/intl/messages.js b/packages/xo-web/src/common/intl/messages.js index af5b21744..e4dc38b2d 100644 --- a/packages/xo-web/src/common/intl/messages.js +++ b/packages/xo-web/src/common/intl/messages.js @@ -408,7 +408,8 @@ const messages = { offlineSnapshot: 'Offline snapshot', offlineSnapshotInfo: 'Shutdown VMs before snapshotting them', timeout: 'Timeout', - timeoutInfo: 'Number of seconds after which a job is considered failed', + timeoutInfo: 'Number of hours after which a job is considered failed', + timeoutUnit: 'in hours', dbAndDrRequireEntreprisePlan: 'Delta Backup and DR require Entreprise plan', crRequiresPremiumPlan: 'CR requires Premium plan', smartBackupModeTitle: 'Smart mode', diff --git a/packages/xo-web/src/xo-app/backup-ng/new/index.js b/packages/xo-web/src/xo-app/backup-ng/new/index.js index c8fa554c5..d247b07a5 100644 --- a/packages/xo-web/src/xo-app/backup-ng/new/index.js +++ b/packages/xo-web/src/xo-app/backup-ng/new/index.js @@ -1,4 +1,4 @@ -import _ from 'intl' +import _, { messages } from 'intl' import ActionButton from 'action-button' import defined, { get } from '@xen-orchestra/defined' import Icon from 'icon' @@ -15,6 +15,7 @@ import { createGetObjectsOfType } from 'selectors' import { error } from 'notification' import { flatten, includes, isEmpty, map, mapValues, some } from 'lodash' import { form } from 'modal' +import { injectIntl } from 'react-intl' import { injectState, provideState } from '@julien-f/freactal' import { Map } from 'immutable' import { Number } from 'form' @@ -604,8 +605,10 @@ export default [ ), }, }), + injectIntl, injectState, - ({ state, effects, remotes, srsById, job = {} }) => { + ({ state, effects, remotes, srsById, job = {}, intl }) => { + const { formatMessage } = intl const { propSettings, settings = propSettings } = state const { concurrency, reportWhen = 'failure', offlineSnapshot, timeout } = settings.get('') || {} @@ -869,6 +872,7 @@ export default [ id={state.inputTimeoutId} onChange={effects.setTimeout} value={timeout && timeout / 1e3} + placeholder={formatMessage(messages.timeoutUnit)} />