You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I tried to add a plugin tab to kimchi, I found a problem when I refreshing at my tab page.
If I press ctrl+F5 at the tab page add by my plugin, it says "KCHAPI6001E Invalid URL. Redireced to home page." and redirects me to the front page. I did a little
debug and found that it's a AJAX timing problem. When loading the page, it calls kimchi.listPlugins to get the available plugin list from the back-end then it updates the tabs. However the listPlugins is called asynchronously, and needs some time to finish. So when the refesh action triggers an redirect event and calls onKimchiRedirect to redirect to my plugin page, the plugin tabs are not loaded yet. So it redirects me to the front-page instead.
I am able to overcome the problem by adding "async : false,"
in ui/js/src/kimchi.api.js to listPlugins
Fixed the 2 issues:
1) When refreshing (F5) a plugin tab, default tab will be redirected then;
2) tabs.xml is requested twice.
Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
When I tried to add a plugin tab to kimchi, I found a problem when I refreshing at my tab page.
If I press ctrl+F5 at the tab page add by my plugin, it says "KCHAPI6001E Invalid URL. Redireced to home page." and redirects me to the front page. I did a little
debug and found that it's a AJAX timing problem. When loading the page, it calls kimchi.listPlugins to get the available plugin list from the back-end then it updates the tabs. However the listPlugins is called asynchronously, and needs some time to finish. So when the refesh action triggers an redirect event and calls onKimchiRedirect to redirect to my plugin page, the plugin tabs are not loaded yet. So it redirects me to the front-page instead.
I am able to overcome the problem by adding "async : false,"
in ui/js/src/kimchi.api.js to listPlugins
I'm bad in js, maybe you have a nicer solution.
The text was updated successfully, but these errors were encountered: