diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py index 607a9f36f9e8721caaae6fbf1585efd6c2c88f60..7c7023ec02fced91620f7076a7ee8651158ef8c1 100644 --- a/atdb/taskdatabase/models.py +++ b/atdb/taskdatabase/models.py @@ -104,7 +104,7 @@ class Task(models.Model): @property def has_quality(self): - # todo: check if there is a 'quality' structure in the 'task.outputs' + # todo: check if there is a 'quality' structure in the 'task.outputs'? try: quality = self.outputs['quality'] return True @@ -117,7 +117,7 @@ class Task(models.Model): @property def quality(self): - # todo: check if there is a 'quality' structure in the 'task.outputs' + # todo: check if there is a 'quality' structure in the 'task.outputs'? try: return self.outputs['quality'] except: diff --git a/atdb/taskdatabase/templates/taskdatabase/failures/tasks_failures.html b/atdb/taskdatabase/templates/taskdatabase/failures/tasks_failures.html index 75c461e2296df90e3092b03e3231195942ff4ff4..796d6e526453ec0dacf15db6dbc9a6735d539c20 100644 --- a/atdb/taskdatabase/templates/taskdatabase/failures/tasks_failures.html +++ b/atdb/taskdatabase/templates/taskdatabase/failures/tasks_failures.html @@ -29,14 +29,11 @@ <td>{{ task.sas_id }}</td> <td>{{ task.filter }} </td> - - {% if task.has_quality %} - {% for value in task.quality_as_list %} - <td>{{value}}</td> - {% endfor %} + {% if task.status == "processed_failed" %} + <td> + <a href="{% url 'task-setstatus-view' task.pk 'fetched' my_tasks.number %}" class="btn btn-warning btn-sm" role="button"><b><i class="fas fa-sync-alt"></i> Retry</b></a> + </td> {% endif %} - - <td> </tr> diff --git a/atdb/taskdatabase/templates/taskdatabase/failures/tasks_failures_headers.html b/atdb/taskdatabase/templates/taskdatabase/failures/tasks_failures_headers.html index cd699a598401ff3848aa79ade6099795e5574dc3..5bf48b688419c58da166d4d53495647c43c4726c 100644 --- a/atdb/taskdatabase/templates/taskdatabase/failures/tasks_failures_headers.html +++ b/atdb/taskdatabase/templates/taskdatabase/failures/tasks_failures_headers.html @@ -6,11 +6,5 @@ <th>Project</th> <th>SAS_ID</th> <th>filter</th> - <th>uv-coverage</th> - <th>Sensitivity</th> - <th>Conditions</th> - <th>Diagnostic plots</th> - <th>Summary parset</th> - <th>Summary logs</th> - <th>Summary hf5</th> + <th>Actions</th> </tr> \ No newline at end of file diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index 3870b8fc9b36dba2ed67e42a01b4c42e9c6dbfd1..0e2c23da9e97ddd297c95589df15a6642e7f2eb8 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -34,7 +34,7 @@ {% include 'taskdatabase/pagination.html' %} </div> </div> - <p class="footer"> Version 1.0.0 (1 apr 2021 - 08:00) + <p class="footer"> Version 1.0.0 (1 apr 2021 - 12:00) </div> diff --git a/atdb/taskdatabase/views.py b/atdb/taskdatabase/views.py index e13381a8c5a33cbca9f9d53e511a7d2d1eee4531..f3ccb8cafb601b5121f12cbe912f543e23941fbe 100644 --- a/atdb/taskdatabase/views.py +++ b/atdb/taskdatabase/views.py @@ -359,9 +359,9 @@ class ShowQualityPage(ListView): tasks = get_searched_tasks(search_box, sort) # exclude the tasks without quality information - tasks = tasks.exclude(outputs__isnull=True) - tasks = tasks.exclude(outputs__0__quality__isnull=True) - + #tasks = tasks.exclude(outputs__isnull=True) + tasks = tasks.exclude(outputs__quality__isnull=True) + #tasks = tasks.exclude(outputs__0__quality__isnull=True) paginator = Paginator(tasks, config.TASKS_PER_PAGE) # Show 50 tasks per page page = self.request.GET.get('page') @@ -421,8 +421,6 @@ class ShowValidationPage(ListView): # exclude the tasks without quality information tasks = tasks.exclude(status__icontains="failed") - #tasks = tasks.exclude(outputs__0__quality__isnull=True) - paginator = Paginator(tasks, config.TASKS_PER_PAGE) # Show 50 tasks per page page = self.request.GET.get('page') @@ -468,7 +466,7 @@ class ShowFailuresPage(ListView): except: sort = '-creationTime' - tasks = Task.objects.order_by(sort) + tasks = Task.objects.filter(status__icontains='failed').order_by(sort) # check if there is a 'task_filter' put on the session try: @@ -481,11 +479,6 @@ class ShowFailuresPage(ListView): if (search_box is not None): tasks = get_searched_tasks(search_box, sort) - # exclude the tasks without quality information - tasks = tasks.exclude(outputs__isnull=True) - tasks = tasks.exclude(outputs__0__quality__isnull=True) - - paginator = Paginator(tasks, config.TASKS_PER_PAGE) # Show 50 tasks per page page = self.request.GET.get('page')