diff --git a/atdb/taskdatabase/admin.py b/atdb/taskdatabase/admin.py index b5b030a99fc88a61d7d3183f24f084afdb206f56..28057fdc4421b0c574298ffa9f43552c7f45fba8 100644 --- a/atdb/taskdatabase/admin.py +++ b/atdb/taskdatabase/admin.py @@ -2,7 +2,13 @@ from django.contrib import admin from .models import Status, Task, Workflow, LogEntry, Configuration, Job, PostProcessingRule, Monitor, LatestMonitor admin.site.register(Status) -admin.site.register(Task) + +@admin.register(Task) +class TaskAdmin(admin.ModelAdmin): + ordering = ['-creationTime'] + search_fields = ['id','sas_id'] + + admin.site.register(Workflow) admin.site.register(LogEntry) admin.site.register(Configuration) diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py index 2857eeb2e153650639537df2ed676809a6cd606f..d2b57d3fb30ac06efa43709bbb6451ba179a1e7f 100644 --- a/atdb/taskdatabase/models.py +++ b/atdb/taskdatabase/models.py @@ -220,14 +220,7 @@ class Task(models.Model): @property def sas_id_archived(self): try: - # --- temporary hack, test data --- - return int(self.sas_id)+123445 - # --------------------------------- - return self.archive['sas_id_archived'] - - - except: return None @@ -240,14 +233,8 @@ class Task(models.Model): def url_in_lta(self): try: lta_url = Configuration.objects.get(key='lta:url').value - url_in_lta = lta_url + "Lofar?project=ALL&mode=query_result_page" - - # --- temporary hack, test data --- - url_in_lta += "&product=PulsarPipeline&pipeline_object_id=ED0BBBFC49D81C3DE053164A17ACBF9C" - # --------------------------------- - + url_in_lta = lta_url + "Lofar?project=ALL&mode=query_result_page&" + self.archive['path_in_lta'] return url_in_lta - except: return None diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index ff9b89965d2ba9098cfbed70a11379da947d0793..b03628388666f2bbf6553e0caa466f360634390b 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -722,7 +722,7 @@ def construct_inspectionplots(task,source='task_id'): for task in tasks: - results += 'Task <tr style="background-color:#7EB1C4"><td colspan="3"><b>' + str(task.id) + '</b></td></tr>' + results += '<tr style="background-color:#7EB1C4"><td colspan="3"><b>Task ' + str(task.id) + '</b></td></tr>' plots = task.quality_json["plots"] for plot in plots: diff --git a/atdb/taskdatabase/templates/taskdatabase/base.html b/atdb/taskdatabase/templates/taskdatabase/base.html index f5f203bcda10d85c29c195aa69a5348fe1f3c9a5..384c0fd7bb0b3ec8abc7aeada1e07463a54ea59b 100644 --- a/atdb/taskdatabase/templates/taskdatabase/base.html +++ b/atdb/taskdatabase/templates/taskdatabase/base.html @@ -58,7 +58,7 @@ <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 'archived' %}">Archived</a></li> <li><a class="nav-link" href="{% url 'monitoring' %}">Monitoring</a></li> diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index 232fdf24de37ae7c1224fb6a2def8ec529441925..904772e6bb8faf3eb9abc7253fd324767c46f092 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 12 Januari 2022 - 16:00 + <p class="footer"> Version 13 Januari 2022 - 8:00 </div> diff --git a/atdb/taskdatabase/templates/taskdatabase/quality/clear_filter_button.html b/atdb/taskdatabase/templates/taskdatabase/quality/clear_filter_button.html index 10c565f67d22228331541af08d53df17d24533c2..7c212e364f075cd3b918187225da1e566a043d34 100644 --- a/atdb/taskdatabase/templates/taskdatabase/quality/clear_filter_button.html +++ b/atdb/taskdatabase/templates/taskdatabase/quality/clear_filter_button.html @@ -1,3 +1,3 @@ -{% if request.session.filtered == True %} - <a href="{% url 'clear-filter' 'quality' %}" class="btn btn-success btn-sm" role="button"><i class="fas fa-window-close"></i> No Filter</a> -{% endif %} + + <a href="{% url 'clear-filter' 'quality' %}" class="btn btn-success btn-sm" role="button"><i class="fas fa-window-close"></i> Clear Filter</a> +