foreman_patch 1.1.5 → 1.1.6.alpha4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/foreman_patch/concerns/hosts_controller_extensions.rb +35 -41
- data/app/controllers/foreman_patch/react_controller.rb +12 -0
- data/app/lib/actions/foreman_patch/cycle/create.rb +5 -1
- data/app/lib/actions/foreman_patch/cycle/initiate.rb +5 -1
- data/app/lib/actions/foreman_patch/invocation/action.rb +23 -29
- data/app/lib/actions/foreman_patch/invocation/patch.rb +16 -7
- data/app/lib/actions/foreman_patch/invocation/process_logging.rb +44 -0
- data/app/lib/actions/foreman_patch/invocation/proxy_action.rb +52 -0
- data/app/lib/actions/foreman_patch/invocation/wait_for_host.rb +4 -29
- data/app/lib/actions/foreman_patch/round/patch.rb +5 -1
- data/app/lib/actions/foreman_patch/window/publish.rb +5 -1
- data/app/lib/actions/foreman_patch/window/resolve_hosts.rb +5 -1
- data/app/models/foreman_patch/event.rb +13 -0
- data/app/models/foreman_patch/invocation.rb +2 -4
- data/app/views/foreman_patch/api/v2/invocations/base.json.rabl +1 -1
- data/app/views/foreman_patch/api/v2/invocations/event.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/invocations/show.json.rabl +2 -2
- data/app/views/foreman_patch/groups/index.html.erb +1 -1
- data/app/views/foreman_patch/layouts/react.html.erb +1 -1
- data/config/api_routes.rb +26 -28
- data/config/routes.rb +40 -29
- data/db/migrate/20230706092400_nullify_group_on_delete.rb +11 -0
- data/db/migrate/20230707102800_create_invocation_events.rb +16 -0
- data/db/seeds.d/100-assign_features_with_templates.rb +6 -12
- data/lib/foreman_patch/engine.rb +11 -46
- data/lib/foreman_patch/register.rb +119 -0
- data/lib/foreman_patch/version.rb +1 -1
- data/locale/en/foreman_patch.po +1 -1
- data/locale/foreman_patch.pot +1 -1
- data/locale/gemspec.rb +1 -1
- data/package.json +4 -0
- data/public/assets/foreman_patch/calendar-b5391efda77239c4a4894e9f03f34610f6c8e2e748b2a147febfea814b857cdc.scss.gz +0 -0
- data/public/assets/foreman_patch/cycle_plans-e5667e178ba389908f5c815b24ec0ea77c340849d56bc39c5ce72bb626bd446a.scss +6 -0
- data/public/assets/foreman_patch/cycle_plans-e5667e178ba389908f5c815b24ec0ea77c340849d56bc39c5ce72bb626bd446a.scss.gz +0 -0
- data/public/assets/foreman_patch/cycle_plans-ff3d252119622a68828ff70f4a97328303963002237dbf850e92d6a706e93667.scss +6 -0
- data/public/assets/foreman_patch/cycle_plans-ff3d252119622a68828ff70f4a97328303963002237dbf850e92d6a706e93667.scss.gz +0 -0
- data/public/assets/foreman_patch/foreman_patch-410cf04bf9b09e65fee034cc3f2dd74acf2524abf881c6d6e559d5c62a615faf.css +11 -0
- data/public/assets/foreman_patch/foreman_patch-410cf04bf9b09e65fee034cc3f2dd74acf2524abf881c6d6e559d5c62a615faf.css.gz +0 -0
- data/public/assets/foreman_patch/foreman_patch-84845e54f06d3a11189828e656432d587c7312358cdf694753da7b78b7dabcee.css +11 -0
- data/public/assets/foreman_patch/foreman_patch-84845e54f06d3a11189828e656432d587c7312358cdf694753da7b78b7dabcee.css.gz +0 -0
- data/public/assets/foreman_patch/foreman_patch-a76c5fd10a5795e97c5ae4c222bfdf4ab88da49d6a7659175dba79f8fc62ab47.css +82 -0
- data/public/assets/foreman_patch/foreman_patch-a76c5fd10a5795e97c5ae4c222bfdf4ab88da49d6a7659175dba79f8fc62ab47.css.gz +0 -0
- data/public/assets/foreman_patch/foreman_patch.json +1 -0
- data/public/assets/foreman_patch/plan_edit_windows-2eb04c7e83fa62797b0a14364d3ff5b3c4336983603fdc5a276b5464eeba7e60.js +9 -0
- data/public/assets/foreman_patch/plan_edit_windows-2eb04c7e83fa62797b0a14364d3ff5b3c4336983603fdc5a276b5464eeba7e60.js.gz +0 -0
- data/public/assets/foreman_patch/plan_edit_windows-ddedd3e70fb6ef761f636be2b7b35286e86d68e126bfc37294f9365a5171a928.js +9 -0
- data/public/assets/foreman_patch/plan_edit_windows-ddedd3e70fb6ef761f636be2b7b35286e86d68e126bfc37294f9365a5171a928.js.gz +0 -0
- data/public/webpack/foreman_patch/bundle.css +1 -0
- data/public/webpack/foreman_patch/bundle.js +34173 -0
- data/public/webpack/foreman_patch/foreman_patch.css +1 -0
- data/public/webpack/foreman_patch/foreman_patch.js +34366 -0
- data/public/webpack/foreman_patch/foreman_patch:global.css +1 -0
- data/public/webpack/foreman_patch/foreman_patch:global.js +32098 -0
- data/public/webpack/foreman_patch/manifest.json +25 -0
- data/public/webpack/foreman_patch/vendor.js +5201 -0
- data/webpack/components/Invocations/InvocationsPage.js +1 -1
- data/webpack/components/Invocations/index.js +6 -6
- data/webpack/components/common/Calendar/Calendar.css +76 -0
- data/webpack/components/common/Calendar/Calendar.js +5 -4
- data/webpack/components/common/Table/index.js +28 -0
- data/webpack/global_index.js +16 -0
- data/webpack/index.js +3 -8
- data/webpack/src/Components/Invocation/Invocation.js +67 -0
- data/webpack/src/Components/Invocation/InvocationLogFooter.js +30 -0
- data/webpack/src/Components/Invocation/InvocationLogToolbar.js +80 -0
- data/webpack/{components → src/Components}/Invocation/InvocationSelectors.js +0 -3
- data/webpack/src/Components/Invocation/index.js +62 -0
- data/webpack/src/Components/InvocationStatus.js +50 -0
- data/webpack/src/Components/Loading.js +51 -0
- data/webpack/src/Extends/index.js +15 -0
- data/webpack/src/Router/routes.js +4 -2
- data/webpack/src/reducers.js +1 -1
- metadata +57 -88
- data/app/lib/actions/foreman_patch/cycle/complete.rb +0 -41
- data/app/lib/actions/foreman_patch/cycle/plan.rb +0 -73
- data/app/lib/actions/foreman_patch/round/plan.rb +0 -33
- data/app/lib/actions/foreman_patch/window/plan.rb +0 -43
- data/app/models/setting/patching.rb +0 -57
- data/app/views/foreman_patch/api/v2/invocations/phase.json.rabl +0 -7
- data/config/routes/mount_engine.rb +0 -3
- data/config/routes/overrides.rb +0 -10
- data/lib/foreman_patch/plugin.rb +0 -47
- data/webpack/components/Invocation/Invocation.js +0 -47
- data/webpack/components/Invocation/index.js +0 -36
- data/webpack/components/common/Terminal/OutputLine.js +0 -26
- data/webpack/components/common/Terminal/Terminal.js +0 -115
- data/webpack/components/common/Terminal/Terminal.scss +0 -47
- data/webpack/src/ForemanPatch.js +0 -11
- data/webpack/src/Router/index.js +0 -14
- data/webpack/src/index.js +0 -1
- /data/{webpack/components/common/Calendar/Calendar.scss → public/assets/foreman_patch/calendar-b5391efda77239c4a4894e9f03f34610f6c8e2e748b2a147febfea814b857cdc.scss} +0 -0
- /data/webpack/components/Invocations/{Invocations.scss → Invocations.css} +0 -0
- /data/webpack/{components → src/Components}/Invocation/InvocationActions.js +0 -0
- /data/webpack/{components → src/Components}/Invocation/InvocationConsts.js +0 -0
data/config/routes.rb
CHANGED
@@ -1,47 +1,58 @@
|
|
1
1
|
ForemanPatch::Engine.routes.draw do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
get 'auto_complete_search'
|
6
|
-
end
|
2
|
+
resources :groups, only: [:index, :new, :create, :edit, :update, :destroy] do
|
3
|
+
collection do
|
4
|
+
get 'auto_complete_search'
|
7
5
|
end
|
6
|
+
end
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
resources :windows, only: [:new, :create]
|
8
|
+
resources :cycles, only: [:index, :show, :destroy] do
|
9
|
+
collection do
|
10
|
+
get 'auto_complete_search'
|
15
11
|
end
|
16
12
|
|
17
|
-
resources :windows, only: [:
|
13
|
+
resources :windows, only: [:new, :create]
|
14
|
+
end
|
18
15
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
resources :windows, only: [:show, :destroy]
|
17
|
+
|
18
|
+
resources :rounds, only: [:show] do
|
19
|
+
collection do
|
20
|
+
get 'auto_complete_search'
|
23
21
|
end
|
22
|
+
end
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
24
|
+
resources :invocations, only: [:show, :destroy] do
|
25
|
+
collection do
|
26
|
+
get 'auto_complete_search'
|
29
27
|
end
|
28
|
+
end
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end
|
30
|
+
resources :plans, only: [:index, :new, :create, :show, :edit, :update, :destroy] do
|
31
|
+
resources :window_plans, only: [:new, :create]
|
32
|
+
member do
|
33
|
+
post :iterate
|
36
34
|
end
|
35
|
+
end
|
37
36
|
|
38
|
-
|
37
|
+
resources :window_plans, only: [:edit, :update, :destroy]
|
39
38
|
|
40
|
-
|
41
|
-
|
39
|
+
resources :ticket_fields, except: [:show] do
|
40
|
+
resources :lookup_values, only: [:index, :create, :update, :destroy]
|
41
|
+
collection do
|
42
|
+
get 'auto_complete_search'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
constraints(id: %r{[^/]+}) do
|
47
|
+
resources :hosts, only: [], controller: '/hosts' do
|
42
48
|
collection do
|
43
|
-
|
49
|
+
post 'select_multiple_patch_group'
|
50
|
+
post 'update_multiple_patch_group'
|
44
51
|
end
|
45
52
|
end
|
46
53
|
end
|
47
54
|
end
|
55
|
+
|
56
|
+
Foreman::Application.routes.draw do
|
57
|
+
mount ForemanPatch::Engine, at: '/foreman_patch'
|
58
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class NullifyGroupOnDelete < ActiveRecord::Migration[6.0]
|
2
|
+
def up
|
3
|
+
remove_foreign_key :foreman_patch_rounds, name: :foreman_patch_rounds_by_group
|
4
|
+
add_foreign_key :foreman_patch_rounds, :foreman_patch_groups, column: :group_id, name: :foreman_patch_rounds_by_group, on_delete: :nullify
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
remove_foreign_key :foreman_patch_rounds, name: :foreman_patch_rounds_by_group
|
9
|
+
add_foreign_key :foreman_patch_rounds, :foreman_patch_groups, column: :group_id, name: :foreman_patch_rounds_by_group
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateInvocationEvents < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :foreman_patch_events do |t|
|
4
|
+
t.bigint :invocation_id, null: false
|
5
|
+
t.integer :sequence, null: false
|
6
|
+
t.timestamp :timestamp, null: false
|
7
|
+
t.string :event_type, null: false
|
8
|
+
t.string :event, null: false
|
9
|
+
t.string :meta
|
10
|
+
|
11
|
+
t.index [:invocation_id, :sequence], unique: true, name: :foreman_patch_events_index
|
12
|
+
end
|
13
|
+
|
14
|
+
add_foreign_key :foreman_patch_events, :foreman_patch_invocations, column: :invocation_id, name: :foreman_patch_events_for_invocation, on_delete: :cascade
|
15
|
+
end
|
16
|
+
end
|
@@ -1,16 +1,10 @@
|
|
1
1
|
User.as_anonymous_admin do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
module_template = JobTemplate.find_by(name: 'Power Action - SSH Default')
|
9
|
-
if module_template && !Rails.env.test? && Setting[:remote_execution_sync_templates]
|
10
|
-
module_template.sync_feature('power_action')
|
11
|
-
module_template.organizations << Organization.unscoped.all if module_template.organizations.empty?
|
12
|
-
module_template.locations << Location.unscoped.all if module_template.locations.empty?
|
13
|
-
end
|
2
|
+
JobTemplate.without_auditing do
|
3
|
+
module_template = JobTemplate.find_by(name: 'Power Action - SSH Default')
|
4
|
+
if module_template && !Rails.env.test? && Setting[:remote_execution_sync_templates]
|
5
|
+
module_template.sync_feature('power_action')
|
6
|
+
module_template.organizations << Organization.unscoped.all if module_template.organizations.empty?
|
7
|
+
module_template.locations << Location.unscoped.all if module_template.locations.empty?
|
14
8
|
end
|
15
9
|
end
|
16
10
|
end
|
data/lib/foreman_patch/engine.rb
CHANGED
@@ -1,15 +1,9 @@
|
|
1
1
|
module ForemanPatch
|
2
2
|
class Engine < ::Rails::Engine
|
3
|
-
engine_name 'foreman_patch'
|
4
3
|
isolate_namespace ForemanPatch
|
4
|
+
engine_name 'foreman_patch'
|
5
5
|
|
6
|
-
config.
|
7
|
-
config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
|
8
|
-
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
|
9
|
-
|
10
|
-
initializer 'foreman_patch.configure_assets', group: :assets do
|
11
|
-
SETTINGS[:foreman_patch] = { assets: { precompile: ['foreman_patch.css'] } }
|
12
|
-
end
|
6
|
+
config.paths['config/routes.rb'].unshift('config/api_routes.rb')
|
13
7
|
|
14
8
|
# Add any db migrations
|
15
9
|
initializer 'foreman_patch.load_app_instance_data' do |app|
|
@@ -18,40 +12,29 @@ module ForemanPatch
|
|
18
12
|
end
|
19
13
|
end
|
20
14
|
|
21
|
-
initializer 'foreman_patch.
|
22
|
-
|
23
|
-
app.routes_reloader.paths << "#{ForemanPatch::Engine.root}/config/api_routes.rb"
|
24
|
-
app.routes_reloader.paths.unshift("#{ForemanPatch::Engine.root}/config/routes/overrides.rb")
|
25
|
-
end
|
26
|
-
|
27
|
-
initializer 'foreman_patch.load_default_settings', before: :load_config_initializers do |_app|
|
28
|
-
require_dependency File.expand_path('../../../app/models/setting/patching.rb', __FILE__)
|
29
|
-
end
|
30
|
-
|
31
|
-
initializer 'foreman_patch.require_dynflow', before: 'foreman_tasks.initialize_dynflow' do |_app|
|
32
|
-
::ForemanTasks.dynflow.require!
|
33
|
-
::ForemanTasks.dynflow.config.eager_load_paths << File.join(ForemanPatch::Engine.root, 'app/lib/actions/foreman_patch')
|
34
|
-
end
|
35
|
-
|
36
|
-
initializer 'foreman_patch.register_plugin', :before => :finisher_hook do |_app|
|
37
|
-
require 'foreman_patch/plugin'
|
15
|
+
initializer 'foreman_patch.register_plugin', before: :finisher_hook, after: 'katello.register_plugin' do |_app|
|
16
|
+
require 'foreman_patch/register'
|
38
17
|
Apipie.configuration.checksum_path += ['/foreman_patch/api/']
|
39
18
|
end
|
40
19
|
|
41
|
-
initializer 'foreman_patch.
|
42
|
-
|
20
|
+
initializer 'foreman_patch.register_actions', before: :finisher_hook do |_app|
|
21
|
+
ForemanTasks.dynflow.require!
|
22
|
+
ForemanTasks.dynflow.config.eager_load_paths << File.join(ForemanPatch::Engine.root, 'app/lib/actions/foreman_patch')
|
23
|
+
ForemanTasks.dynflow.eager_load_actions!
|
43
24
|
end
|
44
25
|
|
45
26
|
# Include concerns in this config.to_prepare block
|
46
27
|
config.to_prepare do
|
47
28
|
# Model extensions
|
48
|
-
::Host::Managed.
|
29
|
+
::Host::Managed.include ForemanPatch::Concerns::HostManagedExtensions
|
49
30
|
|
50
31
|
# Controller extensions
|
51
32
|
::HostsController.include ForemanPatch::Concerns::HostsControllerExtensions
|
52
33
|
|
53
34
|
# Api Controller extensions
|
54
35
|
::Api::V2::HostsController.include ForemanPatch::Concerns::Api::V2::HostsControllerExtensions
|
36
|
+
rescue => e
|
37
|
+
Rails.logger.warn "ForemanPatch: skipping engine hook (#{e})"
|
55
38
|
end
|
56
39
|
|
57
40
|
rake_tasks do
|
@@ -66,22 +49,4 @@ module ForemanPatch
|
|
66
49
|
Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
|
67
50
|
end
|
68
51
|
end
|
69
|
-
|
70
|
-
def self.table_name_prefix
|
71
|
-
'foreman_patch_'
|
72
|
-
end
|
73
|
-
|
74
|
-
def self.use_relative_model_naming
|
75
|
-
true
|
76
|
-
end
|
77
|
-
|
78
|
-
def self.register_rex_features
|
79
|
-
RemoteExecutionFeature.register(
|
80
|
-
:power_action,
|
81
|
-
N_('Power Action'),
|
82
|
-
description: N_('Power Action'),
|
83
|
-
provided_inputs: 'action',
|
84
|
-
host_action_button: false
|
85
|
-
)
|
86
|
-
end
|
87
52
|
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
Foreman::Plugin.register :foreman_patch do
|
2
|
+
requires_foreman '~> 3.1'
|
3
|
+
|
4
|
+
register_global_js_file 'global'
|
5
|
+
|
6
|
+
settings do
|
7
|
+
category(:patching, N_('Patching')) do
|
8
|
+
setting('host_max_wait_for_up',
|
9
|
+
type: :integer,
|
10
|
+
description: N_("Maximum seconds to wait for a host after patching restart."),
|
11
|
+
default: 600,
|
12
|
+
full_name: N_("Max wait for host up"))
|
13
|
+
setting('host_patch_timeout',
|
14
|
+
type: :integer,
|
15
|
+
description: N_("Maximum seconds for a patching invocation to run before timing out"),
|
16
|
+
default: nil,
|
17
|
+
full_name: N_('Patch Timeout'))
|
18
|
+
setting('patch_schedule_time_zone',
|
19
|
+
type: :string,
|
20
|
+
description: N_('Time zone used to base patch window scheduling off of.'),
|
21
|
+
default: 'UTC',
|
22
|
+
full_name: N_('Patch Schedule Time Zone'),
|
23
|
+
collection: proc { ActiveSupport::TimeZone.all.map { |tz| [ tz.name, tz.name ] }.to_h })
|
24
|
+
setting('ticket_api_host',
|
25
|
+
type: :string,
|
26
|
+
description: N_('Host used for change management tickets'),
|
27
|
+
default: nil,
|
28
|
+
full_name: N_('Ticket API host'))
|
29
|
+
setting('ticket_api_proxy',
|
30
|
+
type: :string,
|
31
|
+
description: N_('HTTP Proxy to access ticket API host'),
|
32
|
+
default: nil,
|
33
|
+
full_name: N_('Ticket API HTTP proxy'),
|
34
|
+
collection: proc { HttpProxy.all.map { |proxy| [proxy.name, proxy.name_and_url] }.to_h },
|
35
|
+
include_blank: N_('no proxy'))
|
36
|
+
setting('ticket_api_user',
|
37
|
+
type: :string,
|
38
|
+
description: N_('User with access to ticket API'),
|
39
|
+
default: nil,
|
40
|
+
full_name: N_('Ticket API user'))
|
41
|
+
setting('ticket_api_password',
|
42
|
+
type: :string,
|
43
|
+
description: N_('Password for ticket API user'),
|
44
|
+
default: nil,
|
45
|
+
full_name: N_('Ticket API password'),
|
46
|
+
encrypted: true)
|
47
|
+
setting('ticket_api_path',
|
48
|
+
type: :string,
|
49
|
+
description: N_('Ticket API path for REST/CRUD operations'),
|
50
|
+
default: nil,
|
51
|
+
full_name: N_('Ticket API path'))
|
52
|
+
setting('ticket_web_ui_path',
|
53
|
+
type: :string,
|
54
|
+
description: N_('Path for opening a ticket in the web UI'),
|
55
|
+
default: nil,
|
56
|
+
full_name: N_('Ticket Web UI path'))
|
57
|
+
setting('ticket_label_field',
|
58
|
+
type: :string,
|
59
|
+
description: N_('Name of the field used for the ticket label'),
|
60
|
+
default: nil,
|
61
|
+
full_name: N_('Ticket label field'))
|
62
|
+
setting('ticket_id_field',
|
63
|
+
type: :string,
|
64
|
+
description: N_('Name of the field used for the ticket id'),
|
65
|
+
default: nil,
|
66
|
+
full_name: N_('Ticket ID field'))
|
67
|
+
setting('skip_broken_patches',
|
68
|
+
type: :boolean,
|
69
|
+
description: N_('Skip broken dependencies during patching'),
|
70
|
+
default: true,
|
71
|
+
full_name: N_('Skip broken patches'))
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
apipie_documented_controllers(["#{ForemanPatch::Engine.root}/app/controllers/foreman_patch/api/v2/*.rb"])
|
76
|
+
|
77
|
+
# Add permissions
|
78
|
+
security_block :foreman_patch do
|
79
|
+
end
|
80
|
+
|
81
|
+
divider :top_menu, caption: N_('Patching'), parent: :content_menu
|
82
|
+
menu :top_menu, :groups,
|
83
|
+
caption: N_('Groups'),
|
84
|
+
engine: ForemanPatch::Engine,
|
85
|
+
parent: :content_menu
|
86
|
+
|
87
|
+
menu :top_menu, :cycles,
|
88
|
+
caption: N_('Cycles'),
|
89
|
+
engine: ForemanPatch::Engine,
|
90
|
+
parent: :content_menu
|
91
|
+
|
92
|
+
menu :top_menu, :plans,
|
93
|
+
caption: N_('Plans'),
|
94
|
+
engine: ForemanPatch::Engine,
|
95
|
+
parent: :content_menu
|
96
|
+
|
97
|
+
menu :top_menu, :ticket_fields,
|
98
|
+
caption: N_('Ticket Fields'),
|
99
|
+
engine: ForemanPatch::Engine,
|
100
|
+
parent: :content_menu
|
101
|
+
|
102
|
+
parameter_filter ::Host::Managed, :group_facet_attributes => [:group_id]
|
103
|
+
|
104
|
+
describe_host do
|
105
|
+
multiple_actions_provider :patch_host_multiple_actions
|
106
|
+
overview_fields_provider :patch_host_overview_fields
|
107
|
+
end
|
108
|
+
|
109
|
+
register_facet ForemanPatch::Host::GroupFacet, :group_facet do
|
110
|
+
api_view list: 'foreman_patch/api/v2/group_facet/base_with_root',
|
111
|
+
single: 'foreman_patch/api/v2/group_facet/show'
|
112
|
+
api_docs :group_facet_attributes, ::ForemanPatch::Api::V2::HostGroupsController
|
113
|
+
extend_model ForemanPatch::Concerns::GroupFacetHostExtensions
|
114
|
+
set_dependent_action :destroy
|
115
|
+
end
|
116
|
+
|
117
|
+
RemoteExecutionFeature.register(:power_action, N_("Power Action"), description: N_("Power Action"), provided_inputs: ['action'])
|
118
|
+
RemoteExecutionFeature.register(:ensure_services, N_("Ensure Services"), description: N_("Ensure Services are running"))
|
119
|
+
end
|
data/locale/en/foreman_patch.po
CHANGED
data/locale/foreman_patch.pot
CHANGED
data/locale/gemspec.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# Matches foreman_patch.gemspec
|
2
|
-
_(
|
2
|
+
_("Foreman Plugin for Managing Patching.")
|
data/package.json
CHANGED
@@ -12,6 +12,7 @@
|
|
12
12
|
"publish-coverage": "tfm-publish-coverage",
|
13
13
|
"stories": "tfm-stories --plugin",
|
14
14
|
"stories:build": "tfm-build-stories --plugin",
|
15
|
+
"stories:deploy": "surge --project .storybook-dist",
|
15
16
|
"create-react-component": "yo react-domain"
|
16
17
|
},
|
17
18
|
"repository": {
|
@@ -36,6 +37,9 @@
|
|
36
37
|
"stylelint-config-standard": "^18.0.0",
|
37
38
|
"stylelint": "^9.3.0"
|
38
39
|
},
|
40
|
+
"dependencies": {
|
41
|
+
"@patternfly/react-log-viewer": "~4.87.100"
|
42
|
+
},
|
39
43
|
"peerDependencies": {
|
40
44
|
"@theforeman/vendor": "^8.15.0"
|
41
45
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
|
4
|
+
*/
|
5
|
+
/* line 3, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
6
|
+
.calendar .day {
|
7
|
+
padding: 2px;
|
8
|
+
height: 120px;
|
9
|
+
}
|
10
|
+
|
11
|
+
/* line 16, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
12
|
+
.calendar .today {
|
13
|
+
background: #ffffc0;
|
14
|
+
}
|
15
|
+
|
16
|
+
/* line 20, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
17
|
+
.calendar .past {
|
18
|
+
background: #f9f9f9;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* line 28, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
22
|
+
.calendar .disabled {
|
23
|
+
background: #e8e8e8;
|
24
|
+
}
|
25
|
+
|
26
|
+
/* line 32, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
27
|
+
.calendar td.enabled:hover {
|
28
|
+
background: #def3ff;
|
29
|
+
}
|
30
|
+
|
31
|
+
/* line 36, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
32
|
+
.calendar h6 {
|
33
|
+
margin: 2px 3px;
|
34
|
+
}
|
35
|
+
|
36
|
+
/* line 40, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
37
|
+
.calendar div.day {
|
38
|
+
margin: 0;
|
39
|
+
height: inherit;
|
40
|
+
width: inherit;
|
41
|
+
display: block;
|
42
|
+
}
|
43
|
+
|
44
|
+
/* line 47, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
45
|
+
.calendar div.event {
|
46
|
+
margin: 2px, 10px;
|
47
|
+
border: 1px solid;
|
48
|
+
border-color: #d1d1d1;
|
49
|
+
padding: 2px 3px;
|
50
|
+
background: #ffffff;
|
51
|
+
}
|
52
|
+
|
53
|
+
/* line 56, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
54
|
+
.calendar .calendar-header button {
|
55
|
+
font-size: 20px;
|
56
|
+
width: 100%;
|
57
|
+
}
|
58
|
+
|
59
|
+
/* line 61, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
60
|
+
.calendar .calendar-header .calendar-title {
|
61
|
+
font-size: 24px;
|
62
|
+
text-align: center;
|
63
|
+
}
|
64
|
+
|
65
|
+
/* line 66, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
66
|
+
.calendar .calendar-header .previous {
|
67
|
+
padding-left: 0px;
|
68
|
+
padding-right: 20px;
|
69
|
+
}
|
70
|
+
|
71
|
+
/* line 71, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/calendar.scss */
|
72
|
+
.calendar .calendar-header .next {
|
73
|
+
padding-left: 20px;
|
74
|
+
padding-right: 0px;
|
75
|
+
}
|
76
|
+
/* line 1, ../projects/foreman_patch/app/assets/stylesheets/foreman_patch/cycle_plans.scss */
|
77
|
+
div.event {
|
78
|
+
margin: 2px 10px;
|
79
|
+
border: 1px solid black;
|
80
|
+
border-color: #d1d1d1;
|
81
|
+
padding: 2px 3px;
|
82
|
+
}
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
{"files":{"foreman_patch/foreman_patch-410cf04bf9b09e65fee034cc3f2dd74acf2524abf881c6d6e559d5c62a615faf.css":{"logical_path":"foreman_patch/foreman_patch.css","mtime":"2023-05-22T20:41:49+00:00","size":209,"digest":"4617ad50b4acfdbcac439e6e98890cf44ee4404a32997c83bd8c39efc6a63ba4","integrity":"sha256-RhetULSs/bysQ55umIkM9E7kQEoymXyDvYw578amO6Q="},"foreman_patch/cycle_plans-ff3d252119622a68828ff70f4a97328303963002237dbf850e92d6a706e93667.scss":{"logical_path":"foreman_patch/cycle_plans.scss","mtime":"2023-05-22T20:41:49+00:00","size":106,"digest":"aa7bb2d36a98d83776b4dd9dd93431ba648b84a37478f93c445eb9bda0f84006","integrity":"sha256-qnuy02qY2Dd2tN2d2TQxumSLhKN0ePk8RF65vaD4QAY="},"foreman_patch/plan_edit_windows-ddedd3e70fb6ef761f636be2b7b35286e86d68e126bfc37294f9365a5171a928.js":{"logical_path":"foreman_patch/plan_edit_windows.js","mtime":"2023-05-22T20:41:49+00:00","size":283,"digest":"f692a4baa15305b1be60ee3377d7460ebb5606ad8d7a907341b76bf05010991a","integrity":"sha256-9pKkuqFTBbG+YO4zd9dGDrtWBq2NepBzQbdr8FAQmRo="},"foreman_patch/calendar-b5391efda77239c4a4894e9f03f34610f6c8e2e748b2a147febfea814b857cdc.scss":{"logical_path":"foreman_patch/calendar.scss","mtime":"2023-07-11T17:43:02+00:00","size":954,"digest":"76d5588d09b6965ef0929bd626928c7ebb0563c66a062875a714edc90a60d9c9","integrity":"sha256-dtVYjQm2ll7wkpvWJpKMfrsFY8ZqBih1pxTtyQpg2ck="},"foreman_patch/foreman_patch-a76c5fd10a5795e97c5ae4c222bfdf4ab88da49d6a7659175dba79f8fc62ab47.css":{"logical_path":"foreman_patch/foreman_patch.css","mtime":"2023-07-11T17:43:02+00:00","size":2149,"digest":"81f5c52d7c9b7e29d8e2d0999fd1823c163e9ed4edaed4b60f9104e9f9a75aa4","integrity":"sha256-gfXFLXybfinY4tCZn9GCPBY+ntTtrtS2D5EE6fmnWqQ="},"foreman_patch/cycle_plans-e5667e178ba389908f5c815b24ec0ea77c340849d56bc39c5ce72bb626bd446a.scss":{"logical_path":"foreman_patch/cycle_plans.scss","mtime":"2023-07-19T20:44:56+00:00","size":106,"digest":"aa7bb2d36a98d83776b4dd9dd93431ba648b84a37478f93c445eb9bda0f84006","integrity":"sha256-qnuy02qY2Dd2tN2d2TQxumSLhKN0ePk8RF65vaD4QAY="},"foreman_patch/plan_edit_windows-2eb04c7e83fa62797b0a14364d3ff5b3c4336983603fdc5a276b5464eeba7e60.js":{"logical_path":"foreman_patch/plan_edit_windows.js","mtime":"2023-07-19T20:44:56+00:00","size":283,"digest":"f692a4baa15305b1be60ee3377d7460ebb5606ad8d7a907341b76bf05010991a","integrity":"sha256-9pKkuqFTBbG+YO4zd9dGDrtWBq2NepBzQbdr8FAQmRo="},"foreman_patch/foreman_patch-84845e54f06d3a11189828e656432d587c7312358cdf694753da7b78b7dabcee.css":{"logical_path":"foreman_patch/foreman_patch.css","mtime":"2023-07-19T20:44:56+00:00","size":209,"digest":"4617ad50b4acfdbcac439e6e98890cf44ee4404a32997c83bd8c39efc6a63ba4","integrity":"sha256-RhetULSs/bysQ55umIkM9E7kQEoymXyDvYw578amO6Q="}},"assets":{"foreman_patch/foreman_patch.css":"foreman_patch/foreman_patch-84845e54f06d3a11189828e656432d587c7312358cdf694753da7b78b7dabcee.css","foreman_patch/cycle_plans.scss":"foreman_patch/cycle_plans-e5667e178ba389908f5c815b24ec0ea77c340849d56bc39c5ce72bb626bd446a.scss","foreman_patch/plan_edit_windows.js":"foreman_patch/plan_edit_windows-2eb04c7e83fa62797b0a14364d3ff5b3c4336983603fdc5a276b5464eeba7e60.js","foreman_patch/calendar.scss":"foreman_patch/calendar-b5391efda77239c4a4894e9f03f34610f6c8e2e748b2a147febfea814b857cdc.scss"}}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
function remove_window_plan(window_plan_id) {
|
2
|
+
$('#windowPlan' + window_plan_id).remove();
|
3
|
+
}
|
4
|
+
|
5
|
+
function edit_window_plan(window_plan_id) {
|
6
|
+
if (window_plan_id == null) form = null;
|
7
|
+
else form = $('#windowPlans #windowPlanHidden' + window_plan_id);
|
8
|
+
//show_window_plan_modal();
|
9
|
+
};
|
Binary file
|
@@ -0,0 +1,9 @@
|
|
1
|
+
function remove_window_plan(window_plan_id) {
|
2
|
+
$('#windowPlan' + window_plan_id).remove();
|
3
|
+
}
|
4
|
+
|
5
|
+
function edit_window_plan(window_plan_id) {
|
6
|
+
if (window_plan_id == null) form = null;
|
7
|
+
else form = $('#windowPlans #windowPlanHidden' + window_plan_id);
|
8
|
+
//show_window_plan_modal();
|
9
|
+
};
|