error handling patterns are not consistent in volumes forms

Bug #1353194 reported by Gloria Gu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Vlad Okhrimenko

Bug Description

There are a couple of patterns of form's exception handling in volumes. Each of them behaves differently.

for example:

1. in admin volumes create volume type

        except Exception:
            exceptions.handle(request,
                              _('Unable to create volume type.'))
            return False

When error happens, the dialog stays open, error message shows up at the upper right corner of the browser.

2. in project volumes
   except Exception:
            exceptions.handle(request, ignore=True)
            self.api_error(_("Unable to create volume."))
            return False

When error happens, the dialog stays open, error message within the form at he upper left corner in red.

3. in project volumes.
except Exception:
            redirect = reverse("horizon:project:volumes:index")
            exceptions.handle(request,
                              _('Unable to attach volume.'),
                              redirect=redirect)

when error happens , the dialog closes, error message shows up at the upper right corner of the browser.

Would like to have consistent behaviors for users. This is a wishlist.

Gloria Gu (gloria-gu)
description: updated
Changed in horizon:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in horizon:
assignee: nobody → Vlad Okhrimenko (vokhrimenko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143470

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/143470
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5aca62f8b2cd2e49806de384e204fde82f23c9b1
Submitter: Jenkins
Branch: master

commit 5aca62f8b2cd2e49806de384e204fde82f23c9b1
Author: Vlad Okhrimenko <email address hidden>
Date: Mon Dec 22 17:25:08 2014 +0200

    Error handling patterns are consistent in volumes forms

    Fixed in handle-function after exception(for that
    would have the same behavior). Now, after error --
    the form will close(If this not form-validation error)

    Closes-Bug: #1353194
    Change-Id: I4ced2c249712f42be56471af418cff6793e48db1

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.