Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael William Coughlin
GraceDB Server
Commits
b47aa4c6
Commit
b47aa4c6
authored
12 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
Added uptime reporting.
parent
72fe3428
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
gracedb/reports.py
+11
-1
11 additions, 1 deletion
gracedb/reports.py
settings/default.py
+2
-0
2 additions, 0 deletions
settings/default.py
settings/development.py
+5
-0
5 additions, 0 deletions
settings/development.py
templates/gracedb/histogram.html
+44
-3
44 additions, 3 deletions
templates/gracedb/histogram.html
with
62 additions
and
4 deletions
gracedb/reports.py
+
11
−
1
View file @
b47aa4c6
...
...
@@ -7,10 +7,12 @@ from django.conf import settings
import
os
def
histo
(
request
):
# Latency table.
try
:
table
=
open
(
settings
.
LATENCY_REPORT_WEB_PAGE_FILE_PATH
,
"
r
"
).
read
()
except
IOError
:
table
=
"
No
Data Available
"
table
=
No
ne
# IFAR tables.
...
...
@@ -22,10 +24,18 @@ def histo(request):
if
os
.
access
(
fname
,
os
.
R_OK
):
ifar
.
append
(
name
)
# Uptime table.
try
:
uptime
=
open
(
settings
.
UPTIME_REPORT_DIR
+
"
/ytd.html
"
,
"
r
"
).
read
()
except
IOError
:
uptime
=
None
return
render_to_response
(
'
gracedb/histogram.html
'
,
{
'
table
'
:
table
,
'
ifar
'
:
ifar
,
'
uptime
'
:
uptime
,
},
context_instance
=
RequestContext
(
request
))
This diff is collapsed.
Click to expand it.
settings/default.py
+
2
−
0
View file @
b47aa4c6
...
...
@@ -60,6 +60,8 @@ LATENCY_REPORT_DEST_DIR = "/home/gracedb/data/latency"
LATENCY_MAXIMUM_CHARTED
=
1800
LATENCY_REPORT_WEB_PAGE_FILE_PATH
=
LATENCY_REPORT_DEST_DIR
+
"
/latency.inc
"
# Uptime reporting
UPTIME_REPORT_DIR
=
"
/home/gracedb/data/uptime
"
# Find another way to do this.
...
...
This diff is collapsed.
Click to expand it.
settings/development.py
+
5
−
0
View file @
b47aa4c6
...
...
@@ -29,6 +29,11 @@ SKYALERT_IVORN_PATTERN = "ivo://ligo.org/gracedb#%s-dev"
# Latency histograms. Where they go and max latency to bin.
LATENCY_REPORT_DEST_DIR
=
"
/home/bmoe/data/latency
"
LATENCY_REPORT_WEB_PAGE_FILE_PATH
=
LATENCY_REPORT_DEST_DIR
+
"
/latency.inc
"
# Uptime reporting
UPTIME_REPORT_DIR
=
"
/home/bmoe/data/uptime
"
SITE_ID
=
4
...
...
This diff is collapsed.
Click to expand it.
templates/gracedb/histogram.html
+
44
−
3
View file @
b47aa4c6
...
...
@@ -4,14 +4,39 @@
{% block heading %}Reports{% endblock %}
{% block pageid %}reports{% endblock %}
{% block jscript %}
<script
type=
"text/javascript"
>
function
toggle
(
id
)
{
var
div
=
document
.
getElementById
(
id
);
if
(
div
.
style
.
display
==
"
block
"
)
{
div
.
style
.
display
=
"
none
"
;
}
else
{
div
.
style
.
display
=
"
block
"
;
}
}
</script>
{% endblock %}
{% block content %}
<br/>
<a
name=
"latency"
></a><h3>
Latency
</h3>
{{ table|safe }}
<a
name=
"latency"
href=
"javascript:toggle('latency');"
><h3>
Latency
</h3></a>
<div
id=
"latency"
style=
"display:none;"
>
{% if table %}
{{ table|safe }}
{% else %}
No Latency data.
{% endif %}
</div>
<br/>
<br/>
<a
name=
"ifar"
></a><h3>
CBC IFAR
</h3>
<a
name=
"ifar"
href=
"javascript:toggle('ifar');"
><h3>
CBC IFAR
</h3></a>
<div
id=
"ifar"
style=
"display:none;"
>
{% if ifar %}
{% for chart in ifar %}
<img
src=
"{{ chart }}"
><br/>
...
...
@@ -19,5 +44,21 @@
{% else %}
No IFAR charts.
{% endif %}
</div>
<br/>
<br/>
<a
name=
"uptime"
href=
"javascript:toggle('uptime');"
><h3>
Gracedb Uptime
</h3></a>
<div
id=
"uptime"
style=
"display: none;"
>
{% if uptime %}
{{ uptime|safe }}
{% else %}
No uptime charts.
{% endif %}
</div>
{% endblock %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment