mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Remove all pjs!
This commit is contained in:
		@@ -6,11 +6,11 @@ class CorpusAnalysisClient {
 | 
			
		||||
    this.socket = socket;
 | 
			
		||||
 | 
			
		||||
    // socket on event fpr corpous analysis initialization
 | 
			
		||||
    socket.on("pj_corpus_analysis_init", (response) => {
 | 
			
		||||
    socket.on("corpus_analysis_init", (response) => {
 | 
			
		||||
      var errorText;
 | 
			
		||||
 | 
			
		||||
      if (response.code === 200) {
 | 
			
		||||
        console.log(`pj_corpus_analysis_init: ${response.code} - ${response.msg}`);
 | 
			
		||||
        console.log(`corpus_analysis_init: ${response.code} - ${response.msg}`);
 | 
			
		||||
        if (this.callbacks.init != undefined) {
 | 
			
		||||
          this.callbacks.init(response.payload);
 | 
			
		||||
        }
 | 
			
		||||
@@ -25,16 +25,16 @@ class CorpusAnalysisClient {
 | 
			
		||||
        if (this.displays.init != undefined)  {
 | 
			
		||||
          this.displays.init.setVisibilityByStatus("error");
 | 
			
		||||
        }
 | 
			
		||||
        console.error(`pj_corpus_analysis_init: ${errorText}`);
 | 
			
		||||
        console.error(`corpus_analysis_init: ${errorText}`);
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // socket on event for recieveing query results
 | 
			
		||||
    socket.on("pj_corpus_analysis_query", (response) => {
 | 
			
		||||
    socket.on("corpus_analysis_query", (response) => {
 | 
			
		||||
      var errorText;
 | 
			
		||||
 | 
			
		||||
      if (response.code === 200) {
 | 
			
		||||
        console.log(`pj_corpus_analysis_query: ${response.code} - ${response.msg}`);
 | 
			
		||||
        console.log(`corpus_analysis_query: ${response.code} - ${response.msg}`);
 | 
			
		||||
        if (this.callbacks.query != undefined)  {
 | 
			
		||||
          this.callbacks.query(response.payload);
 | 
			
		||||
        }
 | 
			
		||||
@@ -50,11 +50,11 @@ class CorpusAnalysisClient {
 | 
			
		||||
        if (this.displays.query != undefined)  {
 | 
			
		||||
          this.displays.query.setVisibilityByStatus("error");
 | 
			
		||||
        }
 | 
			
		||||
        console.error(`pj_corpus_analysis_query: ${errorText}`);
 | 
			
		||||
        console.error(`corpus_analysis_query: ${errorText}`);
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    socket.on("pj_corpus_analysis_query_results", (response) => {
 | 
			
		||||
    socket.on("corpus_analysis_query_results", (response) => {
 | 
			
		||||
        if (this.callbacks.query_results != undefined) {this.callbacks.query_results(response.payload);}
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
@@ -66,7 +66,7 @@ class CorpusAnalysisClient {
 | 
			
		||||
    if (this.displays.init != undefined)  {
 | 
			
		||||
      this.displays.init.setVisibilityByStatus("waiting");
 | 
			
		||||
    }
 | 
			
		||||
    this.socket.emit("pj_corpus_analysis_init", this.corpusId);
 | 
			
		||||
    this.socket.emit("corpus_analysis_init", this.corpusId);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  query(queryStr) {
 | 
			
		||||
@@ -79,7 +79,7 @@ class CorpusAnalysisClient {
 | 
			
		||||
    if (this.displays.query != undefined)  {
 | 
			
		||||
      this.displays.query.setVisibilityByStatus("waiting");
 | 
			
		||||
    }
 | 
			
		||||
    nopaque.socket.emit("pj_corpus_analysis_query", queryStr);
 | 
			
		||||
    nopaque.socket.emit("corpus_analysis_query", queryStr);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  setCallback(type, callback) {
 | 
			
		||||
 
 | 
			
		||||
@@ -94,7 +94,7 @@ function inspect(dataIndex) {
 | 
			
		||||
  contextResultsElement = document.getElementById("context-results");
 | 
			
		||||
  contextResultsElement.innerHTML = "";  // clear it from old inspects
 | 
			
		||||
  contextModal.open();
 | 
			
		||||
  nopaque.socket.emit("pj_corpus_analysis_inspect_match",
 | 
			
		||||
  nopaque.socket.emit("corpus_analysis_inspect_match",
 | 
			
		||||
              {payload: {
 | 
			
		||||
                         first_cpos: results.resultsJSON.matches[dataIndex].c[0],
 | 
			
		||||
                         last_cpos: results.resultsJSON.matches[dataIndex].c[1]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user