[Kimchi-devel] [PATCH] [Wok] Bug fix: Pass function parameters when calling setTimeout

Aline Manera posted 1 patch 7 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/kimchi tags/patchew/20170303022839.11729-1-alinefm@linux.vnet.ibm.com
ui/js/src/wok.main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Kimchi-devel] [PATCH] [Wok] Bug fix: Pass function parameters when calling setTimeout
Posted by Aline Manera 7 years, 7 months 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 Aline Manera 7 years, 7 months ago
Applied. Thanks.

Regards,

Aline Manera

_______________________________________________
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 7 years, 7 months 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