foreman_theme_satellite 13.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +619 -0
- data/README.md +482 -0
- data/Rakefile +47 -0
- data/app/assets/images/foreman_theme_satellite/favicon.ico +0 -0
- data/app/assets/images/foreman_theme_satellite/header_logo.svg +836 -0
- data/app/assets/images/foreman_theme_satellite/login_bg.svg +384 -0
- data/app/assets/images/foreman_theme_satellite/login_logo.svg +840 -0
- data/app/assets/javascripts/foreman_theme_satellite/locale/en/foreman_theme_satellite.js +124 -0
- data/app/assets/javascripts/foreman_theme_satellite/theme_dashboard.js +17 -0
- data/app/assets/javascripts/foreman_theme_satellite/theme_ng_page_title.js +15 -0
- data/app/assets/stylesheets/foreman_theme_satellite/application_colors.css +12 -0
- data/app/assets/stylesheets/foreman_theme_satellite/bastion.scss +5 -0
- data/app/assets/stylesheets/foreman_theme_satellite/external_logout.scss +13 -0
- data/app/assets/stylesheets/foreman_theme_satellite/foreman_theme_satellite.css +1 -0
- data/app/assets/stylesheets/foreman_theme_satellite/login.scss +32 -0
- data/app/assets/stylesheets/foreman_theme_satellite/patternfly_and_overrides.scss +7 -0
- data/app/assets/stylesheets/foreman_theme_satellite/provisioning_templates.scss +3 -0
- data/app/assets/stylesheets/foreman_theme_satellite/theme.scss +14 -0
- data/app/assets/stylesheets/foreman_theme_satellite/topbar.scss +11 -0
- data/app/assets/stylesheets/foreman_theme_satellite/wizard.scss +14 -0
- data/app/controllers/concerns/documentation_controller_branding.rb +33 -0
- data/app/controllers/concerns/provisioning_templates_controller_branding.rb +94 -0
- data/app/helpers/provisioning_templates_helper_branding.rb +12 -0
- data/app/helpers/rhev_helper.rb +10 -0
- data/app/helpers/theme_application_helper.rb +17 -0
- data/app/helpers/theme_css_class_helper.rb +8 -0
- data/app/helpers/theme_discovery_helper.rb +10 -0
- data/app/helpers/theme_external_logout_helper.rb +10 -0
- data/app/helpers/theme_layout_helper.rb +18 -0
- data/app/helpers/theme_login_helper.rb +10 -0
- data/app/models/concerns/branch_info_branding.rb +9 -0
- data/app/models/concerns/deprecation_notification.rb +23 -0
- data/app/models/concerns/distributor_version.rb +7 -0
- data/app/models/concerns/gce.rb +7 -0
- data/app/models/concerns/openstack.rb +8 -0
- data/app/models/concerns/ovirt.rb +8 -0
- data/app/models/concerns/provisioning.rb +21 -0
- data/app/models/concerns/realm_theme.rb +18 -0
- data/app/models/concerns/satellite_packages.rb +8 -0
- data/app/models/concerns/setting_branding.rb +17 -0
- data/app/models/concerns/upstream_only_settings.rb +6 -0
- data/app/overrides/bootdisk_help_page.rb +44 -0
- data/app/overrides/layouts/base/theme_react_root.html.erb.deface +7 -0
- data/app/overrides/layouts/base/theme_resources.html.erb.deface +7 -0
- data/app/overrides/layouts/base/theme_style_resources.html.erb.deface +3 -0
- data/app/overrides/rhev.rb +14 -0
- data/app/overrides/satellite_name_override.rb +83 -0
- data/app/services/concerns/setting_registry_branding.rb +20 -0
- data/app/services/foreman_theme_satellite/renderer_methods.rb +22 -0
- data/app/views/api/v2/home/status_extensions.json.rabl +1 -0
- data/app/views/foreman_theme_satellite/_theme_client_side_branding.js.erb +63 -0
- data/app/views/foreman_theme_satellite/rhev/_form.erb +8 -0
- data/app/views/foreman_theme_satellite/rhev/_show.html.erb +6 -0
- data/db/migrate/20160404130619_remove_satellite_from_notification_name.rb +8 -0
- data/db/migrate/20161220092005_remove_satellite_from_notification_name_spell_correction.rb +24 -0
- data/db/migrate/20180516103339_update_idm_params.rb +19 -0
- data/db/migrate/20180605150932_deprecate_satellite_templates.rb +52 -0
- data/db/migrate/20181108171732_change_blog_url.rb +13 -0
- data/db/migrate/20201118090534_insights_param.rb +9 -0
- data/db/seeds.d/069-provisioning_templates_defaults.rb +24 -0
- data/db/seeds.d/850-global_parameters.rb +15 -0
- data/lib/foreman_theme_satellite/branded_words.rb +58 -0
- data/lib/foreman_theme_satellite/deprecated_templates.rb +9 -0
- data/lib/foreman_theme_satellite/documentation.rb +76 -0
- data/lib/foreman_theme_satellite/engine.rb +155 -0
- data/lib/foreman_theme_satellite/pry_rack.rb +12 -0
- data/lib/foreman_theme_satellite/replacer_repository.rb +57 -0
- data/lib/foreman_theme_satellite/rss_checker_branding.rb +11 -0
- data/lib/foreman_theme_satellite/version.rb +3 -0
- data/lib/foreman_theme_satellite.rb +4 -0
- data/lib/generators/foreman_theme_satellite/color_diff_generator.rb +32 -0
- data/lib/generators/foreman_theme_satellite/lib/color_changer.rb +25 -0
- data/lib/generators/foreman_theme_satellite/lib/css_compare.rb +85 -0
- data/lib/tasks/foreman_theme_satellite_tasks.rake +48 -0
- data/locale/Makefile +65 -0
- data/locale/en/foreman_theme_satellite.edit.po +152 -0
- data/locale/en/foreman_theme_satellite.po +286 -0
- data/locale/en/foreman_theme_satellite.po.time_stamp +0 -0
- data/locale/foreman_theme_satellite.pot +387 -0
- data/locale/gemspec.rb +2 -0
- data/package.json +31 -0
- data/webpack/index.js +5 -0
- metadata +226 -0
@@ -0,0 +1,124 @@
|
|
1
|
+
locales['foreman_theme_satellite'] = locales['foreman_theme_satellite'] || {}; locales['foreman_theme_satellite']['en'] = {
|
2
|
+
"domain": "foreman_theme_satellite",
|
3
|
+
"locale_data": {
|
4
|
+
"foreman_theme_satellite": {
|
5
|
+
"": {
|
6
|
+
"Project-Id-Version": "version 0.0.1",
|
7
|
+
"Report-Msgid-Bugs-To": "",
|
8
|
+
"PO-Revision-Date": "2014-08-20 08:54+0100",
|
9
|
+
"Last-Translator": "Foreman Team <foreman-dev@googlegroups.com>",
|
10
|
+
"Language-Team": "Foreman Team <foreman-dev@googlegroups.com>",
|
11
|
+
"Language": "",
|
12
|
+
"MIME-Version": "1.0",
|
13
|
+
"Content-Type": "text/plain; charset=UTF-8",
|
14
|
+
"Content-Transfer-Encoding": "8bit",
|
15
|
+
"Plural-Forms": "nplurals=2; plural=(n != 1);",
|
16
|
+
"lang": "en",
|
17
|
+
"domain": "foreman_theme_satellite",
|
18
|
+
"plural_forms": "nplurals=2; plural=(n != 1);"
|
19
|
+
},
|
20
|
+
"(build: %{version})": [
|
21
|
+
""
|
22
|
+
],
|
23
|
+
"API Guide": [
|
24
|
+
""
|
25
|
+
],
|
26
|
+
"Administering Red Hat Satellite": [
|
27
|
+
""
|
28
|
+
],
|
29
|
+
"Blog": [
|
30
|
+
""
|
31
|
+
],
|
32
|
+
"Customer portal": [
|
33
|
+
""
|
34
|
+
],
|
35
|
+
"Documentation": [
|
36
|
+
""
|
37
|
+
],
|
38
|
+
"Environment only": [
|
39
|
+
""
|
40
|
+
],
|
41
|
+
"Full trace": [
|
42
|
+
""
|
43
|
+
],
|
44
|
+
"Host group and Environment": [
|
45
|
+
""
|
46
|
+
],
|
47
|
+
"Host group only": [
|
48
|
+
""
|
49
|
+
],
|
50
|
+
"IRC": [
|
51
|
+
""
|
52
|
+
],
|
53
|
+
"If you feel this is an error with Satellite 6 itself, please open a new issue with": [
|
54
|
+
""
|
55
|
+
],
|
56
|
+
"Includes %{system} © 2009-%{year} Paul Kelly and Ohad Levy": [
|
57
|
+
""
|
58
|
+
],
|
59
|
+
"More information": [
|
60
|
+
""
|
61
|
+
],
|
62
|
+
"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.": [
|
63
|
+
""
|
64
|
+
],
|
65
|
+
"Operating System": [
|
66
|
+
""
|
67
|
+
],
|
68
|
+
"Operating system default": [
|
69
|
+
""
|
70
|
+
],
|
71
|
+
"RHEV integration is deprecated.": [
|
72
|
+
""
|
73
|
+
],
|
74
|
+
"Red Hat Satellite Blog": [
|
75
|
+
""
|
76
|
+
],
|
77
|
+
"Satellite ticketing system": [
|
78
|
+
""
|
79
|
+
],
|
80
|
+
"Show unsupported provisioning templates": [
|
81
|
+
""
|
82
|
+
],
|
83
|
+
"Show unsupported provisioning templates. When enabled, all the avaiable templates will be shown. When disabled, Red Hat supported templates will be shown only": [
|
84
|
+
""
|
85
|
+
],
|
86
|
+
"Support": [
|
87
|
+
""
|
88
|
+
],
|
89
|
+
"Supported by Red Hat": [
|
90
|
+
""
|
91
|
+
],
|
92
|
+
"The final entry, Operating System default, can be set by editing the %s page.": [
|
93
|
+
""
|
94
|
+
],
|
95
|
+
"Theme changes for Satellite 6.": [
|
96
|
+
""
|
97
|
+
],
|
98
|
+
"Transitioning from Red Hat Satellite 5 to Red Hat Satellite 6": [
|
99
|
+
""
|
100
|
+
],
|
101
|
+
"Version %{version}": [
|
102
|
+
""
|
103
|
+
],
|
104
|
+
"Version %{version} © %{year} Red Hat Inc.": [
|
105
|
+
""
|
106
|
+
],
|
107
|
+
"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:": [
|
108
|
+
""
|
109
|
+
],
|
110
|
+
"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.": [
|
111
|
+
""
|
112
|
+
],
|
113
|
+
"You can find us on %{liberachat} (irc.libera.chat) in #redhat-satellite.": [
|
114
|
+
""
|
115
|
+
],
|
116
|
+
"You would probably need to attach the": [
|
117
|
+
""
|
118
|
+
],
|
119
|
+
"and relevant log entries.": [
|
120
|
+
""
|
121
|
+
]
|
122
|
+
}
|
123
|
+
}
|
124
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
function start_gridster(){
|
2
|
+
var baseWidth = $(".gridster").width()/12 - 30;
|
3
|
+
var gridster = $(".gridster>ul").gridster({
|
4
|
+
widget_margins: [15, 10],
|
5
|
+
widget_base_dimensions: [baseWidth, 360],
|
6
|
+
max_size_x: 12,
|
7
|
+
min_cols: 12,
|
8
|
+
max_cols: 12,
|
9
|
+
autogenerate_stylesheet: false
|
10
|
+
}).data('gridster');
|
11
|
+
refreshCharts();
|
12
|
+
$(".gridster>ul>li[data-hide='true']").each(function(i, widget) {
|
13
|
+
$(widget).hide();
|
14
|
+
gridster.remove_widget(widget);
|
15
|
+
$(".gridster>ul").append($(widget));
|
16
|
+
});
|
17
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
if (typeof(angular) !== 'undefined') {
|
2
|
+
angular.module('Bastion.components').config([ '$provide', function($provide) {
|
3
|
+
$provide.decorator('PageTitle', [
|
4
|
+
'$delegate',
|
5
|
+
function ($delegate) {
|
6
|
+
var originalSetTitle = $delegate.setTitle;
|
7
|
+
$delegate.setTitle = function themeSetTitle(title, locals) {
|
8
|
+
title = 'Red Hat Satellite - ' + title;
|
9
|
+
originalSetTitle.apply($delegate, arguments)
|
10
|
+
}
|
11
|
+
return $delegate;
|
12
|
+
}
|
13
|
+
]);
|
14
|
+
}]);
|
15
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
.bastion .dropdown-menu>.active>a, .bastion .dropdown-menu>.active>a:hover, .bastion .dropdown-menu>.active>a:focus {
|
2
|
+
border: 1px solid #999999/*{borderColorHover}*/ !important;
|
3
|
+
background: #dadada/*{bgColorHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/;
|
4
|
+
font-weight: normal/*{fwDefault}*/;
|
5
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@import 'foreman_theme_satellite/login.scss';
|
2
|
+
|
3
|
+
.external-logout {
|
4
|
+
background-image: $bg-img;
|
5
|
+
background-size: $bg-size;
|
6
|
+
background-color: $bg-color;
|
7
|
+
background-repeat: $bg-repeat;
|
8
|
+
|
9
|
+
header img.brand {
|
10
|
+
margin: $brand-margin !important;
|
11
|
+
max-width: $brand-max-width !important;
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require foreman_theme_satellite/theme
|
@@ -0,0 +1,32 @@
|
|
1
|
+
$bg-img: image-url('foreman_theme_satellite/login_bg.svg');
|
2
|
+
$bg-size: 55% auto;
|
3
|
+
$bg-color: #202020;
|
4
|
+
$bg-repeat: no-repeat;
|
5
|
+
$brand-margin: 150px 15% 0 0;
|
6
|
+
$brand-max-width: none;
|
7
|
+
|
8
|
+
#login-page {
|
9
|
+
.login-pf {
|
10
|
+
background-image: $bg-img;
|
11
|
+
background-size: $bg-size;
|
12
|
+
background-color: $bg-color;
|
13
|
+
background-repeat: $bg-repeat;
|
14
|
+
}
|
15
|
+
|
16
|
+
.login-pf-brand {
|
17
|
+
margin: $brand-margin;
|
18
|
+
max-width: $brand-max-width;
|
19
|
+
}
|
20
|
+
|
21
|
+
.external-logout {
|
22
|
+
background-image: $bg-img;
|
23
|
+
background-size: $bg-size;
|
24
|
+
background-color: $bg-color;
|
25
|
+
background-repeat: $bg-repeat;
|
26
|
+
|
27
|
+
header img.brand {
|
28
|
+
margin: $brand-margin !important;
|
29
|
+
max-width: $brand-max-width !important;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@import "foreman_theme_satellite/bastion.scss";
|
2
|
+
@import "foreman_theme_satellite/application_colors";
|
3
|
+
@import "foreman_theme_satellite/login.scss";
|
4
|
+
@import "foreman_theme_satellite/external_logout.scss";
|
5
|
+
@import "foreman_theme_satellite/patternfly_and_overrides.scss";
|
6
|
+
@import "foreman_theme_satellite/topbar.scss";
|
7
|
+
@import "foreman_theme_satellite/wizard.scss";
|
8
|
+
@import "foreman_theme_satellite/provisioning_templates.scss";
|
9
|
+
|
10
|
+
.avatar{
|
11
|
+
&.small{
|
12
|
+
margin: -5px 5px 0 0;
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require_relative '../../../lib/foreman_theme_satellite/documentation'
|
2
|
+
|
3
|
+
module DocumentationControllerBranding
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
def documentation_url(section = nil, options = {})
|
7
|
+
url = ''
|
8
|
+
unless section.nil?
|
9
|
+
dictionary = ForemanThemeSatellite::Documentation::USER_GUIDE_DICTIONARY
|
10
|
+
matched_key = dictionary.keys.sort_by(&:length).reverse.find {|key| section.include? key}
|
11
|
+
url = dictionary[matched_key] if matched_key
|
12
|
+
end
|
13
|
+
if url.empty?
|
14
|
+
upstream_url = super(section, options)
|
15
|
+
if (upstream_url =~ /redhat.com/)
|
16
|
+
url = upstream_url
|
17
|
+
else
|
18
|
+
special_links_pair = ForemanThemeSatellite::Documentation::SPECIAL_LINKS.find { |regex, _val| regex.match(upstream_url) }
|
19
|
+
url = special_links_pair[1] if special_links_pair
|
20
|
+
url = "#{ForemanThemeSatellite.documentation_root}/administering_red_hat_satellite" if url.empty?
|
21
|
+
end
|
22
|
+
end
|
23
|
+
url
|
24
|
+
end
|
25
|
+
|
26
|
+
def plugin_documentation_url
|
27
|
+
ForemanThemeSatellite::Documentation::PLUGINS_DOCUMENTATION[plugin_documentation_params[:name]] || super
|
28
|
+
end
|
29
|
+
|
30
|
+
def wiki_url(section: '')
|
31
|
+
documentation_url(section)
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
module ProvisioningTemplatesControllerBranding
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
SUPPORTED_PROVISIONING_TEMPLATES = [
|
5
|
+
'ansible_provisioning_callback',
|
6
|
+
'ansible_tower_callback_script',
|
7
|
+
'ansible_tower_callback_service',
|
8
|
+
'Atomic Kickstart default',
|
9
|
+
'AutoYaST default',
|
10
|
+
'AutoYaST default iPXE',
|
11
|
+
'AutoYaST default PXELinux',
|
12
|
+
'AutoYaST default user data',
|
13
|
+
'AutoYaST SLES default',
|
14
|
+
'blacklist_kernel_modules',
|
15
|
+
'Boot disk Grub2 EFI - generic host',
|
16
|
+
'Boot disk iPXE - generic host',
|
17
|
+
'Boot disk iPXE - generic static host',
|
18
|
+
'Boot disk iPXE - host',
|
19
|
+
'built',
|
20
|
+
'CloudInit default',
|
21
|
+
'create_users',
|
22
|
+
'csr_attributes.yaml',
|
23
|
+
'Discovery Red Hat kexec',
|
24
|
+
'efibootmgr_netboot',
|
25
|
+
'eject_cdrom',
|
26
|
+
'epel',
|
27
|
+
'fips_packages',
|
28
|
+
'fix_hosts',
|
29
|
+
'freeipa_register',
|
30
|
+
'Global Registration',
|
31
|
+
'Grubby default',
|
32
|
+
'http_proxy',
|
33
|
+
'insights',
|
34
|
+
'iPXE default local boot',
|
35
|
+
'iPXE global default',
|
36
|
+
'iPXE intermediate script',
|
37
|
+
'Kickstart default',
|
38
|
+
'Kickstart default finish',
|
39
|
+
'Kickstart default iPXE',
|
40
|
+
'Kickstart default PXEGrub',
|
41
|
+
'Kickstart default PXEGrub2',
|
42
|
+
'Kickstart default PXELinux',
|
43
|
+
'Kickstart default user data',
|
44
|
+
'kickstart_ifcfg_bonded_interface',
|
45
|
+
'kickstart_ifcfg_bond_interface',
|
46
|
+
'kickstart_ifcfg_generic_interface',
|
47
|
+
'kickstart_ifcfg_get_identifier_names',
|
48
|
+
'kickstart_kernel_options',
|
49
|
+
'kickstart_networking_setup',
|
50
|
+
'Kickstart oVirt-RHVH',
|
51
|
+
'Kickstart oVirt-RHVH PXELinux',
|
52
|
+
'kickstart_rhsm',
|
53
|
+
'Linux host_init_config default',
|
54
|
+
'ntp',
|
55
|
+
'puppet.conf',
|
56
|
+
'puppetlabs_repo',
|
57
|
+
'puppet_setup',
|
58
|
+
'pxegrub2_chainload',
|
59
|
+
'PXEGrub2 default local boot',
|
60
|
+
'pxegrub2_discovery',
|
61
|
+
'PXEGrub2 global default',
|
62
|
+
'pxegrub2_mac',
|
63
|
+
'pxegrub_chainload',
|
64
|
+
'PXEGrub default local boot',
|
65
|
+
'pxegrub_discovery',
|
66
|
+
'PXEGrub global default',
|
67
|
+
'PXELinux chain iPXE',
|
68
|
+
'PXELinux chain iPXE UNDI',
|
69
|
+
'pxelinux_chainload',
|
70
|
+
'PXELinux default local boot',
|
71
|
+
'PXELinux default memdisk',
|
72
|
+
'pxelinux_discovery',
|
73
|
+
'PXELinux global default',
|
74
|
+
'redhat_register',
|
75
|
+
'remote_execution_ssh_keys',
|
76
|
+
'schedule_reboot',
|
77
|
+
'UserData default',
|
78
|
+
'UserData open-vm-tools',
|
79
|
+
'yum_proxy'
|
80
|
+
].freeze
|
81
|
+
|
82
|
+
module Overrides
|
83
|
+
def index
|
84
|
+
return super if Setting[:show_unsupported_templates]
|
85
|
+
|
86
|
+
@templates = super
|
87
|
+
@templates = @templates.where(name: ProvisioningTemplatesControllerBranding::SUPPORTED_PROVISIONING_TEMPLATES)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
included do
|
92
|
+
prepend Overrides
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module ProvisioningTemplatesHelperBranding
|
2
|
+
def link_to_if_authorized(name, options = {}, html_options = {})
|
3
|
+
return super unless name.is_a?(ProvisioningTemplate)
|
4
|
+
return super unless ProvisioningTemplatesControllerBranding::SUPPORTED_PROVISIONING_TEMPLATES.include?(name.name)
|
5
|
+
|
6
|
+
image_tag(
|
7
|
+
'foreman_theme_satellite/Redhat.png',
|
8
|
+
class: 'prov-brand-img',
|
9
|
+
title: _('Supported by Red Hat')
|
10
|
+
).safe_concat(super)
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module RhevHelper
|
2
|
+
def rhev_deprecation_alert
|
3
|
+
header = _('RHEV integration is deprecated.')
|
4
|
+
text = _('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.')
|
5
|
+
link = link_to(_('More information'), 'https://access.redhat.com/announcements/6960518', target: '_blank', rel: 'noopener')
|
6
|
+
alert = "<strong>#{header}</strong><p>#{text} #{link}</p>"
|
7
|
+
|
8
|
+
content_tag(:div, alert.html_safe, class: 'alert alert-warning')
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# rubocop:disable Metrics/LineLength
|
4
|
+
# Overrides for functions used in helpers.
|
5
|
+
module ThemeApplicationHelper
|
6
|
+
def association_text()
|
7
|
+
content_tag(:p, _('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.')) +
|
8
|
+
content_tag(:p, _('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:')) +
|
9
|
+
(content_tag :ul do
|
10
|
+
content_tag(:li, _('Host group and Environment'))
|
11
|
+
content_tag(:li, _('Host group only'))
|
12
|
+
content_tag(:li, _('Environment only'))
|
13
|
+
content_tag(:li, _('Operating system default'))
|
14
|
+
end)
|
15
|
+
(_('The final entry, Operating System default, can be set by editing the %s page.') % (link_to _('Operating System'), operatingsystems_path)).html_safe
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Overrides for functions used in helpers.
|
4
|
+
module ThemeDiscoveryHelper
|
5
|
+
# This override should be deprecated once discovery moves to use external links controller.
|
6
|
+
# Tracked upstream under https://projects.theforeman.org/issues/33231
|
7
|
+
def discovery_doc_url
|
8
|
+
ForemanThemeSatellite::Documentation::PLUGINS_DOCUMENTATION['foreman_discovery']
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Overrides for functions used in helpers.
|
4
|
+
module ThemeLayoutHelper
|
5
|
+
def title(page_title, page_header = nil)
|
6
|
+
content_for(:content) do
|
7
|
+
react_component 'Helmet', title: page_title.to_s
|
8
|
+
end
|
9
|
+
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def layout_data
|
14
|
+
super.merge(
|
15
|
+
logo: image_path("foreman_theme_satellite/header_logo.svg", :class => "header-logo")
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module DeprecationNotification
|
2
|
+
module StringParser
|
3
|
+
def initialize(template, options = {})
|
4
|
+
options[:version] = '6.8' if options[:version] == '2.0' ||
|
5
|
+
options[:version] == '2.1'
|
6
|
+
options[:version] = '6.9' if options[:version] == '2.2' ||
|
7
|
+
options[:version] == '2.3'
|
8
|
+
options[:version] = '6.10' if options[:version] == '2.4' ||
|
9
|
+
options[:version] == '2.5'
|
10
|
+
super(template, options)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
module Notification
|
15
|
+
def create!(opts)
|
16
|
+
if opts[:notification_blueprint] == NotificationBlueprint.find_by_name('feature_deprecation') &&
|
17
|
+
opts.dig(:actions, :links, 0, :href) == 'https://community.theforeman.org/t/dropping-smart-variables/16176'
|
18
|
+
opts[:actions][:links][0][:href] = "#{ForemanThemeSatellite.documentation_root}/release_notes/index"
|
19
|
+
end
|
20
|
+
super(opts)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Provisioning
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
scoped_search on: :name, complete_value: { true: true, false: false }, rename: 'supported', ext_method: :search_by_supported
|
6
|
+
|
7
|
+
def self.search_by_supported(_key, operator, value)
|
8
|
+
value = value == 'true'
|
9
|
+
value = !value if operator == '<>'
|
10
|
+
op = value ? 'IN' : 'NOT IN'
|
11
|
+
names = ProvisioningTemplatesControllerBranding::SUPPORTED_PROVISIONING_TEMPLATES.map do |n|
|
12
|
+
"'#{n}'"
|
13
|
+
end.join(',')
|
14
|
+
conditions = "templates.name #{op} (#{names})"
|
15
|
+
|
16
|
+
{
|
17
|
+
conditions: sanitize_sql_for_conditions([conditions])
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module RealmTheme
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
included do
|
4
|
+
remove_const(:TYPES)
|
5
|
+
const_set(:TYPES, ["Red Hat Identity Management", "Active Directory"])
|
6
|
+
#removed validator that was using the old TYPES const
|
7
|
+
Realm.class_eval do
|
8
|
+
_validators.delete(:realm_type)
|
9
|
+
_validate_callbacks.each do |callback|
|
10
|
+
if callback.raw_filter.respond_to? :attributes
|
11
|
+
callback.raw_filter.attributes.delete :realm_type
|
12
|
+
end
|
13
|
+
end
|
14
|
+
validates :realm_type, :presence => true, :inclusion => { :in => ["Red Hat Identity Management", "Active Directory"] }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module SettingBranding
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
class_methods do
|
4
|
+
def replace_keywords(keyword)
|
5
|
+
keyword&.gsub! '$VERSION', ForemanThemeSatellite::SATELLITE_VERSION
|
6
|
+
super
|
7
|
+
end
|
8
|
+
|
9
|
+
def [](name)
|
10
|
+
if UpstreamOnlySettings::SETTINGS.include?(name.to_s)
|
11
|
+
Rails.logger.debug "Setting '#{name}' is not available in Satellite; ignoring"
|
12
|
+
return nil
|
13
|
+
end
|
14
|
+
super
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|