foreman_acd 0.7.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -3
  3. data/app/controllers/foreman_acd/ansible_playbooks_controller.rb +17 -2
  4. data/app/controllers/foreman_acd/app_definitions_controller.rb +104 -7
  5. data/app/controllers/foreman_acd/app_instances_controller.rb +15 -30
  6. data/app/controllers/foreman_acd/concerns/app_instance_mixins.rb +36 -0
  7. data/app/controllers/ui_acd_controller.rb +38 -1
  8. data/app/lib/actions/foreman_acd/run_configurator.rb +1 -0
  9. data/app/models/concerns/foreman_acd/host_managed_extensions.rb +15 -27
  10. data/app/models/foreman_acd/app_instance.rb +47 -2
  11. data/app/models/foreman_acd/foreman_host.rb +8 -0
  12. data/app/services/foreman_acd/app_deployer.rb +19 -2
  13. data/app/services/foreman_acd/inventory_creator.rb +11 -1
  14. data/app/views/foreman_acd/app_definitions/import.html.erb +20 -1
  15. data/app/views/foreman_acd/app_definitions/index.html.erb +3 -6
  16. data/app/views/foreman_acd/app_instances/index.html.erb +15 -11
  17. data/app/views/foreman_acd/app_instances/report.html.erb +7 -2
  18. data/app/views/ui_acd/host_report.json.rabl +4 -0
  19. data/app/views/ui_acd/report_data.json.rabl +10 -0
  20. data/app/views/ui_acd/validate_hostname.json.rabl +6 -0
  21. data/config/routes.rb +3 -0
  22. data/db/migrate/20210818125913_add_is_existing_host_to_foreman_host.rb +8 -0
  23. data/db/migrate/20210902110645_add_initial_configure_task.rb +8 -0
  24. data/lib/foreman_acd/plugin.rb +6 -6
  25. data/lib/foreman_acd/version.rb +1 -1
  26. data/lib/foreman_acd.rb +27 -9
  27. data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +2 -0
  28. data/webpack/components/ApplicationDefinition/ApplicationDefinition.js +28 -9
  29. data/webpack/components/ApplicationDefinition/ApplicationDefinitionActions.js +6 -0
  30. data/webpack/components/ApplicationDefinition/ApplicationDefinitionConstants.js +1 -0
  31. data/webpack/components/ApplicationDefinition/ApplicationDefinitionReducer.js +30 -9
  32. data/webpack/components/ApplicationDefinition/ApplicationDefinitionSelectors.js +3 -0
  33. data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinition.test.js +1 -0
  34. data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinition.test.js.snap +30 -5
  35. data/webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js +1 -1
  36. data/webpack/components/ApplicationDefinition/components/__tests__/__snapshots__/AnsiblePlaybookSelector.test.js.snap +3 -3
  37. data/webpack/components/ApplicationDefinition/index.js +6 -0
  38. data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImport.js +214 -0
  39. data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImport.scss +1 -0
  40. data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportActions.js +161 -0
  41. data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportConstants.js +6 -0
  42. data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportReducer.js +79 -0
  43. data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportSelectors.js +8 -0
  44. data/webpack/components/ApplicationDefinitionImport/__fixtures__/applicationDefinitionImportConfData_1.fixtures.js +129 -0
  45. data/webpack/components/ApplicationDefinitionImport/__fixtures__/applicationDefinitionImportReducer.fixtures.js +29 -0
  46. data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImport.test.js +20 -0
  47. data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportReducer.test.js +43 -0
  48. data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportSelectors.test.js +29 -0
  49. data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImport.test.js.snap +62 -0
  50. data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImportReducer.test.js.snap +362 -0
  51. data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImportSelectors.test.js.snap +130 -0
  52. data/webpack/components/ApplicationDefinitionImport/index.js +32 -0
  53. data/webpack/components/ApplicationInstance/ApplicationInstance.js +96 -25
  54. data/webpack/components/ApplicationInstance/ApplicationInstanceActions.js +112 -6
  55. data/webpack/components/ApplicationInstance/ApplicationInstanceConstants.js +4 -0
  56. data/webpack/components/ApplicationInstance/ApplicationInstanceHelper.js +15 -0
  57. data/webpack/components/ApplicationInstance/ApplicationInstanceReducer.js +71 -30
  58. data/webpack/components/ApplicationInstance/ApplicationInstanceSelectors.js +3 -0
  59. data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceReducer.fixtures.js +2 -0
  60. data/webpack/components/ApplicationInstance/__tests__/ApplicationInstance.test.js +1 -0
  61. data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceReducer.test.js +12 -0
  62. data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstance.test.js.snap +97 -7
  63. data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceReducer.test.js.snap +271 -0
  64. data/webpack/components/ApplicationInstance/components/AppDefinitionSelector.js +1 -0
  65. data/webpack/components/ApplicationInstance/components/ServiceCounter.js +1 -1
  66. data/webpack/components/ApplicationInstance/helper.js +0 -0
  67. data/webpack/components/ApplicationInstance/index.js +6 -0
  68. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.js +81 -6
  69. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportActions.js +35 -1
  70. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportConstants.js +3 -0
  71. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportReducer.js +19 -0
  72. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportSelectors.js +4 -0
  73. data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReport.test.js.snap +1 -124
  74. data/webpack/components/ApplicationInstanceReport/index.js +8 -1
  75. data/webpack/components/ExistingHostSelection/ExistingHostSelection.js +104 -0
  76. data/webpack/components/ExistingHostSelection/ExistingHostSelection.scss +15 -0
  77. data/webpack/components/ExistingHostSelection/ExistingHostSelectionActions.js +71 -0
  78. data/webpack/components/ExistingHostSelection/ExistingHostSelectionConstants.js +4 -0
  79. data/webpack/components/ExistingHostSelection/ExistingHostSelectionHelper.js +0 -0
  80. data/webpack/components/ExistingHostSelection/ExistingHostSelectionReducer.js +90 -0
  81. data/webpack/components/ExistingHostSelection/ExistingHostSelectionSelectors.js +8 -0
  82. data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionConfData_1.fixtures.js +191 -0
  83. data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionReducer.fixtures.js +203 -0
  84. data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelection.test.js +19 -0
  85. data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionReducer.test.js +59 -0
  86. data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionSelectors.test.js +36 -0
  87. data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelection.test.js.snap +35 -0
  88. data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelectionReducer.test.js.snap +614 -0
  89. data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelectionSelectors.test.js.snap +27 -0
  90. data/webpack/components/ExistingHostSelection/components/ServiceSelector.js +48 -0
  91. data/webpack/components/ExistingHostSelection/components/__tests__/ServiceSelector.test.js +35 -0
  92. data/webpack/components/ExistingHostSelection/components/__tests__/__snapshots__/ServiceSelector.test.js.snap +77 -0
  93. data/webpack/components/ExistingHostSelection/index.js +26 -0
  94. data/webpack/components/ParameterSelection/ParameterSelection.js +98 -1
  95. data/webpack/components/ParameterSelection/ParameterSelection.scss +7 -0
  96. data/webpack/components/ParameterSelection/ParameterSelectionActions.js +36 -2
  97. data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +2 -0
  98. data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +49 -8
  99. data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +1 -0
  100. data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +2 -0
  101. data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +96 -0
  102. data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +5 -0
  103. data/webpack/components/ParameterSelection/index.js +2 -1
  104. data/webpack/components/SyncGitRepo/SyncGitRepo.js +2 -10
  105. data/webpack/components/SyncGitRepo/SyncGitRepoActions.js +1 -2
  106. data/webpack/components/SyncGitRepo/SyncGitRepoConstants.js +0 -1
  107. data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepo.test.js.snap +1 -0
  108. data/webpack/components/SyncGitRepo/components/FormTextInput.js +1 -1
  109. data/webpack/components/SyncGitRepo/components/ScmTypeSelector.js +3 -2
  110. data/webpack/components/common/DeleteTableEntry.js +16 -2
  111. data/webpack/components/common/__tests__/__snapshots__/DeleteTableEntry.test.js.snap +38 -0
  112. data/webpack/helper.js +5 -0
  113. data/webpack/index.js +5 -0
  114. data/webpack/js-yaml.js +3874 -0
  115. data/webpack/reducer.js +13 -2
  116. metadata +46 -2
@@ -5,6 +5,7 @@ import {
5
5
  successState,
6
6
  editState,
7
7
  initApplicationInstancePayload,
8
+ closeAlertModalPayload,
8
9
  addHostPayload,
9
10
  deleteHostPayload,
10
11
  activateEditHostPayload,
@@ -18,6 +19,7 @@ import {
18
19
 
19
20
  import {
20
21
  APPLICATION_INSTANCE_INIT,
22
+ APPLICATION_INSTANCE_CLOSE_ALERT_MODAL,
21
23
  APPLICATION_INSTANCE_LOAD_APPLICATION_DEFINITION_REQUEST,
22
24
  APPLICATION_INSTANCE_LOAD_APPLICATION_DEFINITION_SUCCESS,
23
25
  APPLICATION_INSTANCE_LOAD_APPLICATION_DEFINITION_FAILURE,
@@ -27,10 +29,13 @@ import {
27
29
  APPLICATION_INSTANCE_HOST_EDIT_CONFIRM,
28
30
  APPLICATION_INSTANCE_HOST_EDIT_CHANGE,
29
31
  APPLICATION_INSTANCE_HOST_EDIT_CANCEL,
32
+ APPLICATION_INSTANCE_HOST_EDIT_ERROR,
30
33
  APPLICATION_INSTANCE_FOREMAN_PARAMETER_SELECTION_MODAL_OPEN,
31
34
  APPLICATION_INSTANCE_FOREMAN_PARAMETER_SELECTION_MODAL_CLOSE,
32
35
  APPLICATION_INSTANCE_ANSIBLE_PARAMETER_SELECTION_MODAL_OPEN,
33
36
  APPLICATION_INSTANCE_ANSIBLE_PARAMETER_SELECTION_MODAL_CLOSE,
37
+ APPLICATION_INSTANCE_ADD_EXISTING_HOSTS_MODAL_OPEN,
38
+ APPLICATION_INSTANCE_ADD_EXISTING_HOSTS_MODAL_CLOSE,
34
39
  APPLICATION_INSTANCE_CHANGE_PARAMETER_SELECTION_MODE,
35
40
  } from '../ApplicationInstanceConstants';
36
41
 
@@ -50,6 +55,13 @@ const fixtures = {
50
55
  payload: initApplicationInstancePayload,
51
56
  },
52
57
  },
58
+ 'should close alert modal': {
59
+ state: successState,
60
+ action: {
61
+ type: APPLICATION_INSTANCE_CLOSE_ALERT_MODAL,
62
+ payload: closeAlertModalPayload,
63
+ },
64
+ },
53
65
  'should add a host': {
54
66
  state: successState,
55
67
  action: {
@@ -2,8 +2,32 @@
2
2
 
3
3
  exports[`ApplicationInstance should render application instance 1`] = `
4
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
+ />
5
29
  <div
6
- class="service-counter"
30
+ className="service-counter"
7
31
  >
8
32
  <ServiceCounter
9
33
  hostList={Array []}
@@ -19,12 +43,13 @@ exports[`ApplicationInstance should render application instance 1`] = `
19
43
  }
20
44
  }
21
45
  editable={false}
46
+ hidden={false}
22
47
  label="Application Definition"
23
48
  onChange={[Function]}
24
49
  selectValue=""
25
50
  viewText=""
26
51
  />
27
- <p
52
+ <div
28
53
  style={
29
54
  Object {
30
55
  "paddingTop": 25,
@@ -34,7 +59,7 @@ exports[`ApplicationInstance should render application instance 1`] = `
34
59
  <pre>
35
60
  App Definition can't be blank
36
61
  </pre>
37
- </p>
62
+ </div>
38
63
  </div>
39
64
  <div
40
65
  className="form-group"
@@ -75,6 +100,28 @@ exports[`ApplicationInstance should render application instance 1`] = `
75
100
  hidden={false}
76
101
  onAddTableEntry={[Function]}
77
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>
78
125
  <span
79
126
  style={
80
127
  Object {
@@ -88,7 +135,7 @@ exports[`ApplicationInstance should render application instance 1`] = `
88
135
  block={false}
89
136
  bsClass="btn"
90
137
  bsStyle="default"
91
- disabled={false}
138
+ disabled={true}
92
139
  onClick={[Function]}
93
140
  style={
94
141
  Object {
@@ -97,7 +144,7 @@ exports[`ApplicationInstance should render application instance 1`] = `
97
144
  }
98
145
  >
99
146
  <span
100
- title="change ansible variables for 'all'"
147
+ title="Change ansible variables for 'all'"
101
148
  >
102
149
  A
103
150
  </span>
@@ -192,15 +239,58 @@ exports[`ApplicationInstance should render application instance 1`] = `
192
239
  </Footer>
193
240
  </ForemanModal>
194
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>
195
285
  <div />
196
286
  <RailsData
197
- key="applications_instance"
287
+ key="application_instance_hosts_data"
198
288
  parameter="hosts"
199
289
  value="[]"
200
290
  view="app_instance"
201
291
  />
202
292
  <RailsData
203
- key="applications_instance"
293
+ key="application_instance_ansible_data"
204
294
  parameter="ansible_vars_all"
205
295
  value="[]"
206
296
  view="app_instance"
@@ -469,6 +469,7 @@ Object {
469
469
  "foremanParameters": Array [],
470
470
  "hostname": "",
471
471
  "id": 5,
472
+ "isExistingHost": false,
472
473
  "newEntry": true,
473
474
  "service": "",
474
475
  },
@@ -476,6 +477,7 @@ Object {
476
477
  "foremanParameters": Array [],
477
478
  "hostname": "",
478
479
  "id": 5,
480
+ "isExistingHost": false,
479
481
  "newEntry": true,
480
482
  "service": "",
481
483
  },
@@ -1114,6 +1116,275 @@ Object {
1114
1116
  }
1115
1117
  `;
1116
1118
 
1119
+ exports[`ApplicationInstanceReducer should close alert modal 1`] = `
1120
+ Object {
1121
+ "alertModalText": "",
1122
+ "alertModalTitle": "",
1123
+ "ansibleVarsAll": Array [
1124
+ Object {
1125
+ "id": 0,
1126
+ "name": "repository",
1127
+ "value": "https://github.com/bennojoy/mywebapp.git",
1128
+ },
1129
+ ],
1130
+ "appDefinition": Object {
1131
+ "ansible_vars_all": "[{\\"id\\":0,\\"name\\":\\"repository\\",\\"value\\":\\"https://github.com/bennojoy/mywebapp.git\\"}]",
1132
+ "created_at": "2021-03-11 12:51:34 +0100",
1133
+ "description": "",
1134
+ "id": 1,
1135
+ "location_ids": Array [
1136
+ 2,
1137
+ ],
1138
+ "name": "LAMP",
1139
+ "organization_ids": Array [
1140
+ 1,
1141
+ ],
1142
+ "services": "[{\\"id\\":1,\\"name\\":\\"web\\",\\"description\\":\\"\\",\\"hostgroup\\":\\"1\\",\\"ansibleGroup\\":\\"webservers\\",\\"minCount\\":\\"2\\",\\"maxCount\\":\\"\\",\\"foremanParameters\\":[{\\"id\\":1,\\"locked\\":false,\\"name\\":\\"CP\\",\\"description\\":\\"\\",\\"type\\":\\"computeprofile\\",\\"value\\":\\"1\\"},{\\"id\\":2,\\"locked\\":true,\\"name\\":\\"LE\\",\\"description\\":\\"\\",\\"type\\":\\"lifecycleenv\\",\\"value\\":\\"1\\"}],\\"ansibleParameters\\":[{\\"id\\":0,\\"name\\":\\"dummy_var\\",\\"value\\":\\"0\\"}]},{\\"id\\":2,\\"name\\":\\"db\\",\\"description\\":\\"\\",\\"hostgroup\\":\\"1\\",\\"ansibleGroup\\":\\"dbservers\\",\\"minCount\\":\\"1\\",\\"maxCount\\":\\"\\",\\"foremanParameters\\":[],\\"ansibleParameters\\":[{\\"id\\":0,\\"name\\":\\"mysqlservice\\",\\"value\\":\\"mysqld\\"},{\\"id\\":1,\\"name\\":\\"mysql_port\\",\\"value\\":\\"3306\\",\\"locked\\":true},{\\"id\\":2,\\"name\\":\\"dbuser\\",\\"value\\":\\"webapp\\"},{\\"id\\":3,\\"name\\":\\"dbname\\",\\"value\\":\\"ANSAP01\\"},{\\"id\\":4,\\"name\\":\\"upassword\\",\\"value\\":\\"Bond@007\\"},{\\"id\\":5,\\"name\\":\\"masterpassword\\",\\"value\\":\\"MySQL@007\\"}]}]",
1143
+ "updated_at": "2021-03-13 00:06:12 +0100",
1144
+ },
1145
+ "columns": Array [
1146
+ Object {
1147
+ "cell": Object {
1148
+ "formatters": Array [
1149
+ null,
1150
+ ],
1151
+ },
1152
+ "header": Object {
1153
+ "formatters": Array [
1154
+ null,
1155
+ ],
1156
+ "label": "Hostname",
1157
+ "props": Object {
1158
+ "index": 0,
1159
+ "style": Object {
1160
+ "width": "30%",
1161
+ },
1162
+ },
1163
+ },
1164
+ "property": "hostname",
1165
+ },
1166
+ Object {
1167
+ "cell": Object {
1168
+ "formatters": Array [
1169
+ null,
1170
+ ],
1171
+ },
1172
+ "header": Object {
1173
+ "formatters": Array [
1174
+ null,
1175
+ ],
1176
+ "label": "Description",
1177
+ "props": Object {
1178
+ "index": 1,
1179
+ "style": Object {
1180
+ "width": "30%",
1181
+ },
1182
+ },
1183
+ },
1184
+ "property": "description",
1185
+ },
1186
+ Object {
1187
+ "cell": Object {
1188
+ "formatters": Array [
1189
+ null,
1190
+ ],
1191
+ },
1192
+ "header": Object {
1193
+ "formatters": Array [
1194
+ null,
1195
+ ],
1196
+ "label": "Service",
1197
+ "props": Object {
1198
+ "index": 2,
1199
+ "style": Object {
1200
+ "width": "20%",
1201
+ },
1202
+ },
1203
+ },
1204
+ "property": "service",
1205
+ },
1206
+ Object {
1207
+ "cell": Object {
1208
+ "formatters": Array [
1209
+ null,
1210
+ ],
1211
+ },
1212
+ "header": Object {
1213
+ "formatters": Array [
1214
+ null,
1215
+ ],
1216
+ "label": "Actions",
1217
+ "props": Object {
1218
+ "index": 4,
1219
+ "style": Object {
1220
+ "width": "20%",
1221
+ },
1222
+ },
1223
+ },
1224
+ "property": "actions",
1225
+ },
1226
+ ],
1227
+ "error": Object {
1228
+ "errorMsg": "",
1229
+ "status": "",
1230
+ "statusText": "",
1231
+ },
1232
+ "hosts": Array [
1233
+ Object {
1234
+ "ansibleParameters": Array [
1235
+ Object {
1236
+ "id": 0,
1237
+ "name": "mysqlservice",
1238
+ "value": "mysqld",
1239
+ },
1240
+ Object {
1241
+ "id": 1,
1242
+ "name": "mysql_port",
1243
+ "value": "3306",
1244
+ },
1245
+ Object {
1246
+ "id": 2,
1247
+ "name": "dbuser",
1248
+ "value": "webapp",
1249
+ },
1250
+ Object {
1251
+ "id": 3,
1252
+ "name": "dbname",
1253
+ "value": "ANSAP01",
1254
+ },
1255
+ Object {
1256
+ "id": 4,
1257
+ "name": "upassword",
1258
+ "value": "Bond@007",
1259
+ },
1260
+ Object {
1261
+ "id": 5,
1262
+ "name": "masterpassword",
1263
+ "value": "MySQL@007",
1264
+ },
1265
+ ],
1266
+ "description": "",
1267
+ "foremanParameters": Array [],
1268
+ "hostname": "great-web-app-db-1",
1269
+ "id": 4,
1270
+ "service": "2",
1271
+ },
1272
+ Object {
1273
+ "ansibleParameters": Array [
1274
+ Object {
1275
+ "id": 0,
1276
+ "name": "dummy_var",
1277
+ "value": "0",
1278
+ },
1279
+ ],
1280
+ "description": "",
1281
+ "foremanParameters": Array [],
1282
+ "hostname": "great-web-app-web-1",
1283
+ "id": 1,
1284
+ "service": "1",
1285
+ },
1286
+ Object {
1287
+ "ansibleParameters": Array [
1288
+ Object {
1289
+ "id": 0,
1290
+ "name": "dummy_var",
1291
+ "value": "0",
1292
+ },
1293
+ ],
1294
+ "description": "",
1295
+ "foremanParameters": Array [],
1296
+ "hostname": "great-web-app-web-2",
1297
+ "id": 2,
1298
+ "service": "1",
1299
+ },
1300
+ ],
1301
+ "loading": false,
1302
+ "name": false,
1303
+ "services": Array [
1304
+ Object {
1305
+ "ansibleGroup": "webservers",
1306
+ "ansibleParameters": Array [
1307
+ Object {
1308
+ "id": 0,
1309
+ "name": "dummy_var",
1310
+ "value": "0",
1311
+ },
1312
+ ],
1313
+ "currentCount": 2,
1314
+ "description": "",
1315
+ "foremanParameters": Array [
1316
+ Object {
1317
+ "description": "",
1318
+ "id": 1,
1319
+ "locked": false,
1320
+ "name": "CP",
1321
+ "type": "computeprofile",
1322
+ "value": "1",
1323
+ },
1324
+ Object {
1325
+ "description": "",
1326
+ "id": 2,
1327
+ "locked": true,
1328
+ "name": "LE",
1329
+ "type": "lifecycleenv",
1330
+ "value": "1",
1331
+ },
1332
+ ],
1333
+ "hostgroup": "1",
1334
+ "id": 1,
1335
+ "maxCount": "",
1336
+ "minCount": "2",
1337
+ "name": "web",
1338
+ },
1339
+ Object {
1340
+ "ansibleGroup": "dbservers",
1341
+ "ansibleParameters": Array [
1342
+ Object {
1343
+ "id": 0,
1344
+ "name": "mysqlservice",
1345
+ "value": "mysqld",
1346
+ },
1347
+ Object {
1348
+ "id": 1,
1349
+ "locked": true,
1350
+ "name": "mysql_port",
1351
+ "value": "3306",
1352
+ },
1353
+ Object {
1354
+ "id": 2,
1355
+ "name": "dbuser",
1356
+ "value": "webapp",
1357
+ },
1358
+ Object {
1359
+ "id": 3,
1360
+ "name": "dbname",
1361
+ "value": "ANSAP01",
1362
+ },
1363
+ Object {
1364
+ "id": 4,
1365
+ "name": "upassword",
1366
+ "value": "Bond@007",
1367
+ },
1368
+ Object {
1369
+ "id": 5,
1370
+ "name": "masterpassword",
1371
+ "value": "MySQL@007",
1372
+ },
1373
+ ],
1374
+ "currentCount": 1,
1375
+ "description": "",
1376
+ "foremanParameters": Array [],
1377
+ "hostgroup": "1",
1378
+ "id": 2,
1379
+ "maxCount": "",
1380
+ "minCount": "1",
1381
+ "name": "db",
1382
+ },
1383
+ ],
1384
+ "showAlertModal": false,
1385
+ }
1386
+ `;
1387
+
1117
1388
  exports[`ApplicationInstanceReducer should confirm edit host 1`] = `
1118
1389
  Object {
1119
1390
  "ansibleVarsAll": Array [
@@ -18,6 +18,7 @@ const AppDefinitionSelector= ({
18
18
  <label className="col-md-2 control-label">{label}</label>
19
19
  <div className="col-md-4">
20
20
  <ExtSelect
21
+ hidden={hidden}
21
22
  editable={editable}
22
23
  viewText={viewText}
23
24
  selectValue={selectValue}
@@ -15,7 +15,7 @@ const ServiceCounter= ({
15
15
 
16
16
  return (
17
17
  <div>
18
- <label class="service-counter-title">{title}</label>
18
+ <label className="service-counter-title">{title}</label>
19
19
  {Object.keys(services).map(key => (
20
20
  <Service
21
21
  key={services[key].id}
File without changes
@@ -6,6 +6,9 @@ import ApplicationInstance from './ApplicationInstance';
6
6
  import * as ApplicationInstanceActions from './ApplicationInstanceActions';
7
7
 
8
8
  import {
9
+ selectShowAlertModal,
10
+ selectAlertModalText,
11
+ selectAlertModalTitle,
9
12
  selectEditMode,
10
13
  selectAppDefinition,
11
14
  selectHosts,
@@ -17,6 +20,9 @@ import {
17
20
  } from './ApplicationInstanceSelectors';
18
21
 
19
22
  const mapStateToProps = state => ({
23
+ showAlertModal: selectShowAlertModal(state),
24
+ alertModalText: selectAlertModalText(state),
25
+ alertModalTitle: selectAlertModalTitle(state),
20
26
  editMode: selectEditMode(state),
21
27
  appDefinition: selectAppDefinition(state),
22
28
  hosts: selectHosts(state),