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
5462dcc4
Commit
5462dcc4
authored
Dec 07, 2017
by
Douglas Barbosa Alexandre
Committed by
Kushal Pandya
Dec 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show a warning if secondary node revision is not the same of primary
parent
eb880edb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
app/assets/javascripts/geo_nodes.js
app/assets/javascripts/geo_nodes.js
+6
-5
app/views/admin/geo_nodes/index.html.haml
app/views/admin/geo_nodes/index.html.haml
+2
-2
No files found.
app/assets/javascripts/geo_nodes.js
View file @
5462dcc4
...
...
@@ -13,7 +13,7 @@ const healthyIcon = 'fa-check';
const
unhealthyIcon
=
'
fa-times
'
;
const
unknownIcon
=
'
fa-times
'
;
const
notAvailable
=
'
Not Available
'
;
const
versionMismatch
=
'
d
oes not match the primary node version
'
;
const
versionMismatch
=
'
D
oes not match the primary node version
'
;
const
versionMismatchClass
=
'
geo-node-version-mismatch
'
;
class
GeoNodeStatus
{
...
...
@@ -23,7 +23,6 @@ class GeoNodeStatus {
this
.
$loadingIcon
=
$
(
'
.js-geo-node-loading
'
,
this
.
$el
);
this
.
$dbReplicationLag
=
$
(
'
.js-db-replication-lag
'
,
this
.
$status
);
this
.
$healthStatus
=
$
(
'
.js-health-status
'
,
this
.
$el
);
this
.
$primaryVersion
=
$
(
'
.js-primary-version
'
);
this
.
$status
=
$
(
'
.js-geo-node-status
'
,
this
.
$el
);
this
.
$repositories
=
$
(
'
.js-repositories
'
,
this
.
$status
);
this
.
$lfsObjects
=
$
(
'
.js-lfs-objects
'
,
this
.
$status
);
...
...
@@ -37,6 +36,8 @@ class GeoNodeStatus {
this
.
endpoint
=
this
.
$el
.
data
(
'
status-url
'
);
this
.
$advancedStatus
=
$
(
'
.js-advanced-geo-node-status-toggler
'
,
this
.
$status
.
parent
());
this
.
$advancedStatus
.
on
(
'
click
'
,
GeoNodeStatus
.
toggleShowAdvancedStatus
.
bind
(
this
));
this
.
primaryVersion
=
$
(
'
.js-primary-version
'
).
text
();
this
.
primaryRevision
=
$
(
'
.js-primary-revision
'
).
text
().
replace
(
/
\W
/g
,
''
);
this
.
statusInterval
=
new
SmartInterval
({
callback
:
this
.
getStatus
.
bind
(
this
),
...
...
@@ -200,12 +201,12 @@ class GeoNodeStatus {
this
.
$dbReplicationLag
.
text
(
'
UNKNOWN
'
);
}
if
(
this
.
$primaryVersion
.
text
()
!==
status
.
ver
sion
)
{
if
(
this
.
primaryVersion
===
status
.
version
&&
this
.
primaryRevision
===
status
.
revi
sion
)
{
this
.
$secondaryVersion
.
removeClass
(
`
${
versionMismatchClass
}
`
);
this
.
$secondaryVersion
.
text
(
status
.
version
);
this
.
$secondaryVersion
.
text
(
`
${
status
.
version
}
(
${
status
.
revision
}
)`
);
}
else
{
this
.
$secondaryVersion
.
addClass
(
`
${
versionMismatchClass
}
`
);
this
.
$secondaryVersion
.
text
(
`
${
status
.
version
}
(
${
versionMismatch
}
)
`
);
this
.
$secondaryVersion
.
text
(
`
${
status
.
version
}
(
${
status
.
revision
}
) -
${
versionMismatch
}
`
);
}
if
(
status
.
repositories_count
>
0
)
{
...
...
app/views/admin/geo_nodes/index.html.haml
View file @
5462dcc4
...
...
@@ -34,7 +34,8 @@
%p
%span
.help-block
Gitlab version:
%strong
.node-info.js-primary-version
=
Gitlab
::
VERSION
%span
.js-primary-version
=
Gitlab
::
VERSION
%small
.js-primary-revision
=
"(
#{
Gitlab
::
REVISION
}
)"
-
else
=
status_loading_icon
%table
.geo-node-status.js-geo-node-status.hidden
...
...
@@ -44,7 +45,6 @@
GitLab Version:
%td
.node-info.prepend-top-10.prepend-left-5.js-gitlab-version
%span
.node-info.geo-node-version-mismatch
Foo
-
if
node
.
enabled?
%tr
%td
...
...
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