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
7678c132
Commit
7678c132
authored
11 years ago
by
Branson Stephens
Browse files
Options
Downloads
Patches
Plain Diff
cleaned up event detail template and fixed degradation properties
parent
192f5c5c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gracedb/event_detail.html
+53
-42
53 additions, 42 deletions
templates/gracedb/event_detail.html
with
53 additions
and
42 deletions
templates/gracedb/event_detail.html
+
53
−
42
View file @
7678c132
...
...
@@ -3,7 +3,6 @@
{% load scientific %}
{% load sanitize_html %}
{% load logtags %}
{% block title %}View {{ object.graceid }}{% endblock %}
{% block heading %}{% endblock %}
{% block bodyattrs %}class="tundra eventDetail"{% endblock %}
...
...
@@ -48,7 +47,9 @@
var
editor_div
=
dom
.
byId
(
"
editor
"
);
var
preview_div
=
dom
.
byId
(
"
previewer
"
);
// Branson messing around.
// A pane holder for the form that will tag new log messages.
// I need it up here because we're going to integrate it with the
// editor components.
var
newLogTag_pane_holder
=
dom
.
byId
(
"
newLogTag_pane_holder
"
);
dojo
.
style
(
preview_div
,
{
'
display
'
:
'
none
'
});
...
...
@@ -121,32 +122,15 @@
}
});
// Branson: set up infrastructure for tagging log messages.
{
%
if
blessed_tags
%
}
var
blessedTagStore
=
new
Memory
({
data
:
[
{
%
for
bt
in
blessed_tags
%
}
{
name
:
"
{{bt}}
"
},
{
%
endfor
%
}
]
});
// Branson messing around.
var
tagbox
=
new
ComboBox
({
id
:
"
newTagSelect
"
,
name
:
"
newTagSelect
"
,
value
:
"
insert tag here
"
,
store
:
blessedTagStore
,
searchAttr
:
"
name
"
},
"
newTagSelect
"
);
var
editor
=
new
Editor
({
extraPlugins
:
[
'
foreColor
'
,
'
hiliteColor
'
,
'
|
'
,
'
createLink
'
,
'
insertImage
'
,
'
fullscreen
'
,
'
viewsource
'
,
'
newpage
'
,
'
|
'
,
previewbutton
,
savebutton
]
},
editor_div
);
// Branson: Working on TitlePanes here.
{
%
if
object
.
getAvailableTags
%
}
// If we have blessed tags *and* some log messages have been tagged,
// we will want some TitlePanes.
{
%
if
blessed_tags
and
object
.
getAvailableTags
%
}
var
pane_holder
=
dom
.
byId
(
"
pane_holder
"
);
var
panes
=
new
Array
();
var
titles
=
new
Array
();
...
...
@@ -189,22 +173,21 @@
style
:
"
overflow:hidden;
"
},
figure_container_ids
[
i
]));
}
{
%
endif
%
}
// Form for tagging log messages.
var
cb
=
new
ComboBox
({
id
:
"
existingTagSelect
"
,
name
:
"
existingTagSelect
"
,
value
:
"
None
"
,
store
:
blessedTagStore
,
searchAttr
:
"
name
"
},
"
existingTagSelect
"
);
{
%
endif
%
}
{
#
Endif
for
getAvailableTags
and
blessed_tags
#
}
// Set up infrastructure for tagging log messages.
{
%
if
blessed_tags
%
}
var
blessedTagStore
=
new
Memory
({
data
:
[
{
%
for
bt
in
blessed_tags
%
}
{
name
:
"
{{bt}}
"
},
{
%
endfor
%
}
]
});
{
%
endif
%
}
//
Work on p
anes for the tagging forms
here
.
//
P
anes for the tagging forms.
var
newLogTag
=
dom
.
byId
(
"
newLogTag
"
);
//var newLogTag_pane_hoder = dom.byId("newLogTag_pane_holder");
var
existingLogTag
=
dom
.
byId
(
"
existingLogTag
"
);
var
existingLogTag_pane_holder
=
dom
.
byId
(
"
existingLogTag_pane_holder
"
);
...
...
@@ -220,8 +203,29 @@
existingLogTag_pane_holder
.
appendChild
(
tp_existing
.
domNode
);
dojo
.
destroy
(
existingLogTag
);
var
form
=
dom
.
byId
(
'
tagForm
'
);
// Form for tagging new log messages.
var
cb1
=
new
ComboBox
({
id
:
"
newTagSelect
"
,
name
:
"
newTagSelect
"
,
value
:
"
insert tag here
"
,
{
%
if
blessed_tags
%
}
store
:
blessedTagStore
,
searchAttr
:
"
name
"
{
%
endif
%
}
},
"
newTagSelect
"
);
// Form for tagging existing log messages.
var
cb2
=
new
ComboBox
({
id
:
"
existingTagSelect
"
,
name
:
"
existingTagSelect
"
,
value
:
"
None
"
,
{
%
if
blessed_tags
%
}
store
:
blessedTagStore
,
searchAttr
:
"
name
"
{
%
endif
%
}
},
"
existingTagSelect
"
);
var
form
=
dom
.
byId
(
'
existingTagForm
'
);
on
(
form
,
"
submit
"
,
function
(
evt
){
evt
.
stopPropagation
();
evt
.
preventDefault
();
...
...
@@ -243,11 +247,8 @@
},
function
(
error
){
alert
(
error
);}
);
});
{
%
endif
%
}
});
</script>
...
...
@@ -424,7 +425,7 @@
{# A section for the images #}
{% if object|logsForTagHaveImage:tag.name %}
<!--
XXX in case there are a lot of figures, you should put the
figure container table inside a scrolling div
or something
-->
<!-- figure container table
is
inside a scrolling div -->
<div
id=
"{{tag.name}}_figure_container"
>
<table
class=
"figure_container"
>
<tr>
...
...
@@ -498,20 +499,30 @@
<div
id=
"event_log"
>
{# XXX Hacky. We don't want the title here if we're doing panes. #}
{# And we only do panes if there are available tags. #}
{% if not object.getAvailableTags %}
<h3
id=
"logmessagetitle"
>
Event Log Messages
</h3>
<div
id=
"newLogTag"
>
<p>
Use this form to apply a tag to your new log entry. Choose a tag
name from the dropdown menu or enter a new one. If you are
creating a new tag, please also provide a display name.
</p>
<form>
Tag name
<input
id=
"newTagSelect"
name=
"newTagSelect"
/>
Display name
<input
type=
"text"
id=
"newTagDispName"
name=
"newTagDispName"
/>
</form>
</div>
<div
id=
"newLogTag_pane_holder"
class=
"pmTitlePaneClass"
></div>
<div
id=
"previewer"
></div>
<div
id=
"editor"
></div>
{% endif %}
{% if object.eventlog_set.count %}
<!-- Branson. Here's where you should put the new form. -->
{% if blessed_tags %}
<div
id=
"existingLogTag"
>
<p>
Use this form to tag an existing log message. Choose a tag name from the
dropdown menu or enter a new one. If you are creating a new tag, please
also provide a display name.
<form
id=
"
t
agForm"
>
<form
id=
"
existingT
agForm"
>
Log No.
<input
id=
"n"
name=
"n"
type=
"text"
size=
"4"
/>
Tag name
<input
id=
"existingTagSelect"
name=
"existingTagSelect"
/>
Display name
<input
type=
"text"
id=
"existingTagDispName"
name=
"existingTagDispName"
/>
...
...
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