Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Coughlin
GraceDB Server
Commits
721a6b9c
Commit
721a6b9c
authored
6 years ago
by
Tanner Prestegard
Committed by
GraceDB
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup of superevent alerts
parent
14d2b4a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gracedb/alerts/superevent_utils.py
+10
-6
10 additions, 6 deletions
gracedb/alerts/superevent_utils.py
gracedb/templates/superevents/old_view.html
+0
-178
0 additions, 178 deletions
gracedb/templates/superevents/old_view.html
with
10 additions
and
184 deletions
gracedb/alerts/superevent_utils.py
+
10
−
6
View file @
721a6b9c
import
logging
from
django.urls
import
reverse
from
django.contrib.auth.models
import
Group
as
AuthGroup
from
rest_framework.renderers
import
JSONRenderer
from
.main
import
issue_alerts
from
core.urls
import
build_absolute_uri
from
api.v1.superevents.serializers
import
SupereventSerializer
,
\
SupereventLogSerializer
,
SupereventLabelSerializer
,
\
SupereventEMObservationSerializer
,
SupereventVOEventSerializer
,
\
SupereventSignoffSerializer
from
core.urls
import
build_absolute_uri
from
superevents.shortcuts
import
is_superevent
from
.main
import
issue_alerts
import
logg
ing
# Set up
logg
er
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -116,7 +120,7 @@ def issue_alert_for_superevent_label_removal(labelling, request=None):
def
issue_alert_for_superevent_voevent
(
voevent
,
request
=
None
):
# Get URL for superevent webview and serialized
label
# Get URL for superevent webview and serialized
voevent
url
,
serialized_object
=
superevent_alert_helper
(
voevent
,
SupereventVOEventSerializer
,
request
=
request
)
...
...
@@ -130,7 +134,7 @@ def issue_alert_for_superevent_voevent(voevent, request=None):
def
issue_alert_for_superevent_emobservation
(
emobservation
,
request
=
None
):
# Get URL for superevent webview and serialized
label
# Get URL for superevent webview and serialized
emo
url
,
serialized_object
=
superevent_alert_helper
(
emobservation
,
SupereventEMObservationSerializer
,
request
=
request
)
...
...
@@ -144,7 +148,7 @@ def issue_alert_for_superevent_emobservation(emobservation, request=None):
def
issue_alert_for_superevent_signoff
(
signoff
,
request
=
None
):
# Get URL for superevent webview and serialized
label
# Get URL for superevent webview and serialized
signoff
url
,
serialized_object
=
superevent_alert_helper
(
signoff
,
SupereventSignoffSerializer
,
request
=
request
)
...
...
This diff is collapsed.
Click to expand it.
gracedb/templates/superevents/old_view.html
deleted
100644 → 0
+
0
−
178
View file @
14d2b4a2
{% extends "base.html" %}
{% load timeutil %}
{% load scientific %}
{% load sanitize_html %}
{% load logtags %}
{% block heading %}{% endblock %}
{% block bodyattrs %}class="tundra eventDetail"{% endblock %}
{% block jscript %}
{% endblock %}
{% block content %}
TBD:
<ul
style=
"padding-bottom: 30px;"
>
<li>
Javascript update for labels
</li>
<li>
Log messages should display links for files (make sure to link to correct version)
</li>
<li>
Event log tagging from web interface
</li>
</ul>
<div
id=
'event_detail_content'
>
{% block gw_status %}
{% if show_gw_status_form %}
<div
class=
"content-area"
>
<form
action=
"{% url "
superevents:confirm-gw
"
superevent.superevent_id
%}"
method=
"POST"
>
<input
type=
"submit"
value=
"Confirm this superevent as a GW"
class=
"permButtonClass"
>
</form>
<div><b>
Note:
</b>
this action is irreversible without manual intervention by an admin!
</div>
</div>
{% endif %}
{% endblock %}
{% block superevent_info %}
<h2>
Superevent Info
</h2>
<table
class=
"superevent"
>
<tr>
<th>
Superevent ID
</th>
<th>
Labels
</th>
<th>
Preferred Event
</th>
<th>
GW events
</th>
<th>
External events
</th>
<th>
Links
</th>
</tr>
<tr>
<td>
{{ superevent.superevent_id }}
</td>
<td>
{% for labelling in superevent.labelling_set.all %}
<div
style=
"color: {{ labelling.label.defaultColor }}"
><b>
{{ labelling.label.name }}
</b></div>
{% endfor %}
</td>
<td>
{% if preferred_event %}
<a
href=
"{% url "
view
"
preferred_event.graceid
%}"
>
{{ preferred_event.graceid }}
</a>
{% endif %}
</td>
<td>
<div>
{% for graceid in internal_events %}
<a
href=
"{% url "
view
"
graceid
%}"
>
{{ graceid }}
</a>
{% endfor %}
</div>
</td>
<td>
<div>
{% for graceid in external_events %}
<a
href=
"{% url "
view
"
graceid
%}"
>
{{ graceid }}
</a>
{% endfor %}
</div>
</td>
<td><a
href=
"{% url "
superevents:file-list
"
superevent.superevent_id
%}"
>
Data
</a></td>
</tr>
</table>
{% endblock %}
<br
/>
<br
/>
{% block basic_info %}
<h2>
Preferred Event Info
</h2>
<table
class=
"event"
>
<tr>
<th
valign=
"top"
>
UID
</th>
<th>
Labels
</th>
<th>
Group
</th>
<th>
Pipeline
</th>
<th>
Search
</th>
<th>
Instruments
</th>
<th>
<div
id=
"basic_info_event_ts"
></div>
<div>
Event Time
</div>
</th>
<th>
FAR (Hz)
</th>
<th>
FAR (yr
<sup>
-1
</sup>
)
</th>
<th>
Links
</th>
<th>
<div
id=
"basic_info_created_ts"
></div>
<div>
Submitted
</div>
</th>
</tr>
<tr>
<td><a
href=
"{% url "
view
"
preferred_event.graceid
%}"
>
{{ preferred_event.graceid }}
</a></td>
<td>
{% for labelling in preferred_event.labelling_set.all %}
<span
onmouseover=
"tooltip.show(tooltiptext('{{labelling.label.name}}', '{{labelling.creator.username}}', '{{labelling.created|utc}}', '{{labelling.label.description}}'));"
onmouseout=
"tooltip.hide();"
style=
"color: {{labelling.label.defaultColor}}"
>
{{ labelling.label.name }}
</span>
{% endfor %}
</td>
<td>
{{ preferred_event.group.name }}
</td>
<td>
{{ preferred_event.pipeline.name }}
</td>
<td>
{{ preferred_event.search.name }}
</td>
<td>
{{ preferred_event.instruments }}
</td>
<td>
{% if preferred_event.gpstime %}
<!-- <span title="{{ preferred_event.gpstime|gpsdate }}">{{ preferred_event.gpstime }}</span> -->
{{ preferred_event.gpstime|multiTime:"gps" }}
{% endif %}
</td>
{# NOTE: XXX Using event_far so it can be floored for external users. #}
<td>
{% if far_is_upper_limit %}
<
{% endif %}{{ display_far|scientific }}
</td>
<td>
{% if far_is_upper_limit %}
<
{% endif %}{{ display_far_yr }}
</td>
<td><a
href=
"{{ preferred_event.weburl }}"
>
Data
</a></td>
<td>
{{ preferred_event.created|multiTime:"created" }}
</td>
</tr>
</table>
{% endblock %}
</div>
<div
class=
"content-area"
>
{% if user_is_external %}
{# Analysis-specific attributes which can be exposed to external partners #}
{% block external_analysis_specific %}
{# Empty by default #}
{% endblock %}
{% else %}
{# Analysis-specific attributes #}
{% block analysis_specific %}
{# This block is empty in the base event_detail template #}
{% endblock %}
{% endif %}
</div>
<!-- Form for creating new log messages -->
{% include "superevents/log_create_form.html" %}
<!-- Set of log messages -->
<h2>
Full event log
</h2>
<div
style=
"padding-bottom: 20px"
>
<table>
<tr>
<th>
No.
</th>
<th>
Log Entry Created
</th>
<th>
Submitter
</th>
<th>
Comment
</th>
<th>
Tags
</th>
</tr>
{% for log in logs %}
<tr>
<td>
{{ log.N }}
</td>
<td>
{{ log.created }}
</td>
<td>
{{ log.issuer }}
</td>
<td>
{{ log.comment }}
{% if log.filename %}
{{ log.filename }}
{% endif %}
</td>
<td>
{% for tag in log.tags.all %}
<div
style=
"padding: 2px; display: inline; background-color: #000000; color: #FFFFFF;"
>
{{ tag.displayName }}
</div>
{% endfor %}
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<!-- end event_detail_content div -->
{% endblock %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment