diff --git a/config/settings/base.py b/config/settings/base.py index d03831a5fb5a62081a611aece2cdf04e5c4f2f64..c49bc46a9b98b441058639283513bbf65bc560fd 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -30,7 +30,7 @@ INFO_BANNER_ENABLED = False INFO_BANNER_MESSAGE = "TEST MESSAGE" # Version --------------------------------------------------------------------- -PROJECT_VERSION = '2.12.0' +PROJECT_VERSION = '2.12.1' # Unauthenticated access ------------------------------------------------------ # This variable should eventually control whether unauthenticated access is @@ -643,9 +643,13 @@ ENABLED = {True: "enabled", False: "disabled"} INSTANCE_STUB = """ <li>Phone alerts (calls/SMS) are {0}</li> <li>Email alerts are {1}</li> -<li>LVAlert messages to <span class="text-monospace">{2}</span> are {3}</li> +<li><span class="text-monospace">LVAlert</span> messages to <span class="text-monospace">{2}</span> are {3}</li> """ +if (len(LVALERT_OVERSEER_INSTANCES) == 2): + INSTANCE_STUB = INSTANCE_STUB + \ + '<li><span class="text-monospace">igwn-alert</span> messages to <span class="text-monospace">{4}</span> are {5}</li>' + # Upgrading to django 3.2 produces warning: "Auto-created primary key used # when not defining a primary key type, by default 'django.db.models.AutoField'. DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' diff --git a/config/settings/container/dev.py b/config/settings/container/dev.py index 080cec395c3a5f1b802c99f601e5afdd5bdd49e9..7a6f87072cf9da42ba951a1912d6ceaf5bd6f183 100644 --- a/config/settings/container/dev.py +++ b/config/settings/container/dev.py @@ -90,7 +90,18 @@ INSTANCE_TITLE = 'GraceDB Development VM' INSTANCE_LIST = INSTANCE_STUB.format(ENABLED[SEND_PHONE_ALERTS], ENABLED[SEND_EMAIL_ALERTS], LVALERT_OVERSEER_INSTANCES[0]['lvalert_server'], + ENABLED[SEND_XMPP_ALERTS], + LVALERT_OVERSEER_INSTANCES[1]['lvalert_server'], ENABLED[SEND_XMPP_ALERTS]) + +# Add sub-bullet with igwn-alert group: +if (len(LVALERT_OVERSEER_INSTANCES) == 2): + igwn_alert_group = os.environ.get('IGWN_ALERT_GROUP', 'lvalert-dev') + group_sub_bullet = """<ul> + <li> Messages are sent to group: <span class="text-monospace"> {0} </span></li> + </ul>""".format(igwn_alert_group) + INSTANCE_LIST = INSTANCE_LIST + group_sub_bullet + INSTANCE_TITLE = 'GraceDB Development Server' INSTANCE_INFO = """ <h5>Development Instance</h5> diff --git a/config/settings/container/playground.py b/config/settings/container/playground.py index 3494ac527b8b27d04686188fa92ed85b6b0c4612..23c2206c270ff87ab5262530ac89b1ff7215a47d 100644 --- a/config/settings/container/playground.py +++ b/config/settings/container/playground.py @@ -41,7 +41,18 @@ INSTANCE_TITLE = 'GraceDB Playground' INSTANCE_LIST = INSTANCE_STUB.format(ENABLED[SEND_PHONE_ALERTS], ENABLED[SEND_EMAIL_ALERTS], LVALERT_OVERSEER_INSTANCES[0]['lvalert_server'], + ENABLED[SEND_XMPP_ALERTS], + LVALERT_OVERSEER_INSTANCES[1]['lvalert_server'], ENABLED[SEND_XMPP_ALERTS]) + +# Add sub-bullet with igwn-alert group: +if (len(LVALERT_OVERSEER_INSTANCES) == 2): + igwn_alert_group = os.environ.get('IGWN_ALERT_GROUP', 'lvalert-dev') + group_sub_bullet = """<ul> + <li> Messages are sent to group: <span class="text-monospace"> {0} </span></li> + </ul>""".format(igwn_alert_group) + INSTANCE_LIST = INSTANCE_LIST + group_sub_bullet + INSTANCE_INFO = """ <h5>Playground instance</h5> <hr> diff --git a/config/settings/container/test.py b/config/settings/container/test.py index e81ff3c63d38604e5de9cb67a8105864927fd51e..20d38d1737b806e50e2acbf1a12c66f0696727a1 100644 --- a/config/settings/container/test.py +++ b/config/settings/container/test.py @@ -90,7 +90,18 @@ INSTANCE_TITLE = 'GraceDB Testing Server' INSTANCE_LIST = INSTANCE_STUB.format(ENABLED[SEND_PHONE_ALERTS], ENABLED[SEND_EMAIL_ALERTS], LVALERT_OVERSEER_INSTANCES[0]['lvalert_server'], + ENABLED[SEND_XMPP_ALERTS], + LVALERT_OVERSEER_INSTANCES[1]['lvalert_server'], ENABLED[SEND_XMPP_ALERTS]) + +# Add sub-bullet with igwn-alert group: +if (len(LVALERT_OVERSEER_INSTANCES) == 2): + igwn_alert_group = os.environ.get('IGWN_ALERT_GROUP', 'lvalert-dev') + group_sub_bullet = """<ul> + <li> Messages are sent to group: <span class="text-monospace"> {0} </span></li> + </ul>""".format(igwn_alert_group) + INSTANCE_LIST = INSTANCE_LIST + group_sub_bullet + INSTANCE_INFO = """ <h5>Testing Instance</h5> <hr> diff --git a/config/settings/vm/dev.py b/config/settings/vm/dev.py index 6c5a25c819d0d16946d89e2145e3acac7742eb91..41484aae9be52ead6518fb7f39e9f8d62b4f0fd8 100644 --- a/config/settings/vm/dev.py +++ b/config/settings/vm/dev.py @@ -4,10 +4,11 @@ import socket from .base import * -CONFIG_NAME = "TEST" +CONFIG_NAME = "DEV" # Debug settings DEBUG = True +SEND_XMPP_ALERTS=True # Override EMBB email address # TP (8 Aug 2017): not sure why? @@ -52,7 +53,19 @@ INSTANCE_TITLE = 'GraceDB Development VM' INSTANCE_LIST = INSTANCE_STUB.format(ENABLED[SEND_PHONE_ALERTS], ENABLED[SEND_EMAIL_ALERTS], LVALERT_OVERSEER_INSTANCES[0]['lvalert_server'], + ENABLED[SEND_XMPP_ALERTS], + LVALERT_OVERSEER_INSTANCES[1]['lvalert_server'], ENABLED[SEND_XMPP_ALERTS]) + +# Add sub-bullet with igwn-alert group: +if (len(LVALERT_OVERSEER_INSTANCES) == 2): + igwn_alert_group = os.environ.get('IGWN_ALERT_GROUP', 'lvalert-dev') + group_sub_bullet = """<ul> + <li> Messages are sent to group: <span class="text-monospace"> {0} </span></li> + </ul>""".format(igwn_alert_group) + +INSTANCE_LIST = INSTANCE_LIST + group_sub_bullet + INSTANCE_INFO = """ <h5>Development Instance</h5> <hr>