foreman_openbolt 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +619 -0
- data/README.md +46 -0
- data/Rakefile +106 -0
- data/app/controllers/foreman_openbolt/task_controller.rb +298 -0
- data/app/lib/actions/foreman_openbolt/cleanup_proxy_artifacts.rb +40 -0
- data/app/lib/actions/foreman_openbolt/poll_task_status.rb +151 -0
- data/app/models/foreman_openbolt/task_job.rb +110 -0
- data/app/views/foreman_openbolt/react_page.html.erb +1 -0
- data/config/routes.rb +24 -0
- data/db/migrate/20250819000000_create_openbolt_task_jobs.rb +25 -0
- data/db/migrate/20250925000000_add_command_to_openbolt_task_jobs.rb +7 -0
- data/db/migrate/20251001000000_add_task_description_to_task_jobs.rb +7 -0
- data/db/seeds.d/001_add_openbolt_feature.rb +4 -0
- data/lib/foreman_openbolt/engine.rb +169 -0
- data/lib/foreman_openbolt/version.rb +5 -0
- data/lib/foreman_openbolt.rb +7 -0
- data/lib/proxy_api/openbolt.rb +53 -0
- data/lib/tasks/foreman_openbolt_tasks.rake +48 -0
- data/locale/Makefile +73 -0
- data/locale/en/foreman_openbolt.po +19 -0
- data/locale/foreman_openbolt.pot +19 -0
- data/locale/gemspec.rb +7 -0
- data/package.json +41 -0
- data/test/factories/foreman_openbolt_factories.rb +7 -0
- data/test/test_plugin_helper.rb +8 -0
- data/test/unit/foreman_openbolt_test.rb +13 -0
- data/webpack/global_index.js +4 -0
- data/webpack/global_test_setup.js +11 -0
- data/webpack/index.js +19 -0
- data/webpack/src/Components/LaunchTask/EmptyContent.js +24 -0
- data/webpack/src/Components/LaunchTask/FieldTable.js +147 -0
- data/webpack/src/Components/LaunchTask/HostSelector/HostSearch.js +29 -0
- data/webpack/src/Components/LaunchTask/HostSelector/SearchSelect.js +208 -0
- data/webpack/src/Components/LaunchTask/HostSelector/SelectedChips.js +113 -0
- data/webpack/src/Components/LaunchTask/HostSelector/hostgroups.gql +9 -0
- data/webpack/src/Components/LaunchTask/HostSelector/hosts.gql +10 -0
- data/webpack/src/Components/LaunchTask/HostSelector/index.js +261 -0
- data/webpack/src/Components/LaunchTask/OpenBoltOptionsSection.js +116 -0
- data/webpack/src/Components/LaunchTask/ParameterField.js +145 -0
- data/webpack/src/Components/LaunchTask/ParametersSection.js +66 -0
- data/webpack/src/Components/LaunchTask/SmartProxySelect.js +51 -0
- data/webpack/src/Components/LaunchTask/TaskSelect.js +84 -0
- data/webpack/src/Components/LaunchTask/hooks/useOpenBoltOptions.js +63 -0
- data/webpack/src/Components/LaunchTask/hooks/useSmartProxies.js +48 -0
- data/webpack/src/Components/LaunchTask/hooks/useTasksData.js +64 -0
- data/webpack/src/Components/LaunchTask/index.js +333 -0
- data/webpack/src/Components/TaskExecution/ExecutionDetails.js +188 -0
- data/webpack/src/Components/TaskExecution/ExecutionDisplay.js +99 -0
- data/webpack/src/Components/TaskExecution/LoadingIndicator.js +51 -0
- data/webpack/src/Components/TaskExecution/ResultDisplay.js +174 -0
- data/webpack/src/Components/TaskExecution/TaskDetails.js +99 -0
- data/webpack/src/Components/TaskExecution/hooks/useJobPolling.js +142 -0
- data/webpack/src/Components/TaskExecution/index.js +130 -0
- data/webpack/src/Components/TaskHistory/TaskPopover.js +95 -0
- data/webpack/src/Components/TaskHistory/index.js +199 -0
- data/webpack/src/Components/common/HostsPopover.js +49 -0
- data/webpack/src/Components/common/constants.js +44 -0
- data/webpack/src/Components/common/helpers.js +19 -0
- data/webpack/src/Pages/LaunchTaskPage.js +12 -0
- data/webpack/src/Pages/TaskExecutionPage.js +12 -0
- data/webpack/src/Pages/TaskHistoryPage.js +12 -0
- data/webpack/src/Router/routes.js +30 -0
- data/webpack/test_setup.js +17 -0
- data/webpack/webpack.config.js +7 -0
- metadata +208 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
|
3
|
+
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
|
4
|
+
import TaskExecution from '../Components/TaskExecution';
|
|
5
|
+
|
|
6
|
+
const TaskExecutionPage = () => (
|
|
7
|
+
<PageLayout header={__('Task Execution')}>
|
|
8
|
+
<TaskExecution />
|
|
9
|
+
</PageLayout>
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export default TaskExecutionPage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
|
3
|
+
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
|
4
|
+
import TaskHistory from '../Components/TaskHistory';
|
|
5
|
+
|
|
6
|
+
const TaskHistoryPage = () => (
|
|
7
|
+
<PageLayout header={__('Task History')}>
|
|
8
|
+
<TaskHistory />
|
|
9
|
+
</PageLayout>
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export default TaskHistoryPage;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import LaunchTaskPage from '../Pages/LaunchTaskPage';
|
|
3
|
+
import TaskExecutionPage from '../Pages/TaskExecutionPage';
|
|
4
|
+
import TaskHistoryPage from '../Pages/TaskHistoryPage';
|
|
5
|
+
|
|
6
|
+
const routes = [
|
|
7
|
+
{
|
|
8
|
+
path: '/foreman_openbolt/page_launch_task',
|
|
9
|
+
exact: true,
|
|
10
|
+
render: () => <LaunchTaskPage />,
|
|
11
|
+
requiresAuth: true,
|
|
12
|
+
requiredPermissions: ['execute_openbolt'],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
path: '/foreman_openbolt/page_task_execution',
|
|
16
|
+
exact: true,
|
|
17
|
+
render: () => <TaskExecutionPage />,
|
|
18
|
+
requiresAuth: true,
|
|
19
|
+
requiredPermissions: ['execute_openbolt'],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
path: '/foreman_openbolt/page_task_history',
|
|
23
|
+
exact: true,
|
|
24
|
+
render: () => <TaskHistoryPage />,
|
|
25
|
+
requiresAuth: true,
|
|
26
|
+
requiredPermissions: ['execute_openbolt'],
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
export default routes;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import 'core-js/shim';
|
|
2
|
+
import 'regenerator-runtime/runtime';
|
|
3
|
+
import MutationObserver from '@sheerun/mutationobserver-shim';
|
|
4
|
+
|
|
5
|
+
import { configure } from 'enzyme';
|
|
6
|
+
import Adapter from 'enzyme-adapter-react-16';
|
|
7
|
+
|
|
8
|
+
configure({ adapter: new Adapter() });
|
|
9
|
+
|
|
10
|
+
// Mocking translation function
|
|
11
|
+
global.__ = text => text; // eslint-disable-line
|
|
12
|
+
|
|
13
|
+
// Mocking locales to prevent unnecessary fallback messages
|
|
14
|
+
window.locales = { en: { domain: 'app', locale_data: { app: { '': {} } } } };
|
|
15
|
+
|
|
16
|
+
// see https://github.com/testing-library/dom-testing-library/releases/tag/v7.0.0
|
|
17
|
+
window.MutationObserver = MutationObserver;
|
metadata
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: foreman_openbolt
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Overlook InfraTech
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: foreman-tasks
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '11.0'
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 11.0.6
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - "~>"
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: '11.0'
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 11.0.6
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: erb_lint
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - "~>"
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: 0.9.0
|
|
39
|
+
type: :development
|
|
40
|
+
prerelease: false
|
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - "~>"
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: 0.9.0
|
|
46
|
+
- !ruby/object:Gem::Dependency
|
|
47
|
+
name: rake
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '13.0'
|
|
53
|
+
- - ">="
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: 13.0.6
|
|
56
|
+
type: :development
|
|
57
|
+
prerelease: false
|
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - "~>"
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '13.0'
|
|
63
|
+
- - ">="
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: 13.0.6
|
|
66
|
+
- !ruby/object:Gem::Dependency
|
|
67
|
+
name: rdoc
|
|
68
|
+
requirement: !ruby/object:Gem::Requirement
|
|
69
|
+
requirements:
|
|
70
|
+
- - "~>"
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: '6.5'
|
|
73
|
+
type: :development
|
|
74
|
+
prerelease: false
|
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
76
|
+
requirements:
|
|
77
|
+
- - "~>"
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: '6.5'
|
|
80
|
+
- !ruby/object:Gem::Dependency
|
|
81
|
+
name: theforeman-rubocop
|
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
|
83
|
+
requirements:
|
|
84
|
+
- - "~>"
|
|
85
|
+
- !ruby/object:Gem::Version
|
|
86
|
+
version: 0.1.2
|
|
87
|
+
type: :development
|
|
88
|
+
prerelease: false
|
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
90
|
+
requirements:
|
|
91
|
+
- - "~>"
|
|
92
|
+
- !ruby/object:Gem::Version
|
|
93
|
+
version: 0.1.2
|
|
94
|
+
- !ruby/object:Gem::Dependency
|
|
95
|
+
name: rubocop-rake
|
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
|
97
|
+
requirements:
|
|
98
|
+
- - "~>"
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: 0.6.0
|
|
101
|
+
type: :development
|
|
102
|
+
prerelease: false
|
|
103
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
104
|
+
requirements:
|
|
105
|
+
- - "~>"
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: 0.6.0
|
|
108
|
+
description: This plugin adds OpenBolt integration into Foreman, allowing users to
|
|
109
|
+
run tasks and plans present in their environment.
|
|
110
|
+
email:
|
|
111
|
+
- contact@overlookinfratech.com
|
|
112
|
+
executables: []
|
|
113
|
+
extensions: []
|
|
114
|
+
extra_rdoc_files: []
|
|
115
|
+
files:
|
|
116
|
+
- LICENSE
|
|
117
|
+
- README.md
|
|
118
|
+
- Rakefile
|
|
119
|
+
- app/controllers/foreman_openbolt/task_controller.rb
|
|
120
|
+
- app/lib/actions/foreman_openbolt/cleanup_proxy_artifacts.rb
|
|
121
|
+
- app/lib/actions/foreman_openbolt/poll_task_status.rb
|
|
122
|
+
- app/models/foreman_openbolt/task_job.rb
|
|
123
|
+
- app/views/foreman_openbolt/react_page.html.erb
|
|
124
|
+
- config/routes.rb
|
|
125
|
+
- db/migrate/20250819000000_create_openbolt_task_jobs.rb
|
|
126
|
+
- db/migrate/20250925000000_add_command_to_openbolt_task_jobs.rb
|
|
127
|
+
- db/migrate/20251001000000_add_task_description_to_task_jobs.rb
|
|
128
|
+
- db/seeds.d/001_add_openbolt_feature.rb
|
|
129
|
+
- lib/foreman_openbolt.rb
|
|
130
|
+
- lib/foreman_openbolt/engine.rb
|
|
131
|
+
- lib/foreman_openbolt/version.rb
|
|
132
|
+
- lib/proxy_api/openbolt.rb
|
|
133
|
+
- lib/tasks/foreman_openbolt_tasks.rake
|
|
134
|
+
- locale/Makefile
|
|
135
|
+
- locale/en/foreman_openbolt.po
|
|
136
|
+
- locale/foreman_openbolt.pot
|
|
137
|
+
- locale/gemspec.rb
|
|
138
|
+
- package.json
|
|
139
|
+
- test/factories/foreman_openbolt_factories.rb
|
|
140
|
+
- test/test_plugin_helper.rb
|
|
141
|
+
- test/unit/foreman_openbolt_test.rb
|
|
142
|
+
- webpack/global_index.js
|
|
143
|
+
- webpack/global_test_setup.js
|
|
144
|
+
- webpack/index.js
|
|
145
|
+
- webpack/src/Components/LaunchTask/EmptyContent.js
|
|
146
|
+
- webpack/src/Components/LaunchTask/FieldTable.js
|
|
147
|
+
- webpack/src/Components/LaunchTask/HostSelector/HostSearch.js
|
|
148
|
+
- webpack/src/Components/LaunchTask/HostSelector/SearchSelect.js
|
|
149
|
+
- webpack/src/Components/LaunchTask/HostSelector/SelectedChips.js
|
|
150
|
+
- webpack/src/Components/LaunchTask/HostSelector/hostgroups.gql
|
|
151
|
+
- webpack/src/Components/LaunchTask/HostSelector/hosts.gql
|
|
152
|
+
- webpack/src/Components/LaunchTask/HostSelector/index.js
|
|
153
|
+
- webpack/src/Components/LaunchTask/OpenBoltOptionsSection.js
|
|
154
|
+
- webpack/src/Components/LaunchTask/ParameterField.js
|
|
155
|
+
- webpack/src/Components/LaunchTask/ParametersSection.js
|
|
156
|
+
- webpack/src/Components/LaunchTask/SmartProxySelect.js
|
|
157
|
+
- webpack/src/Components/LaunchTask/TaskSelect.js
|
|
158
|
+
- webpack/src/Components/LaunchTask/hooks/useOpenBoltOptions.js
|
|
159
|
+
- webpack/src/Components/LaunchTask/hooks/useSmartProxies.js
|
|
160
|
+
- webpack/src/Components/LaunchTask/hooks/useTasksData.js
|
|
161
|
+
- webpack/src/Components/LaunchTask/index.js
|
|
162
|
+
- webpack/src/Components/TaskExecution/ExecutionDetails.js
|
|
163
|
+
- webpack/src/Components/TaskExecution/ExecutionDisplay.js
|
|
164
|
+
- webpack/src/Components/TaskExecution/LoadingIndicator.js
|
|
165
|
+
- webpack/src/Components/TaskExecution/ResultDisplay.js
|
|
166
|
+
- webpack/src/Components/TaskExecution/TaskDetails.js
|
|
167
|
+
- webpack/src/Components/TaskExecution/hooks/useJobPolling.js
|
|
168
|
+
- webpack/src/Components/TaskExecution/index.js
|
|
169
|
+
- webpack/src/Components/TaskHistory/TaskPopover.js
|
|
170
|
+
- webpack/src/Components/TaskHistory/index.js
|
|
171
|
+
- webpack/src/Components/common/HostsPopover.js
|
|
172
|
+
- webpack/src/Components/common/constants.js
|
|
173
|
+
- webpack/src/Components/common/helpers.js
|
|
174
|
+
- webpack/src/Pages/LaunchTaskPage.js
|
|
175
|
+
- webpack/src/Pages/TaskExecutionPage.js
|
|
176
|
+
- webpack/src/Pages/TaskHistoryPage.js
|
|
177
|
+
- webpack/src/Router/routes.js
|
|
178
|
+
- webpack/test_setup.js
|
|
179
|
+
- webpack/webpack.config.js
|
|
180
|
+
homepage: https://github.com/overlookinfra/foreman_openbolt
|
|
181
|
+
licenses:
|
|
182
|
+
- GPL-3.0-only
|
|
183
|
+
metadata:
|
|
184
|
+
is_foreman_plugin: 'true'
|
|
185
|
+
rdoc_options: []
|
|
186
|
+
require_paths:
|
|
187
|
+
- lib
|
|
188
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
|
+
requirements:
|
|
190
|
+
- - ">="
|
|
191
|
+
- !ruby/object:Gem::Version
|
|
192
|
+
version: '2.7'
|
|
193
|
+
- - "<"
|
|
194
|
+
- !ruby/object:Gem::Version
|
|
195
|
+
version: '4'
|
|
196
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
|
+
requirements:
|
|
198
|
+
- - ">="
|
|
199
|
+
- !ruby/object:Gem::Version
|
|
200
|
+
version: '0'
|
|
201
|
+
requirements: []
|
|
202
|
+
rubygems_version: 3.6.9
|
|
203
|
+
specification_version: 4
|
|
204
|
+
summary: Foreman OpenBolt integration
|
|
205
|
+
test_files:
|
|
206
|
+
- test/factories/foreman_openbolt_factories.rb
|
|
207
|
+
- test/test_plugin_helper.rb
|
|
208
|
+
- test/unit/foreman_openbolt_test.rb
|