Changeset
ui/js/src/wok.main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Test passed: Unit Tests

loading

Git apply log
Switched to a new branch '20170303022839.11729-1-alinefm@linux.vnet.ibm.com'
Applying: Bug fix: Pass function parameters when calling setTimeout
To https://github.com/patchew-project/kimchi-wok
 + 145ecc5...c5d161d patchew/20170303022839.11729-1-alinefm@linux.vnet.ibm.com -> patchew/20170303022839.11729-1-alinefm@linux.vnet.ibm.com (forced update)
[Kimchi-devel] [PATCH] [Wok] Bug fix: Pass function parameters when calling setTimeout
Posted by Aline Manera, 20 weeks ago
The issue was identified when loading Wok UI on Chrome but it could
happen on any browser if the request to /plugins takes more than
expected.

All that, because the setTimeout function was not passing the parameters
to the second call to buildTabs.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
---
 ui/js/src/wok.main.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js
index 20c017e..c8c3889 100644
--- a/ui/js/src/wok.main.js
+++ b/ui/js/src/wok.main.js
@@ -141,7 +141,7 @@ wok.main = function() {
     var buildTabs = function(callback) {
         // Make wok.plugins is ready to be used
         if (wok.plugins == undefined) {
-            setTimeout(buildTabs, 2000);
+            setTimeout(function() {buildTabs(callback)}, 2000);
             return;
         }
 
-- 
2.9.3

_______________________________________________
Kimchi-devel mailing list
Kimchi-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel
Re: [Kimchi-devel] [PATCH] [Wok] Bug fix: Pass function parameters when calling setTimeout
Posted by Daniel Henrique Barboza, 19 weeks ago
Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>

On 03/02/2017 11:28 PM, Aline Manera wrote:
> The issue was identified when loading Wok UI on Chrome but it could
> happen on any browser if the request to /plugins takes more than
> expected.
>
> All that, because the setTimeout function was not passing the parameters
> to the second call to buildTabs.
>
> Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
> ---
>   ui/js/src/wok.main.js | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js
> index 20c017e..c8c3889 100644
> --- a/ui/js/src/wok.main.js
> +++ b/ui/js/src/wok.main.js
> @@ -141,7 +141,7 @@ wok.main = function() {
>       var buildTabs = function(callback) {
>           // Make wok.plugins is ready to be used
>           if (wok.plugins == undefined) {
> -            setTimeout(buildTabs, 2000);
> +            setTimeout(function() {buildTabs(callback)}, 2000);
>               return;
>           }
>   

_______________________________________________
Kimchi-devel mailing list
Kimchi-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel
Re: [Kimchi-devel] [PATCH] [Wok] Bug fix: Pass function parameters when calling setTimeout
Posted by Aline Manera, 19 weeks ago
Applied. Thanks.

Regards,

Aline Manera

_______________________________________________
Kimchi-devel mailing list
Kimchi-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel