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

adding 'lastest change' column, but commented out for later use

parent 10239f30
No related branches found
No related tags found
2 merge requests!295merge all the updates to master into this branch also,!294adding (initial) discard mechanism
......@@ -25,7 +25,7 @@ class Workflow(models.Model):
prefetch = models.BooleanField(null=True, default=True)
def __str__(self):
return str(self.id) + '-' + str(self.workflow_uri)
return str(self.id) + ' - ' + str(self.workflow_uri)
# convert the quality information from the JSONfield into a easy parsable list for the template
......@@ -241,12 +241,23 @@ class Task(models.Model):
@property
def sasid_is_verified(self):
for task in Task.objects.filter(sas_id=self.sas_id):
if task.status not in verified_statusses:
return False
return True
# NV: this shows the latest status change, but because it is a derived property it cannot be sorted.
# This functionality was not requested, and to avoid additional requests about 'sort' functionalty
# it is currently commented out. Could be of use later though, so I leave it in for now.
# @property
# def latest_change(self):
# qs = Status.objects.filter(task__id=self.id).order_by('-timestamp')
# if len(qs) > 0:
# status = qs[0]
# timestamp = status.timestamp
#
# return timestamp
class LogEntry(models.Model):
cpu_cycles = models.IntegerField(null=True,blank=True)
......
......@@ -28,7 +28,7 @@
<a class="open-modal btn btn-primary btn-sm"
href="{% url 'workflow-details' task.workflow %}"
data-popup-url="{% url 'workflow-details' task.workflow %}"
target="_blank"><i class="fas fa-project-diagram"></i> {{ task.workflow }}
target="_blank"><i class="fas fa-project-diagram"></i> {{ task.workflow.id }}
</a></td>
</td>
<td>
......@@ -47,7 +47,7 @@
{% if not task.resume %}
<td class="bigger">{{ task.status }} (holding)</td>
{% endif %}
<!-- <td>{{ task.latest_change|date:"Y-m-d H:i:s" }}</td>-->
<td>{{ task.project }}</td>
<td>{{ task.sas_id }}</td>
<td>{{ task.filter }} </td>
......
......@@ -21,6 +21,7 @@
Status
<a href="{% url 'sort-tasks' 'status' 'atdb' %}" class="btn btn-light btn-sm" role="button"><i class="fas fa-sort-down"></i></a>
</th>
<!-- <th>Latest Change</th>-->
<th>
<a href="{% url 'sort-tasks' '-project' 'atdb' %}" class="btn btn-light btn-sm" role="button"><i class="fas fa-sort-up"></i></a>
Project
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment