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

fix(xo-web/backup-ng): display user errors in the form #4131

Merged
merged 5 commits into from Sep 10, 2019

Conversation

badrAZ
Copy link
Contributor

@badrAZ badrAZ commented Apr 8, 2019

Fixes #3831

image

Check list

Check items when done or if not relevant

  • PR reference the relevant issue (e.g. Fixes #007)
  • if UI changes, a screenshot has been added to the PR
  • CHANGELOG.unreleased.md:
    • enhancement/bug fix entry added
    • list of packages to release updated (${name} v${new version})
  • documentation updated
  • I have tested added/updated features (and impacted code)

Process

  1. create a PR as soon as possible
  2. mark it as WiP: (Work in Progress) if not ready to be merged
  3. when you want a review, add a reviewer
  4. if necessary, update your PR, and re- add a reviewer

@badrAZ badrAZ changed the title [WiP] feat(xo-web/backup-ng): improve schedules form feat(xo-web/backup-ng): improve new schedule form feedback May 2, 2019
@badrAZ badrAZ requested a review from julien-f May 2, 2019 13:17
@badrAZ badrAZ self-assigned this May 2, 2019
@badrAZ badrAZ requested review from pdonias and removed request for julien-f May 2, 2019 13:17
@pdonias pdonias requested review from Rajaa-BARHTAOUI and removed request for pdonias May 3, 2019 08:28
: setting
)
return mapValues(settings, predicate)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline predicate.

@@ -134,11 +136,13 @@ const getOptionRenderer = ({ label }) => <span>{_(label)}</span>

const createDoesRetentionExist = name => {
const predicate = setting => setting[name] > 0
return ({ propSettings, settings = propSettings }) => settings.some(predicate)
return ({ settings }) => some(settings, predicate)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can inline predicate.
Why you use _.some instead of some? settings is an Array ?

newSchedule.name !== oldSchedule.name ||
newSchedule.timezone !== oldSchedule.timezone ||
newSchedule.enabled !== oldSchedule.enabled
) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove this ? it avoid editSchedule if shedule doesn't change, right?

packages/xo-web/src/xo-app/backup-ng/new/index.js Outdated Show resolved Hide resolved
@badrAZ badrAZ force-pushed the backupNg-schedules branch 3 times, most recently from 6ade22c to 318f9b3 Compare July 29, 2019 09:41
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
@badrAZ badrAZ changed the title feat(xo-web/backup-ng): improve new schedule form feedback fix(xo-web/backup-ng): fix errors displayed behind the schedule form Sep 2, 2019
@badrAZ badrAZ requested a review from pdonias September 2, 2019 09:54
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
@badrAZ badrAZ changed the title fix(xo-web/backup-ng): fix errors displayed behind the schedule form fix(xo-web/backup-ng): display user errors in the form Sep 9, 2019
@badrAZ badrAZ requested a review from pdonias September 9, 2019 09:42
@pdonias pdonias merged commit c44ef6a into master Sep 10, 2019
@pdonias pdonias deleted the backupNg-schedules branch September 10, 2019 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Backup NG] Improve the new schedule form feedback
3 participants