Commit ab03323f authored by Zack Cuddy's avatar Zack Cuddy Committed by Martin Wortschack

Geo - Update Fontawesome icons

Replaces some usages
of old fontawesome icons
with GitLab SVGs.

Some of the icons had
already been removed
from our icon library
causes an untracked bug
in the code.
parent e09933bf
......@@ -4,9 +4,9 @@ module EE
module GeoHelper
STATUS_ICON_NAMES_BY_STATE = {
synced: 'check',
pending: 'clock-o',
failed: 'exclamation-triangle',
never: 'circle-o'
pending: 'clock',
failed: 'warning-solid',
never: 'status_notfound'
}.freeze
def self.current_node_human_status
......@@ -44,17 +44,6 @@ module EE
node.namespaces.map(&:human_name).sort.join(', ')
end
def node_status_icon(node)
unless node.primary?
status = node.enabled? ? 'unknown' : 'disabled'
icon = status == 'healthy' ? 'check' : 'times'
icon "#{icon} fw",
class: "js-geo-node-icon geo-node-#{status}",
title: status.capitalize
end
end
def selective_sync_types_json
options = {
ALL: {
......@@ -74,10 +63,6 @@ module EE
options.to_json
end
def status_loading_icon
icon "spinner spin fw", class: 'js-geo-node-loading'
end
def node_class(node)
klass = []
klass << 'js-geo-secondary-node' if node.secondary?
......@@ -118,7 +103,7 @@ module EE
end
def geo_registry_status_icon(registry)
icon STATUS_ICON_NAMES_BY_STATE.fetch(registry.synchronization_state, 'exclamation-triangle')
sprite_icon(STATUS_ICON_NAMES_BY_STATE.fetch(registry.synchronization_state, 'warning-solid'))
end
def geo_registry_status_text(registry)
......
%h4
= icon('exclamation-triangle')
= sprite_icon('warning-solid')
Merge requests are read-only in a secondary Geo node
---
title: Geo - Update Legacy Icons
merge_request: 48058
author:
type: changed
......@@ -142,6 +142,8 @@ RSpec.describe 'admin Geo Projects', :js, :geo do
labels.each do |label|
expect(page).to have_content(label)
end
expect(page).to have_css("svg[data-testid=\"#{icon}-icon\"")
end
end
end
......@@ -151,6 +153,7 @@ RSpec.describe 'admin Geo Projects', :js, :geo do
let(:expected_registries) { [synced_registry] }
let(:unexpected_registries) { [sync_pending_registry, sync_failed_registry, never_synced_registry] }
let(:labels) { ['Status', 'Last successful sync', 'Last time verified', 'Last repository check run'] }
let(:icon) { 'check' }
it_behaves_like 'shows filter specific projects and correct labels'
end
......@@ -160,6 +163,7 @@ RSpec.describe 'admin Geo Projects', :js, :geo do
let(:expected_registries) { [sync_pending_registry] }
let(:unexpected_registries) { [synced_registry, sync_failed_registry, never_synced_registry] }
let(:labels) { ['Status', 'Next sync scheduled at', 'Last sync attempt'] }
let(:icon) { 'clock' }
it_behaves_like 'shows filter specific projects and correct labels'
end
......@@ -169,6 +173,7 @@ RSpec.describe 'admin Geo Projects', :js, :geo do
let(:expected_registries) { [sync_failed_registry] }
let(:unexpected_registries) { [synced_registry, sync_pending_registry, never_synced_registry] }
let(:labels) { ['Status', 'Next sync scheduled at', 'Last sync attempt'] }
let(:icon) { 'warning-solid' }
it_behaves_like 'shows filter specific projects and correct labels'
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