mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/nopaque into development
This commit is contained in:
commit
e7ff3984b5
@ -339,7 +339,7 @@ def inspect_query_result(query_result_id):
|
|||||||
query_result_file_content = json.load(query_result_file)
|
query_result_file_content = json.load(query_result_file)
|
||||||
return render_template('corpora/query_results/inspect.html.j2',
|
return render_template('corpora/query_results/inspect.html.j2',
|
||||||
display_options_form=display_options_form,
|
display_options_form=display_options_form,
|
||||||
inspect_display_options_form=inspect_display_options_form,
|
inspect_display_options_form=inspect_display_options_form, # noqa
|
||||||
query_result_file_content=query_result_file_content,
|
query_result_file_content=query_result_file_content,
|
||||||
query_metadata=query_metadata,
|
query_metadata=query_metadata,
|
||||||
title='Inspect query result')
|
title='Inspect query result')
|
||||||
|
@ -256,8 +256,8 @@ class ClientEventListener {
|
|||||||
// Executes a specific registered callback by provoding a type string.
|
// Executes a specific registered callback by provoding a type string.
|
||||||
executeCallback(defaultArgs, type) {
|
executeCallback(defaultArgs, type) {
|
||||||
let listenerCallback = this.listenerCallbacks[type];
|
let listenerCallback = this.listenerCallbacks[type];
|
||||||
listenerCallback.callbackFunction(...defaultArgs,
|
let args = defaultArgs.concat(listenerCallback.args) ;
|
||||||
...listenerCallback.args);
|
listenerCallback.callbackFunction(...args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,9 +2,8 @@
|
|||||||
* This callback is called on a socket.on "corpus_analysis_send_meta_data".
|
* This callback is called on a socket.on "corpus_analysis_send_meta_data".
|
||||||
* Handels incoming corpus metadata
|
* Handels incoming corpus metadata
|
||||||
*/
|
*/
|
||||||
// TODO: rework arguments to ...args
|
function saveMetaData(...args) {
|
||||||
function saveMetaData() {
|
let [payload, client, results, rest] = args;
|
||||||
let [payload, client, results, rest] = arguments;
|
|
||||||
client.notifyView('meta-data-recieving');
|
client.notifyView('meta-data-recieving');
|
||||||
results.metaData.init(payload)
|
results.metaData.init(payload)
|
||||||
console.info('Metada saved:', results);
|
console.info('Metada saved:', results);
|
||||||
@ -18,9 +17,9 @@ function saveMetaData() {
|
|||||||
* and does some preperation work like hiding or showing elements and deleting
|
* and does some preperation work like hiding or showing elements and deleting
|
||||||
* the data from the last query.
|
* the data from the last query.
|
||||||
*/
|
*/
|
||||||
function prepareQueryData() {
|
function prepareQueryData(...args) {
|
||||||
// deletes old data from query issued before this new query
|
// deletes old data from query issued before this new query
|
||||||
let [payload, client, results, rest] = arguments;
|
let [payload, client, results, rest] = args;
|
||||||
// always initialize the results to delete data from the query issued before
|
// always initialize the results to delete data from the query issued before
|
||||||
results.init();
|
results.init();
|
||||||
results.data.match_count = payload.match_count;
|
results.data.match_count = payload.match_count;
|
||||||
@ -31,8 +30,8 @@ function prepareQueryData() {
|
|||||||
/**
|
/**
|
||||||
* This callbacks saves the incoming query data chunks into the model results.
|
* This callbacks saves the incoming query data chunks into the model results.
|
||||||
*/
|
*/
|
||||||
function saveQueryData() {
|
function saveQueryData(...args) {
|
||||||
let [payload, client, results, rest] = arguments;
|
let [payload, client, results, rest] = args;
|
||||||
// Get data matches length before new chunk data is being inserted
|
// Get data matches length before new chunk data is being inserted
|
||||||
let dataLength = results.data.matches.length;
|
let dataLength = results.data.matches.length;
|
||||||
if (client.dynamicMode) {
|
if (client.dynamicMode) {
|
||||||
@ -94,8 +93,8 @@ function saveQueryData() {
|
|||||||
* from the already present results.data. Result data is identified with the
|
* from the already present results.data. Result data is identified with the
|
||||||
* dataIndexes. On index is one match.
|
* dataIndexes. On index is one match.
|
||||||
*/
|
*/
|
||||||
function getResultsData() {
|
function getResultsData(...args) {
|
||||||
let [resultsType, dataIndexes, resultsList, client, results, rest] = arguments;
|
let [resultsType, dataIndexes, resultsList, client, results, rest] = args;
|
||||||
client.isBusy = true;
|
client.isBusy = true;
|
||||||
if (resultsList.exportFullInspectContext.checked
|
if (resultsList.exportFullInspectContext.checked
|
||||||
|| resultsType === 'inspect-results') {
|
|| resultsType === 'inspect-results') {
|
||||||
@ -112,8 +111,8 @@ function getResultsData() {
|
|||||||
* Handles incoming results which have been requested via getResultsData(). and
|
* Handles incoming results which have been requested via getResultsData(). and
|
||||||
* saves the data accorindgly into the results object.
|
* saves the data accorindgly into the results object.
|
||||||
*/
|
*/
|
||||||
function saveResultsData() {
|
function saveResultsData(...args) {
|
||||||
let [payload, type, client, results, rest] = arguments;
|
let [payload, type, client, results, rest] = args;
|
||||||
let objectKey = '';
|
let objectKey = '';
|
||||||
if (type === 'full-results') {
|
if (type === 'full-results') {
|
||||||
console.info('Saving full-results data.');
|
console.info('Saving full-results data.');
|
||||||
|
@ -250,7 +250,6 @@ function showCorpusFiles(resultsList, results) {
|
|||||||
valueNames: ["title", "year", "match-count"],
|
valueNames: ["title", "year", "match-count"],
|
||||||
};
|
};
|
||||||
let corpusFileTable = new List('corpus-file-table', options);
|
let corpusFileTable = new List('corpus-file-table', options);
|
||||||
console.log(corpusFileTable);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user