Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9290380c
Commit
9290380c
authored
Nov 09, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo: Fix handling of nil values on advanced section in admin screen
parent
a72e2f4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
app/assets/javascripts/geo_nodes.js
app/assets/javascripts/geo_nodes.js
+13
-2
No files found.
app/assets/javascripts/geo_nodes.js
View file @
9290380c
...
...
@@ -111,6 +111,8 @@ class GeoNodeStatus {
let
eventDate
=
notAvailable
;
let
cursorDate
=
notAvailable
;
let
lastEventSeen
=
notAvailable
;
let
lastCursorEvent
=
notAvailable
;
if
(
status
.
last_event_timestamp
!==
null
&&
status
.
last_event_timestamp
>
0
)
{
eventDate
=
gl
.
utils
.
formatDate
(
new
Date
(
status
.
last_event_timestamp
*
1000
));
...
...
@@ -120,8 +122,17 @@ class GeoNodeStatus {
cursorDate
=
gl
.
utils
.
formatDate
(
new
Date
(
status
.
cursor_last_event_timestamp
*
1000
));
}
this
.
$lastEventSeen
.
text
(
`
${
status
.
last_event_id
}
(
${
eventDate
}
)`
);
this
.
$lastCursorEvent
.
text
(
`
${
status
.
cursor_last_event_id
}
(
${
cursorDate
}
)`
);
if
(
status
.
last_event_id
!==
null
)
{
lastEventSeen
=
`
${
status
.
last_event_id
}
(
${
eventDate
}
)`
;
}
if
(
status
.
cursor_last_event_id
!==
null
)
{
lastCursorEvent
=
`
${
status
.
cursor_last_event_id
}
(
${
cursorDate
}
)`
;
}
this
.
$lastEventSeen
.
text
(
lastEventSeen
);
this
.
$lastCursorEvent
.
text
(
lastCursorEvent
);
if
(
status
.
health
===
'
Healthy
'
)
{
this
.
$health
.
text
(
''
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment