diff --git a/www/go/core/views/extjs3/Jmap.js b/www/go/core/views/extjs3/Jmap.js index 07023245ea..bfb8f8ce34 100644 --- a/www/go/core/views/extjs3/Jmap.js +++ b/www/go/core/views/extjs3/Jmap.js @@ -10,7 +10,7 @@ go.Jmap = { paused: 0, - requestTimeout: 180000, + requestTimeout: 30000, /** * Enable for XDEBUG profiling diff --git a/www/go/core/views/extjs3/util.js b/www/go/core/views/extjs3/util.js index 58c596e920..76abff4314 100644 --- a/www/go/core/views/extjs3/util.js +++ b/www/go/core/views/extjs3/util.js @@ -529,7 +529,6 @@ go.util = (function () { * @return {undefined} */ exportToFile: function (entity, queryParams, extension, params) { - function doExport(columns) { @@ -552,6 +551,10 @@ go.util = (function () { params.columns = columns; } + //allow longer requests for export. TODO. move this to a background process + const oldTimeout = go.Jmap.requestTimeout; + go.Jmap.requestTimeout = 180000; + return go.Jmap.request({ method: entity + "/export", params: params @@ -561,6 +564,8 @@ go.util = (function () { Ext.MessageBox.alert(t("Error"), response.message); }).finally(function() { Ext.getBody().unmask(); + + go.Jmap.requestTimeout = oldTimeout; }) } diff --git a/www/views/Extjs3/javascript/overrides.js b/www/views/Extjs3/javascript/overrides.js index a0ab58afb8..c73f6024f6 100644 --- a/www/views/Extjs3/javascript/overrides.js +++ b/www/views/Extjs3/javascript/overrides.js @@ -13,7 +13,7 @@ //Default timeout 3 minutes. Ext.override(Ext.data.Connection, { - timeout: 180000 + timeout: 30000//180000 }); Ext.override(Ext.form.TimeField, {