foreman_acd 0.7.0 → 0.9.2
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 -5
- data/app/controllers/foreman_acd/ansible_playbooks_controller.rb +17 -2
- data/app/controllers/foreman_acd/app_definitions_controller.rb +104 -7
- data/app/controllers/foreman_acd/app_instances_controller.rb +15 -30
- data/app/controllers/foreman_acd/concerns/app_instance_mixins.rb +36 -0
- data/app/controllers/ui_acd_controller.rb +42 -3
- data/app/lib/actions/foreman_acd/run_configurator.rb +1 -0
- data/app/models/concerns/foreman_acd/host_managed_extensions.rb +40 -27
- data/app/models/foreman_acd/app_instance.rb +47 -2
- data/app/models/foreman_acd/foreman_host.rb +8 -0
- data/app/services/foreman_acd/app_deployer.rb +19 -2
- data/app/services/foreman_acd/inventory_creator.rb +11 -1
- data/app/views/foreman_acd/app_definitions/_form.html.erb +4 -0
- data/app/views/foreman_acd/app_definitions/import.html.erb +20 -1
- data/app/views/foreman_acd/app_definitions/index.html.erb +3 -6
- data/app/views/foreman_acd/app_instances/_form.html.erb +4 -0
- data/app/views/foreman_acd/app_instances/index.html.erb +15 -11
- data/app/views/foreman_acd/app_instances/report.html.erb +7 -2
- data/app/views/ui_acd/host_report.json.rabl +4 -0
- data/app/views/ui_acd/report_data.json.rabl +10 -0
- data/app/views/ui_acd/validate_hostname.json.rabl +6 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20210818125913_add_is_existing_host_to_foreman_host.rb +8 -0
- data/db/migrate/20210902110645_add_initial_configure_task.rb +8 -0
- data/lib/foreman_acd/plugin.rb +9 -9
- data/lib/foreman_acd/version.rb +1 -1
- data/lib/foreman_acd.rb +27 -9
- data/package.json +8 -25
- data/test/controllers/ui_acd_controller_test.rb +4 -1
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +2 -0
- data/webpack/__snapshots__/helper.test.js.snap +1 -1
- data/webpack/components/ApplicationDefinition/ApplicationDefinition.js +34 -10
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionActions.js +12 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionConstants.js +1 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionReducer.js +30 -9
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionSelectors.js +4 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinition.test.js +1 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionSelectors.test.js +12 -0
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinition.test.js.snap +31 -5
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionSelectors.test.js.snap +8 -0
- data/webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js +1 -1
- data/webpack/components/ApplicationDefinition/components/__tests__/__snapshots__/AnsiblePlaybookSelector.test.js.snap +3 -3
- data/webpack/components/ApplicationDefinition/index.js +8 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImport.js +214 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImport.scss +1 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportActions.js +161 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportConstants.js +6 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportReducer.js +79 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportSelectors.js +8 -0
- data/webpack/components/ApplicationDefinitionImport/__fixtures__/applicationDefinitionImportConfData_1.fixtures.js +129 -0
- data/webpack/components/ApplicationDefinitionImport/__fixtures__/applicationDefinitionImportReducer.fixtures.js +29 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImport.test.js +20 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportReducer.test.js +43 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportSelectors.test.js +29 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImport.test.js.snap +62 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImportReducer.test.js.snap +362 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImportSelectors.test.js.snap +130 -0
- data/webpack/components/ApplicationDefinitionImport/index.js +32 -0
- data/webpack/components/ApplicationInstance/ApplicationInstance.js +102 -26
- data/webpack/components/ApplicationInstance/ApplicationInstanceActions.js +118 -6
- data/webpack/components/ApplicationInstance/ApplicationInstanceConstants.js +4 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceHelper.js +15 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceReducer.js +71 -30
- data/webpack/components/ApplicationInstance/ApplicationInstanceSelectors.js +4 -0
- data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceReducer.fixtures.js +2 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstance.test.js +1 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceReducer.test.js +12 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceSelectors.test.js +12 -0
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstance.test.js.snap +98 -7
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceReducer.test.js.snap +271 -0
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceSelectors.test.js.snap +8 -0
- data/webpack/components/ApplicationInstance/components/AppDefinitionSelector.js +1 -0
- data/webpack/components/ApplicationInstance/components/ServiceCounter.js +1 -1
- data/webpack/components/ApplicationInstance/helper.js +0 -0
- data/webpack/components/ApplicationInstance/index.js +8 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.js +81 -6
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportActions.js +35 -1
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportConstants.js +3 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportReducer.js +19 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportSelectors.js +4 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReport.test.js.snap +1 -124
- data/webpack/components/ApplicationInstanceReport/index.js +8 -1
- data/webpack/components/ExistingHostSelection/ExistingHostSelection.js +104 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelection.scss +15 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionActions.js +71 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionConstants.js +4 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionHelper.js +0 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionReducer.js +90 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionSelectors.js +8 -0
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionConfData_1.fixtures.js +191 -0
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionReducer.fixtures.js +203 -0
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelection.test.js +19 -0
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionReducer.test.js +59 -0
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionSelectors.test.js +36 -0
- data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelection.test.js.snap +35 -0
- data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelectionReducer.test.js.snap +614 -0
- data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelectionSelectors.test.js.snap +27 -0
- data/webpack/components/ExistingHostSelection/components/ServiceSelector.js +48 -0
- data/webpack/components/ExistingHostSelection/components/__tests__/ServiceSelector.test.js +35 -0
- data/webpack/components/ExistingHostSelection/components/__tests__/__snapshots__/ServiceSelector.test.js.snap +77 -0
- data/webpack/components/ExistingHostSelection/index.js +26 -0
- data/webpack/components/ParameterSelection/ParameterSelection.js +103 -1
- data/webpack/components/ParameterSelection/ParameterSelection.scss +7 -0
- data/webpack/components/ParameterSelection/ParameterSelectionActions.js +46 -4
- data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +2 -0
- data/webpack/components/ParameterSelection/ParameterSelectionHelper.js +5 -1
- data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +52 -11
- data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +2 -0
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionData_1.fixtures.js +8 -0
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +2 -0
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js +6 -0
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +96 -0
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +117 -17
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionSelectors.test.js.snap +13 -0
- data/webpack/components/ParameterSelection/index.js +4 -1
- data/webpack/components/SyncGitRepo/SyncGitRepo.js +2 -10
- data/webpack/components/SyncGitRepo/SyncGitRepoActions.js +2 -3
- data/webpack/components/SyncGitRepo/SyncGitRepoConstants.js +0 -1
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepo.test.js.snap +1 -0
- data/webpack/components/SyncGitRepo/components/FormTextInput.js +1 -1
- data/webpack/components/SyncGitRepo/components/ScmTypeSelector.js +3 -2
- data/webpack/components/common/DeleteTableEntry.js +16 -2
- data/webpack/components/common/__tests__/__snapshots__/DeleteTableEntry.test.js.snap +38 -0
- data/webpack/helper.js +21 -1
- data/webpack/helper.test.js +20 -1
- data/webpack/index.js +5 -0
- data/webpack/js-yaml.js +3874 -0
- data/webpack/reducer.js +13 -2
- data/webpack/test_setup.js +0 -2
- metadata +46 -2
data/webpack/helper.test.js
CHANGED
@@ -2,6 +2,7 @@ import {
|
|
2
2
|
arrayToObject,
|
3
3
|
arrayToObjectObj,
|
4
4
|
EasyHeaderFormatter,
|
5
|
+
supportedPluginsToHiddenParameterTypes,
|
5
6
|
} from './helper';
|
6
7
|
|
7
8
|
describe('helper', () => {
|
@@ -30,8 +31,26 @@ describe('helper', () => {
|
|
30
31
|
);
|
31
32
|
});
|
32
33
|
|
33
|
-
it('
|
34
|
+
it('formats a nice, easy header', () => {
|
34
35
|
expect(EasyHeaderFormatter('MyValue', { column: { header: { label: 'TheLabel', props: { p1: '1' } } } })).toMatchSnapshot();
|
35
36
|
});
|
37
|
+
|
38
|
+
it('creates hidden parameter definition by supported plugins 1', () => {
|
39
|
+
expect(supportedPluginsToHiddenParameterTypes({ puppet: false})).toEqual(
|
40
|
+
['puppetenv']
|
41
|
+
);
|
42
|
+
});
|
43
|
+
|
44
|
+
it('creates hidden parameter definition by supported plugins 2', () => {
|
45
|
+
expect(supportedPluginsToHiddenParameterTypes({ puppet: true})).toEqual(
|
46
|
+
[]
|
47
|
+
);
|
48
|
+
});
|
49
|
+
|
50
|
+
it('creates hidden parameter definition by supported plugins 3', () => {
|
51
|
+
expect(supportedPluginsToHiddenParameterTypes({})).toEqual(
|
52
|
+
[]
|
53
|
+
);
|
54
|
+
});
|
36
55
|
});
|
37
56
|
|
data/webpack/index.js
CHANGED
@@ -3,8 +3,11 @@ import injectReducer from 'foremanReact/redux/reducers/registerReducer';
|
|
3
3
|
import ParameterSelection from './components/ParameterSelection';
|
4
4
|
import SyncGitRepo from './components/SyncGitRepo';
|
5
5
|
import ApplicationDefinition from './components/ApplicationDefinition';
|
6
|
+
import ApplicationDefinitionImport from './components/ApplicationDefinitionImport';
|
6
7
|
import ApplicationInstance from './components/ApplicationInstance';
|
7
8
|
import ApplicationInstanceReport from './components/ApplicationInstanceReport';
|
9
|
+
import ExistingHostSelection from './components/ExistingHostSelection';
|
10
|
+
|
8
11
|
import reducer from './reducer';
|
9
12
|
|
10
13
|
injectReducer('foremanAcd', reducer);
|
@@ -12,5 +15,7 @@ injectReducer('foremanAcd', reducer);
|
|
12
15
|
componentRegistry.register({ name: 'ParameterSelection', type: ParameterSelection, });
|
13
16
|
componentRegistry.register({ name: 'SyncGitRepo', type: SyncGitRepo, });
|
14
17
|
componentRegistry.register({ name: 'ApplicationDefinition', type: ApplicationDefinition, });
|
18
|
+
componentRegistry.register({ name: 'ApplicationDefinitionImport', type: ApplicationDefinitionImport, });
|
15
19
|
componentRegistry.register({ name: 'ApplicationInstance', type: ApplicationInstance, });
|
16
20
|
componentRegistry.register({ name: 'ApplicationInstanceReport', type: ApplicationInstanceReport, });
|
21
|
+
componentRegistry.register({ name: 'ExistingHostSelection', type: ExistingHostSelection, });
|