foreman_acd 0.4.0 → 0.9.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 +84 -84
- data/app/controllers/foreman_acd/ansible_playbooks_controller.rb +103 -11
- data/app/controllers/foreman_acd/api/v2/ansible_playbooks_controller.rb +21 -3
- data/app/controllers/foreman_acd/api/v2/app_definitions_controller.rb +1 -0
- data/app/controllers/foreman_acd/api/v2/app_instances_controller.rb +9 -1
- data/app/controllers/foreman_acd/app_definitions_controller.rb +117 -15
- data/app/controllers/foreman_acd/app_instances_controller.rb +104 -30
- data/app/controllers/foreman_acd/concerns/ansible_playbook_parameters.rb +1 -1
- data/app/controllers/foreman_acd/concerns/app_definition_parameters.rb +1 -1
- data/app/controllers/foreman_acd/concerns/app_instance_mixins.rb +36 -0
- data/app/controllers/foreman_acd/concerns/app_instance_parameters.rb +1 -1
- data/app/controllers/foreman_acd/remote_execution_controller.rb +36 -23
- data/app/controllers/ui_acd_controller.rb +46 -0
- data/app/lib/actions/foreman_acd/deploy_all_hosts.rb +47 -0
- data/app/lib/actions/foreman_acd/run_configurator.rb +45 -0
- data/app/models/concerns/foreman_acd/host_managed_extensions.rb +39 -0
- data/app/models/foreman_acd/acd_provider.rb +36 -0
- data/app/models/foreman_acd/ansible_playbook.rb +32 -14
- data/app/models/foreman_acd/app_definition.rb +24 -1
- data/app/models/foreman_acd/app_instance.rb +85 -5
- data/app/models/foreman_acd/foreman_host.rb +31 -0
- data/app/models/foreman_acd/taxonomy_extensions.rb +17 -0
- data/app/services/foreman_acd/acd_proxy_proxy_selector.rb +17 -0
- data/app/services/foreman_acd/app_configurator.rb +64 -36
- data/app/services/foreman_acd/app_deployer.rb +83 -48
- data/app/services/foreman_acd/inventory_creator.rb +36 -25
- data/app/views/foreman_acd/ansible_playbooks/_form.html.erb +50 -7
- data/app/views/foreman_acd/ansible_playbooks/edit.html.erb +9 -1
- data/app/views/foreman_acd/ansible_playbooks/index.html.erb +3 -3
- data/app/views/foreman_acd/api/v2/ansible_playbooks/base.json.rabl +2 -0
- data/app/views/foreman_acd/api/v2/ansible_playbooks/index.json.rabl +2 -0
- data/app/views/foreman_acd/api/v2/ansible_playbooks/show.json.rabl +6 -0
- data/app/views/foreman_acd/api/v2/app_definitions/base.json.rabl +2 -0
- data/app/views/foreman_acd/api/v2/app_definitions/index.json.rabl +2 -0
- data/app/views/foreman_acd/api/v2/app_definitions/show.json.rabl +6 -0
- data/app/views/foreman_acd/api/v2/app_instances/base.json.rabl +3 -1
- data/app/views/foreman_acd/api/v2/app_instances/index.json.rabl +2 -0
- data/app/views/foreman_acd/api/v2/app_instances/show.json.rabl +2 -0
- data/app/views/foreman_acd/app_definitions/_form.html.erb +9 -1
- data/app/views/foreman_acd/app_definitions/edit.html.erb +10 -5
- data/app/views/foreman_acd/app_definitions/import.html.erb +20 -1
- data/app/views/foreman_acd/app_definitions/index.html.erb +5 -8
- data/app/views/foreman_acd/app_instances/_form.html.erb +4 -4
- data/app/views/foreman_acd/app_instances/edit.html.erb +10 -0
- data/app/views/foreman_acd/app_instances/index.html.erb +93 -14
- data/app/views/foreman_acd/app_instances/report.html.erb +12 -4
- data/app/views/templates/job/run_acd_ansible_playbook.erb +28 -15
- data/app/views/ui_acd/app_definition.json.rabl +1 -1
- 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 +12 -3
- data/db/migrate/20200917120220_add_ansible_playbook_id.rb +1 -1
- data/db/migrate/20201016002819_add_ansible_vars_all_to_app_definitions.rb +3 -0
- data/db/migrate/20201016104338_add_ansible_vars_all_to_app_instances.rb +3 -0
- data/db/migrate/20210112111548_add_organization_to_app_instance.rb +22 -0
- data/db/migrate/20210112113853_add_location_to_app_instance.rb +8 -0
- data/db/migrate/20210202141658_create_foreman_hosts.rb +24 -0
- data/db/migrate/20210204111306_remove_hosts_from_app_instances.rb +8 -0
- data/db/migrate/20210209091014_rename_acd_tables.rb +16 -0
- data/db/migrate/20210216083522_add_last_progress_report.rb +8 -0
- data/db/migrate/20210216091529_add_last_deploy_task.rb +8 -0
- data/db/migrate/20210316151145_add_git_commit_to_ansible_playbooks.rb +8 -0
- data/db/migrate/20210503122809_add_git_url_to_ansible_playbooks.rb +8 -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/db/seeds.d/62_acd_proxy_feature.rb +4 -0
- data/db/seeds.d/75-job_templates.rb +6 -1
- data/lib/foreman_acd/engine.rb +40 -3
- data/lib/foreman_acd/plugin.rb +60 -45
- data/lib/foreman_acd/version.rb +1 -1
- data/lib/foreman_acd.rb +30 -0
- data/lib/tasks/foreman_acd_tasks.rake +0 -12
- data/locale/en/foreman_acd.edit.po +326 -0
- data/locale/en/foreman_acd.po +232 -2
- data/{app/controllers/foreman_acd/api/v2/app_playbooks_controller.rb → locale/en/foreman_acd.po.time_stamp} +0 -0
- data/locale/foreman_acd.pot +343 -8
- data/package.json +8 -8
- data/test/controllers/ansible_playbooks_controller_test.rb +27 -0
- data/test/controllers/app_instances_controller_test.rb +8 -3
- data/test/controllers/ui_acd_controller_test.rb +22 -6
- data/test/factories/foreman_acd_factories.rb +18 -4
- data/test/models/acd_provider_test.rb +37 -0
- data/test/models/ansible_playbook_test.rb +11 -0
- data/test/models/app_definition_test.rb +1 -1
- data/test/models/app_instance_test.rb +2 -0
- data/test/models/concerns/host_extensions_test.rb +26 -0
- data/test/models/foreman_host_test.rb +12 -0
- data/webpack/__mocks__/foremanReact/API.js +2 -0
- data/webpack/__mocks__/foremanReact/common/I18n.js +3 -0
- data/webpack/__mocks__/foremanReact/common/helpers.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal.js +7 -0
- data/webpack/__mocks__/foremanReact/components/common/forms/CommonForm.js +2 -0
- data/webpack/__mocks__/foremanReact/components/common/forms/TextInput.js +2 -0
- data/webpack/__mocks__/foremanReact/components/hosts/powerStatus.js +1 -0
- data/webpack/__snapshots__/helper.test.js.snap +14 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinition.js +55 -21
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionActions.js +14 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionConstants.js +2 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionReducer.js +48 -1
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionSelectors.js +4 -0
- data/webpack/components/ApplicationDefinition/__fixtures__/applicationDefinitionConfData_1.fixtures.js +288 -0
- data/webpack/components/ApplicationDefinition/__fixtures__/applicationDefinitionReducer.fixtures.js +79 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinition.test.js +26 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionReducer.test.js +119 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionSelectors.test.js +41 -0
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinition.test.js.snap +225 -0
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionReducer.test.js.snap +3033 -0
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionSelectors.test.js.snap +299 -0
- data/webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js +2 -1
- data/webpack/components/ApplicationDefinition/components/__tests__/AnsiblePlaybookSelector.test.js +41 -0
- data/webpack/components/ApplicationDefinition/components/__tests__/__snapshots__/AnsiblePlaybookSelector.test.js.snap +121 -0
- 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 +153 -45
- data/webpack/components/ApplicationInstance/ApplicationInstanceActions.js +120 -6
- data/webpack/components/ApplicationInstance/ApplicationInstanceConstants.js +5 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceHelper.js +15 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceReducer.js +77 -22
- data/webpack/components/ApplicationInstance/ApplicationInstanceSelectors.js +4 -0
- data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceConfData_1.fixtures.js +263 -0
- data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceReducer.fixtures.js +80 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstance.test.js +24 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceReducer.test.js +131 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceSelectors.test.js +44 -0
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstance.test.js.snap +299 -0
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceReducer.test.js.snap +2990 -0
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceSelectors.test.js.snap +276 -0
- data/webpack/components/ApplicationInstance/components/AppDefinitionSelector.js +1 -0
- data/webpack/components/ApplicationInstance/components/Service.js +1 -1
- 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 +128 -60
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.scss +17 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportActions.js +40 -50
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportConstants.js +5 -4
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportReducer.js +19 -14
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportSelectors.js +4 -1
- data/webpack/components/ApplicationInstanceReport/__fixtures__/applicationInstanceReportData_1.fixtures.js +349 -0
- data/webpack/components/ApplicationInstanceReport/__fixtures__/applicationInstanceReportReducer.fixtures.js +20 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReport.test.js +47 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReportReducer.test.js +41 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReportSelectors.test.js +26 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReport.test.js.snap +7 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportReducer.test.js.snap +718 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportSelectors.test.js.snap +347 -0
- data/webpack/components/ApplicationInstanceReport/components/ReportViewer.js +1 -1
- data/webpack/components/ApplicationInstanceReport/components/__tests__/ReportViewer.test.js +24 -0
- data/webpack/components/ApplicationInstanceReport/components/__tests__/__snapshots__/ReportViewer.test.js.snap +24 -0
- data/webpack/components/ApplicationInstanceReport/index.js +8 -3
- 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 +138 -15
- data/webpack/components/ParameterSelection/ParameterSelection.scss +7 -0
- data/webpack/components/ParameterSelection/ParameterSelectionActions.js +52 -9
- data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +3 -0
- data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +62 -25
- data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +1 -0
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionData_1.fixtures.js +116 -84
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionReducer.fixtures.js +10 -4
- data/webpack/components/ParameterSelection/__tests__/ParameterSelection.test.js +36 -46
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +33 -25
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js +6 -6
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +84 -112
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +1488 -872
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionSelectors.test.js.snap +117 -79
- data/webpack/components/ParameterSelection/index.js +2 -1
- data/webpack/components/SyncGitRepo/SyncGitRepo.js +202 -0
- data/webpack/components/SyncGitRepo/SyncGitRepo.scss +1 -0
- data/webpack/components/SyncGitRepo/SyncGitRepoActions.js +123 -0
- data/webpack/components/SyncGitRepo/SyncGitRepoConstants.js +8 -0
- data/webpack/components/SyncGitRepo/SyncGitRepoReducer.js +80 -0
- data/webpack/components/SyncGitRepo/SyncGitRepoSelectors.js +6 -0
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoConfData_1.fixtures.js +7 -0
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoReducer.fixtures.js +44 -0
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepo.test.js +27 -0
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepoReducer.test.js +95 -0
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepoSelectors.test.js +32 -0
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepo.test.js.snap +31 -0
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepoReducer.test.js.snap +137 -0
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepoSelectors.test.js.snap +13 -0
- data/webpack/components/SyncGitRepo/components/FormTextInput.js +42 -0
- data/webpack/components/SyncGitRepo/components/ScmTypeSelector.js +47 -0
- data/webpack/components/SyncGitRepo/index.js +28 -0
- data/webpack/components/common/DeleteTableEntry.js +18 -4
- data/webpack/components/common/EditTableEntry.js +50 -0
- data/webpack/components/common/ExtTextInput.js +43 -0
- data/webpack/components/common/LockTableEntry.js +60 -0
- data/webpack/components/common/__tests__/EditTableEntry.test.js +53 -0
- data/webpack/components/common/__tests__/LockTableEntry.test.js +35 -0
- data/webpack/components/common/__tests__/__snapshots__/DeleteTableEntry.test.js.snap +40 -2
- data/webpack/components/common/__tests__/__snapshots__/EditTableEntry.test.js.snap +81 -0
- data/webpack/components/common/__tests__/__snapshots__/LockTableEntry.test.js.snap +60 -0
- data/webpack/helper.js +20 -1
- data/webpack/helper.test.js +37 -0
- data/webpack/index.js +7 -0
- data/webpack/js-yaml.js +3874 -0
- data/webpack/reducer.js +16 -1
- metadata +182 -11
- data/app/views/foreman_acd/app_instances/deploy.html.erb +0 -19
- data/webpack/components/common/EasyHeaderFormatter.js +0 -18
- data/webpack/components/common/__tests__/__snapshots__/AddParameter.test.js.snap +0 -35
- data/webpack/components/common/__tests__/__snapshots__/DeleteParameter.test.js.snap +0 -41
@@ -0,0 +1,44 @@
|
|
1
|
+
import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
|
2
|
+
|
3
|
+
import {
|
4
|
+
selectEditMode,
|
5
|
+
selectAppDefinition,
|
6
|
+
selectHosts,
|
7
|
+
selectColumns,
|
8
|
+
selectServices,
|
9
|
+
selectParametersData,
|
10
|
+
selectAnsibleVarsAll,
|
11
|
+
selectParamEditMode,
|
12
|
+
} from '../ApplicationInstanceSelectors';
|
13
|
+
|
14
|
+
import {
|
15
|
+
applicationInstanceConfData_1,
|
16
|
+
} from '../__fixtures__/applicationInstanceConfData_1.fixtures';
|
17
|
+
|
18
|
+
const stateFactory = obj => ({
|
19
|
+
foremanAcd: {
|
20
|
+
applicationInstanceConf: obj,
|
21
|
+
},
|
22
|
+
});
|
23
|
+
|
24
|
+
const fixtures = {
|
25
|
+
'should return editMode from applicationInstanceConfData_1 fixtures': () =>
|
26
|
+
selectEditMode(stateFactory(applicationInstanceConfData_1)),
|
27
|
+
'should return appDefinition from applicationInstanceConfData_1 fixtures': () =>
|
28
|
+
selectAppDefinition(stateFactory(applicationInstanceConfData_1)),
|
29
|
+
'should return hosts from applicationInstanceConfData_1 fixtures': () =>
|
30
|
+
selectHosts(stateFactory(applicationInstanceConfData_1)),
|
31
|
+
'should return columns from applicationInstanceConfData_1 fixtures': () =>
|
32
|
+
selectColumns(stateFactory(applicationInstanceConfData_1)),
|
33
|
+
'should return services from applicationInstanceConfData_1 fixtures': () =>
|
34
|
+
selectServices(stateFactory(applicationInstanceConfData_1)),
|
35
|
+
'should return parametersData from applicationInstanceConfData_1 fixtures': () =>
|
36
|
+
selectParametersData(stateFactory(applicationInstanceConfData_1)),
|
37
|
+
'should return ansibleVarsAll from applicationInstanceConfData_1 fixtures': () =>
|
38
|
+
selectAnsibleVarsAll(stateFactory(applicationInstanceConfData_1)),
|
39
|
+
'should return ParamEditMode from applicationInstanceConfData_1 fixtures': () =>
|
40
|
+
selectParamEditMode(stateFactory(applicationInstanceConfData_1)),
|
41
|
+
};
|
42
|
+
|
43
|
+
describe('ApplicationInstanceSelectors', () =>
|
44
|
+
testSelectorsSnapshotWithFixtures(fixtures));
|
data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstance.test.js.snap
ADDED
@@ -0,0 +1,299 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`ApplicationInstance should render application instance 1`] = `
|
4
|
+
<span>
|
5
|
+
<MessageDialog
|
6
|
+
accessibleDescription=""
|
7
|
+
accessibleName=""
|
8
|
+
className=""
|
9
|
+
enforceFocus={true}
|
10
|
+
footer={null}
|
11
|
+
icon={
|
12
|
+
<Icon
|
13
|
+
name="error-circle-o"
|
14
|
+
type="pf"
|
15
|
+
/>
|
16
|
+
}
|
17
|
+
onHide={[Function]}
|
18
|
+
primaryAction={[Function]}
|
19
|
+
primaryActionButtonBsStyle="danger"
|
20
|
+
primaryActionButtonContent="OK"
|
21
|
+
primaryContent=""
|
22
|
+
secondaryAction={[Function]}
|
23
|
+
secondaryActionButtonBsStyle="default"
|
24
|
+
secondaryActionButtonContent={null}
|
25
|
+
secondaryContent={null}
|
26
|
+
show={false}
|
27
|
+
title=""
|
28
|
+
/>
|
29
|
+
<div
|
30
|
+
className="service-counter"
|
31
|
+
>
|
32
|
+
<ServiceCounter
|
33
|
+
hostList={Array []}
|
34
|
+
serviceList={Array []}
|
35
|
+
title="Service counts"
|
36
|
+
/>
|
37
|
+
</div>
|
38
|
+
<div>
|
39
|
+
<AppDefinitionSelector
|
40
|
+
additionalData={
|
41
|
+
Object {
|
42
|
+
"url": undefined,
|
43
|
+
}
|
44
|
+
}
|
45
|
+
editable={false}
|
46
|
+
hidden={false}
|
47
|
+
label="Application Definition"
|
48
|
+
onChange={[Function]}
|
49
|
+
selectValue=""
|
50
|
+
viewText=""
|
51
|
+
/>
|
52
|
+
<div
|
53
|
+
style={
|
54
|
+
Object {
|
55
|
+
"paddingTop": 25,
|
56
|
+
}
|
57
|
+
}
|
58
|
+
>
|
59
|
+
<pre>
|
60
|
+
App Definition can't be blank
|
61
|
+
</pre>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
<div
|
65
|
+
className="form-group"
|
66
|
+
>
|
67
|
+
<TablePfProvider
|
68
|
+
bordered={true}
|
69
|
+
className=""
|
70
|
+
columns={Array []}
|
71
|
+
components={
|
72
|
+
Object {
|
73
|
+
"body": Object {
|
74
|
+
"cell": [Function],
|
75
|
+
"row": [Function],
|
76
|
+
},
|
77
|
+
}
|
78
|
+
}
|
79
|
+
condensed={false}
|
80
|
+
dataTable={true}
|
81
|
+
hover={true}
|
82
|
+
inlineEdit={true}
|
83
|
+
striped={true}
|
84
|
+
>
|
85
|
+
<Header
|
86
|
+
headerRows={
|
87
|
+
Array [
|
88
|
+
Array [],
|
89
|
+
]
|
90
|
+
}
|
91
|
+
/>
|
92
|
+
<Body
|
93
|
+
onRow={[Function]}
|
94
|
+
rowKey="id"
|
95
|
+
rows={Array []}
|
96
|
+
/>
|
97
|
+
</TablePfProvider>
|
98
|
+
<AddTableEntry
|
99
|
+
disabled={true}
|
100
|
+
hidden={false}
|
101
|
+
onAddTableEntry={[Function]}
|
102
|
+
/>
|
103
|
+
<span
|
104
|
+
style={
|
105
|
+
Object {
|
106
|
+
"marginLeft": 10,
|
107
|
+
}
|
108
|
+
}
|
109
|
+
>
|
110
|
+
<Button
|
111
|
+
active={false}
|
112
|
+
block={false}
|
113
|
+
bsClass="btn"
|
114
|
+
bsStyle="default"
|
115
|
+
disabled={true}
|
116
|
+
onClick={[Function]}
|
117
|
+
>
|
118
|
+
<Icon
|
119
|
+
name="server"
|
120
|
+
title="Add existing hosts"
|
121
|
+
type="pf"
|
122
|
+
/>
|
123
|
+
</Button>
|
124
|
+
</span>
|
125
|
+
<span
|
126
|
+
style={
|
127
|
+
Object {
|
128
|
+
"marginLeft": 30,
|
129
|
+
}
|
130
|
+
}
|
131
|
+
>
|
132
|
+
Ansible group vars 'all':
|
133
|
+
<Button
|
134
|
+
active={false}
|
135
|
+
block={false}
|
136
|
+
bsClass="btn"
|
137
|
+
bsStyle="default"
|
138
|
+
disabled={true}
|
139
|
+
onClick={[Function]}
|
140
|
+
style={
|
141
|
+
Object {
|
142
|
+
"marginLeft": 10,
|
143
|
+
}
|
144
|
+
}
|
145
|
+
>
|
146
|
+
<span
|
147
|
+
title="Change ansible variables for 'all'"
|
148
|
+
>
|
149
|
+
A
|
150
|
+
</span>
|
151
|
+
</Button>
|
152
|
+
</span>
|
153
|
+
</div>
|
154
|
+
<div>
|
155
|
+
<ForemanModal
|
156
|
+
dialogClassName="param_selection_modal"
|
157
|
+
id="AppInstanceForemanParamSelection"
|
158
|
+
title="Foreman Parameter specification for Application Instance"
|
159
|
+
>
|
160
|
+
<Header
|
161
|
+
closeButton={false}
|
162
|
+
>
|
163
|
+
Parameter specification
|
164
|
+
</Header>
|
165
|
+
<Connect(ParameterSelection)
|
166
|
+
data={Object {}}
|
167
|
+
editModeCallback={[Function]}
|
168
|
+
location="Default Location"
|
169
|
+
organization="Default Organization"
|
170
|
+
paramType="PARAMETER_SELECTION_PARAM_TYPE_FOREMAN"
|
171
|
+
/>
|
172
|
+
<Footer>
|
173
|
+
<div>
|
174
|
+
<Button
|
175
|
+
active={false}
|
176
|
+
block={false}
|
177
|
+
bsClass="btn"
|
178
|
+
bsStyle="primary"
|
179
|
+
disabled={false}
|
180
|
+
onClick={[Function]}
|
181
|
+
>
|
182
|
+
Save
|
183
|
+
</Button>
|
184
|
+
<Button
|
185
|
+
active={false}
|
186
|
+
block={false}
|
187
|
+
bsClass="btn"
|
188
|
+
bsStyle="default"
|
189
|
+
disabled={false}
|
190
|
+
onClick={[Function]}
|
191
|
+
>
|
192
|
+
Cancel
|
193
|
+
</Button>
|
194
|
+
</div>
|
195
|
+
</Footer>
|
196
|
+
</ForemanModal>
|
197
|
+
</div>
|
198
|
+
<div>
|
199
|
+
<ForemanModal
|
200
|
+
dialogClassName="param_selection_modal"
|
201
|
+
id="AppInstanceAnsibleParamSelection"
|
202
|
+
title="Ansible group variables for Application Instance"
|
203
|
+
>
|
204
|
+
<Header
|
205
|
+
closeButton={false}
|
206
|
+
>
|
207
|
+
Parameter specification
|
208
|
+
</Header>
|
209
|
+
<Connect(ParameterSelection)
|
210
|
+
data={Object {}}
|
211
|
+
editModeCallback={[Function]}
|
212
|
+
location="Default Location"
|
213
|
+
organization="Default Organization"
|
214
|
+
paramType="PARAMETER_SELECTION_PARAM_TYPE_ANSIBLE"
|
215
|
+
/>
|
216
|
+
<Footer>
|
217
|
+
<div>
|
218
|
+
<Button
|
219
|
+
active={false}
|
220
|
+
block={false}
|
221
|
+
bsClass="btn"
|
222
|
+
bsStyle="primary"
|
223
|
+
disabled={false}
|
224
|
+
onClick={[Function]}
|
225
|
+
>
|
226
|
+
Save
|
227
|
+
</Button>
|
228
|
+
<Button
|
229
|
+
active={false}
|
230
|
+
block={false}
|
231
|
+
bsClass="btn"
|
232
|
+
bsStyle="default"
|
233
|
+
disabled={false}
|
234
|
+
onClick={[Function]}
|
235
|
+
>
|
236
|
+
Cancel
|
237
|
+
</Button>
|
238
|
+
</div>
|
239
|
+
</Footer>
|
240
|
+
</ForemanModal>
|
241
|
+
</div>
|
242
|
+
<div>
|
243
|
+
<ForemanModal
|
244
|
+
dialogClassName="add_existing_hosts_modal"
|
245
|
+
id="AppInstanceAddExistingHosts"
|
246
|
+
title="Add existing hosts to an Application Instance"
|
247
|
+
>
|
248
|
+
<Header
|
249
|
+
closeButton={false}
|
250
|
+
>
|
251
|
+
Existing hosts selection
|
252
|
+
</Header>
|
253
|
+
<Connect(ExistingHostSelection)
|
254
|
+
allHosts={Array []}
|
255
|
+
location="Default Location"
|
256
|
+
organization="Default Organization"
|
257
|
+
services={Array []}
|
258
|
+
/>
|
259
|
+
<Footer>
|
260
|
+
<div>
|
261
|
+
<Button
|
262
|
+
active={false}
|
263
|
+
block={false}
|
264
|
+
bsClass="btn"
|
265
|
+
bsStyle="primary"
|
266
|
+
disabled={false}
|
267
|
+
onClick={[Function]}
|
268
|
+
>
|
269
|
+
Save
|
270
|
+
</Button>
|
271
|
+
<Button
|
272
|
+
active={false}
|
273
|
+
block={false}
|
274
|
+
bsClass="btn"
|
275
|
+
bsStyle="default"
|
276
|
+
disabled={false}
|
277
|
+
onClick={[Function]}
|
278
|
+
>
|
279
|
+
Cancel
|
280
|
+
</Button>
|
281
|
+
</div>
|
282
|
+
</Footer>
|
283
|
+
</ForemanModal>
|
284
|
+
</div>
|
285
|
+
<div />
|
286
|
+
<RailsData
|
287
|
+
key="application_instance_hosts_data"
|
288
|
+
parameter="hosts"
|
289
|
+
value="[]"
|
290
|
+
view="app_instance"
|
291
|
+
/>
|
292
|
+
<RailsData
|
293
|
+
key="application_instance_ansible_data"
|
294
|
+
parameter="ansible_vars_all"
|
295
|
+
value="[]"
|
296
|
+
view="app_instance"
|
297
|
+
/>
|
298
|
+
</span>
|
299
|
+
`;
|