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
08ca8dee
Commit
08ca8dee
authored
10 years ago
by
Branson Craig Stephens
Browse files
Options
Downloads
Patches
Plain Diff
Fixed time display in log messages to show seconds.
parent
9e7acff7
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_script.js
+13
-11
13 additions, 11 deletions
templates/gracedb/event_detail_script.js
with
13 additions
and
11 deletions
templates/gracedb/event_detail_script.js
+
13
−
11
View file @
08ca8dee
...
...
@@ -103,6 +103,8 @@ var getKeys = function(obj){
}
var
image_extensions
=
[
'
png
'
,
'
gif
'
,
'
jpg
'
];
var
TIME_DISP_FMT
=
'
MMM D, YYYY h:mm:ss A
'
;
//var TIME_DISP_FMT = 'LLL';
// A utility function to determine whether a log message has an image.
// This would not be necessary if we were using django template language
...
...
@@ -550,7 +552,7 @@ require([
// Convert the 'created' times to UTC.
logs
=
logs
.
map
(
function
(
obj
)
{
var
server_t
=
moment
.
tz
(
obj
.
created
,
'
America/Chicago
'
);
obj
.
created
=
server_t
.
clone
().
tz
(
'
UTC
'
).
format
(
'
LLL
'
);
obj
.
created
=
server_t
.
clone
().
tz
(
'
UTC
'
).
format
(
TIME_DISP_FMT
);
return
obj
;
});
...
...
@@ -581,11 +583,11 @@ require([
},
renderCell
:
function
(
object
,
value
,
node
,
options
)
{
var
server_t
=
moment
.
tz
(
object
.
created
,
'
America/Chicago
'
);
var
t
=
put
(
node
,
'
time[name="time-log"]
'
,
server_t
.
format
(
'
LLL
'
));
put
(
t
,
'
[utc="$"]
'
,
server_t
.
clone
().
tz
(
'
UTC
'
).
format
(
'
LLL
'
));
put
(
t
,
'
[llo="$"]
'
,
server_t
.
format
(
'
LLL
'
));
put
(
t
,
'
[lho="$"]
'
,
server_t
.
clone
().
tz
(
'
America/Los_Angeles
'
).
format
(
'
LLL
'
));
put
(
t
,
'
[virgo="$"]
'
,
server_t
.
clone
().
tz
(
'
Europe/Rome
'
).
format
(
'
LLL
'
));
var
t
=
put
(
node
,
'
time[name="time-log"]
'
,
server_t
.
format
(
TIME_DISP_FMT
));
put
(
t
,
'
[utc="$"]
'
,
server_t
.
clone
().
tz
(
'
UTC
'
).
format
(
TIME_DISP_FMT
));
put
(
t
,
'
[llo="$"]
'
,
server_t
.
format
(
TIME_DISP_FMT
));
put
(
t
,
'
[lho="$"]
'
,
server_t
.
clone
().
tz
(
'
America/Los_Angeles
'
).
format
(
TIME_DISP_FMT
));
put
(
t
,
'
[virgo="$"]
'
,
server_t
.
clone
().
tz
(
'
Europe/Rome
'
).
format
(
TIME_DISP_FMT
));
return
t
;
}
},
...
...
@@ -694,11 +696,11 @@ require([
},
renderCell
:
function
(
object
,
value
,
node
,
options
)
{
var
server_t
=
moment
.
tz
(
object
.
created
,
'
America/Chicago
'
);
var
t
=
put
(
node
,
'
time[name="time-audit-log"]
'
,
server_t
.
format
(
'
LLL
'
));
put
(
t
,
'
[utc="$"]
'
,
server_t
.
clone
().
tz
(
'
UTC
'
).
format
(
'
LLL
'
));
put
(
t
,
'
[llo="$"]
'
,
server_t
.
format
(
'
LLL
'
));
put
(
t
,
'
[lho="$"]
'
,
server_t
.
clone
().
tz
(
'
America/Los_Angeles
'
).
format
(
'
LLL
'
));
put
(
t
,
'
[virgo="$"]
'
,
server_t
.
clone
().
tz
(
'
Europe/Rome
'
).
format
(
'
LLL
'
));
var
t
=
put
(
node
,
'
time[name="time-audit-log"]
'
,
server_t
.
format
(
TIME_DISP_FMT
));
put
(
t
,
'
[utc="$"]
'
,
server_t
.
clone
().
tz
(
'
UTC
'
).
format
(
TIME_DISP_FMT
));
put
(
t
,
'
[llo="$"]
'
,
server_t
.
format
(
TIME_DISP_FMT
));
put
(
t
,
'
[lho="$"]
'
,
server_t
.
clone
().
tz
(
'
America/Los_Angeles
'
).
format
(
TIME_DISP_FMT
));
put
(
t
,
'
[virgo="$"]
'
,
server_t
.
clone
().
tz
(
'
Europe/Rome
'
).
format
(
TIME_DISP_FMT
));
return
t
;
}
},
...
...
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