Skip to content
Snippets Groups Projects
Commit 6e0354b3 authored by Brian Moe's avatar Brian Moe
Browse files

Added IFAR chart to reports page.

parent a555d844
No related branches found
No related tags found
No related merge requests found
......@@ -4,15 +4,21 @@ from django.template import RequestContext
from django.shortcuts import render_to_response
from django.conf import settings
import os
def histo(request):
try:
table = open(settings.LATENCY_REPORT_WEB_PAGE_FILE_PATH, "r").read()
except IOError:
table = "No Data Available"
if os.access(settings.REPORT_IFAR_IMAGE, os.R_OK):
ifar = settings.REPORT_IFAR_URL
else:
ifar = None
return render_to_response(
'gracedb/histogram.html',
{'table': table},
{'table': table,
'ifar' : ifar,
},
context_instance=RequestContext(request))
......@@ -75,6 +75,10 @@ LATENCY_REPORT_DEST_DIR = "/home/gracedb/data/latency"
LATENCY_MAXIMUM_CHARTED = 1800
LATENCY_REPORT_WEB_PAGE_FILE_PATH = LATENCY_REPORT_DEST_DIR + "/latency.inc"
REPORT_CBC_IFAR_QUERY = "LowMass ER1 hasfar"
REPORT_IFAR_IMAGE = LATENCY_REPORT_DEST_DIR + "/ifar.png"
REPORT_IFAR_URL = "ifar.png"
# RSS Feed Defaults
FEED_MAX_RESULTS = 50
......
......@@ -60,10 +60,14 @@ GRACEDB_DATA_DIR = "/mnt/gracedb-web/data"
#GRACEDB_DATA_DIR = "/mnt/gracedb-web-temp/data"
# Latency histograms. Where they go and max latency to bin.
LATENCY_REPORT_DEST_DIR = "/home/bmoe/django/data/latency"
LATENCY_REPORT_DEST_DIR = "/home/bmoe/data/latency"
LATENCY_MAXIMUM_CHARTED = 1800
LATENCY_REPORT_WEB_PAGE_FILE_PATH = LATENCY_REPORT_DEST_DIR + "/latency.inc"
REPORT_CBC_IFAR_QUERY = "LowMass ER1 hasfar"
REPORT_IFAR_IMAGE = LATENCY_REPORT_DEST_DIR + "/ifar.png"
REPORT_IFAR_URL = "ifar.png"
# RSS Feed Defaults
FEED_MAX_RESULTS = 50
......
{% extends "base.html" %}
{% block title %}Reporting Latency{% endblock %}
{% block heading %}Reporting Latency{% endblock %}
{% block title %}Reports{% endblock %}
{% block heading %}Reports{% endblock %}
{% block pageid %}reports{% endblock %}
{% block content %}
<h3>Latency</h3>
{{ table|safe }}
<br/>
<h3>CBC IFAR</h3>
{% if ifar %}
<img src="{{ ifar }}">hai
{% else %}
No IFAR table.
{% endif %}
{% endblock %}
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