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
0cf48d8f
Commit
0cf48d8f
authored
Feb 23, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show repositories synced/total for each secondary node on Geo Nodes page
[ci skip]
parent
32a1eaec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
app/presenters/geo_node_presenter.rb
app/presenters/geo_node_presenter.rb
+9
-1
app/views/admin/geo_nodes/index.html.haml
app/views/admin/geo_nodes/index.html.haml
+1
-1
No files found.
app/presenters/geo_node_presenter.rb
View file @
0cf48d8f
...
...
@@ -9,8 +9,16 @@ class GeoNodePresenter < Gitlab::View::Presenter::Delegated
status
.
health
end
def
repositories
status
.
repositories
end
def
repositories_synced
(
status
.
repositories_synced
.
to_f
/
status
.
repositories
.
to_f
)
*
100.0
status
.
repositories_synced
end
def
repositories_synced_in_percentage
(
repositories_synced
.
to_f
/
repositories
.
to_f
)
*
100.0
end
def
repositories_failed
...
...
app/views/admin/geo_nodes/index.html.haml
View file @
0cf48d8f
...
...
@@ -25,7 +25,7 @@
%span
.help-block
Primary node
-
else
%p
%span
.help-block
=
"Repositories synced:
#{
n
umber_to_percentage
(
node
.
repositories_synced
,
precision:
0
)
}
"
%span
.help-block
=
"Repositories synced:
#{
n
ode
.
repositories_synced
}
/
#{
node
.
repositories
}
(
#{
number_to_percentage
(
node
.
repositories_synced_in_percentage
,
precision:
0
)
}
)
"
%p
%span
.help-block
=
"Repositories failed:
#{
node
.
repositories_failed
}
"
%p
...
...
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