Skip to content

Commit 6897576

Browse files
Fix submit code and add modal header
1 parent dc307aa commit 6897576

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

app/javascript/components/automate-entry-points/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ const AutomateEntryPoints = ({
177177

178178
return !isLoading && (
179179
<Modal
180+
modalHeading="Select Entry Point Instance"
180181
open={showModal}
181182
primaryButtonText={__('OK')}
182183
secondaryButtonText={__('Cancel')}

app/javascript/components/terraform-template-catalog-form/helper.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,48 @@ export const prepareRequestObject = (values, formId) => {
182182
requestObject.config_info.provision.extra_vars = convertArrayToObject(requestObject.config_info.provision.extra_vars);
183183
}
184184

185+
if (requestObject.provisioning_entry_point_type === 'embedded_automate') {
186+
if (requestObject.provisioning_entry_point_automate && requestObject.provisioning_entry_point_automate.element) {
187+
requestObject.provisioning_entry_point = {
188+
id: requestObject.provisioning_entry_point_automate.element.id,
189+
name: requestObject.provisioning_entry_point_automate.element.name,
190+
};
191+
delete requestObject.provisioning_entry_point_automate;
192+
}
193+
} else if (requestObject.provisioning_entry_point_workflow) {
194+
requestObject.provisioning_entry_point = requestObject.provisioning_entry_point_workflow.id;
195+
delete requestObject.provisioning_entry_point_workflow;
196+
}
197+
delete requestObject.provisioning_entry_point_type;
198+
199+
if (requestObject.reconfigure_entry_point_type === 'embedded_automate') {
200+
if (requestObject.reconfigure_entry_point_automate && requestObject.reconfigure_entry_point_automate.element) {
201+
requestObject.reconfigure_entry_point = {
202+
id: requestObject.reconfigure_entry_point_automate.element.id,
203+
name: requestObject.reconfigure_entry_point_automate.element.name,
204+
};
205+
delete requestObject.reconfigure_entry_point_automate;
206+
}
207+
} else if (requestObject.reconfigure_entry_point_workflow) {
208+
requestObject.reconfigure_entry_point = requestObject.reconfigure_entry_point_workflow.id;
209+
delete requestObject.reconfigure_entry_point_workflow;
210+
}
211+
delete requestObject.reconfigure_entry_point_type;
212+
213+
if (requestObject.retirement_entry_point_type === 'embedded_automate') {
214+
if (requestObject.retirement_entry_point_automate && requestObject.retirement_entry_point_automate.element) {
215+
requestObject.retirement_entry_point = {
216+
id: requestObject.reconfigure_entry_point_automate.element.id,
217+
name: requestObject.retirement_entry_point_automate.element.name,
218+
};
219+
delete requestObject.retirement_entry_point_automate;
220+
}
221+
} else if (requestObject.retirement_entry_point_workflow) {
222+
requestObject.retirement_entry_point = requestObject.retirement_entry_point_workflow.id;
223+
delete requestObject.retirement_entry_point_workflow;
224+
}
225+
delete requestObject.retirement_entry_point_type;
226+
185227
// if (requestObject.config_info.retirement.extra_vars) {
186228
// requestObject.config_info.retirement.extra_vars = convertArrayToObject(requestObject.config_info.retirement.extra_vars);
187229
// }

app/javascript/components/terraform-template-catalog-form/terraform-template-catalog-form.schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const basicInformationTabSchema = (availableCatalogs, tenantTree, roleAllows, zo
7575
{
7676
component: 'embedded-automate-entry-point',
7777
id: 'reconfigure_entry_point_automate',
78-
name: 'recounfigure_entry_point_automate',
78+
name: 'reconfigure_entry_point_automate',
7979
label: 'Reconfigure Entry Point',
8080
field: 'fqname',
8181
selected: '',

0 commit comments

Comments
 (0)