yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #27183
[Bug 1414067] [NEW] Table row updating doesn't always work with tabs
Public bug reported:
Updating table rows with ajax doesn't work if the table is part of a
tabs.TabbedTableView and the tabs.TableTab is not the first tab. Please
see the attached example code. Note that loading the second page
directly with
http://127.0.0.1:8000/mydashboard/?tab=mypanel_tabs__second_tab works
fine. It also works if the the table is part of the first tab.
Looking at the javascript code the problem seems to be that
horizon.datatables.update(); in horizon.tables.js gets called before the
code that switches to a different tab. Therefore the table doesn't exist
yet when it is trying to update the rows. An easy solution would be to
run horizon.datatables.update(); via horizon.tabs.addTabLoadFunction()
as this ensures that the tab code is executed before the table is
updated.
** Affects: horizon
Importance: Undecided
Status: New
** Patch added: "0001-ajax-bug-example.patch"
https://bugs.launchpad.net/bugs/1414067/+attachment/4304424/+files/0001-ajax-bug-example.patch
--
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/1414067
Title:
Table row updating doesn't always work with tabs
Status in OpenStack Dashboard (Horizon):
New
Bug description:
Updating table rows with ajax doesn't work if the table is part of a
tabs.TabbedTableView and the tabs.TableTab is not the first tab.
Please see the attached example code. Note that loading the second
page directly with
http://127.0.0.1:8000/mydashboard/?tab=mypanel_tabs__second_tab works
fine. It also works if the the table is part of the first tab.
Looking at the javascript code the problem seems to be that
horizon.datatables.update(); in horizon.tables.js gets called before
the code that switches to a different tab. Therefore the table doesn't
exist yet when it is trying to update the rows. An easy solution would
be to run horizon.datatables.update(); via
horizon.tabs.addTabLoadFunction() as this ensures that the tab code is
executed before the table is updated.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1414067/+subscriptions
Follow ups
References