Skip to content
Snippets Groups Projects
Commit 75db3d0f authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Adding superevent signoff list to home page

A list of superevents which need operator signoff will appear
on the home page if the user signs in from an IFO control room.
parent b7a3844f
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ from .view_utils import get_recent_events_string
from .view_utils import eventLogToDict
from .view_utils import signoffToDict
from alerts.old_alert import issueAlertForUpdate, issueXMPPAlert
from superevents.models import Superevent
# Set up logging
import logging
......@@ -117,6 +118,11 @@ def index(request):
context['new_signoff_graceids'] = [e.graceid() for e in new_events]
context['older_signoff_graceids'] = [e.graceid() for e in older_events]
# TODO: ensure not test or MDC types once those are implemented
# Superevent signoffs
context['signoff_superevent_ids'] = [s.superevent_id for s in
Superevent.objects.filter(labelling__label__name=label_name)]
recent_events = ''
if request.user and not is_external(request.user) and settings.SHOW_RECENT_EVENTS_ON_HOME:
try:
......
......@@ -95,9 +95,17 @@ follow-ups. </p>
<div class="signoff-area">
<h2>Attention {{signoff_instrument}} Operator</h2>
<br />
<h3>The following superevents require your signoff:</h3>
{% if signoff_superevent_ids|length %}
<ul>
{% for s_id in signoff_superevent_ids %}
<li><a href="{% url "superevents:view" s_id %}">{{ s_id }}</a></li>
{% endfor %}
</ul>
{% endif %}
<h3>The following events require your sign-off:</h3>
<p>Events submitted within the last 24 hours:</p>
{% if new_signoff_graceids|length %}
<p>Events submitted within the last 24 hours:</p>
<ul>
{% for graceid in new_signoff_graceids %}
<li><a href="{% url "view" graceid %}">{{ graceid }}</a></li>
......
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