yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #48256
[Bug 1514627] Re: Angular actions not evaluated properly when dependent on row update.
Reviewed: https://review.openstack.org/289849
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2de6baae34f13ae1e0e3e70e2f08eceae346cfcc
Submitter: Jenkins
Branch: master
commit 2de6baae34f13ae1e0e3e70e2f08eceae346cfcc
Author: Timur Sufiev <tsufiev@xxxxxxxxxxxx>
Date: Tue Mar 8 13:32:22 2016 +0300
Fix non-working Angular actions in jquery modified tables
Fix the issue by re-$compile-ing the content dynamically inserted by
jQuery. Ideally we should solve it by replacing jQuery insert with
Angular one. This remains a TODO for Newton release.
Closes-Bug: #1514627
Co-Authored-By: Matt Borland <matt.borland@xxxxxxx>
Change-Id: Ifbe063e9dd6c20930a1ed4fa14dddb2d0f762902
** Changed in: horizon
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1514627
Title:
Angular actions not evaluated properly when dependent on row update.
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
See: https://review.openstack.org/#/c/219925/6
Copying my comments from there:
Ok, I've verified this as well and looked at a little bit of the code,
but this problem is NOT a problem specific to this patch. This patch
works the same as the images table launch instance.
It appears to actually be a problem with how angular is being handled
when rows are added to the table via the create action when the row
goes through a row update via XHR. The link is not getting evaluated
by angular after a create and therefore is never getting into scope.
This means the ng-click is not actually have any affect.
You can tell by seeing that ng-scope is not added as a class by
angular after create (right click on action and do inspect element).
However, if you do a full page refresh after create (with browser
refresh, coming back to the page, or clicking the volumes menu item),
the action works and that is because it has been evaluated by angular
and has a scope (it has an ng-scope class).
You can actually see the same behavior with the images table depending
on how you choose to create the image.
Note that the images table is directly in the index and not nested
underneath tabs like the volumes table, but that seems like a red
herring.
On the images table, if you put in a link to an image URL and uncheck
the box to copy data, you'll see that the launch instance link works
(it has angular scope). In the background, only a DOCUMENT GET for
the full page is issued. If, however, you checkbox the link to copy
data, you see that the link does NOT work (no angular scope) and you
can also observe that after the Document request for the full page is
sent, an XHR request is set for row_update.
(e.g.
https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/The_OpenStack_logo.svg
/2000px-The_OpenStack_logo.svg.png)
I think we need a separate bug and patch for handling the row update
case, because that could be tracked and backported independently.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1514627/+subscriptions
References