foreman_theme_satellite 13.1.0 → 13.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6712b54b9a655b833cd7c67931e8725861a8bc1738eb05b4e39232564106749b
4
- data.tar.gz: e4d3e6310a890fe539aa4d4de3f23ded4957e70fad2af4e3c764e2824aabd05a
3
+ metadata.gz: 2fd91a213bdd2371b7b27083b0d07d67cdc62cf134010105970038bf18c812ad
4
+ data.tar.gz: a42b790f25bbecca04b24a6227c5babe722d73d42cbfca66c7e00ae84f3161cc
5
5
  SHA512:
6
- metadata.gz: 39d6169e89fba9e5a99bb663e2168d2173fc785152aeffd9010e9a657c8f1a6c38117d8be0924e151165d240e9287f54d32c74fff97450b92fb2605172a652f4
7
- data.tar.gz: 4ad13a0248ddeec1350812e2f9a267df6022ab7a3989afeb295b65b9667c272aff0b676bd5a383544acb6136d7f893f17cf3023ec2eaf71491e2e61e33cf0d4d
6
+ metadata.gz: e1e1c1d3bb94e37e58ebfa19409615d128f9d15b3d9c8960990be28bcc3bca86c69a67d84a6b856b7ec392285891f65ed9203fa5c7feca8314f547adbb5a05c6
7
+ data.tar.gz: 5d94cd375d7186c0ea4210e291e51bb44464b8b590d61c51380380d5b4d02d0409c8b94238aca5daa4cdb9b481f846937be39ee0265b55370a4e91b3a360c942
@@ -12,3 +12,21 @@
12
12
  margin: -5px 5px 0 0;
13
13
  }
14
14
  }
15
+
16
+ #rails-app-content {
17
+ --header-height: 70px;
18
+ top: var(--header-height);
19
+ height: calc(100% - var(--header-height));
20
+
21
+ &.eol-banner {
22
+ --banner-height: calc(
23
+ 2 * var(--pf-global--spacer--xs) +
24
+ 2 * (var(--pf-global--LineHeight--md) * var(--pf-global--FontSize--sm))
25
+ ); // banner height is line height and a small padding
26
+ top: calc(
27
+ var(--header-height) + var(--banner-height)
28
+ );
29
+
30
+ height: calc(100% - var(--header-height) - var(--banner-height));
31
+ }
32
+ }
@@ -4,7 +4,7 @@ module ProvisioningTemplatesHelperBranding
4
4
  return super unless ProvisioningTemplatesControllerBranding::SUPPORTED_PROVISIONING_TEMPLATES.include?(name.name)
5
5
 
6
6
  image_tag(
7
- 'foreman_theme_satellite/Redhat.png',
7
+ 'foreman_theme_satellite/supported_icon.png',
8
8
  class: 'prov-brand-img',
9
9
  title: _('Supported by Red Hat')
10
10
  ).safe_concat(super)
@@ -0,0 +1,56 @@
1
+ <!-- insert_top 'body' -->
2
+
3
+ <% if User.current&.admin %>
4
+ <% data = ForemanThemeSatellite.lifecycle_data %>
5
+
6
+ <% text, icon, date = if data[:end_of_life].nil?
7
+ [nil, nil, nil]
8
+ elsif data[:end_of_life] < Time.zone.now
9
+ [_('Satellite %{version} is estimated to have reached its End of Life on %{date}.'), 'danger', data[:end_of_life]]
10
+ elsif data[:end_of_life] < 6.months.after
11
+ [_('Satellite %{version} is estimated to reach its End of Life by the end of %{month} %{year}.'), 'warning', I18n.l(data[:end_of_life], format: "%B %Y")]
12
+ end %>
13
+
14
+ <% if text %>
15
+ <div class="pf-c-banner pf-m-<%= icon %>" id="satellite-eol-banner">
16
+ <div>
17
+ <% if icon == 'warning' %>
18
+ <%= text % { month: _(data[:end_of_life].strftime('%B')), year: data[:end_of_life].strftime('%Y'), version: data[:short_version] } %>
19
+ <% else %>
20
+ <%= text % { date: data[:end_of_life].to_date, version: data[:short_version] } %>
21
+ <% end %>
22
+ <div>
23
+ <%= _("For up to date information about Satellite's lifecycle see ") %><a href="https://access.redhat.com/support/policy/updates/satellite"><%= _("Red Hat Satellite Product Life Cycle") %></a>.
24
+ <%= _("Kindly plan to upgrade Satellite to the supported version, for upgrade guidance see ") %><a href="<%= ForemanThemeSatellite.documentation_server %>/labsinfo/satelliteupgradehelper "><%= _("Red Hat Satellite Upgrade Helper") %>.
25
+ </div>
26
+ </div>
27
+ <span id="satellite-oel-banner-dismiss-button" style="position: absolute; font-size: 20px; top: 0px; right: 5px; cursor: pointer;">&times;</span>
28
+ </div>
29
+
30
+ <script>
31
+ const level = "<%= icon %>";
32
+ const shouldHide = localStorage.getItem('satellite-eol-banner-dismissed');
33
+ const element = document.getElementById('satellite-eol-banner');
34
+ const hiddenUntil = new Date(localStorage.getItem('satellite-eol-banner-dismissed-until'));
35
+
36
+ if (shouldHide == level && hiddenUntil >= (new Date())) {
37
+ element.style.display = 'none';
38
+ } else {
39
+ window.onload = function(e) {
40
+ // We have to do it from a callback because the element may not exist yet
41
+ document.getElementById('rails-app-content').classList.add('eol-banner');
42
+ }
43
+ }
44
+
45
+ const dismissButton = document.getElementById('satellite-oel-banner-dismiss-button');
46
+ dismissButton.addEventListener('click', () => {
47
+ element.style.display = 'none';
48
+ document.getElementById('rails-app-content').classList.remove('eol-banner');
49
+ localStorage.setItem('satellite-eol-banner-dismissed', level);
50
+ const now = new Date();
51
+ const cutoff = new Date(now.getTime() + 30 * 24 * 60 * 60 * 1000);
52
+ localStorage.setItem('satellite-eol-banner-dismissed-until', cutoff.toISOString());
53
+ });
54
+ </script>
55
+ <% end %>
56
+ <% end %>
@@ -0,0 +1,31 @@
1
+ module ForemanThemeSatellite
2
+ class Lifecycle
3
+ class << self
4
+ # rubocop:disable Metrics/AbcSize
5
+ def lifecycle_data(version)
6
+ metadata_path = ::ForemanThemeSatellite::LIFECYCLE_METADATA_PATH
7
+
8
+ parsed = Foreman::Version.new(version)
9
+ lifecycle_data = { current_version: version, short_version: "#{parsed.major}.#{parsed.minor}" }
10
+
11
+ return lifecycle_data unless File.exist?(metadata_path)
12
+
13
+ yaml = YAML.load_file(metadata_path)
14
+ raise "Unexpected lifecycle metadata file version '#{yaml['version']}'" unless yaml['version'] == '1'
15
+
16
+ eol = yaml['releases'].fetch(lifecycle_data[:short_version], {})['end_of_life']
17
+ lifecycle_data[:end_of_life] = Time.find_zone('UTC').parse(eol) if eol
18
+ lifecycle_data[:status] = if lifecycle_data[:end_of_life].nil?
19
+ nil
20
+ elsif lifecycle_data[:end_of_life] < Time.zone.now
21
+ 'danger'
22
+ elsif lifecycle_data[:end_of_life] < 6.months.after
23
+ 'warning'
24
+ end
25
+
26
+ lifecycle_data
27
+ end
28
+ # rubocop:enable Metrics/AbcSize
29
+ end
30
+ end
31
+ end
@@ -50,8 +50,8 @@ module ForemanThemeSatellite
50
50
  'RolesandPermissions' => "#{ForemanThemeSatellite.documentation_root}/administering_red_hat_satellite/managing_users_and_roles_admin",
51
51
  'LDAPAuthentication' => "#{ForemanThemeSatellite.documentation_root}/installing_satellite_server_in_a_connected_network_environment/configuring_external_authentication_satellite#Using_LDAP_satellite",
52
52
  'Bookmarks' => "#{ForemanThemeSatellite.documentation_root}/administering_red_hat_satellite/searching_and_bookmarking_admin",
53
- 'Policydeploymentoptions' => "#{ForemanThemeSatellite.documentation_root}/managing_security_compliance#Managing_Compliance_Policies_security-compliance",
54
- 'CreatingSCAPcontent' => "#{ForemanThemeSatellite.documentation_root}/administering_red_hat_satellite/managing_security_compliance_admin#running-a-security-compliance-scan-on-demand_admin",
53
+ 'Policydeploymentoptions' => "#{ForemanThemeSatellite.documentation_root}/managing_security_compliance/compliance-policy-deployment-options_security-compliance",
54
+ 'CreatingSCAPcontent' => "#{ForemanThemeSatellite.documentation_root}/managing_security_compliance/configuring_scap_contents_security-compliance",
55
55
 
56
56
  # Planning
57
57
  'SmartProxies' => "#{ForemanThemeSatellite.documentation_root}/satellite_overview_concepts_and_deployment_considerations/chap-documentation-architecture_guide-capsule_server_overview",
@@ -62,6 +62,13 @@ module ForemanThemeSatellite
62
62
 
63
63
  # Misc
64
64
  'GettingHelp' => "https://access.redhat.com/products/red-hat-satellite/#support",
65
+
66
+ # Managing Security Compliance
67
+ 'Monitoring_Compliance_security-compliance' => "#{ForemanThemeSatellite.documentation_root}/managing_security_compliance/Monitoring_Compliance_security-compliance",
68
+ 'Managing_Compliance_Policies_security-compliance' => "#{ForemanThemeSatellite.documentation_root}/managing_security_compliance/Managing_Compliance_Policies_security-compliance",
69
+ 'Configuring_SCAP_Contents_security-compliance' => "#{ForemanThemeSatellite.documentation_root}/managing_security_compliance/Configuring_SCAP_Contents_security-compliance",
70
+ 'tailoring-xccdf-profiles_security-compliance' => "#{ForemanThemeSatellite.documentation_root}/managing_security_compliance/Configuring_SCAP_Contents_security-compliance#tailoring-xccdf-profiles_security-compliance",
71
+ 'deploying-compliance-policies_security-compliance' => "#{ForemanThemeSatellite.documentation_root}/managing_security_compliance/Configuring_SCAP_Contents_security-compliance#deploying-compliance-policies_security-compliance",
65
72
  }.freeze
66
73
 
67
74
  PLUGINS_DOCUMENTATION = {
@@ -114,6 +114,7 @@ module ForemanThemeSatellite
114
114
  end
115
115
 
116
116
  METADATA_PATH = '/usr/share/satellite/metadata.yml'.freeze
117
+ LIFECYCLE_METADATA_PATH = '/usr/share/satellite/lifecycle-metadata.yml'.freeze
117
118
 
118
119
  def self.metadata_field(key, default)
119
120
  value = ENV["SATELLITE_#{key.upcase}"]
@@ -125,8 +126,12 @@ module ForemanThemeSatellite
125
126
  @metadata_yaml.fetch(key, default)
126
127
  end
127
128
 
129
+ def self.lifecycle_data
130
+ @lifecycle_data ||= ForemanThemeSatellite::Lifecycle.lifecycle_data(get_satellite_version)
131
+ end
132
+
128
133
  def self.get_satellite_version
129
- metadata_field('version', '6.13.0-development')
134
+ metadata_field('version', '6.14.0-development')
130
135
  end
131
136
 
132
137
  def self.get_satellite_short_version
@@ -1,3 +1,3 @@
1
1
  module ForemanThemeSatellite
2
- VERSION = '13.1.0'.freeze
2
+ VERSION = '13.2.0'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_theme_satellite",
3
- "version": "13.1.0",
3
+ "version": "13.2.0",
4
4
  "description": "Satellite theme =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -14,14 +14,14 @@
14
14
  "url": "http://bugzilla.redhat.com/"
15
15
  },
16
16
  "peerDependencies": {
17
- "@theforeman/vendor": "^4.12.0"
17
+ "@theforeman/vendor": ">= 4.12.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@babel/core": "^7.7.0",
21
- "@theforeman/builder": "^4.12.0",
22
- "@theforeman/eslint-plugin-foreman": "^4.12.0",
23
- "@theforeman/test": "^4.12.0",
24
- "@theforeman/vendor-dev": "^4.12.0",
21
+ "@theforeman/builder": ">= 4.12.0",
22
+ "@theforeman/eslint-plugin-foreman": ">= 4.12.0",
23
+ "@theforeman/test": ">= 4.12.0",
24
+ "@theforeman/vendor-dev": ">= 4.12.0",
25
25
  "babel-eslint": "^10.0.3",
26
26
  "eslint": "^6.7.2",
27
27
  "prettier": "^2.0.5",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_theme_satellite
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.1.0
4
+ version: 13.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shimon Stein
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-10-26 00:00:00.000000000 Z
12
+ date: 2023-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -124,6 +124,7 @@ files:
124
124
  - app/assets/images/foreman_theme_satellite/header_logo.svg
125
125
  - app/assets/images/foreman_theme_satellite/login_bg.svg
126
126
  - app/assets/images/foreman_theme_satellite/login_logo.svg
127
+ - app/assets/images/foreman_theme_satellite/supported_icon.png
127
128
  - app/assets/javascripts/foreman_theme_satellite/locale/en/foreman_theme_satellite.js
128
129
  - app/assets/javascripts/foreman_theme_satellite/theme_dashboard.js
129
130
  - app/assets/javascripts/foreman_theme_satellite/theme_ng_page_title.js
@@ -159,12 +160,14 @@ files:
159
160
  - app/models/concerns/setting_branding.rb
160
161
  - app/models/concerns/upstream_only_settings.rb
161
162
  - app/overrides/bootdisk_help_page.rb
163
+ - app/overrides/layouts/base/eol_banner.html.erb.deface
162
164
  - app/overrides/layouts/base/theme_react_root.html.erb.deface
163
165
  - app/overrides/layouts/base/theme_resources.html.erb.deface
164
166
  - app/overrides/layouts/base/theme_style_resources.html.erb.deface
165
167
  - app/overrides/rhev.rb
166
168
  - app/overrides/satellite_name_override.rb
167
169
  - app/services/concerns/setting_registry_branding.rb
170
+ - app/services/foreman_theme_satellite/lifecycle.rb
168
171
  - app/services/foreman_theme_satellite/renderer_methods.rb
169
172
  - app/views/api/v2/home/status_extensions.json.rabl
170
173
  - app/views/foreman_theme_satellite/_theme_client_side_branding.js.erb
@@ -192,9 +195,7 @@ files:
192
195
  - lib/generators/foreman_theme_satellite/lib/css_compare.rb
193
196
  - lib/tasks/foreman_theme_satellite_tasks.rake
194
197
  - locale/Makefile
195
- - locale/en/foreman_theme_satellite.edit.po
196
198
  - locale/en/foreman_theme_satellite.po
197
- - locale/en/foreman_theme_satellite.po.time_stamp
198
199
  - locale/foreman_theme_satellite.pot
199
200
  - locale/gemspec.rb
200
201
  - package.json
@@ -1,152 +0,0 @@
1
- # foreman_theme_satellite
2
- #
3
- # This file is distributed under the same license as foreman_theme_satellite.
4
- #
5
- msgid ""
6
- msgstr ""
7
- "Project-Id-Version: version 0.0.1\n"
8
- "Report-Msgid-Bugs-To: \n"
9
- "PO-Revision-Date: 2014-08-20 08:54+0100\n"
10
- "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
11
- "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
12
- "Language: \n"
13
- "MIME-Version: 1.0\n"
14
- "Content-Type: text/plain; charset=UTF-8\n"
15
- "Content-Transfer-Encoding: 8bit\n"
16
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
-
18
- #: ../app/helpers/provisioning_templates_helper_branding.rb:9
19
- msgid "Supported by Red Hat"
20
- msgstr ""
21
-
22
- #: ../app/helpers/rhev_helper.rb:3
23
- msgid "RHEV integration is deprecated."
24
- msgstr ""
25
-
26
- #: ../app/helpers/rhev_helper.rb:4
27
- msgid "On August 31, 2022, Red Hat Virtualization entered the Maintenance Support Phase. The Maintenance Support Phase runs until August 31, 2024, followed by the Extended Life Phase, which runs until August 31, 2026."
28
- msgstr ""
29
-
30
- #: ../app/helpers/rhev_helper.rb:5
31
- msgid "More information"
32
- msgstr ""
33
-
34
- #: ../app/helpers/theme_application_helper.rb:7
35
- msgid "When editing a Template, you must assign a list of Operating Systems with which this Template can be used. Optionally, you can restrict a template to a list of Hostgroups or Environments."
36
- msgstr ""
37
-
38
- #: ../app/helpers/theme_application_helper.rb:8
39
- msgid "When a Host requests a template (e.g. during provisioning), Foreman selects the optimal match from the available templates of that type, in the following order:"
40
- msgstr ""
41
-
42
- #: ../app/helpers/theme_application_helper.rb:10
43
- msgid "Host group and Environment"
44
- msgstr ""
45
-
46
- #: ../app/helpers/theme_application_helper.rb:11
47
- msgid "Host group only"
48
- msgstr ""
49
-
50
- #: ../app/helpers/theme_application_helper.rb:12
51
- msgid "Environment only"
52
- msgstr ""
53
-
54
- #: ../app/helpers/theme_application_helper.rb:13
55
- msgid "Operating system default"
56
- msgstr ""
57
-
58
- #: ../app/helpers/theme_application_helper.rb:15
59
- msgid "The final entry, Operating System default, can be set by editing the %s page."
60
- msgstr ""
61
-
62
- #: ../app/helpers/theme_application_helper.rb:15
63
- msgid "Operating System"
64
- msgstr ""
65
-
66
- #: ../app/overrides/satellite_name_override.rb:2
67
- msgid "Version %{version}"
68
- msgstr ""
69
-
70
- #: ../app/overrides/satellite_name_override.rb:3
71
- msgid "Support"
72
- msgstr ""
73
-
74
- #: ../app/overrides/satellite_name_override.rb:4
75
- msgid "Customer portal"
76
- msgstr ""
77
-
78
- #: ../app/overrides/satellite_name_override.rb:5
79
- msgid "Documentation"
80
- msgstr ""
81
-
82
- #: ../app/overrides/satellite_name_override.rb:6
83
- msgid "Administering Red Hat Satellite"
84
- msgstr ""
85
-
86
- #: ../app/overrides/satellite_name_override.rb:7
87
- msgid "Transitioning from Red Hat Satellite 5 to Red Hat Satellite 6"
88
- msgstr ""
89
-
90
- #: ../app/overrides/satellite_name_override.rb:8
91
- msgid "API Guide"
92
- msgstr ""
93
-
94
- #: ../app/overrides/satellite_name_override.rb:9
95
- msgid "Blog"
96
- msgstr ""
97
-
98
- #: ../app/overrides/satellite_name_override.rb:10
99
- msgid "Red Hat Satellite Blog"
100
- msgstr ""
101
-
102
- #: ../app/overrides/satellite_name_override.rb:11
103
- msgid "IRC"
104
- msgstr ""
105
-
106
- #: ../app/overrides/satellite_name_override.rb:12
107
- msgid "You can find us on %{liberachat} (irc.libera.chat) in #redhat-satellite."
108
- msgstr ""
109
-
110
- #: ../app/overrides/satellite_name_override.rb:13
111
- msgid "Version %{version} © %{year} Red Hat Inc."
112
- msgstr ""
113
-
114
- #: ../app/overrides/satellite_name_override.rb:14
115
- msgid "Includes %{system} © 2009-%{year} Paul Kelly and Ohad Levy"
116
- msgstr ""
117
-
118
- #: ../app/overrides/satellite_name_override.rb:15
119
- msgid "If you feel this is an error with Satellite 6 itself, please open a new issue with"
120
- msgstr ""
121
-
122
- #: ../app/overrides/satellite_name_override.rb:16
123
- msgid "Satellite ticketing system"
124
- msgstr ""
125
-
126
- #: ../app/overrides/satellite_name_override.rb:17
127
- msgid "You would probably need to attach the"
128
- msgstr ""
129
-
130
- #: ../app/overrides/satellite_name_override.rb:18
131
- msgid "Full trace"
132
- msgstr ""
133
-
134
- #: ../app/overrides/satellite_name_override.rb:19
135
- msgid "and relevant log entries."
136
- msgstr ""
137
-
138
- #: ../app/overrides/satellite_name_override.rb:20
139
- msgid "(build: %{version})"
140
- msgstr ""
141
-
142
- #: ../lib/foreman_theme_satellite/engine.rb:45
143
- msgid "Show unsupported provisioning templates. When enabled, all the avaiable templates will be shown. When disabled, Red Hat supported templates will be shown only"
144
- msgstr ""
145
-
146
- #: ../lib/foreman_theme_satellite/engine.rb:48
147
- msgid "Show unsupported provisioning templates"
148
- msgstr ""
149
-
150
- #: gemspec.rb:2
151
- msgid "Theme changes for Satellite 6."
152
- msgstr ""
File without changes