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 ...@@ -65,6 +65,12 @@ class GeoNode < ActiveRecord::Base
self.primary? ? false : !oauth_application.present? self.primary? ? false : !oauth_application.present?
end end
def backfill_repositories
if Gitlab::Geo.enabled?
GeoScheduleBackfillWorker.perform_async(id) unless primary?
end
end
private private
def url_helper_args def url_helper_args
...@@ -121,8 +127,4 @@ class GeoNode < ActiveRecord::Base ...@@ -121,8 +127,4 @@ class GeoNode < ActiveRecord::Base
self.system_hook.push_events = true self.system_hook.push_events = true
self.system_hook.tag_push_events = true self.system_hook.tag_push_events = true
end end
def backfill_repositories
GeoScheduleBackfillWorker.perform_async(id) unless primary?
end
end end
...@@ -53,13 +53,13 @@ ...@@ -53,13 +53,13 @@
.pull-right .pull-right
- if node.missing_oauth_application? - 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') = icon('exclamation-triangle fw')
Repair authentication Repair authentication
- unless node.primary? - 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' = icon 'map-signs'
Backfill all repositories 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' = icon 'trash'
Remove 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