From 545c3ae2ecec47d8494ba08759b93583beb359d7 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Fri, 14 Feb 2020 15:23:02 +0100
Subject: [PATCH] update
---
app/corpora/views.py | 2 +-
app/models.py | 4 ++--
app/static/css/nopaque.css | 44 ++++++++++++++------------------------
3 files changed, 19 insertions(+), 31 deletions(-)
diff --git a/app/corpora/views.py b/app/corpora/views.py
index 4287446d..5b700b94 100644
--- a/app/corpora/views.py
+++ b/app/corpora/views.py
@@ -196,7 +196,7 @@ def prepare_corpus(corpus_id):
if not (corpus.creator == current_user or current_user.is_administrator()):
abort(403)
if len(corpus.files.all()) > 0:
- corpus.status = 'preparable'
+ corpus.status = 'submitted'
db.session.commit()
flash('Corpus marked for preparation!')
else:
diff --git a/app/models.py b/app/models.py
index e72d7860..88015191 100644
--- a/app/models.py
+++ b/app/models.py
@@ -326,8 +326,8 @@ class Job(db.Model):
self.status = 'canceling'
db.session.commit()
while self.status != 'canceled':
- # In case the daemon started a submitted job meanwhile
- if self.status == 'running':
+ # In case the daemon handled a job in any way
+ if self.status != 'canceling':
self.status = 'canceling'
db.session.commit()
sleep(1)
diff --git a/app/static/css/nopaque.css b/app/static/css/nopaque.css
index c1c999ad..97b7a7c6 100644
--- a/app/static/css/nopaque.css
+++ b/app/static/css/nopaque.css
@@ -116,42 +116,30 @@ indicator will show up how the column is sorted right now.; */
.status[data-status] {
background-color: #f44336 !important; /* ~materialize "red" */
}
-.status[data-status="analysing"] {
- background-color: #4caf50 !important; /* ~materialize green */
+.status[data-status="unprepared"] {
+ background-color: #9e9e9e !important; /* ~materialize grey */
}
-.status[data-status="complete"] {
- background-color: #4caf50 !important; /* ~materialize green */
+.status[data-status="submitted"] {
+ background-color: #9e9e9e !important; /* ~materialize grey */
}
-.status[data-status="pending"] {
- background-color: #ff9800 !important; /* ~materialize orange */
-}
-.status[data-status="preparable"] {
- background-color: #ff9800 !important; /* ~materialize orange */
-}
-.status[data-status="prepared"] {
- background-color: #4caf50 !important; /* ~materialize green */
-}
-.status[data-status="preparing"] {
- background-color: #03a9f4 !important; /* ~materialize light-blue */
-}
-.status[data-status="removing"] {
- background-color: #ff5722 !important; /* ~materialize deep-orange */
+.status[data-status="queued"] {
+ background-color: #2196f3 !important; /* ~materialize blue */
}
.status[data-status="running"] {
background-color: #ffc107 !important; /* ~materialize amber */
}
-.status[data-status="start analysis"] {
- background-color: #ffeb3b !important; /* ~materialize yellow */
+.status[data-status="complete"] {
+ background-color: #4caf50 !important; /* ~materialize green */
}
-.status[data-status="stopping"] {
- background-color: #ff5722 !important; /* ~materialize deep-orange */
+.status[data-status="prepared"] {
+ background-color: #4caf50 !important; /* ~materialize green */
+}
+.status[data-status="start analysis"] {
+ background-color: #2196f3 !important; /* ~materialize blue */
+}
+.status[data-status="analysing"] {
+ background-color: #4caf50 !important; /* ~materialize green */
}
.status[data-status="stop analysis"] {
background-color: #ff5722 !important; /* ~materialize deep-orange */
}
-.status[data-status="submitted"] {
- background-color: #2196f3 !important; /* ~materialize blue */
-}
-.status[data-status="unprepared"] {
- background-color: #9e9e9e !important; /* ~materialize grey */
-}