foreman_acd 0.9.7 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -19
- data/app/controllers/ui_acd_controller.rb +1 -1
- data/db/migrate/20210503122809_add_git_url_to_ansible_playbooks.rb +1 -1
- data/lib/foreman_acd/engine.rb +4 -10
- data/lib/foreman_acd/plugin.rb +1 -1
- data/lib/foreman_acd/version.rb +1 -1
- data/package.json +5 -3
- data/test/controllers/ui_acd_controller_test.rb +1 -1
- data/webpack/components/ApplicationDefinition/ApplicationDefinition.js +210 -121
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionActions.js +79 -91
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionConstants.js +30 -15
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js +15 -15
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionReducer.js +96 -63
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionSelectors.js +22 -11
- data/webpack/components/ApplicationDefinition/__fixtures__/{applicationDefinitionConfData_1.fixtures.js → applicationDefinitionConfData1.fixtures.js} +77 -105
- data/webpack/components/ApplicationDefinition/__fixtures__/applicationDefinitionReducer.fixtures.js +49 -29
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinition.test.js +4 -4
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionHelper.test.js +16 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionReducer.test.js +0 -5
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionSelectors.test.js +25 -25
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionReducer.test.js.snap +9 -1
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionSelectors.test.js.snap +11 -11
- data/webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js +30 -25
- data/webpack/components/ApplicationDefinition/components/__tests__/AnsiblePlaybookSelector.test.js +3 -3
- data/webpack/components/ApplicationDefinition/index.js +0 -1
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImport.js +91 -105
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportActions.js +59 -84
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportConstants.js +12 -6
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportReducer.js +21 -27
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportSelectors.js +14 -7
- data/webpack/components/ApplicationDefinitionImport/__fixtures__/{applicationDefinitionImportConfData_1.fixtures.js → applicationDefinitionImportConfData1.fixtures.js} +32 -40
- data/webpack/components/ApplicationDefinitionImport/__fixtures__/applicationDefinitionImportReducer.fixtures.js +14 -16
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImport.test.js +38 -8
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportReducer.test.js +0 -2
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportSelectors.test.js +9 -9
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImport.test.js.snap +116 -2
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImportSelectors.test.js.snap +3 -3
- data/webpack/components/ApplicationInstance/ApplicationInstance.js +344 -193
- data/webpack/components/ApplicationInstance/ApplicationInstanceActions.js +92 -105
- data/webpack/components/ApplicationInstance/ApplicationInstanceConstants.js +34 -17
- data/webpack/components/ApplicationInstance/ApplicationInstanceHelper.js +4 -7
- data/webpack/components/ApplicationInstance/ApplicationInstanceReducer.js +114 -74
- data/webpack/components/ApplicationInstance/ApplicationInstanceSelectors.js +18 -9
- data/webpack/components/ApplicationInstance/__fixtures__/{applicationInstanceConfData_1.fixtures.js → applicationInstanceConfData1.fixtures.js} +68 -86
- data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceReducer.fixtures.js +24 -32
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstance.test.js +75 -10
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceReducer.test.js +0 -8
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceSelectors.test.js +27 -27
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstance.test.js.snap +606 -2
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceSelectors.test.js.snap +12 -12
- data/webpack/components/ApplicationInstance/components/AppDefinitionSelector.js +32 -25
- data/webpack/components/ApplicationInstance/components/Service.js +7 -18
- data/webpack/components/ApplicationInstance/components/ServiceCounter.js +25 -18
- data/webpack/components/ApplicationInstance/index.js +0 -1
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.js +167 -110
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportActions.js +20 -25
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportConstants.js +10 -5
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportReducer.js +9 -12
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportSelectors.js +12 -6
- data/webpack/components/ApplicationInstanceReport/__fixtures__/{applicationInstanceReportData_1.fixtures.js → applicationInstanceReportData1.fixtures.js} +154 -101
- data/webpack/components/ApplicationInstanceReport/__fixtures__/applicationInstanceReportReducer.fixtures.js +3 -10
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReport.test.js +28 -22
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReportSelectors.test.js +5 -7
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportReducer.test.js.snap +0 -1
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportSelectors.test.js.snap +2 -2
- data/webpack/components/ApplicationInstanceReport/components/ReportViewer.js +9 -5
- data/webpack/components/ApplicationInstanceReport/components/__tests__/ReportViewer.test.js +1 -3
- data/webpack/components/ExistingHostSelection/ExistingHostSelection.js +35 -56
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionActions.js +21 -28
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionConstants.js +6 -3
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionReducer.js +16 -19
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionSelectors.js +8 -4
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionConfData1.fixtures.js +187 -0
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionReducer.fixtures.js +13 -24
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelection.test.js +3 -2
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionSelectors.test.js +11 -14
- data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelectionSelectors.test.js.snap +5 -5
- data/webpack/components/ExistingHostSelection/components/ServiceSelector.js +31 -25
- data/webpack/components/ExistingHostSelection/components/__tests__/ServiceSelector.test.js +3 -9
- data/webpack/components/ParameterSelection/ParameterSelection.js +258 -174
- data/webpack/components/ParameterSelection/ParameterSelectionActions.js +110 -100
- data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +22 -11
- data/webpack/components/ParameterSelection/ParameterSelectionHelper.js +13 -11
- data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +63 -49
- data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +10 -5
- data/webpack/components/ParameterSelection/__fixtures__/{parameterSelectionData_1.fixtures.js → parameterSelectionData1.fixtures.js} +67 -104
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionReducer.fixtures.js +22 -26
- data/webpack/components/ParameterSelection/__tests__/ParameterSelection.test.js +50 -36
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionHelper.test.js +76 -0
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +0 -2
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js +23 -25
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +100 -0
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +99 -112
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionSelectors.test.js.snap +18 -19
- data/webpack/components/ParameterSelection/index.js +1 -4
- data/webpack/components/SyncGitRepo/SyncGitRepo.js +124 -117
- data/webpack/components/SyncGitRepo/SyncGitRepoActions.js +64 -74
- data/webpack/components/SyncGitRepo/SyncGitRepoReducer.js +17 -17
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoConfData1.fixtures.js +7 -0
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoReducer.fixtures.js +10 -18
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepo.test.js +80 -6
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepoSelectors.test.js +9 -11
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepo.test.js.snap +192 -1
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepoSelectors.test.js.snap +4 -4
- data/webpack/components/SyncGitRepo/components/FormTextInput.js +26 -21
- data/webpack/components/SyncGitRepo/components/ScmTypeSelector.js +29 -24
- data/webpack/components/SyncGitRepo/index.js +2 -5
- data/webpack/components/common/AddTableEntry.js +3 -10
- data/webpack/components/common/DeleteTableEntry.js +7 -15
- data/webpack/components/common/EditTableEntry.js +7 -7
- data/webpack/components/common/ExtSelect.js +12 -8
- data/webpack/components/common/ExtTextInput.js +12 -7
- data/webpack/components/common/LockTableEntry.js +6 -6
- data/webpack/components/common/RailsData.js +6 -16
- data/webpack/components/common/__tests__/ExtSelect.test.js +2 -2
- data/webpack/components/common/__tests__/RailsData.test.js +0 -2
- data/webpack/global_test_setup.js +11 -0
- data/webpack/helper.js +10 -21
- data/webpack/helper.test.js +17 -29
- data/webpack/index.js +25 -7
- data/webpack/js-yaml.js +1563 -1135
- data/webpack/reducer.js +52 -27
- metadata +16 -14
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionConfData_1.fixtures.js +0 -191
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelection.fixtures.js +0 -153
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoConfData_1.fixtures.js +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e8dc2917de1aa5ada0252edd2c3fb14615b804f3e39f58d237ef7b97ec52266
|
4
|
+
data.tar.gz: d38e9a064751be62eab34a5537ecce21f288535e42bd96934ac9047b4238630e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e6b683a22c4554d476d5a51908aa00906f0351b5d0e7ca098a2184fd8c209444f3105cb1216156a2f496f51cb032b51c7b96b84df718f5892b7cf4734de5acb
|
7
|
+
data.tar.gz: 0b353179ccc1844bb71864dbf2af3e672563249a780ff8237f96639851fdb2bc14bf505bc0db5f50e96fa5a23fc1133e1f7c0f59fe19a7ec53b07fcdcac92e6d
|
data/README.md
CHANGED
@@ -59,26 +59,12 @@ See [Deploying Hosts using Application Centric Deployment](https://docs.theforem
|
|
59
59
|
|
60
60
|
## Installation
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
### TL;DR:
|
65
|
-
|
66
|
-
yum install tfm-rubygem-foreman_acd
|
67
|
-
foreman-maintain service restart
|
68
|
-
|
69
|
-
In some cases, you need to manually run
|
70
|
-
|
71
|
-
foreman-rake db:migrate
|
72
|
-
foreman-rake db:seed
|
62
|
+
Check out the [Foreman documentation](https://docs.theforeman.org/nightly/Deploying_Hosts_AppCentric/index-katello.html#Installing_ACD_on_Server_application_centric_deployment) on how to install the foreman_acd plugin.
|
73
63
|
|
74
64
|
### Smart Proxy Installation
|
75
65
|
|
76
|
-
You
|
77
|
-
|
78
|
-
yum install tfm-rubygem-smart_proxy_acd tfm-rubygem-smart_proxy_acd_core
|
79
|
-
foreman-maintain service restart
|
80
|
-
|
81
|
-
You need to refresh the smart proxy features in *Infrastructure > Smart Proxies > Your Smart-Proxy > Actions > Refresh* after the installation of the Smart Proxy ACD components.
|
66
|
+
You need to install [Smart Proxy ACD](https://github.com/ATIX-AG/smart_proxy_acd), too.
|
67
|
+
Check out the [Foreman documentation](https://docs.theforeman.org/nightly/Deploying_Hosts_AppCentric/index-katello.html#Installing_ACD_on_Smart_Proxy_application_centric_deployment) on how to install the smart_proxy_acd plugin.
|
82
68
|
|
83
69
|
### Tips
|
84
70
|
|
@@ -98,7 +84,7 @@ Store it in `/var/lib/foreman/foreman_acd/ansible-playbooks/` so that SELinux is
|
|
98
84
|
### Application Definition (for Admins)
|
99
85
|
|
100
86
|
* Create an Application Definition via *Applications > Application Definitions*.
|
101
|
-
* Select the Ansible Playbook you want to use.
|
87
|
+
* Select the Ansible Playbook you want to use.
|
102
88
|
* Add new services and specify the host group you want to use.
|
103
89
|
* Specify any values a user will be allowed to overwrite.
|
104
90
|
You may also set a default value.
|
@@ -128,7 +114,7 @@ Fork and send a Pull Request. Thank you.
|
|
128
114
|
|
129
115
|
## Copyright
|
130
116
|
|
131
|
-
Copyright (c)
|
117
|
+
Copyright (c) 2024 ATIX AG
|
132
118
|
|
133
119
|
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
134
120
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Add git_url column to ansible_playbook
|
4
|
-
class
|
4
|
+
class AddGitURLToAnsiblePlaybooks < ActiveRecord::Migration[6.0]
|
5
5
|
def change
|
6
6
|
add_column :acd_ansible_playbooks, :git_url, :string
|
7
7
|
end
|
data/lib/foreman_acd/engine.rb
CHANGED
@@ -9,14 +9,6 @@ module ForemanAcd
|
|
9
9
|
class Engine < ::Rails::Engine
|
10
10
|
engine_name 'foreman_acd'
|
11
11
|
|
12
|
-
config.autoload_paths += Dir["#{config.root}/app/controllers/foreman_acd/concerns"]
|
13
|
-
config.autoload_paths += Dir["#{config.root}/app/models"]
|
14
|
-
config.autoload_paths += Dir["#{config.root}/app/services"]
|
15
|
-
config.autoload_paths += Dir["#{config.root}/app/helpers"]
|
16
|
-
config.autoload_paths += Dir["#{config.root}/app/overrides"]
|
17
|
-
config.autoload_paths += Dir["#{config.root}/app/lib"]
|
18
|
-
config.autoload_paths += Dir["#{config.root}/lib"]
|
19
|
-
|
20
12
|
# Add any db migrations
|
21
13
|
initializer 'foreman_acd.load_app_instance_data' do |app|
|
22
14
|
ForemanAcd::Engine.paths['db/migrate'].existent.each do |path|
|
@@ -40,8 +32,10 @@ module ForemanAcd
|
|
40
32
|
Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
|
41
33
|
end
|
42
34
|
|
43
|
-
initializer 'foreman_acd.register_plugin', :before => :finisher_hook do
|
44
|
-
|
35
|
+
initializer 'foreman_acd.register_plugin', :before => :finisher_hook do |app|
|
36
|
+
app.reloader.to_prepare do
|
37
|
+
require 'foreman_acd/plugin'
|
38
|
+
end
|
45
39
|
end
|
46
40
|
|
47
41
|
initializer 'foreman_acd.register_actions', :before => :finisher_hook do |_app|
|
data/lib/foreman_acd/plugin.rb
CHANGED
data/lib/foreman_acd/version.rb
CHANGED
data/package.json
CHANGED
@@ -9,12 +9,14 @@
|
|
9
9
|
"devDependencies": {
|
10
10
|
"@theforeman/builder": ">= 12.0.1",
|
11
11
|
"@theforeman/eslint-plugin-foreman": ">= 12.0.1",
|
12
|
+
"@theforeman/find-foreman": "^13.0.0",
|
12
13
|
"@theforeman/test": ">= 12.0.1",
|
13
14
|
"@theforeman/vendor-dev": ">= 12.0.1",
|
14
15
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
15
16
|
"babel-preset-env": "^1.6.0",
|
16
17
|
"babel-preset-react": "^6.24.1",
|
17
18
|
"eslint": "^6.7.2",
|
19
|
+
"eslint-plugin-react": "^7.34.1",
|
18
20
|
"jest": "^23.6.0",
|
19
21
|
"jest-prop-type-error": "^1.1.0",
|
20
22
|
"lodash": "^4.17.11",
|
@@ -26,11 +28,11 @@
|
|
26
28
|
"table-resolver": "^3.2.0"
|
27
29
|
},
|
28
30
|
"scripts": {
|
29
|
-
"lint": "
|
30
|
-
"lint-fix": "
|
31
|
+
"lint": "eslint *.js webpack",
|
32
|
+
"lint-fix": "eslint --fix *.js webpack",
|
31
33
|
"stylelint": "stylelint webpack/**/*.scss",
|
32
34
|
"stylelint-fix": "stylelint webpack/**/*.scss --fix",
|
33
|
-
"test": "
|
35
|
+
"test": "tfm-test --plugin --config jest.config.js"
|
34
36
|
},
|
35
37
|
"repository": {
|
36
38
|
"type": "git",
|
@@ -13,7 +13,7 @@ module Katello
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# UI Controller tests
|
16
|
-
class
|
16
|
+
class UIAcdControllerTest < ActionController::TestCase
|
17
17
|
test 'get app json' do
|
18
18
|
app_def = FactoryBot.create(:app_definition)
|
19
19
|
get :app, :params => { :id => app_def.id }, :session => set_session_user
|