Skip to content
Snippets Groups Projects
Commit ade9b4eb authored by Nico Vermaas's avatar Nico Vermaas
Browse files

create structure for Validation and Failures pages

parent ed872cf1
No related branches found
No related tags found
2 merge requests!217Master,!214create structure for Validation and Failures pages
Showing
with 372 additions and 6 deletions
atdb/atdb/static/taskdatabase/ATDB-LDV Workflow Diagram.png

114 KiB | W: | H:

atdb/atdb/static/taskdatabase/ATDB-LDV Workflow Diagram.png

119 KiB | W: | H:

atdb/atdb/static/taskdatabase/ATDB-LDV Workflow Diagram.png
atdb/atdb/static/taskdatabase/ATDB-LDV Workflow Diagram.png
atdb/atdb/static/taskdatabase/ATDB-LDV Workflow Diagram.png
atdb/atdb/static/taskdatabase/ATDB-LDV Workflow Diagram.png
  • 2-up
  • Swipe
  • Onion skin
atdb/docs/ATDB Context Diagram.png

595 KiB

atdb/docs/ATDB-LDV - Deployment Diagram.png

67.1 KiB | W: | H:

atdb/docs/ATDB-LDV - Deployment Diagram.png

164 KiB | W: | H:

atdb/docs/ATDB-LDV - Deployment Diagram.png
atdb/docs/ATDB-LDV - Deployment Diagram.png
atdb/docs/ATDB-LDV - Deployment Diagram.png
atdb/docs/ATDB-LDV - Deployment Diagram.png
  • 2-up
  • Swipe
  • Onion skin
atdb/docs/ATDB-LDV Workflow Diagram.png

153 KiB | W: | H:

atdb/docs/ATDB-LDV Workflow Diagram.png

156 KiB | W: | H:

atdb/docs/ATDB-LDV Workflow Diagram.png
atdb/docs/ATDB-LDV Workflow Diagram.png
atdb/docs/ATDB-LDV Workflow Diagram.png
atdb/docs/ATDB-LDV Workflow Diagram.png
  • 2-up
  • Swipe
  • Onion skin
atdb/taskdatabase/static/taskdatabase/ATDB-LDV Workflow Diagram.png

114 KiB | W: | H:

atdb/taskdatabase/static/taskdatabase/ATDB-LDV Workflow Diagram.png

119 KiB | W: | H:

atdb/taskdatabase/static/taskdatabase/ATDB-LDV Workflow Diagram.png
atdb/taskdatabase/static/taskdatabase/ATDB-LDV Workflow Diagram.png
atdb/taskdatabase/static/taskdatabase/ATDB-LDV Workflow Diagram.png
atdb/taskdatabase/static/taskdatabase/ATDB-LDV Workflow Diagram.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li><a class="nav-link" href="{% url 'task-details'%}">Task Details</a></li> <li><a class="nav-link" href="{% url 'task-details'%}">Task Details</a></li>
<li><a class="nav-link" href="{% url 'quality' %}">Quality</a></li>
{% endif %} {% endif %}
<li><a class="nav-link" href="{% url 'dashboard' 'active_nores_nofilter' %}">Dashboard</a></li> <li><a class="nav-link" href="{% url 'dashboard' 'active_nores_nofilter' %}">Dashboard</a></li>
...@@ -58,6 +57,11 @@ ...@@ -58,6 +57,11 @@
{% comment %} {% comment %}
<li><a class="nav-link" href="{% url 'query2' request|current_query_params %}">Filter2</a></li> <li><a class="nav-link" href="{% url 'query2' request|current_query_params %}">Filter2</a></li>
{% endcomment %} {% endcomment %}
<li><a class="nav-link" href="{% url 'quality' %}">Quality</a></li>
<li><a class="nav-link" href="{% url 'validation' %}">Validation</a></li>
<li><a class="nav-link" href="{% url 'failures' %}">Failures</a></li>
<li><a class="nav-link" href="{% url 'monitoring' %}">Monitoring</a></li> <li><a class="nav-link" href="{% url 'monitoring' %}">Monitoring</a></li>
<li><a class="nav-link" href="{% url 'diagram' %}">Diagram</a></li> <li><a class="nav-link" href="{% url 'diagram' %}">Diagram</a></li>
......
{% extends 'taskdatabase/base.html' %}
{% load static %}
{% block myBlock %}
<div class="container-fluid details-container">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-8">
<h3>Failures</h3>
These are all the tasks that failed.
Click 'Retry' to restart a specific step in the workflow.
<a class="nav-link" href="{% url 'diagram' %}">See workflow diagram</a>
<hr>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
{% include 'taskdatabase/pagination.html' %}
&nbsp;
{% if my_tasks %}
<div class="panel panel-success">
<div class="panel-body">
<table class="table table-striped table-bordered table-sm">
<thead>
{% include 'taskdatabase/failures/tasks_failures_headers.html' %}
</thead>
<tbody>
{% include 'taskdatabase/failures/tasks_failures.html' %}
</tbody>
</table>
{% else %}
<p>No recent Tasks.</p>
{% endif %}
</div>
</div>
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
</div>
</div>
</div>
{% include 'taskdatabase/localstorage_scripts.html' %}
{% endblock %}
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
{% include 'taskdatabase/pagination.html' %} {% include 'taskdatabase/pagination.html' %}
</div> </div>
</div> </div>
<p class="footer"> Version 1.0.0 (8 mar 2021 - 17:00) <p class="footer"> Version 1.0.0 (1 apr 2021 - 08:00)
</div> </div>
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
<div class="row"> <div class="row">
<div class="col-8"> <div class="col-8">
<h3>Quality Diagnostics</h3> <h3>Quality Diagnostics</h3>
This overview shows the Quality Diagnostics of all the task that have this information'.
<hr>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
...@@ -22,10 +24,10 @@ ...@@ -22,10 +24,10 @@
<table class="table table-striped table-bordered table-sm"> <table class="table table-striped table-bordered table-sm">
<thead> <thead>
{% include 'taskdatabase/tasks_quality_headers.html' %} {% include 'taskdatabase/quality/tasks_quality_headers.html' %}
</thead> </thead>
<tbody> <tbody>
{% include 'taskdatabase/tasks_quality.html' %} {% include 'taskdatabase/quality/tasks_quality.html' %}
</tbody> </tbody>
</table> </table>
{% else %} {% else %}
......
{% load static %}
{% for task in my_tasks %}
{% if task.status != "removed_invisible" %}
<div class="row">
<tr class="{{ task.status }}">
<td>
<a href="{{ task.get_absolute_url }}" target="_blank">{{ task.id }} </a>
</td>
<td>
{% if user.is_authenticated %}
<a class="btn btn-primary btn-sm"
href="{% url 'task-details' task.id my_tasks.number %}"
data-popup-url="{% url 'task-details' task.id my_tasks.number %}"
><i class="fas fa-list"></i> Details
</a>&nbsp;
{% endif %}
</td>
{% if task.resume %}
<td class="bigger">{{ task.status }}</td>
{% endif %}
{% if not task.resume %}
<td class="bigger">{{ task.status }} (holding)</td>
{% endif %}
<td>{{ task.project }}</td>
<td>{{ task.sas_id }}</td>
<td>{{ task.filter }} </td>
{% if task.has_quality %}
{% for value in task.quality_as_list %}
<td>{{value}}</td>
{% endfor %}
{% endif %}
<td>
</tr>
</div>
{% endif %}
{% endfor %}
{% include "taskdatabase/modal/modal_script.html" %}
{% include "taskdatabase/modal/modal.html" %}
\ No newline at end of file
<tr>
<th>ID</th>
<th>Details</th>
<th>Status</th>
<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>
</tr>
\ No newline at end of file
{% load static %}
{% for task in my_tasks %}
{% if task.status != "removed_invisible" %}
<div class="row">
<tr class="{{ task.status }}">
<td>
<a href="{{ task.get_absolute_url }}" target="_blank">{{ task.id }} </a>
</td>
<td>
{% if user.is_authenticated %}
<a class="btn btn-primary btn-sm"
href="{% url 'task-details' task.id my_tasks.number %}"
data-popup-url="{% url 'task-details' task.id my_tasks.number %}"
><i class="fas fa-list"></i> Details
</a>&nbsp;
{% endif %}
</td>
{% if task.resume %}
<td class="bigger">{{ task.status }}</td>
{% endif %}
{% if not task.resume %}
<td class="bigger">{{ task.status }} (holding)</td>
{% endif %}
<td>{{ task.project }}</td>
<td>{{ task.sas_id }}</td>
<td>{{ task.filter }} </td>
{% if task.has_quality %}
{% for value in task.quality_as_list %}
<td>{{value}}</td>
{% endfor %}
{% endif %}
<td>
</tr>
</div>
{% endif %}
{% endfor %}
{% include "taskdatabase/modal/modal_script.html" %}
{% include "taskdatabase/modal/modal.html" %}
\ No newline at end of file
<tr>
<th>ID</th>
<th>Details</th>
<th>Status</th>
<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>
</tr>
\ No newline at end of file
{% extends 'taskdatabase/base.html' %}
{% load static %}
{% block myBlock %}
<div class="container-fluid details-container">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-8">
<h3>Validation</h3>
These are the tasks in status 'stored' that can be validated. Click one of the quality buttons to validate.
<hr>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
{% include 'taskdatabase/pagination.html' %}
&nbsp;
{% if my_tasks %}
<div class="panel panel-success">
<div class="panel-body">
<table class="table table-striped table-bordered table-sm">
<thead>
{% include 'taskdatabase/validation/tasks_validation_headers.html' %}
</thead>
<tbody>
{% include 'taskdatabase/validation/tasks_validation.html' %}
</tbody>
</table>
{% else %}
<p>No recent Tasks.</p>
{% endif %}
</div>
</div>
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
</div>
</div>
</div>
{% include 'taskdatabase/localstorage_scripts.html' %}
{% endblock %}
...@@ -16,6 +16,8 @@ urlpatterns = [ ...@@ -16,6 +16,8 @@ urlpatterns = [
path('', views.IndexView.as_view(), name='index'), path('', views.IndexView.as_view(), name='index'),
path('postprocessing-tasks', views.PostProcessingTasksView.as_view(), name='postprocessing-tasks'), path('postprocessing-tasks', views.PostProcessingTasksView.as_view(), name='postprocessing-tasks'),
path('quality', views.ShowQualityPage.as_view(), name='quality'), path('quality', views.ShowQualityPage.as_view(), name='quality'),
path('validation', views.ShowValidationPage.as_view(), name='validation'),
path('failures', views.ShowFailuresPage.as_view(), name='failures'),
path('task_details/<int:id>/<page>', views.TaskDetails, name='task-details'), path('task_details/<int:id>/<page>', views.TaskDetails, name='task-details'),
path('task_details/', views.TaskDetails, name='task-details'), path('task_details/', views.TaskDetails, name='task-details'),
......
...@@ -327,9 +327,72 @@ class PostProcessingTasksView(ListView): ...@@ -327,9 +327,72 @@ class PostProcessingTasksView(ListView):
class ShowQualityPage(ListView): class ShowQualityPage(ListView):
""" """
This is the main view of ATDB. It shows a pagination list of tasks, sorted by creationTime. This shows the tasks that have a quality statistics in its outputs[0]['quality'].
Not that the global filter is also applied
"""
template_name = 'taskdatabase/quality/quality_page.html'
# by default this returns the list in an object called object_list, so use 'object_list' in the html page.
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
context_object_name = 'my_tasks'
def get_queryset(self):
status = self.request.GET.get('status')
search_box = self.request.GET.get('search_box', None)
# get the sort variable from the session or use default
try:
sort = self.request.session['sort']
except:
sort = '-creationTime'
tasks = Task.objects.order_by(sort)
# check if there is a 'task_filter' put on the session
try:
filter = self.request.session['task_filter']
if filter != 'all':
tasks = get_searched_tasks(filter, sort)
except:
pass
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')
try:
# check if there was a page on the session, if so, use it.
if page == None:
page = self.request.session['page']
self.request.session['page'] = None
except:
pass
try:
tasks = paginator.page(page)
except PageNotAnInteger:
# If page is not an integer, deliver first page.
tasks = paginator.page(1)
except EmptyPage:
# If page is out of range (e.g. 9999), deliver last page of results.
tasks = paginator.page(paginator.num_pages)
return tasks
class ShowValidationPage(ListView):
"""
This shows the tasks that are ready for validation
Not that the global filter is also applied
""" """
template_name = 'taskdatabase/quality_page.html' template_name = 'taskdatabase/validation/validation_page.html'
# by default this returns the list in an object called object_list, so use 'object_list' in the html page. # by default this returns the list in an object called object_list, so use 'object_list' in the html page.
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
...@@ -386,6 +449,69 @@ class ShowQualityPage(ListView): ...@@ -386,6 +449,69 @@ class ShowQualityPage(ListView):
return tasks return tasks
class ShowFailuresPage(ListView):
"""
This shows the tasks that are ready for validation
Not that the global filter is also applied
"""
template_name = 'taskdatabase/failures/failures_page.html'
# by default this returns the list in an object called object_list, so use 'object_list' in the html page.
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
context_object_name = 'my_tasks'
def get_queryset(self):
status = self.request.GET.get('status')
search_box = self.request.GET.get('search_box', None)
# get the sort variable from the session or use default
try:
sort = self.request.session['sort']
except:
sort = '-creationTime'
tasks = Task.objects.order_by(sort)
# check if there is a 'task_filter' put on the session
try:
filter = self.request.session['task_filter']
if filter != 'all':
tasks = get_searched_tasks(filter, sort)
except:
pass
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')
try:
# check if there was a page on the session, if so, use it.
if page == None:
page = self.request.session['page']
self.request.session['page'] = None
except:
pass
try:
tasks = paginator.page(page)
except PageNotAnInteger:
# If page is not an integer, deliver first page.
tasks = paginator.page(1)
except EmptyPage:
# If page is out of range (e.g. 9999), deliver last page of results.
tasks = paginator.page(paginator.num_pages)
return tasks
def get_searched_tasks(search, sort): def get_searched_tasks(search, sort):
tasks = Task.objects.filter( tasks = Task.objects.filter(
Q(id__contains=search) | Q(id__contains=search) |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment