delete-modal passes only ID to callback

Bug #1761074 reported by Shu Muto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Shu Muto

Bug Description

Angular-based dialog for confirming deletion passes only ID to callback in deletion action service of each panel.

If the API does not accept ID on deletion or other operations, e.g. quota management on magnum API that needs composite key with project_id and resource, the panel needs to retrieve list and to filter by ID on callback. So passing a whole object makes sense.

To enable to pass whole entity of selected item, we can pass it as second parameter for callback.

Changed in horizon:
assignee: nobody → Shu Muto (shu-mutou)
status: New → In Progress
Shu Muto (shu-mutou)
description: updated
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Some IRC discussion to clarify the background.
As a conclusion, it sounds reasonable to pass a whole object as argument.

http://eavesdrop.openstack.org/irclogs/%23openstack-horizon/%23openstack-horizon.2018-04-04.log.html#t2018-04-04T07:14:48

Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → Wishlist
milestone: none → rocky-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/558430
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=d0beeb7e142197152925b9c257a2e4f402ac9fb2
Submitter: Zuul
Branch: master

commit d0beeb7e142197152925b9c257a2e4f402ac9fb2
Author: Shu Muto <email address hidden>
Date: Tue Apr 3 17:40:27 2018 +0900

    Pass whole selected entity to deleteEntity callback

    For now, delete-modal service passes only ID to deleteEntity callback.
    Some plugins need other parameters to delete entity.
    So this patch passes whole selected entity to callback as second argument.

    Change-Id: I395470110a5f03ebb08a043ca433b16b999dad3f
    Needed-By: Ic5aba9b2e953cde7950ae7656cd5a3fee3f4a55c
    Closes-Bug: #1761074

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 14.0.0.0b1

This issue was fixed in the openstack/horizon 14.0.0.0b1 development milestone.

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.