update table action buttons after ajax finished

Bug #1398577 reported by Cindy Lu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Zhang John

Bug Description

Scenario:
Volume Quota is set to 3. Create 3 volumes on Projects > Volumes. 'Create Volume' button is now disabled and reads 'Create Volume (Quota Exceeded)'. When you delete it, it isn't immediately deleted, rather it uses ajax polling to determine the state. The button still reads 'Create Volume (Quota Exceeded)'. User needs to do a manual refresh to see the table actions get updated.

Same goes for Delete. If you delete all volumes, the 'Delete Volume' button should also be removed. However, it doesn't get removed until you refresh the page.

Changed in horizon:
assignee: nobody → Zhang John (zhang-john-vmthunder)
Changed in horizon:
status: New → In Progress
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/152787

Revision history for this message
Zhang John (zhang-john-vmthunder) wrote :

We fixed this bug by adding 'btn-create' class to CreateVolume action. And when deletion finished, row update action will change the status of create button "btn-create" simultaneously.
Review: https://review.openstack.org/152787

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit d51730a50881748538e85c48fb732a0e94025663
Author: Zhang John <email address hidden>
Date: Wed Feb 4 12:57:48 2015 +0800

    Add "btn-create" Class to Create Volume Button

    Create volume button doesn't have 'btn-create' class. So when
    volume quota exceeded, and then delete volume, create volume
    button will not come back to enabled automatically, because
    that will not run the update action.

    Closes-Bug: 1398577

    Change-Id: I449b07b658f56979a03d350ea2ffaa4ec2879d09

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.