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

add 'path_to_lta' link

parent 496cf84a
No related branches found
No related tags found
No related merge requests found
Pipeline #42665 passed
...@@ -224,21 +224,19 @@ class Task(models.Model): ...@@ -224,21 +224,19 @@ class Task(models.Model):
except: except:
return None return None
def lta_object_id(self): # def lta_object_id(self):
try: # try:
return self.archive['lta_object_id'] # return self.archive['lta_object_id']
except: # except:
return None # return None
def url_in_lta(self):
def path_to_lta(self):
try: try:
lta_url = Configuration.objects.get(key='lta:url').value return self.archive['path_to_lta']
url_in_lta = lta_url + "Lofar?project=ALL&mode=query_result_page&" + self.archive['path_in_lta']
return url_in_lta
except: except:
return None return None
class LogEntry(models.Model): class LogEntry(models.Model):
cpu_cycles = models.IntegerField(null=True,blank=True) cpu_cycles = models.IntegerField(null=True,blank=True)
wall_clock_time = models.IntegerField(null=True,blank=True) wall_clock_time = models.IntegerField(null=True,blank=True)
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</td> </td>
<td> <td>
{% if task.sas_id_archived != None %} {% if task.sas_id_archived != None %}
<a href={{ task.url_in_lta }} target="_blank"> <a href={{ task.path_to_lta }} target="_blank">
<img src="{% static 'taskdatabase/ldvlogo_small.png' %}" height="20" alt="link to LTA"> <img src="{% static 'taskdatabase/ldvlogo_small.png' %}" height="20" alt="link to LTA">
{{ task.sas_id_archived }} {{ task.sas_id_archived }}
</a>&nbsp; </a>&nbsp;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
{% include 'taskdatabase/pagination.html' %} {% include 'taskdatabase/pagination.html' %}
</div> </div>
</div> </div>
<p class="footer"> Version 16 Januari 2022 - 12:00 <p class="footer"> Version 19 Januari 2022 - 10:00
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment