The Angular images actions now consistently return a promise. This allows
a view to fetch an image related action from the registry, call it, and
have a consistent way to know that it is complete.
For actions, promises are preferred over events because they require
less setup and teardown, better handle the asynchronous nature of
modals, don't require a parent-child scope relationship and finally
allow for success/fail handler chaining.
Future patches may add data to the promise so that the view can know
which items were affected by the action.
This patch simply returns promises from actions as this is
a pattern I'd like to establish for Mitaka. Usage of these promises is
left to a follow-on patch. Also, removing the event mechanism from actions
is left to a follow-on patch.
Reviewed: https:/ /review. openstack. org/290800 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=05b53f7d60c 2e9e0c753834865 6442a89a03d3fd
Committed: https:/
Submitter: Jenkins
Branch: master
commit 05b53f7d60c2e9e 0c7538348656442 a89a03d3fd
Author: Tyr Johanson <email address hidden>
Date: Wed Mar 9 12:22:44 2016 -0700
Images Actions Return Promises
The Angular images actions now consistently return a promise. This allows
a view to fetch an image related action from the registry, call it, and
have a consistent way to know that it is complete.
For actions, promises are preferred over events because they require
less setup and teardown, better handle the asynchronous nature of
modals, don't require a parent-child scope relationship and finally
allow for success/fail handler chaining.
Future patches may add data to the promise so that the view can know
which items were affected by the action.
This patch simply returns promises from actions as this is
a pattern I'd like to establish for Mitaka. Usage of these promises is
left to a follow-on patch. Also, removing the event mechanism from actions
is left to a follow-on patch.
Change-Id: I78d189d6eb026b d98abba64516410 10104fc5002 Implements: blueprint angularize- images- table
Partially-
Closes-Bug: 1555929
Partial-Bug: 1514627