Maintenance: Improve core workflow working only on last request to reduce form blocking and more checks on websocket connection.

This commit is contained in:
Rolf Schmidt 2021-09-15 08:08:27 +01:00
parent 83eb5fc0b1
commit 03a831b53b

View file

@ -76,6 +76,7 @@ class App.FormHandlerCoreWorkflow
# checks if the ajax or websocket endpoint should be used
@useWebSockets: ->
return if !App.WebSocket.channel()
return !App.Config.get('core_workflow_ajax_mode')
# restricts the dropdown and tree select values of a form
@ -274,6 +275,7 @@ class App.FormHandlerCoreWorkflow
# this will use the form handler information to send the data to the backend via ajax/websockets
@request: (classname, form, ui, attributes, params) ->
requestID = "CoreWorkflow-#{Math.floor( Math.random() * 999999 ).toString()}"
coreWorkflowRequests = {}
coreWorkflowRequests[requestID] = { classname: classname, form: form, ui: ui, attributes: attributes, params: params }
requestData = {