aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-09-05 12:47:49 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-09-05 12:47:49 +0100
commita43145b4042a9ce53f4c7aeca979dd69cffb0546 (patch)
tree1c3b99e2c0e8259676db0c423440ef1b984c32cc /app
parentFix css include (diff)
downloadAnnotateChange-a43145b4042a9ce53f4c7aeca979dd69cffb0546.tar.gz
AnnotateChange-a43145b4042a9ce53f4c7aeca979dd69cffb0546.zip
Change percentage to percentage of target
Diffstat (limited to 'app')
-rw-r--r--app/admin/routes.py3
-rw-r--r--app/templates/admin/manage_datasets.html2
2 files changed, 3 insertions, 2 deletions
diff --git a/app/admin/routes.py b/app/admin/routes.py
index e07475f..0736549 100644
--- a/app/admin/routes.py
+++ b/app/admin/routes.py
@@ -163,10 +163,11 @@ def manage_datasets():
for dataset in Dataset.query.all():
tasks = Task.query.filter_by(dataset_id=dataset.id).all()
n_complete = len([t for t in tasks if t.done])
+ desired = current_app.config["TASKS_NUM_PER_DATASET"]
if len(tasks) == 0:
perc = float("nan")
else:
- perc = n_complete / len(tasks) * 100
+ perc = n_complete / desired * 100
entry = {
"id": dataset.id,
"name": dataset.name,
diff --git a/app/templates/admin/manage_datasets.html b/app/templates/admin/manage_datasets.html
index 78757b6..1b8dddf 100644
--- a/app/templates/admin/manage_datasets.html
+++ b/app/templates/admin/manage_datasets.html
@@ -36,7 +36,7 @@ dataset <b>and</b> all associated tasks and annotations. Are you sure?") }}
<th scope="col">Demo</th>
<th scope="col">Assigned Tasks</th>
<th scope="col">Completed Tasks</th>
- <th scope="col">Percentage</th>
+ <th scope="col">Target Reached (%)</th>
</thead>
{% for entry in overview %}
<tr>