Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
ce39b249
Commit
ce39b249
authored
5 years ago
by
Stephan Porada
Browse files
Options
Downloads
Plain Diff
Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development
parents
9c611afd
093f3bfe
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/jobs/views.py
+5
-4
5 additions, 4 deletions
app/jobs/views.py
app/templates/corpora/corpus.html.j2
+14
-1
14 additions, 1 deletion
app/templates/corpora/corpus.html.j2
app/templates/jobs/job.html.j2
+9
-1
9 additions, 1 deletion
app/templates/jobs/job.html.j2
with
28 additions
and
6 deletions
app/jobs/views.py
+
5
−
4
View file @
ce39b249
...
@@ -20,10 +20,11 @@ def job(job_id):
...
@@ -20,10 +20,11 @@ def job(job_id):
@jobs.route
(
'
/<int:job_id>/delete
'
)
@jobs.route
(
'
/<int:job_id>/delete
'
)
@login_required
@login_required
def
delete_job
(
job_id
):
def
delete_job
(
job_id
):
delete_thread
=
threading
.
Thread
(
job
=
Job
.
query
.
get_or_404
(
job_id
)
target
=
background_delete_job
,
if
not
(
job
.
creator
==
current_user
or
current_user
.
is_administrator
()):
args
=
(
current_app
.
_get_current_object
(),
job_id
)
abort
(
403
)
)
delete_thread
=
threading
.
Thread
(
target
=
background_delete_job
,
args
=
(
current_app
,
job_id
))
delete_thread
.
start
()
delete_thread
.
start
()
flash
(
'
Job has been deleted!
'
)
flash
(
'
Job has been deleted!
'
)
return
redirect
(
url_for
(
'
main.dashboard
'
))
return
redirect
(
url_for
(
'
main.dashboard
'
))
...
...
This diff is collapsed.
Click to expand it.
app/templates/corpora/corpus.html.j2
+
14
−
1
View file @
ce39b249
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
<td class="right-align">
<td class="right-align">
<a class="waves-effect waves-light btn-small" href="{{ url_for('corpora.edit_corpus_file', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons">edit</i></a>
<a class="waves-effect waves-light btn-small" href="{{ url_for('corpora.edit_corpus_file', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons">edit</i></a>
<a class="waves-effect waves-light btn-small" href="{{ url_for('corpora.download_corpus_file', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons">file_download</i></a>
<a class="waves-effect waves-light btn-small" href="{{ url_for('corpora.download_corpus_file', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons">file_download</i></a>
<a
class="waves-effect waves-light btn-small red" href="{{ url_for('corpora.delete_corpus_file', corpus_file_id=file.id, corpus_id=corpus.id) }}
"><i class="material-icons">delete</i></a>
<a
data-target="delete-corpus-file-{{ file.id }}-modal" class="waves-effect waves-light btn-small red modal-trigger
"><i class="material-icons">delete</i></a>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
@@ -79,4 +79,17 @@
...
@@ -79,4 +79,17 @@
<a href="{{ url_for('corpora.delete_corpus', corpus_id=corpus.id) }}" class="modal-close waves-effect waves-green btn red">Confirm<i class="material-icons right">send</i></a>
<a href="{{ url_for('corpora.delete_corpus', corpus_id=corpus.id) }}" class="modal-close waves-effect waves-green btn red">Confirm<i class="material-icons right">send</i></a>
</div>
</div>
</div>
</div>
{% for file in corpus.files %}
<div id="delete-corpus-file-{{ file.id }}-modal" class="modal">
<div class="modal-content">
<h4>Confirm corpus file deletion</h4>
<p>Do you really want to delete the corpus file {{ file.filename }}? The file will be permanently deleted!</p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-green btn cancel">Cancel</a>
<a class="modal-close waves-effect waves-green btn red" href="{{ url_for('corpora.delete_corpus_file', corpus_file_id=file.id, corpus_id=corpus.id) }}">Confirm<i class="material-icons right">send</i></a>
</div>
</div>
{% endfor %}
{% endblock %}
{% endblock %}
This diff is collapsed.
Click to expand it.
app/templates/jobs/job.html.j2
+
9
−
1
View file @
ce39b249
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
this.job = jobs[this.jobId];
this.job = jobs[this.jobId];
}
}
// End date
this.setEndDate(this.job.end_date);
// Status
// Status
this.setStatus(this.job.status);
this.setStatus(this.job.status);
// End date
// End date
...
@@ -73,7 +75,13 @@
...
@@ -73,7 +75,13 @@
}
}
setEndDate(timestamp) {
setEndDate(timestamp) {
document.getElementById("end-date").value = new Date(timestamp * 1000).toLocaleString();
var end_date;
if (timestamp === null) {
end_date = "N.a.";
} else {
end_date = new Date(timestamp * 1000).toLocaleString();
}
document.getElementById("end-date").value = end_date;
M.updateTextFields();
M.updateTextFields();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment