Commit c0eef344 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Fix backfill action and Geo Nodes button spacing

parent 5461d215
......@@ -65,6 +65,12 @@ class GeoNode < ActiveRecord::Base
self.primary? ? false : !oauth_application.present?
end
def backfill_repositories
if Gitlab::Geo.enabled?
GeoScheduleBackfillWorker.perform_async(id) unless primary?
end
end
private
def url_helper_args
......@@ -121,8 +127,4 @@ class GeoNode < ActiveRecord::Base
self.system_hook.push_events = true
self.system_hook.tag_push_events = true
end
def backfill_repositories
GeoScheduleBackfillWorker.perform_async(id) unless primary?
end
end
......@@ -53,13 +53,13 @@
.pull-right
- if node.missing_oauth_application?
= link_to repair_admin_geo_node_path(node), method: :post, title: 'OAuth application is missing', class: 'btn btn-default, btn-sm' do
= link_to repair_admin_geo_node_path(node), method: :post, title: 'OAuth application is missing', class: 'btn btn-default btn-sm prepend-left-10' do
= icon('exclamation-triangle fw')
Repair authentication
- unless node.primary?
= link_to backfill_repositories_admin_geo_node_path(node), method: :post, class: 'btn btn-primary btn-sm' do
= link_to backfill_repositories_admin_geo_node_path(node), method: :post, class: 'btn btn-primary btn-sm prepend-left-10' do
= icon 'map-signs'
Backfill all repositories
= link_to admin_geo_node_path(node), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm' do
= link_to admin_geo_node_path(node), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm prepend-left-10' do
= icon 'trash'
Remove
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