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
71e26d3a
Commit
71e26d3a
authored
May 03, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only show actions and primary label on primary node; hide error if healthy
parent
056ddf5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
app/assets/javascripts/geo_nodes.js
app/assets/javascripts/geo_nodes.js
+3
-1
app/helpers/ee/geo_helper.rb
app/helpers/ee/geo_helper.rb
+1
-1
app/views/admin/geo_nodes/index.html.haml
app/views/admin/geo_nodes/index.html.haml
+10
-9
No files found.
app/assets/javascripts/geo_nodes.js
View file @
71e26d3a
...
...
@@ -37,7 +37,9 @@ class GeoNodeStatus {
this
.
$repositoriesFailed
.
html
(
status
.
repositories_failed_count
);
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
'
)
{
if
(
status
.
health
===
'
Healthy
'
)
{
this
.
$health
.
html
(
''
);
}
else
{
this
.
$health
.
html
(
`<code class="geo-health">
${
status
.
health
}
</code>`
);
}
...
...
app/helpers/ee/geo_helper.rb
View file @
71e26d3a
...
...
@@ -18,7 +18,7 @@ module EE
def
node_class
(
node
)
klass
=
[]
klass
<<
'js-geo-secondary-node'
if
node
.
secondary?
klass
<<
'
node-disabled'
unless
node
.
enabled?
klass
<<
'node-disabled'
unless
node
.
enabled?
klass
end
...
...
app/views/admin/geo_nodes/index.html.haml
View file @
71e26d3a
...
...
@@ -20,10 +20,10 @@
.node-block
=
node_status_icon
(
node
)
%strong
=
node
.
url
-
if
node
.
primary?
.node-badge.primary-node
Primary
-
if
current_node?
(
node
)
.node-badge.current-node
Current node
-
if
node
.
primary?
.node-badge.primary-node
Primary
%span
.help-block
Primary node
-
else
.js-geo-node-status
{
style:
'display: none'
}
...
...
@@ -51,10 +51,11 @@
%p
.js-health
.node-actions
-
if
Gitlab
::
Geo
.
license_allows?
-
if
node
.
missing_oauth_application?
=
link_to
"Repair authentication"
,
repair_admin_geo_node_path
(
node
),
method: :post
,
title:
'OAuth application is missing'
,
class:
'btn btn-default btn-sm'
-
if
node
.
secondary?
=
toggle_node_button
(
node
)
=
link_to
"Remove"
,
admin_geo_node_path
(
node
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
'btn btn-remove btn-sm'
-
if
current_node?
(
node
)
==
node
.
primary?
.node-actions
-
if
Gitlab
::
Geo
.
license_allows?
-
if
node
.
missing_oauth_application?
=
link_to
"Repair authentication"
,
repair_admin_geo_node_path
(
node
),
method: :post
,
title:
'OAuth application is missing'
,
class:
'btn btn-default btn-sm'
-
if
node
.
secondary?
=
toggle_node_button
(
node
)
=
link_to
"Remove"
,
admin_geo_node_path
(
node
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
'btn btn-remove btn-sm'
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