Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/nopaque into development

This commit is contained in:
Patrick Jentsch 2020-10-12 13:28:26 +02:00
commit e7ff3984b5
4 changed files with 13 additions and 15 deletions

View File

@ -339,7 +339,7 @@ def inspect_query_result(query_result_id):
query_result_file_content = json.load(query_result_file)
return render_template('corpora/query_results/inspect.html.j2',
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_metadata=query_metadata,
title='Inspect query result')

View File

@ -256,8 +256,8 @@ class ClientEventListener {
// Executes a specific registered callback by provoding a type string.
executeCallback(defaultArgs, type) {
let listenerCallback = this.listenerCallbacks[type];
listenerCallback.callbackFunction(...defaultArgs,
...listenerCallback.args);
let args = defaultArgs.concat(listenerCallback.args) ;
listenerCallback.callbackFunction(...args);
}
}

View File

@ -2,9 +2,8 @@
* This callback is called on a socket.on "corpus_analysis_send_meta_data".
* Handels incoming corpus metadata
*/
// TODO: rework arguments to ...args
function saveMetaData() {
let [payload, client, results, rest] = arguments;
function saveMetaData(...args) {
let [payload, client, results, rest] = args;
client.notifyView('meta-data-recieving');
results.metaData.init(payload)
console.info('Metada saved:', results);
@ -18,9 +17,9 @@ function saveMetaData() {
* and does some preperation work like hiding or showing elements and deleting
* the data from the last query.
*/
function prepareQueryData() {
function prepareQueryData(...args) {
// 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
results.init();
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.
*/
function saveQueryData() {
let [payload, client, results, rest] = arguments;
function saveQueryData(...args) {
let [payload, client, results, rest] = args;
// Get data matches length before new chunk data is being inserted
let dataLength = results.data.matches.length;
if (client.dynamicMode) {
@ -94,8 +93,8 @@ function saveQueryData() {
* from the already present results.data. Result data is identified with the
* dataIndexes. On index is one match.
*/
function getResultsData() {
let [resultsType, dataIndexes, resultsList, client, results, rest] = arguments;
function getResultsData(...args) {
let [resultsType, dataIndexes, resultsList, client, results, rest] = args;
client.isBusy = true;
if (resultsList.exportFullInspectContext.checked
|| resultsType === 'inspect-results') {
@ -112,8 +111,8 @@ function getResultsData() {
* Handles incoming results which have been requested via getResultsData(). and
* saves the data accorindgly into the results object.
*/
function saveResultsData() {
let [payload, type, client, results, rest] = arguments;
function saveResultsData(...args) {
let [payload, type, client, results, rest] = args;
let objectKey = '';
if (type === 'full-results') {
console.info('Saving full-results data.');

View File

@ -250,7 +250,6 @@ function showCorpusFiles(resultsList, results) {
valueNames: ["title", "year", "match-count"],
};
let corpusFileTable = new List('corpus-file-table', options);
console.log(corpusFileTable);
}
}