foreman_acd 0.0.6 → 0.2.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 +4 -4
- data/app/controllers/foreman_acd/api/v2/app_definitions_controller.rb +1 -2
- data/app/controllers/foreman_acd/app_definitions_controller.rb +29 -1
- data/app/controllers/foreman_acd/app_instances_controller.rb +70 -21
- data/app/controllers/foreman_acd/concerns/app_definition_parameters.rb +1 -1
- data/app/controllers/foreman_acd/concerns/app_instance_parameters.rb +1 -1
- data/app/controllers/ui_acd_controller.rb +0 -1
- data/app/models/foreman_acd/app_definition.rb +0 -1
- data/app/views/foreman_acd/app_definitions/_form.html.erb +6 -14
- data/app/views/foreman_acd/app_definitions/import.html.erb +18 -0
- data/app/views/foreman_acd/app_definitions/index.html.erb +9 -5
- data/app/views/foreman_acd/app_instances/_form.html.erb +5 -5
- data/app/views/foreman_acd/app_instances/deploy.html.erb +19 -0
- data/app/views/foreman_acd/app_instances/index.html.erb +6 -5
- data/app/views/foreman_acd/app_instances/report.html.erb +19 -0
- data/app/views/ui_acd/app_definition.json.rabl +1 -1
- data/config/routes.rb +7 -0
- data/db/migrate/20190610202252_create_app_definitions.rb +1 -3
- data/db/migrate/20190625140305_create_app_instances.rb +1 -1
- data/lib/foreman_acd/plugin.rb +19 -2
- data/lib/foreman_acd/version.rb +1 -1
- data/webpack/components/ApplicationDefinition/ApplicationDefinition.js +261 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinition.scss +1 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionActions.js +211 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionConstants.js +9 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionReducer.js +147 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionSelectors.js +6 -0
- data/webpack/components/ApplicationDefinition/index.js +29 -0
- data/webpack/components/ApplicationInstance/ApplicationInstance.js +342 -0
- data/webpack/components/ApplicationInstance/ApplicationInstance.scss +11 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceActions.js +210 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceConstants.js +12 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceReducer.js +223 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceSelectors.js +8 -0
- data/webpack/components/ApplicationInstance/components/AppDefinitionSelector.js +49 -0
- data/webpack/components/ApplicationInstance/components/Service.js +30 -0
- data/webpack/components/ApplicationInstance/components/ServiceCounter.js +37 -0
- data/webpack/components/ApplicationInstance/index.js +33 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.js +155 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.scss +27 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportActions.js +86 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportConstants.js +4 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportReducer.js +52 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportSelectors.js +5 -0
- data/webpack/components/ApplicationInstanceReport/components/ReportViewer.js +26 -0
- data/webpack/components/ApplicationInstanceReport/index.js +27 -0
- data/webpack/components/ParameterSelection/ParameterSelection.js +65 -161
- data/webpack/components/ParameterSelection/ParameterSelection.scss +9 -0
- data/webpack/components/ParameterSelection/ParameterSelectionActions.js +42 -71
- data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +12 -19
- data/webpack/components/ParameterSelection/ParameterSelectionHelper.js +3 -3
- data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +76 -75
- data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +2 -6
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelection.fixtures.js +12 -21
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionData_1.fixtures.js +1 -1
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionReducer.fixtures.js +3 -45
- data/webpack/components/ParameterSelection/__tests__/ParameterSelection.test.js +20 -0
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +22 -46
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js +6 -6
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +40 -265
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +11 -96
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionSelectors.test.js.snap +3 -9
- data/webpack/components/ParameterSelection/index.js +4 -6
- data/webpack/components/common/AddTableEntry.js +30 -0
- data/webpack/components/common/DeleteTableEntry.js +39 -0
- data/webpack/components/common/ExtSelect.js +43 -0
- data/webpack/components/common/RailsData.js +27 -0
- data/webpack/components/common/__tests__/AddTableEntry.test.js +26 -0
- data/webpack/components/common/__tests__/DeleteTableEntry.test.js +29 -0
- data/webpack/components/common/__tests__/ExtSelect.test.js +38 -0
- data/webpack/components/common/__tests__/RailsData.test.js +16 -0
- data/webpack/components/common/__tests__/__snapshots__/AddParameter.test.js.snap +35 -0
- data/webpack/components/common/__tests__/__snapshots__/AddTableEntry.test.js.snap +35 -0
- data/webpack/components/common/__tests__/__snapshots__/DeleteParameter.test.js.snap +41 -0
- data/webpack/components/common/__tests__/__snapshots__/DeleteTableEntry.test.js.snap +41 -0
- data/webpack/components/common/__tests__/__snapshots__/ExtSelect.test.js.snap +18 -0
- data/webpack/components/common/__tests__/__snapshots__/RailsData.test.js.snap +10 -0
- data/webpack/helper.js +20 -0
- data/webpack/index.js +6 -0
- data/webpack/reducer.js +40 -3
- metadata +47 -46
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { differenceBy, slice, includes, uniq } from 'lodash';
|
|
2
|
-
import Immutable from 'seamless-immutable';
|
|
3
|
-
import { createSelector } from 'reselect';
|
|
4
|
-
|
|
5
1
|
const parameterState = state => state.foremanAcd.parameterSelectionParameters;
|
|
6
2
|
|
|
7
3
|
export const selectLoading = state => parameterState(state).loading;
|
|
8
4
|
export const selectEditMode = state => parameterState(state).editMode;
|
|
9
5
|
export const selectForemanData = state => parameterState(state).foremanData;
|
|
10
6
|
export const selectParameterTypes = state => parameterState(state).parameterTypes;
|
|
11
|
-
export const
|
|
7
|
+
export const selectParameters = state => parameterState(state).parameters;
|
|
12
8
|
export const selectSortingColumns = state => parameterState(state).sortingColumns;
|
|
13
9
|
export const selectColumns = state => parameterState(state).columns;
|
|
14
|
-
export const
|
|
10
|
+
export const selectServiceDefinition = state => parameterState(state).serviceDefinition;
|
|
15
11
|
export const selectHostgroupId = state => parameterState(state).hostgroupId;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
export const newDefinition = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
mode: "newDefinition",
|
|
3
|
+
serviceDefinition: {
|
|
4
|
+
id: 1,
|
|
5
|
+
name: "Test123",
|
|
6
|
+
hostgroup_id: 1
|
|
6
7
|
},
|
|
7
|
-
loadForemanDataUrl: "/acd/ui_acd_fdata/__id__",
|
|
8
|
-
mode: "newDefinition"
|
|
9
8
|
};
|
|
10
9
|
export const editDefinition = {
|
|
11
|
-
organization: "Default Organization",
|
|
12
|
-
location: "Default Location",
|
|
13
|
-
hostgroups: {
|
|
14
|
-
"1": "centos7"
|
|
15
|
-
},
|
|
16
|
-
loadForemanDataUrl: "/acd/ui_acd_fdata/__id__",
|
|
17
10
|
mode: "editDefinition",
|
|
18
|
-
|
|
11
|
+
serviceDefinition: {
|
|
19
12
|
id: 1,
|
|
20
13
|
name: "Test123",
|
|
21
14
|
hostgroup_id: 1
|
|
@@ -82,21 +75,19 @@ export const editDefinition = {
|
|
|
82
75
|
|
|
83
76
|
export const newInstance = {
|
|
84
77
|
mode: "newInstance",
|
|
85
|
-
organization: "Default Organization",
|
|
86
|
-
location: "Default Location",
|
|
87
78
|
applications: {
|
|
88
79
|
"1": "Test123",
|
|
89
80
|
"2": "sowasvonneu"
|
|
90
81
|
},
|
|
91
|
-
|
|
92
|
-
|
|
82
|
+
serviceDefinition: {
|
|
83
|
+
id: 1,
|
|
84
|
+
name: "Test123",
|
|
85
|
+
hostgroup_id: 1
|
|
86
|
+
},
|
|
93
87
|
};
|
|
94
88
|
export const editInstance = {
|
|
95
89
|
mode: "editInstance",
|
|
96
|
-
|
|
97
|
-
location: "Default Location",
|
|
98
|
-
loadForemanDataUrl: "/acd/ui_acd_fdata/__id__",
|
|
99
|
-
appDefinition: {
|
|
90
|
+
serviceDefinition: {
|
|
100
91
|
id: 1,
|
|
101
92
|
name: "Test123",
|
|
102
93
|
hostgroup_id: 1
|
data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionReducer.fixtures.js
CHANGED
|
@@ -13,9 +13,9 @@ export const successState = Immutable(parameterSelectionData_1);
|
|
|
13
13
|
|
|
14
14
|
const EDIT_ROW_ID = 5;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
editClone["
|
|
16
|
+
const editClone = parameterSelectionData_1;
|
|
17
|
+
const editIndex = findIndex(editClone.parameters, { id: EDIT_ROW_ID })
|
|
18
|
+
editClone["parameters"][editIndex].backup = cloneDeep(editClone["parameters"][editIndex]);
|
|
19
19
|
export const editState = Immutable(editClone);
|
|
20
20
|
|
|
21
21
|
export const initParameterSelectionPayload = parameterSelectionData_1;
|
|
@@ -83,45 +83,3 @@ export const loadForemanDataSuccessPayload = {
|
|
|
83
83
|
export const loadForemanDataFailurePayload = {
|
|
84
84
|
error: "Something really bad happend",
|
|
85
85
|
};
|
|
86
|
-
|
|
87
|
-
export const loadParameterSelectionRequestPayload = { };
|
|
88
|
-
export const loadParameterSelectionSuccessPayload = {
|
|
89
|
-
app_definition: {
|
|
90
|
-
id: 2,
|
|
91
|
-
name: "sowasvonneu",
|
|
92
|
-
description: "",
|
|
93
|
-
hostgroup_id: 1,
|
|
94
|
-
parameters: "[{\"id\":0,\"name\":\"richtigneu\",\"description\":\"\",\"type\":\"puppetenv\",\"value\":\"1\"},{\"id\":1,\"name\":\"ganzgut\",\"description\":\"\",\"type\":\"ip\",\"value\":\"1.1.1.2\"}]",
|
|
95
|
-
created_at: "2019-11-13 17:47:27 +0100",
|
|
96
|
-
updated_at: "2019-11-13 17:47:27 +0100"
|
|
97
|
-
},
|
|
98
|
-
fdata: {
|
|
99
|
-
hostgroup_id: 1,
|
|
100
|
-
environments: [
|
|
101
|
-
{
|
|
102
|
-
id: 1,
|
|
103
|
-
name: "production"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
id: 2,
|
|
107
|
-
name: "test"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
lifecycle_environments: [],
|
|
111
|
-
domains: [],
|
|
112
|
-
computeprofiles: [],
|
|
113
|
-
ptables: [
|
|
114
|
-
{
|
|
115
|
-
id: 105,
|
|
116
|
-
name: "Kickstart default"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 104,
|
|
120
|
-
name: "Kickstart default thin"
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
export const loadParameterSelectionFailurePayload = {
|
|
126
|
-
error: "Something really bad happend",
|
|
127
|
-
};
|
|
@@ -15,32 +15,52 @@ const noop = () => {};
|
|
|
15
15
|
|
|
16
16
|
const fixtures = {
|
|
17
17
|
'should render newDefinition': {
|
|
18
|
+
location: "Default Location",
|
|
19
|
+
organization: "Default Organization",
|
|
20
|
+
loadForemanDataUrl: "/acd/ui_acd_fdata/__id__",
|
|
18
21
|
loading: false,
|
|
19
22
|
data: newDefinition,
|
|
20
23
|
error: { statusText: '', errorMsg: '' },
|
|
21
24
|
initParameterSelection: noop,
|
|
22
25
|
loadForemanData: noop,
|
|
26
|
+
addParameter: noop,
|
|
27
|
+
deleteParameter: noop,
|
|
23
28
|
},
|
|
24
29
|
'should render editDefinition': {
|
|
30
|
+
location: "Default Location",
|
|
31
|
+
organization: "Default Organization",
|
|
32
|
+
loadForemanDataUrl: "/acd/ui_acd_fdata/__id__",
|
|
25
33
|
loading: false,
|
|
26
34
|
data: editDefinition,
|
|
27
35
|
error: { statusText: '', errorMsg: '' },
|
|
28
36
|
initParameterSelection: noop,
|
|
29
37
|
loadForemanData: noop,
|
|
38
|
+
addParameter: noop,
|
|
39
|
+
deleteParameter: noop,
|
|
30
40
|
},
|
|
31
41
|
'should render newInstance': {
|
|
42
|
+
location: "Default Location",
|
|
43
|
+
organization: "Default Organization",
|
|
32
44
|
loading: false,
|
|
45
|
+
loadForemanDataUrl: "/acd/ui_acd_fdata/__id__",
|
|
33
46
|
data: newInstance,
|
|
34
47
|
error: { statusText: '', errorMsg: '' },
|
|
35
48
|
initParameterSelection: noop,
|
|
36
49
|
loadForemanData: noop,
|
|
50
|
+
addParameter: noop,
|
|
51
|
+
deleteParameter: noop,
|
|
37
52
|
},
|
|
38
53
|
'should render editInstance': {
|
|
54
|
+
location: "Default Location",
|
|
55
|
+
organization: "Default Organization",
|
|
39
56
|
loading: false,
|
|
57
|
+
loadForemanDataUrl: "/acd/ui_acd_fdata/__id__",
|
|
40
58
|
data: editInstance,
|
|
41
59
|
error: { statusText: '', errorMsg: '' },
|
|
42
60
|
initParameterSelection: noop,
|
|
43
61
|
loadForemanData: noop,
|
|
62
|
+
addParameter: noop,
|
|
63
|
+
deleteParameter: noop,
|
|
44
64
|
},
|
|
45
65
|
};
|
|
46
66
|
|
|
@@ -21,20 +21,17 @@ import {
|
|
|
21
21
|
} from '../__fixtures__/parameterSelectionReducer.fixtures';
|
|
22
22
|
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
LOAD_PARAMETER_SELECTION_REQUEST,
|
|
36
|
-
LOAD_PARAMETER_SELECTION_SUCCESS,
|
|
37
|
-
LOAD_PARAMETER_SELECTION_FAILURE,
|
|
24
|
+
PARAMETER_SELECTION_INIT,
|
|
25
|
+
PARAMETER_SELECTION_DELETE,
|
|
26
|
+
PARAMETER_SELECTION_ADD,
|
|
27
|
+
PARAMETER_SELECTION_EDIT_ACTIVATE,
|
|
28
|
+
PARAMETER_SELECTION_EDIT_CONFIRM,
|
|
29
|
+
PARAMETER_SELECTION_EDIT_CHANGE,
|
|
30
|
+
PARAMETER_SELECTION_EDIT_CANCEL,
|
|
31
|
+
PARAMETER_SELECTION_SORT,
|
|
32
|
+
PARAMETER_SELECTION_LOAD_FOREMAN_DATA_REQUEST,
|
|
33
|
+
PARAMETER_SELECTION_LOAD_FOREMAN_DATA_SUCCESS,
|
|
34
|
+
PARAMETER_SELECTION_LOAD_FOREMAN_DATA_FAILURE,
|
|
38
35
|
} from '../ParameterSelectionConstants';
|
|
39
36
|
|
|
40
37
|
const fixtures = {
|
|
@@ -49,101 +46,80 @@ const fixtures = {
|
|
|
49
46
|
'should initialize component': {
|
|
50
47
|
state: initialState,
|
|
51
48
|
action: {
|
|
52
|
-
type:
|
|
49
|
+
type: PARAMETER_SELECTION_INIT,
|
|
53
50
|
payload: initParameterSelectionPayload,
|
|
54
51
|
},
|
|
55
52
|
},
|
|
56
53
|
'should add a parameter': {
|
|
57
54
|
state: successState,
|
|
58
55
|
action: {
|
|
59
|
-
type:
|
|
56
|
+
type: PARAMETER_SELECTION_ADD,
|
|
60
57
|
payload: addParameterPayload,
|
|
61
58
|
},
|
|
62
59
|
},
|
|
63
60
|
'should delete a parameter': {
|
|
64
61
|
state: successState,
|
|
65
62
|
action: {
|
|
66
|
-
type:
|
|
63
|
+
type: PARAMETER_SELECTION_DELETE,
|
|
67
64
|
payload: deleteParameterPayload,
|
|
68
65
|
},
|
|
69
66
|
},
|
|
70
67
|
'should activate edit parameter': {
|
|
71
68
|
state: successState,
|
|
72
69
|
action: {
|
|
73
|
-
type:
|
|
70
|
+
type: PARAMETER_SELECTION_EDIT_ACTIVATE,
|
|
74
71
|
payload: activateEditParameterPayload,
|
|
75
72
|
},
|
|
76
73
|
},
|
|
77
74
|
'should confirm edit parameter': {
|
|
78
75
|
state: editState,
|
|
79
76
|
action: {
|
|
80
|
-
type:
|
|
77
|
+
type: PARAMETER_SELECTION_EDIT_CONFIRM,
|
|
81
78
|
payload: confirmEditParameterPayload,
|
|
82
79
|
},
|
|
83
80
|
},
|
|
84
81
|
'should cancel edit parameter': {
|
|
85
82
|
state: editState,
|
|
86
83
|
action: {
|
|
87
|
-
type:
|
|
84
|
+
type: PARAMETER_SELECTION_EDIT_CANCEL,
|
|
88
85
|
payload: cancelEditParameterPayload,
|
|
89
86
|
},
|
|
90
87
|
},
|
|
91
88
|
'should change edit parameter': {
|
|
92
89
|
state: editState,
|
|
93
90
|
action: {
|
|
94
|
-
type:
|
|
91
|
+
type: PARAMETER_SELECTION_EDIT_CHANGE,
|
|
95
92
|
payload: changeEditParameterPayload,
|
|
96
93
|
},
|
|
97
94
|
},
|
|
98
95
|
'should sort parameter': {
|
|
99
96
|
state: successState,
|
|
100
97
|
action: {
|
|
101
|
-
type:
|
|
98
|
+
type: PARAMETER_SELECTION_SORT,
|
|
102
99
|
payload: sortParameterPayload,
|
|
103
100
|
},
|
|
104
101
|
},
|
|
105
102
|
'should request load foreman data': {
|
|
106
103
|
state: successState,
|
|
107
104
|
action: {
|
|
108
|
-
type:
|
|
105
|
+
type: PARAMETER_SELECTION_LOAD_FOREMAN_DATA_REQUEST,
|
|
109
106
|
payload: loadForemanDataRequestPayload,
|
|
110
107
|
},
|
|
111
108
|
},
|
|
112
109
|
'should load foreman data be successful': {
|
|
113
110
|
state: successState,
|
|
114
111
|
action: {
|
|
115
|
-
type:
|
|
112
|
+
type: PARAMETER_SELECTION_LOAD_FOREMAN_DATA_SUCCESS,
|
|
116
113
|
payload: loadForemanDataSuccessPayload,
|
|
117
114
|
},
|
|
118
115
|
},
|
|
119
116
|
'should load foreman data be erroneous': {
|
|
120
117
|
state: successState,
|
|
121
118
|
action: {
|
|
122
|
-
type:
|
|
119
|
+
type: PARAMETER_SELECTION_LOAD_FOREMAN_DATA_FAILURE,
|
|
123
120
|
payload: loadForemanDataFailurePayload,
|
|
124
121
|
},
|
|
125
122
|
},
|
|
126
|
-
'should request parameter selection': {
|
|
127
|
-
state: initialState,
|
|
128
|
-
action: {
|
|
129
|
-
type: LOAD_PARAMETER_SELECTION_REQUEST,
|
|
130
|
-
payload: loadParameterSelectionRequestPayload,
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
'should load parameter selection be successful': {
|
|
134
|
-
state: initialState,
|
|
135
|
-
action: {
|
|
136
|
-
type: LOAD_PARAMETER_SELECTION_SUCCESS,
|
|
137
|
-
payload: loadParameterSelectionSuccessPayload,
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
'should load parameter selection be erroneous': {
|
|
141
|
-
state: initialState,
|
|
142
|
-
action: {
|
|
143
|
-
type: LOAD_PARAMETER_SELECTION_FAILURE,
|
|
144
|
-
payload: loadParameterSelectionFailurePayload,
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
123
|
};
|
|
148
124
|
|
|
149
125
|
describe('ParameterSelectionReducer', () =>
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
selectEditMode,
|
|
6
6
|
selectForemanData,
|
|
7
7
|
selectParameterTypes,
|
|
8
|
-
|
|
8
|
+
selectParameters,
|
|
9
9
|
selectSortingColumns,
|
|
10
10
|
selectColumns,
|
|
11
|
-
|
|
11
|
+
selectServiceDefinition,
|
|
12
12
|
selectHostgroupId,
|
|
13
13
|
} from '../ParameterSelectionSelectors';
|
|
14
14
|
|
|
@@ -31,14 +31,14 @@ const fixtures = {
|
|
|
31
31
|
selectForemanData(stateFactory(parameterSelectionData_1)),
|
|
32
32
|
'should return parameterTypes from parameterSelectionData_1 fixtures': () =>
|
|
33
33
|
selectParameterTypes(stateFactory(parameterSelectionData_1)),
|
|
34
|
-
'should return
|
|
35
|
-
|
|
34
|
+
'should return parameters from parameterSelectionData_1 fixtures': () =>
|
|
35
|
+
selectParameters(stateFactory(parameterSelectionData_1)),
|
|
36
36
|
'should return sortingColumns from parameterSelectionData_1 fixtures': () =>
|
|
37
37
|
selectSortingColumns(stateFactory(parameterSelectionData_1)),
|
|
38
38
|
'should return columns from parameterSelectionData_1 fixtures': () =>
|
|
39
39
|
selectColumns(stateFactory(parameterSelectionData_1)),
|
|
40
|
-
'should return
|
|
41
|
-
|
|
40
|
+
'should return serviceDefinition from parameterSelectionData_1 fixtures': () =>
|
|
41
|
+
selectServiceDefinition(stateFactory(parameterSelectionData_1)),
|
|
42
42
|
'should return hostgroupId from parameterSelectionData_1 fixtures': () =>
|
|
43
43
|
selectHostgroupId(stateFactory(parameterSelectionData_1)),
|
|
44
44
|
};
|
data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap
CHANGED
|
@@ -8,61 +8,11 @@ exports[`ParameterSelection should render editDefinition 1`] = `
|
|
|
8
8
|
<div
|
|
9
9
|
className="form-group"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<div
|
|
17
|
-
className="col-md-4"
|
|
18
|
-
>
|
|
19
|
-
<div />
|
|
20
|
-
<input
|
|
21
|
-
id="foreman_acd_app_definition_hostgroup_id"
|
|
22
|
-
name="foreman_acd_app_definition[hostgroup_id]"
|
|
23
|
-
type="hidden"
|
|
24
|
-
value={-1}
|
|
25
|
-
/>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div
|
|
30
|
-
className="clearfix"
|
|
31
|
-
>
|
|
32
|
-
<div
|
|
33
|
-
className="form-group"
|
|
34
|
-
>
|
|
35
|
-
<label
|
|
36
|
-
className="col-md-1 control-label"
|
|
37
|
-
>
|
|
38
|
-
Application parameters
|
|
39
|
-
</label>
|
|
40
|
-
<div
|
|
41
|
-
className="col-md-5"
|
|
42
|
-
>
|
|
43
|
-
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<div
|
|
48
|
-
className="clearfix"
|
|
49
|
-
>
|
|
50
|
-
<div
|
|
51
|
-
className="form-group"
|
|
52
|
-
>
|
|
53
|
-
<Button
|
|
54
|
-
active={false}
|
|
55
|
-
block={false}
|
|
56
|
-
bsClass="btn"
|
|
57
|
-
bsStyle="default"
|
|
58
|
-
disabled={true}
|
|
59
|
-
onClick={[Function]}
|
|
60
|
-
>
|
|
61
|
-
<Icon
|
|
62
|
-
name="plus"
|
|
63
|
-
type="fa"
|
|
64
|
-
/>
|
|
65
|
-
</Button>
|
|
11
|
+
<AddTableEntry
|
|
12
|
+
disabled={false}
|
|
13
|
+
hidden={false}
|
|
14
|
+
onAddTableEntry={[Function]}
|
|
15
|
+
/>
|
|
66
16
|
<TablePfProvider
|
|
67
17
|
bordered={true}
|
|
68
18
|
className=""
|
|
@@ -97,26 +47,12 @@ exports[`ParameterSelection should render editDefinition 1`] = `
|
|
|
97
47
|
rows={Array []}
|
|
98
48
|
/>
|
|
99
49
|
</TablePfProvider>
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
disabled={true}
|
|
106
|
-
onClick={[Function]}
|
|
107
|
-
>
|
|
108
|
-
<Icon
|
|
109
|
-
name="plus"
|
|
110
|
-
type="fa"
|
|
111
|
-
/>
|
|
112
|
-
</Button>
|
|
50
|
+
<AddTableEntry
|
|
51
|
+
disabled={false}
|
|
52
|
+
hidden={false}
|
|
53
|
+
onAddTableEntry={[Function]}
|
|
54
|
+
/>
|
|
113
55
|
</div>
|
|
114
|
-
<input
|
|
115
|
-
id="foreman_acd_app_definition_parameters"
|
|
116
|
-
name="foreman_acd_app_definition[parameters]"
|
|
117
|
-
type="hidden"
|
|
118
|
-
value="[]"
|
|
119
|
-
/>
|
|
120
56
|
</div>
|
|
121
57
|
</div>
|
|
122
58
|
`;
|
|
@@ -129,48 +65,11 @@ exports[`ParameterSelection should render editInstance 1`] = `
|
|
|
129
65
|
<div
|
|
130
66
|
className="form-group"
|
|
131
67
|
>
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<div
|
|
138
|
-
className="col-md-4"
|
|
139
|
-
>
|
|
140
|
-
<div />
|
|
141
|
-
<input
|
|
142
|
-
id="foreman_acd_app_instance_app_definition_id"
|
|
143
|
-
name="foreman_acd_app_instance[app_definition_id]"
|
|
144
|
-
type="hidden"
|
|
145
|
-
value=""
|
|
146
|
-
/>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
<div
|
|
151
|
-
className="clearfix"
|
|
152
|
-
>
|
|
153
|
-
<div
|
|
154
|
-
className="form-group"
|
|
155
|
-
>
|
|
156
|
-
<label
|
|
157
|
-
className="col-md-1 control-label"
|
|
158
|
-
>
|
|
159
|
-
Application parameters
|
|
160
|
-
</label>
|
|
161
|
-
<div
|
|
162
|
-
className="col-md-5"
|
|
163
|
-
>
|
|
164
|
-
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
<div
|
|
169
|
-
className="clearfix"
|
|
170
|
-
>
|
|
171
|
-
<div
|
|
172
|
-
className="form-group"
|
|
173
|
-
>
|
|
68
|
+
<AddTableEntry
|
|
69
|
+
disabled={false}
|
|
70
|
+
hidden={true}
|
|
71
|
+
onAddTableEntry={[Function]}
|
|
72
|
+
/>
|
|
174
73
|
<TablePfProvider
|
|
175
74
|
bordered={true}
|
|
176
75
|
className=""
|
|
@@ -205,13 +104,12 @@ exports[`ParameterSelection should render editInstance 1`] = `
|
|
|
205
104
|
rows={Array []}
|
|
206
105
|
/>
|
|
207
106
|
</TablePfProvider>
|
|
107
|
+
<AddTableEntry
|
|
108
|
+
disabled={false}
|
|
109
|
+
hidden={true}
|
|
110
|
+
onAddTableEntry={[Function]}
|
|
111
|
+
/>
|
|
208
112
|
</div>
|
|
209
|
-
<input
|
|
210
|
-
id="foreman_acd_app_instance_parameters"
|
|
211
|
-
name="foreman_acd_app_instance[parameters]"
|
|
212
|
-
type="hidden"
|
|
213
|
-
value="[]"
|
|
214
|
-
/>
|
|
215
113
|
</div>
|
|
216
114
|
</div>
|
|
217
115
|
`;
|
|
@@ -224,71 +122,11 @@ exports[`ParameterSelection should render newDefinition 1`] = `
|
|
|
224
122
|
<div
|
|
225
123
|
className="form-group"
|
|
226
124
|
>
|
|
227
|
-
<
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
<div
|
|
233
|
-
className="col-md-4"
|
|
234
|
-
>
|
|
235
|
-
<Select
|
|
236
|
-
allowClear={true}
|
|
237
|
-
key="key"
|
|
238
|
-
onChange={[Function]}
|
|
239
|
-
options={
|
|
240
|
-
Object {
|
|
241
|
-
"1": "centos7",
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
value="-1"
|
|
245
|
-
/>
|
|
246
|
-
<input
|
|
247
|
-
id="foreman_acd_app_definition_hostgroup_id"
|
|
248
|
-
name="foreman_acd_app_definition[hostgroup_id]"
|
|
249
|
-
type="hidden"
|
|
250
|
-
value={-1}
|
|
251
|
-
/>
|
|
252
|
-
</div>
|
|
253
|
-
</div>
|
|
254
|
-
</div>
|
|
255
|
-
<div
|
|
256
|
-
className="clearfix"
|
|
257
|
-
>
|
|
258
|
-
<div
|
|
259
|
-
className="form-group"
|
|
260
|
-
>
|
|
261
|
-
<label
|
|
262
|
-
className="col-md-1 control-label"
|
|
263
|
-
>
|
|
264
|
-
Application parameters
|
|
265
|
-
</label>
|
|
266
|
-
<div
|
|
267
|
-
className="col-md-5"
|
|
268
|
-
>
|
|
269
|
-
|
|
270
|
-
</div>
|
|
271
|
-
</div>
|
|
272
|
-
</div>
|
|
273
|
-
<div
|
|
274
|
-
className="clearfix"
|
|
275
|
-
>
|
|
276
|
-
<div
|
|
277
|
-
className="form-group"
|
|
278
|
-
>
|
|
279
|
-
<Button
|
|
280
|
-
active={false}
|
|
281
|
-
block={false}
|
|
282
|
-
bsClass="btn"
|
|
283
|
-
bsStyle="default"
|
|
284
|
-
disabled={true}
|
|
285
|
-
onClick={[Function]}
|
|
286
|
-
>
|
|
287
|
-
<Icon
|
|
288
|
-
name="plus"
|
|
289
|
-
type="fa"
|
|
290
|
-
/>
|
|
291
|
-
</Button>
|
|
125
|
+
<AddTableEntry
|
|
126
|
+
disabled={false}
|
|
127
|
+
hidden={false}
|
|
128
|
+
onAddTableEntry={[Function]}
|
|
129
|
+
/>
|
|
292
130
|
<TablePfProvider
|
|
293
131
|
bordered={true}
|
|
294
132
|
className=""
|
|
@@ -323,26 +161,12 @@ exports[`ParameterSelection should render newDefinition 1`] = `
|
|
|
323
161
|
rows={Array []}
|
|
324
162
|
/>
|
|
325
163
|
</TablePfProvider>
|
|
326
|
-
<
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
disabled={true}
|
|
332
|
-
onClick={[Function]}
|
|
333
|
-
>
|
|
334
|
-
<Icon
|
|
335
|
-
name="plus"
|
|
336
|
-
type="fa"
|
|
337
|
-
/>
|
|
338
|
-
</Button>
|
|
164
|
+
<AddTableEntry
|
|
165
|
+
disabled={false}
|
|
166
|
+
hidden={false}
|
|
167
|
+
onAddTableEntry={[Function]}
|
|
168
|
+
/>
|
|
339
169
|
</div>
|
|
340
|
-
<input
|
|
341
|
-
id="foreman_acd_app_definition_parameters"
|
|
342
|
-
name="foreman_acd_app_definition[parameters]"
|
|
343
|
-
type="hidden"
|
|
344
|
-
value="[]"
|
|
345
|
-
/>
|
|
346
170
|
</div>
|
|
347
171
|
</div>
|
|
348
172
|
`;
|
|
@@ -355,59 +179,11 @@ exports[`ParameterSelection should render newInstance 1`] = `
|
|
|
355
179
|
<div
|
|
356
180
|
className="form-group"
|
|
357
181
|
>
|
|
358
|
-
<
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
<div
|
|
364
|
-
className="col-md-4"
|
|
365
|
-
>
|
|
366
|
-
<Select
|
|
367
|
-
allowClear={true}
|
|
368
|
-
key="key"
|
|
369
|
-
onChange={[Function]}
|
|
370
|
-
options={
|
|
371
|
-
Object {
|
|
372
|
-
"1": "Test123",
|
|
373
|
-
"2": "sowasvonneu",
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
value=""
|
|
377
|
-
/>
|
|
378
|
-
<input
|
|
379
|
-
id="foreman_acd_app_instance_app_definition_id"
|
|
380
|
-
name="foreman_acd_app_instance[app_definition_id]"
|
|
381
|
-
type="hidden"
|
|
382
|
-
value=""
|
|
383
|
-
/>
|
|
384
|
-
</div>
|
|
385
|
-
</div>
|
|
386
|
-
</div>
|
|
387
|
-
<div
|
|
388
|
-
className="clearfix"
|
|
389
|
-
>
|
|
390
|
-
<div
|
|
391
|
-
className="form-group"
|
|
392
|
-
>
|
|
393
|
-
<label
|
|
394
|
-
className="col-md-1 control-label"
|
|
395
|
-
>
|
|
396
|
-
Application parameters
|
|
397
|
-
</label>
|
|
398
|
-
<div
|
|
399
|
-
className="col-md-5"
|
|
400
|
-
>
|
|
401
|
-
|
|
402
|
-
</div>
|
|
403
|
-
</div>
|
|
404
|
-
</div>
|
|
405
|
-
<div
|
|
406
|
-
className="clearfix"
|
|
407
|
-
>
|
|
408
|
-
<div
|
|
409
|
-
className="form-group"
|
|
410
|
-
>
|
|
182
|
+
<AddTableEntry
|
|
183
|
+
disabled={false}
|
|
184
|
+
hidden={true}
|
|
185
|
+
onAddTableEntry={[Function]}
|
|
186
|
+
/>
|
|
411
187
|
<TablePfProvider
|
|
412
188
|
bordered={true}
|
|
413
189
|
className=""
|
|
@@ -442,13 +218,12 @@ exports[`ParameterSelection should render newInstance 1`] = `
|
|
|
442
218
|
rows={Array []}
|
|
443
219
|
/>
|
|
444
220
|
</TablePfProvider>
|
|
221
|
+
<AddTableEntry
|
|
222
|
+
disabled={false}
|
|
223
|
+
hidden={true}
|
|
224
|
+
onAddTableEntry={[Function]}
|
|
225
|
+
/>
|
|
445
226
|
</div>
|
|
446
|
-
<input
|
|
447
|
-
id="foreman_acd_app_instance_parameters"
|
|
448
|
-
name="foreman_acd_app_instance[parameters]"
|
|
449
|
-
type="hidden"
|
|
450
|
-
value="[]"
|
|
451
|
-
/>
|
|
452
227
|
</div>
|
|
453
228
|
</div>
|
|
454
229
|
`;
|