mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 09:30:40 +00:00
Intermediate push
This commit is contained in:
@ -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') {
|
||||
|
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user