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

added blessed tags to settings, view, and event_detail

parent abf21a3c
No related branches found
No related tags found
No related merge requests found
...@@ -537,6 +537,7 @@ def view(request, graceid): ...@@ -537,6 +537,7 @@ def view(request, graceid):
context['nearby'] = [(event.gpstime - a.gpstime, event) context['nearby'] = [(event.gpstime - a.gpstime, event)
for event in a.neighbors()] for event in a.neighbors()]
context['skyalert_authorized'] = skyalert_authorized(request) context['skyalert_authorized'] = skyalert_authorized(request)
context['blessed_tags'] = settings.BLESSED_TAGS
return render_to_response( return render_to_response(
[ 'gracedb/event_detail_{0}.html'.format(a.analysisType), [ 'gracedb/event_detail_{0}.html'.format(a.analysisType),
'gracedb/event_detail.html'], 'gracedb/event_detail.html'],
......
...@@ -37,6 +37,15 @@ XMPP_ALERT_CHANNELS = [ ...@@ -37,6 +37,15 @@ XMPP_ALERT_CHANNELS = [
'test_grb', 'test_grb',
] ]
BLESSED_TAGS = [
'psd',
'sky_loc',
'strain',
'tfplots',
'sig_info',
'audio',
]
DATABASES = { DATABASES = {
'default' : { 'default' : {
'NAME' : 'gracedb', 'NAME' : 'gracedb',
......
...@@ -120,8 +120,10 @@ ...@@ -120,8 +120,10 @@
var panes = new Array(); var panes = new Array();
var titles = new Array(); var titles = new Array();
{% for tag in object.getAvailableTags %} {% for tag in object.getAvailableTags %}
{% if tag.name in blessed_tags %}
panes.push(dojo.byId("{{tag.name}}")); panes.push(dojo.byId("{{tag.name}}"));
titles.push("{{tag|tagUnicode}}"); titles.push("{{tag|tagUnicode}}");
{% endif %}
{% endfor %} {% endfor %}
for (var i = 0; i<panes.length; i++) { for (var i = 0; i<panes.length; i++) {
...@@ -143,10 +145,12 @@ ...@@ -143,10 +145,12 @@
// Now, deal with the silly figure containers. // Now, deal with the silly figure containers.
var figure_container_ids = new Array(); var figure_container_ids = new Array();
{% for tag in object.getAvailableTags %} {% for tag in object.getAvailableTags %}
{% if tag.name in blessed_tags %}
if (dojo.byId("{{tag.name}}_figure_container")) { if (dojo.byId("{{tag.name}}_figure_container")) {
console.log("detected figure container for {{tag.name}}"); console.log("detected figure container for {{tag.name}}");
figure_container_ids.push("{{tag.name}}_figure_container"); figure_container_ids.push("{{tag.name}}_figure_container");
} }
{% endif %}
{% endfor %} {% endfor %}
var figure_scrollpanes = new Array(); var figure_scrollpanes = new Array();
for (var i = 0; i<figure_container_ids.length; i++) { for (var i = 0; i<figure_container_ids.length; i++) {
...@@ -318,6 +322,7 @@ ...@@ -318,6 +322,7 @@
{# Loop over the available tags. #} {# Loop over the available tags. #}
{% if object.getAvailableTags %} {% if object.getAvailableTags %}
{% for tag in object.getAvailableTags %} {% for tag in object.getAvailableTags %}
{% if tag.name in blessed_tags %}
{# Create a div to hold the pane innerHTML for this tag #} {# Create a div to hold the pane innerHTML for this tag #}
<div id="{{tag.name}}"> <div id="{{tag.name}}">
...@@ -382,6 +387,7 @@ ...@@ -382,6 +387,7 @@
{% endif %} {% endif %}
</div> </div>
{% endif %} {# endif the tag is blessed #}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
......
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