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

postService - skipError on 400, deduplicate #2728

Merged
merged 1 commit into from
Nov 15, 2017
Merged

postService - skipError on 400, deduplicate #2728

merged 1 commit into from
Nov 15, 2017

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Nov 14, 2017

go to Services > Catalogs, Catalog Items accordion
create a new Catalog Item, of type Ansible Playbook
do stuff to trigger a validation error on saving (duplicate name, badly configured embedded ansible)

Before - you'll see the error modal pop up, and a flash message.

Now - you'll only see the flash message.

This also cleans up postService:

  • there were 2 identical branches differing in action: 'edit' vs action: 'create'
  • handleSuccess handled errors, separately from handleFailure but same way
  • $timeout was being used to compensate for not having originally injected the angular API variant

(postService is only used by that single form - but that's a TODO for later)

https://bugzilla.redhat.com/show_bug.cgi?id=1509809
(at this point, I'm only assuming the BZ is about this, but this goes in line with #2075 and #2604)

go to Services > Catalogs, Catalog Items accordion
create a new Catalog Item, of type Ansible Playbook
do stuff to trigger a validation error on saving (duplicate name, badly configured embedded ansible)

Before - you'll see the error modal pop up, and a flash message.

Now - you'll only see the flash message.

This also cleans up postService:
  * there were 2 identical brances differing in `action: 'edit'` vs `action: 'create'`
  * handleSuccess handled errors, separately from handleFailure but same way
  * $timeout was being used to compensate for not having originally injected the angular API variant

(`postService` is only used by that single form - but that's a TODO for later)

https://bugzilla.redhat.com/show_bug.cgi?id=1509809
@himdel himdel changed the title PostService - skipError on 400, deduplicate postService - skipError on 400, deduplicate Nov 14, 2017
@mzazrivec mzazrivec self-assigned this Nov 15, 2017
@mzazrivec mzazrivec added this to the Sprint 74 Ending Nov 27, 2017 milestone Nov 15, 2017
@mzazrivec mzazrivec merged commit 95966af into ManageIQ:master Nov 15, 2017
simaishi pushed a commit that referenced this pull request Nov 15, 2017
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit e0d38162c0d31b4d2b60cf518c416c19bcc2098f
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Wed Nov 15 13:27:16 2017 +0100

    Merge pull request #2728 from himdel/catalog-playbook-item-bz1509809
    
    postService - skipError on 400, deduplicate
    (cherry picked from commit 95966af2ac4a70d14fbc96dd9405389f9050920c)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1513618

@himdel himdel deleted the catalog-playbook-item-bz1509809 branch November 16, 2017 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants