module ForemanThemeSatellite
rubocop:disable Metrics/LineLength
Constants
- COLOR_REGEX
- COLOR_REPLACEMENT
This color translation is copied from previous colors.scss file. When the same source color was translated to multiple destinations, one of the conflicting pairs was commented out and left for future reference. Each line is commented by the corresponding parameter name.
- DEPRECATED_TEMPLATES
- FOREMAN_BRAND
This list is used for substitution of branded words by both client and server. The server just uses the list as is. The client is consuming it by generated .js.erb file: app/assets/javascripts/theme_client_side_branding.js.erb. For now, modifiers are not supported by the generator. Make sure the regexp works both with Ruby and JavaScript. Entries are processed in order and first wins.
- LIFECYCLE_METADATA_PATH
- METADATA_PATH
- SATELLITE_SHORT_VERSION
this file indicates the satellite version that will be used on links to documentation.
- SATELLITE_VERSION
this file indicates the satellite version that will be represented on the login page.
- VERSION
Public Class Methods
# File lib/foreman_theme_satellite/engine.rb, line 149 def self.documentation_root @documentation_root ||= begin "#{documentation_server}/documentation/en-us/red_hat_satellite/#{documentation_version}/html" end end
# File lib/foreman_theme_satellite/engine.rb, line 141 def self.documentation_server @documentation_server ||= metadata_field('documentation_server', 'https://access.redhat.com') end
# File lib/foreman_theme_satellite/engine.rb, line 145 def self.documentation_version @documentation_version ||= metadata_field('documentation_version', ForemanThemeSatellite::SATELLITE_SHORT_VERSION) end
# File lib/foreman_theme_satellite/engine.rb, line 137 def self.get_satellite_short_version Foreman::Version.new(SATELLITE_VERSION).short end
# File lib/foreman_theme_satellite/engine.rb, line 133 def self.get_satellite_version metadata_field('version', '6.14.0-development') end
# File lib/foreman_theme_satellite/engine.rb, line 129 def self.lifecycle_data @lifecycle_data ||= ForemanThemeSatellite::Lifecycle.lifecycle_data(get_satellite_version) end
# File lib/foreman_theme_satellite/engine.rb, line 119 def self.metadata_field(key, default) value = ENV["SATELLITE_#{key.upcase}"] return value if value metadata_path = Rails.env.production? ? METADATA_PATH : "#{__dir__}/../../config/metadata.yml" @metadata_yaml ||= File.exist?(metadata_path) ? YAML.load_file(metadata_path) : {} @metadata_yaml.fetch(key, default) end