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

Add playground instance changes into master

The settings for gracedb-playground are no longer on a separate
branch and are just included in master. They can be selected
simply by settings the DJANGO_SETTINGS_MODULE environment variable
appropriately.  This should be much easier to maintain than a
completely separate branch.
parent 31c686d3
No related branches found
No related tags found
No related merge requests found
Pipeline #47431 passed
# Settings for a playground GraceDB instance (for user testing) running
# on a VM with Puppet provisioning. Starts with vm.py settings (which inherits
# from base.py settings) and overrides or adds to them.
import textwrap
from .base import *
CONFIG_NAME = "USER TESTING"
# Debug settings
DEBUG = False
# Override EMBB email address
# TP (8 Aug 2017): not sure why?
EMBB_MAIL_ADDRESS = 'gracedb@{fqdn}'.format(fqdn=SERVER_FQDN)
# Turn on XMPP alerts
SEND_XMPP_ALERTS = True
# Enforce that phone and email alerts are off
SEND_PHONE_ALERTS = False
SEND_EMAIL_ALERTS = False
# Define correct LVAlert settings
LVALERT_OVERSEER_INSTANCES = [
{
"lvalert_server": "lvalert-playground.cgca.uwm.edu",
"listen_port": 8001,
},
]
# Add testserver to ALLOWED_HOSTS
ALLOWED_HOSTS += ['testserver']
# Home page stuff
INSTANCE_TITLE = 'GraceDB Playground'
INSTANCE_INFO = """
<p>
This GraceDB instance is designed for users to develop and test their own
applications. It mimics the production instance in all but the following ways:
</p>
<ul>
<li>Phone and e-mail alerts are turned off</li>
<li>Only LIGO logins are provided (no login via InCommon or Google)</li>
<li>LVAlert messages are sent to lvalert-playground.cgca.uwm.edu</li>
<li>Events and associated data will <b>not</b> be preserved indefinitely.
A nightly cron job removes events older than 14 days.</li>
<li><b>Note:</b> for O3 development, the above number has been updated to
<b>112</b>.</li>
</ul>
"""
from django.conf import settings
def LigoDebugContext(request):
if settings.DEBUG and hasattr(settings, 'CONFIG_NAME'):
if hasattr(settings, 'CONFIG_NAME'):
return { 'config_name': settings.CONFIG_NAME }
return {}
......@@ -131,6 +131,12 @@ def index(request):
except Exception, e:
pass
context['recent_events'] = recent_events
# Main heading
context['title'] = getattr(settings, 'INSTANCE_TITLE', None)
# Informational text
context['information'] = getattr(settings, 'INSTANCE_INFO', None)
return render(request, 'gracedb/index.html', context=context)
......
......@@ -67,26 +67,28 @@ body {
<!-- I find myself needing some more space. -->
<!-- <br/> -->
<h2>GraceDB Overview</h2>
<h2>
{% if title %}
{{ title }}
{% else %}
GraceDB Overview
{% endif %}
</h2>
<div class="text">
<p> The gravitational-wave candidate event database (GraceDB) is a
prototype system to organize candidate events from gravitational-wave
searches and to provide an environment to record information about
follow-ups. </p>
<ul>
<!-- <li><a href="https://www.lsc-group.phys.uwm.edu/daswg/wiki/GraceDBER6">Recent changes</a> <font color="red">(IMPORTANT!) </font></li> -->
<!-- <li><a href="https://gw-astronomy.org/wiki/LV_EM/ElectroMagneticBulletinBoard">Prototype EMBB description</a></li> -->
<li><a href="https://wiki.ligo.org/Computing/GraceDB">Project page on wiki.ligo.org</a></li>
<li><a href="{% url "legacy_apiweb:default:root" %}">Browseable REST API</a>
<li><a href="https://gw-astronomy.org/wiki/LV_EM/TechInfo">LV-EM Technical Info</a></li>
<li><a href="https://dcc.ligo.org/G1501296">Tutorial for operators and detector engineers</a></li>
</ul>
{# Can customize main informational display on home page or just use default #}
{% if information %}
{{ information|safe }}
{% else %}
<p>The gravitational-wave candidate event database (GraceDB) is a prototype system to organize candidate events from gravitational-wave searches and to provide an environment to record information about follow-ups.</p>
<ul>
<li><a href="https://wiki.ligo.org/Computing/GraceDB">Project page on wiki.ligo.org</a></li>
<li><a href="{% url "legacy_apiweb:default:root" %}">Browseable REST API</a>
<li><a href="https://gw-astronomy.org/wiki/LV_EM/TechInfo">LV-EM Technical Info</a></li>
<li><a href="https://dcc.ligo.org/G1501296">Tutorial for operators and detector engineers</a></li>
</ul>
{% endif %}
</div>
<!--XXX Infrastructure for human signoffs. Hopefully this will not be permanent. -->
......
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