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
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
28463976
Commit
28463976
authored
12 years ago
by
Brian Moe
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git+ssh://draco.phys.uwm.edu/home/bmoe/gracedb
parents
f61109a9
342852e8
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
+25
-5
25 additions, 5 deletions
gracedb/views.py
templates/gracedb/query.html
+1
-1
1 addition, 1 deletion
templates/gracedb/query.html
with
26 additions
and
6 deletions
gracedb/views.py
+
25
−
5
View file @
28463976
...
...
@@ -592,12 +592,32 @@ def search(request, format=""):
elif
format
==
"
jqgrid
"
:
return
jqgridResponse
(
request
,
objects
)
elif
'
ligolw
'
in
request
.
POST
:
response
=
HttpResponse
(
mimetype
=
'
application/javascript
'
)
response
=
HttpResponse
(
mimetype
=
'
text/plain
'
)
msg
=
'
oh hai
'
response
[
'
Content-length
'
]
=
len
(
msg
)
response
.
write
(
msg
)
if
objects
.
count
()
>
1000
:
# XXX Make this -- Better.
return
HttpResponse
(
"
No more than 1000 events currently allowed.
"
)
from
glue.ligolw
import
ligolw
# lsctables MUST be loaded before utils.
from
glue.ligolw
import
lsctables
from
glue.ligolw
import
utils
from
glue.ligolw.utils
import
ligolw_add
from
settings
import
GRACEDB_DATA_DIR
xmldoc
=
ligolw
.
Document
()
for
obj
in
objects
:
fname
=
os
.
path
.
join
(
GRACEDB_DATA_DIR
,
obj
.
graceid
(),
"
private
"
,
"
coinc.xml
"
)
utils
.
load_filename
(
fname
,
xmldoc
=
xmldoc
)
ligolw_add
.
reassign_ids
(
xmldoc
)
ligolw_add
.
merge_ligolws
(
xmldoc
)
ligolw_add
.
merge_compatible_tables
(
xmldoc
)
response
=
HttpResponse
(
mimetype
=
'
application/xml
'
)
response
[
'
Content-Disposition
'
]
=
'
attachment; filename=gracedb-query.xml
'
utils
.
write_fileobj
(
xmldoc
,
response
)
return
response
else
:
#objects = objects[:limit]
#if objects.count() >= limit:
...
...
This diff is collapsed.
Click to expand it.
templates/gracedb/query.html
+
1
−
1
View file @
28463976
...
...
@@ -31,7 +31,7 @@ onload="document.search_form.query.focus();"
</tr>
<tr><td/><td>
{% include "gracedb/query_help_frag.html" %}
</td></tr>
</table>
<input
type=
"Submit"
name=
"
S
ubmit"
value=
"
s
ubmit"
/>
<input
type=
"Submit"
name=
"
s
ubmit"
value=
"
S
ubmit"
/>
<input
type=
"Submit"
name=
"ligolw"
value=
"LigoLW"
/>
</form>
...
...
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