diff --git a/bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.js b/bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.js index 8f1434737e5ca1b44ac9ca564d6a2535c518e496..f2c74dd9e0ecf3c4dd8bb236d8fcdcfba95fbd4f 100644 --- a/bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.js +++ b/bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.js @@ -463,7 +463,7 @@ return getMonitorSetting(gadget); }) .push(function (configuration_dict) { - return gadget.changeState({ + return gadget.deferChangeState({ options: options, is_exporter: is_exporter, config: JSON.stringify(configuration_dict), @@ -473,7 +473,7 @@ }); } - return gadget.changeState({ + return gadget.deferChangeState({ options: options, is_exporter: is_exporter, config: "", @@ -482,6 +482,12 @@ storage_url: options.url }); }) + .declareJob('deferChangeState', function deferStateChange(state) { + // onStateChange does too many things (notification, ajax, redirect) + // which leads to infinite rendering loop currently + // Break this by decoupling all those things from render + return this.changeState(state); + }) .onStateChange(function () { var gadget = this; if (gadget.state.options === "") { diff --git a/bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.xml b/bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.xml index 3fe77bf46d9e6fa6955bee42fde2dc13d734b8ca..3b6f46a7a90497d9b01d27c1d17820856d167dcb 100644 --- a/bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.xml +++ b/bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.xml @@ -79,7 +79,9 @@ </item> <item> <key> <string>content_type</string> </key> - <value> <string>text/javascript</string> </value> + <value> + <none/> + </value> </item> <item> <key> <string>default_reference</string> </key> @@ -256,7 +258,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>967.60730.33169.16435</string> </value> + <value> <string>994.35342.36450.46984</string> </value> </item> <item> <key> <string>state</string> </key> @@ -274,7 +276,7 @@ </tuple> <state> <tuple> - <float>1530700819.45</float> + <float>1630678427.22</float> <string>UTC</string> </tuple> </state>