mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
bug fixes
This commit is contained in:
parent
27fe4a95e4
commit
5eef2292e7
@ -66,7 +66,7 @@ def get_stopwords():
|
|||||||
stopwords = {}
|
stopwords = {}
|
||||||
for language in languages:
|
for language in languages:
|
||||||
stopwords[language] = nltk.corpus.stopwords.words(language)
|
stopwords[language] = nltk.corpus.stopwords.words(language)
|
||||||
stopwords['punctuation'] = list(punctuation) + ['—', '|', '–', '“', '„']
|
stopwords['punctuation'] = list(punctuation) + ['—', '|', '–', '“', '„', '--']
|
||||||
stopwords['user_stopwords'] = []
|
stopwords['user_stopwords'] = []
|
||||||
response_data = stopwords
|
response_data = stopwords
|
||||||
return response_data, 202
|
return response_data, 202
|
||||||
|
@ -289,8 +289,8 @@ class ConcordanceQueryBuilder {
|
|||||||
this.elements.yourQueryContent = [];
|
this.elements.yourQueryContent = [];
|
||||||
for (let element of this.elements.yourQuery.childNodes) {
|
for (let element of this.elements.yourQuery.childNodes) {
|
||||||
let queryElement = element.dataset.query;
|
let queryElement = element.dataset.query;
|
||||||
queryElement = Utils.escape(queryElement);
|
if (queryElement !== undefined) {
|
||||||
if (queryElement !== 'undefined') {
|
queryElement = Utils.escape(queryElement);
|
||||||
this.elements.yourQueryContent.push(queryElement);
|
this.elements.yourQueryContent.push(queryElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,24 +152,27 @@
|
|||||||
<script>
|
<script>
|
||||||
let jobDisplay = new JobDisplay(document.querySelector('#job-display'));
|
let jobDisplay = new JobDisplay(document.querySelector('#job-display'));
|
||||||
let deleteJobRequestElement = document.querySelector('#delete-job-request');
|
let deleteJobRequestElement = document.querySelector('#delete-job-request');
|
||||||
let jobLogButtonElement = document.querySelector('#job-log-button');
|
|
||||||
let restartJobRequestElement = document.querySelector('#restart-job-request');
|
let restartJobRequestElement = document.querySelector('#restart-job-request');
|
||||||
deleteJobRequestElement.addEventListener('click', (event) => {
|
deleteJobRequestElement.addEventListener('click', (event) => {
|
||||||
Requests.jobs.entity.delete({{ job.hashid|tojson }});
|
Requests.jobs.entity.delete({{ job.hashid|tojson }});
|
||||||
});
|
});
|
||||||
jobLogButtonElement.addEventListener('click', (event) => {
|
|
||||||
Requests.jobs.entity.log({{ job.hashid|tojson }})
|
|
||||||
.then(
|
|
||||||
(response) => {
|
|
||||||
response.json()
|
|
||||||
.then((json) => {
|
|
||||||
let jobLogModalElement = document.querySelector('#job-log-modal');
|
|
||||||
jobLogModalElement.querySelector('pre code').textContent = json.jobLog;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
restartJobRequestElement.addEventListener('click', (event) => {
|
restartJobRequestElement.addEventListener('click', (event) => {
|
||||||
Requests.jobs.entity.restart({{ job.hashid|tojson }});
|
Requests.jobs.entity.restart({{ job.hashid|tojson }});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ({{ current_user.is_administrator()|tojson }}) {
|
||||||
|
let jobLogButtonElement = document.querySelector('#job-log-button');
|
||||||
|
jobLogButtonElement.addEventListener('click', (event) => {
|
||||||
|
Requests.jobs.entity.log({{ job.hashid|tojson }})
|
||||||
|
.then(
|
||||||
|
(response) => {
|
||||||
|
response.json()
|
||||||
|
.then((json) => {
|
||||||
|
let jobLogModalElement = document.querySelector('#job-log-modal');
|
||||||
|
jobLogModalElement.querySelector('pre code').textContent = json.jobLog;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock scripts %}
|
{% endblock scripts %}
|
||||||
|
Loading…
Reference in New Issue
Block a user