Show repositories synced/total for each secondary node on Geo Nodes page

[ci skip]
parent 32a1eaec
...@@ -9,8 +9,16 @@ class GeoNodePresenter < Gitlab::View::Presenter::Delegated ...@@ -9,8 +9,16 @@ class GeoNodePresenter < Gitlab::View::Presenter::Delegated
status.health status.health
end end
def repositories
status.repositories
end
def repositories_synced 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 end
def repositories_failed def repositories_failed
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
%span.help-block Primary node %span.help-block Primary node
- else - else
%p %p
%span.help-block= "Repositories synced: #{number_to_percentage(node.repositories_synced, precision: 0)}" %span.help-block= "Repositories synced: #{node.repositories_synced}/#{node.repositories} (#{number_to_percentage(node.repositories_synced_in_percentage, precision: 0)})"
%p %p
%span.help-block= "Repositories failed: #{node.repositories_failed}" %span.help-block= "Repositories failed: #{node.repositories_failed}"
%p %p
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment