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 Coughlin
GraceDB Server
Commits
55c842b3
Commit
55c842b3
authored
12 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
Cleaned up latest page presentation.
parent
a847b6d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gracedb/views.py
+1
-1
1 addition, 1 deletion
gracedb/views.py
templates/gracedb/latest.html
+55
-34
55 additions, 34 deletions
templates/gracedb/latest.html
with
56 additions
and
35 deletions
gracedb/views.py
+
1
−
1
View file @
55c842b3
...
...
@@ -935,7 +935,7 @@ def latest(request):
if
form
.
is_valid
():
query
=
form
.
cleaned_data
[
'
query
'
]
context
[
'
objects
'
]
=
Event
.
objects
.
filter
(
query
).
distinct
().
order_by
(
"
-created
"
)[:
1
0
]
context
[
'
objects
'
]
=
Event
.
objects
.
filter
(
query
).
distinct
().
order_by
(
"
-created
"
)[:
1
5
]
context
[
'
error
'
]
=
False
else
:
context
[
'
error
'
]
=
True
...
...
This diff is collapsed.
Click to expand it.
templates/gracedb/latest.html
+
55
−
34
View file @
55c842b3
...
...
@@ -97,45 +97,66 @@
</form>
{% if objects %}
<hr/>
{% for item in objects %}
<div
class=
"summary"
>
<div
class=
"graceid"
>
<a
href=
"{% url view item.graceid %}"
>
{{ item.graceid }}
</a>
|
{{item.group}}
{{item.get_analysisType_display}}
</div>
{% for log in item.eventlog_set.iterator %}
<table
class=
"event"
>
{% if skyalert_authorized %}
<tr><td
colspan=
"4"
>
<a
href=
"{% url skyalert object.graceid %}"
><button
type=
"button"
>
Submit to Skyalert
</button></a>
</td></tr>
{% endif %}
<tr>
<th
valign=
"top"
>
UID
</th>
<th>
Labels
</th>
<th>
Group
</th>
<th>
Type
</th>
<th>
Instruments
</th>
<th>
{{ "gps"|timeselect:"gps" }}
Event Time
</th>
<th>
FAR (Hz)
</th>
<th>
Latency (sec)
</th>
<th>
{{"created"|timeselect:"utc" }}
Created
</th>
<th></th>
</tr>
{% for object in objects %}
<tr
class=
{%
cycle
'
odd
'
'
even
'
%}
>
<td>
{{ object.graceid }}
</td>
<td>
{% for labelling in object.labelling_set.all %}
<span
title=
"{{labelling.creator.name}} {{labelling.created|utc}}"
style=
"color: {{labelling.label.defaultColor}}"
>
{{ labelling.label.name }}
</span>
{% endfor %}
</td>
<td>
{{ object.group.name }}
</td>
<td>
{{ object.get_analysisType_display }}
</td>
<td>
{{ object.instruments }}
</td>
<td>
{% if object.gpstime%}
<!-- <span title="{{ object.gpstime|gpsdate }}">{{ object.gpstime }}</span> -->
{{ object.gpstime|multiTime:"gps" }}
{% endif %}
</td>
<td>
{{ object.far|scientific }}
</td>
<td
style=
"text-align:center"
>
{{ object.reportingLatency }}
</td>
<td>
{{ object.created|multiTime:"created" }}
</td>
<td>
{% for log in object.eventlog_set.iterator %}
{% if log.hasImage %}
<div
class=
"skymap"
>
<a
href=
"{{ log.fileurl }}"
dojoType=
"dojox.image.LightboxNano"
><img
height=
"
13
0"
src=
"{{ log.fileurl }}"
></a>
<a
href=
"{{ log.fileurl }}"
dojoType=
"dojox.image.LightboxNano"
><img
height=
"
5
0"
src=
"{{ log.fileurl }}"
></a>
</div>
{% endif %}
{% endfor %}
</td>
</tr>
<div
class=
"labels"
>
{% for labelling in item.labelling_set.all %}
<span
class=
"label"
title=
"{{labelling.creator.name}} {{labelling.created|utc}}"
style=
"color: {{labelling.label.defaultColor}}"
>
{{ labelling.label.name }}
</span>
{% endfor %}
</div>
<table>
<tr><th>
FAR:
</th>
<td>
{{ item.far|scientific }} {% if item.far %}Hz{% endif %}
</td></tr>
<tr><th>
Event Time:
</th>
<td>
{{ item.gpstime }}
</td></tr>
<tr><th>
Latency:
</th>
<td>
{{ item.reportingLatency }} {% if item.reportingLatency %}seconds{% endif %}
</td></tr>
<tr><th>
IFOS:
</th>
<td>
{{ item.instruments }}
</td></tr>
<tr><th>
Created:
</th>
<td>
{{ item.created|utc }}
</td></tr>
</table>
</div>
<!-- class summary -->
{% endfor %}
{% endif %}
{% endfor %}
</table>
{% else %}
<!-- !objects -->
<h1>
No events.
</h1>
{% endif %}
<!-- if objects -->
{% 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