Skip to content
Snippets Groups Projects
Commit f2c7f883 authored by Branson Stephens's avatar Branson Stephens
Browse files

reverted some files to unmodified-by-Branson versions

parent 86bafed4
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,7 @@ import glue.ligolw.utils
import glue.lvalert.utils
def issueAlert(event, location, temp_data_loc):
# Branson commented out just in case somebody is listening.
# issueXMPPAlert(event, location, temp_data_loc)
issueXMPPAlert(event, location, temp_data_loc)
issueEmailAlert(event, location)
def indent(nindent, text):
......@@ -68,6 +67,7 @@ def issueAlertForLabel(event, label, doxmpp):
def issueEmailAlert(event, location):
# Gather Recipients
if event.group.name == 'Test':
fromaddress = settings.ALERT_TEST_EMAIL_FROM
......@@ -77,30 +77,13 @@ def issueEmailAlert(event, location):
fromaddress = settings.ALERT_EMAIL_FROM
toaddresses = settings.ALERT_EMAIL_TO
bccaddresses = settings.ALERT_EMAIL_BCC
# Branson debugging.
# toaddresses = []
# bccaddress = []
atype = AnalysisType.objects.filter(code=event.analysisType)[0]
triggers = atype.trigger_set.filter(labels=None)
# Branson debugging.
# dfile=open("/home/branson/gracedbdev/gracedb/dfile.txt", mode="w");
for trigger in triggers:
for recip in trigger.contacts.all():
if not trigger.farThresh:
# toaddresses = settings.ALERT_EMAIL_TO
# bccaddresses = settings.ALERT_EMAIL_BCC
bccaddresses.append(recip.email)
else:
# Branson debugging.
# dfile.write("event.far = %f\n" % event.far);
if event.far and event.far < trigger.farThresh:
# toaddresses = settings.ALERT_EMAIL_TO
# bccaddresses = settings.ALERT_EMAIL_BCC
bccaddresses.append(recip.email)
# Branson debugging.
# dfile.close()
bccaddresses.append(recip.email)
subject = "[gracedb] %s event. ID: %s" % (event.get_analysisType_display(), event.graceid())
message = """
New Event
......
......@@ -19,7 +19,7 @@
<li id="nav-create"><a href="{% url create %}">Create</a></li>
<li id="nav-reports"><a href="{% url reports %}">Reports</a></li>
<li id="nav-feeds"><a href="{% url feeds %}">RSS</a></li>
<li id="nav-userprofile"><a href="{% url userprofile-home %}">Settings</a></li>
<li id="nav-userprofile"><a href="{% url userprofile-home %}">Options</a></li>
{% if ligouser %}<li id="nav-user">Authenticated as: {{ ligouser.name }}</li>{% endif %}
<ul>
{% endblock %}
......@@ -36,7 +36,7 @@ function changeTime(obj, label) {
<li id="nav-reports"><a href="{% url reports %}">Reports</a></li>
<li id="nav-feeds"><a href="{% url feeds %}">RSS</a></li>
<li id="nav-latest"><a href="{% url latest %}">Latest</a></li>
<li id="nav-userprofile"><a href="{% url userprofile-home %}">Settings</a></li>
<li id="nav-userprofile"><a href="{% url userprofile-home %}">Options</a></li>
{% if ligouser %}<li id="nav-user">Authenticated as: {{ ligouser.name }}</li>{% endif %}
</ul>
<center>
......
......@@ -26,7 +26,7 @@ You can read about using the service on the
<div class="text">
To receive email alerts when GraCEDb events are created, sign up
on the <a target="_blank" href="http://listserv.ligo.org/cgi-bin/mailman/listinfo/gracedb">gracedb mailing list</a> or set up your own alert under the
<a href="{% url userprofile-home %}">Settings</a> menu item.
<a href="{% url userprofile-home %}">Options</a> menu item.
</div>
{% endblock %}
{% extends "base.html" %}
{% block title %}Settings | Create {{ creating }}{% endblock %}
{% block title %}Options | Create {{ creating }}{% endblock %}
{% block heading %}Create {{ creating }}{% endblock %}
{% block pageid %}userprofile{% endblock %}
......
{% extends "base.html" %}
{% block title %}Settings | Notifications{% endblock %}
{% block title %}Options | Notifications{% endblock %}
{% block heading %}Notifications{% endblock %}
{% block pageid %}userprofile{% endblock %}
......
......@@ -17,7 +17,7 @@ urlpatterns = patterns('',
url (r'^$', 'gracedb.views.index', name="home"),
(r'^events/', include('gracedb.urls')),
(r'^api/', include('gracedb.urls_rest')),
(r'^settings/', include('userprofile.urls')),
(r'^options/', include('userprofile.urls')),
(r'^cli/create', 'gracedb.views.create'),
(r'^cli/ping', 'gracedb.views.ping'),
(r'^cli/log', 'gracedb.views.log'),
......
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