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
ddc94734
Commit
ddc94734
authored
May 02, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop and jslint errors
parent
7e9b8872
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
14 deletions
+9
-14
app/assets/javascripts/geo_nodes.js
app/assets/javascripts/geo_nodes.js
+6
-6
app/helpers/ee/geo_helper.rb
app/helpers/ee/geo_helper.rb
+2
-7
spec/serializers/geo_node_status_entity_spec.rb
spec/serializers/geo_node_status_entity_spec.rb
+1
-1
No files found.
app/assets/javascripts/geo_nodes.js
View file @
ddc94734
...
...
@@ -4,7 +4,7 @@ import './smart_interval';
const
healthyClass
=
'
geo-node-healthy
'
;
const
unhealthyClass
=
'
geo-node-unhealthy
'
;
const
healthyIcon
=
'
fa-check
'
;
const
unhealthyIcon
=
'
fa-close
'
const
unhealthyIcon
=
'
fa-close
'
;
class
GeoNodeStatus
{
constructor
(
el
)
{
...
...
@@ -38,7 +38,7 @@ class GeoNodeStatus {
this
.
$lfsObjectsSynced
.
html
(
`
${
status
.
lfs_objects_synced_count
}
/
${
status
.
lfs_objects_count
}
(
${
status
.
lfs_objects_synced_in_percentage
}
)`
);
this
.
$attachmentsSynced
.
html
(
`
${
status
.
attachments_synced_count
}
/
${
status
.
attachments_count
}
(
${
status
.
attachments_synced_in_percentage
}
)`
);
if
(
status
.
health
!==
'
Healthy
'
)
{
this
.
$health
.
html
(
'
<code class="geo-health">
'
+
status
.
health
+
'
</code>
'
);
this
.
$health
.
html
(
`<code class="geo-health">
${
status
.
health
}
</code>`
);
}
this
.
$status
.
show
();
...
...
@@ -47,12 +47,12 @@ class GeoNodeStatus {
setStatusIcon
(
healthy
)
{
if
(
healthy
)
{
this
.
$icon
.
removeClass
(
unhealthyClass
+
'
'
+
unhealthyIcon
)
.
addClass
(
healthyClass
+
'
'
+
healthyIcon
)
this
.
$icon
.
removeClass
(
`
${
unhealthyClass
}
${
unhealthyIcon
}
`
)
.
addClass
(
`
${
healthyClass
}
${
healthyIcon
}
`
)
.
attr
(
'
title
'
,
'
Healthy
'
);
}
else
{
this
.
$icon
.
removeClass
(
healthyClass
+
'
'
+
healthyIcon
)
.
addClass
(
unhealthyClass
+
'
'
+
unhealthyIcon
)
this
.
$icon
.
removeClass
(
`
${
healthyClass
}
${
healthyIcon
}
`
)
.
addClass
(
`
${
unhealthyClass
}
${
unhealthyIcon
}
`
)
.
attr
(
'
title
'
,
'
Unhealthy
'
);
}
}
...
...
app/helpers/ee/geo_helper.rb
View file @
ddc94734
...
...
@@ -3,12 +3,7 @@ module EE
def
node_status_icon
(
node
)
unless
node
.
primary?
status
=
node
.
enabled?
?
'healthy'
:
'disabled'
if
status
==
'healthy'
icon
=
'check'
else
icon
=
'times'
end
icon
=
status
==
'healthy'
?
'check'
:
'times'
icon
"
#{
icon
}
fw"
,
class:
"js-geo-node-icon geo-node-
#{
status
}
"
,
...
...
@@ -28,7 +23,7 @@ module EE
if
node
.
enabled?
[
'warning'
,
'Disable'
,
{
confirm:
'Disabling a node stops the sync process. Are you sure?'
}]
else
[
'success'
,
'Enable'
]
%w[success Enable
]
end
link_to
title
,
...
...
spec/serializers/geo_node_status_entity_spec.rb
View file @
ddc94734
...
...
@@ -61,7 +61,7 @@ describe GeoNodeStatusEntity do
describe
'#health'
do
context
'when node is healthy'
do
it
'exposes the health message'
do
expect
(
subject
[
:health
]).
to
eq
'
No Health Problems Detected
'
expect
(
subject
[
:health
]).
to
eq
'
Healthy
'
end
end
...
...
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