diff --git a/web/app/query_results/views.py b/web/app/query_results/views.py index 1f17a873..463840e9 100644 --- a/web/app/query_results/views.py +++ b/web/app/query_results/views.py @@ -90,7 +90,7 @@ def query_result(query_result_id): @login_required def inspect_query_result(query_result_id): ''' - View to inspect one importe result file in a corpus analysis like interface + View to inspect imported result file in a corpus analysis like interface ''' query_result = QueryResult.query.get_or_404(query_result_id) query_metadata = query_result.query_metadata diff --git a/web/app/static/js/modules/corpus_analysis/client/callbacks.js b/web/app/static/js/modules/corpus_analysis/client/callbacks.js index c936d4e7..bf42fecd 100644 --- a/web/app/static/js/modules/corpus_analysis/client/callbacks.js +++ b/web/app/static/js/modules/corpus_analysis/client/callbacks.js @@ -28,7 +28,7 @@ function prepareQueryData() { /** * This callbacks saves the incoming query data chunks into the model results. */ -function saveQueryData(args) { +function saveQueryData() { let [payload, client, results, rest] = arguments; // get data matches length before new chun kdata is being inserted let dataLength = results.data.matches.length; @@ -51,14 +51,14 @@ function saveQueryData(args) { } } -function getResultsData(args) { +function getResultsData() { let [resultsType, dataIndexes, client, results, rest] = arguments; client.isBusy = true; client.notifyView('results-data-recieving'); client.getResultsData(resultsType, dataIndexes, results); } -function saveResultsData(args) { +function saveResultsData() { let [payload, type, client, results, rest] = arguments; let objectKey = ''; if (type === 'full-results') { diff --git a/web/app/static/js/modules/corpus_analysis/client/listeners.js b/web/app/static/js/modules/corpus_analysis/client/listeners.js index 0edbdde2..32aefce0 100644 --- a/web/app/static/js/modules/corpus_analysis/client/listeners.js +++ b/web/app/static/js/modules/corpus_analysis/client/listeners.js @@ -75,11 +75,11 @@ function recieveMetaData(type, client) { * Also prepares the result.jsList for the incoming data. */ function recieveQueryStatus(type, client) { + /** + * Check if request for session was OK. + * If OK execute registered callbacks and notify View. + */ client.socket.on(type, (response) => { - /** - * Check if request for session was OK. - * If OK execute registered callbacks and notify View. - */ if (response.code === 200) { console.group('corpus_analysis_query: Client recieving query process', 'status via socket.on'); @@ -90,7 +90,7 @@ function recieveQueryStatus(type, client) { console.groupEnd(); } else { console.group('corpus_analysis_query: Client failed recieving', - 'query process status via socket.on'); + 'query process status via socket.on'); let errorText = `Error ${response.payload.code} - ${response.payload.msg}`; if (response.payload.code == 1281) { errorText += ' - Invalid Query'; @@ -109,8 +109,7 @@ function recieveQueryData(type, client) { * Check if request for session was OK. * If OK execute registered callbacks and notify View. */ - if (client.dynamicMode) { - client.socket.on(type, (response) => { + client.socket.on(type, (response) => { if (response.code === 200) { console.group('corpus_analysis_query_results: Recieveing query data') console.info('Client recieving query data via socket.on'); @@ -128,14 +127,7 @@ function recieveQueryData(type, client) { console.error(`corpus_analysis_query: ${errorText}`); console.groupEnd(); } - }); - } else { - console.group('corpus_analysis_query_results: Loading query data.'); - console.info('Client loading imported query data from database.'); - // executing the registered callbacks - client.eventListeners[type].executeCallbacks(); - console.groupEnd(); - } + }); } /** diff --git a/web/app/templates/query_results/inspect.html.j2 b/web/app/templates/query_results/inspect.html.j2 index 1042cf12..92a75393 100644 --- a/web/app/templates/query_results/inspect.html.j2 +++ b/web/app/templates/query_results/inspect.html.j2 @@ -57,166 +57,82 @@ {% endblock %}