Commit 84a67db3 authored by Jonah Kanner's avatar Jonah Kanner 🤓 Committed by GraceDB

first attempt

parent a3af778d
......@@ -120,5 +120,25 @@ class SupereventFileList(SupereventDetailView):
class SupereventPublic(ListView):
model = Superevent
template_name = 'superevents/public.html'
#filter_permissions = ['superevents.view_superevent']
#log_view_permission = 'superevents.view_log'
filter_permissions = ['superevents.view_superevent']
log_view_permission = 'superevents.view_log'
def get_context_data(self, **kwargs):
# Get base context
context = ListView.get_context_data(self, **kwargs)
#-- For each superevent, get list of log messages
for se in context['object_list']:
viewable_logs = get_objects_for_user(self.request.user,
self.log_view_permission, se.log_set.all()).filter(tags__name='em_follow') #-- want this label to be analyst_comment
commentlist = ''
for log in viewable_logs:
commentlist += log.comment
commentlist += '--'
se.comments = commentlist
return context
......@@ -44,11 +44,49 @@
{% endblock %}
{% block content %}
Hello jonah.
<h3>O3 detection candidates: {{ meta.candidates }}</h3>
<br/><br/>
<table class="tablesaw" data-tablesaw-sortable data-tablesaw-sortable-switch data-tablesaw-mode="columntoggle">
<thead><tr>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="persist">Event ID</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="1">Possible Source (Probability)</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="2">Date</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="3">GCN</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="4">Location</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="5">&Omega; Scan</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="5">End Time GPS</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="5">Comments</th>
</tr>
</thead><tbody>
{% for event in object_list %}
I found a superevent! {{ event.superevent_id }}<br/>
<tr {% if event.retract %}style='background-color:#EDD' {% endif %} >
<td><a href=/superevents/{{ event.superevent_id }}>{{ event.superevent_id }}</a></td>
<td style='min-width:120px'>{{ event.sourcetypes }} </td>
<td style='min-width:120px'>{{ event.t_0_date }} </td>
<td>
<a href={{ event.noticeurl }}>Notice</a><br/>
<a href={{ event.gcnurl }}>Circulars</a>
</td>
<td> <a href='{{ event.maplocal }}'> <img src='{{ event.maplocal }}' width='200px'/> </a> </td>
<td>
<a href='https://ldas-jobs.ligo-la.caltech.edu/~detchar/dqr/events/{{ event.superevent_id }}/L1deepomegascan/'>&Omega; L1</a><br/>
<a href='https://ldas-jobs.ligo-wa.caltech.edu/~detchar/dqr/events/{{ event.superevent_id }}/H1deepomegascan/'>&Omega; H1</a>
</td>
<td>{{ event.t_0 }} </td>
<td>{{ event.comments }} </td>
</tr>
{% endfor %}
</tbody></table>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment