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
89f37e80
Commit
89f37e80
authored
May 02, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add node_class
parent
e9c17f39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
app/helpers/ee/geo_helper.rb
app/helpers/ee/geo_helper.rb
+7
-0
app/views/admin/geo_nodes/index.html.haml
app/views/admin/geo_nodes/index.html.haml
+1
-1
No files found.
app/helpers/ee/geo_helper.rb
View file @
89f37e80
...
...
@@ -16,6 +16,13 @@ module EE
end
end
def
node_class
(
node
)
klass
=
[]
klass
<<
'js-geo-secondary-node'
if
node
.
secondary?
klass
<<
' node-disabled'
unless
node
.
enabled?
klass
end
def
toggle_node_button
(
node
)
btn_class
,
title
,
data
=
if
node
.
enabled?
...
...
app/views/admin/geo_nodes/index.html.haml
View file @
89f37e80
...
...
@@ -16,7 +16,7 @@
Geo nodes (
#{
@nodes
.
count
}
)
%ul
.well-list.geo-nodes
-
@nodes
.
each
do
|
node
|
%li
{
id:
dom_id
(
node
),
class:
(
'js-geo-secondary-node'
if
node
.
secondary?
;
'node-disabled'
if
node
.
enabled?
==
fals
e
),
data:
{
status_url:
status_admin_geo_node_path
(
node
)
}
}
%li
{
id:
dom_id
(
node
),
class:
node_class
(
nod
e
),
data:
{
status_url:
status_admin_geo_node_path
(
node
)
}
}
.node-block
=
node_status_icon
(
node
)
%strong
=
node
.
url
...
...
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