Remove unused presenter for GeoNode

parent 5a182357
......@@ -3,8 +3,7 @@ class Admin::GeoNodesController < Admin::ApplicationController
before_action :load_node, only: [:destroy, :repair, :toggle, :status]
def index
# Ensure all nodes are using their Presenter
@nodes = GeoNode.all.map(&:present)
@nodes = GeoNode.all
@node = GeoNode.new
unless Gitlab::Geo.license_allows?
......
class GeoNodePresenter < Gitlab::View::Presenter::Delegated
presents :geo_node
delegate :healthy?, :health, :repositories_count, :repositories_synced_count,
:repositories_synced_in_percentage, :repositories_failed_count,
:lfs_objects_total, :lfs_objects_synced, :lfs_objects_synced_in_percentage,
to: :status
private
def status
@status ||= Geo::NodeStatusService.new.call(geo_node.status_url)
end
end
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