Put headings in new task form pages (#895)
This commit is contained in:
@@ -31,10 +31,15 @@ function CreateNewTaskFormPage() {
|
|||||||
|
|
||||||
if (sampleCases.includes(template as SampleCase)) {
|
if (sampleCases.includes(template as SampleCase)) {
|
||||||
return (
|
return (
|
||||||
<CreateNewTaskForm
|
<div className="space-y-4">
|
||||||
key={template}
|
<header>
|
||||||
initialValues={getSampleForInitialFormValues(template as SampleCase)}
|
<h1 className="text-3xl">Create New Task</h1>
|
||||||
/>
|
</header>
|
||||||
|
<CreateNewTaskForm
|
||||||
|
key={template}
|
||||||
|
initialValues={getSampleForInitialFormValues(template as SampleCase)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,25 +58,30 @@ function CreateNewTaskFormPage() {
|
|||||||
const maxStepsOverride = data.workflow_definition.blocks[0].max_steps_per_run;
|
const maxStepsOverride = data.workflow_definition.blocks[0].max_steps_per_run;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SavedTaskForm
|
<div className="space-y-4">
|
||||||
initialValues={{
|
<header>
|
||||||
title: data.title,
|
<h1 className="text-3xl">Edit Task Template</h1>
|
||||||
description: data.description,
|
</header>
|
||||||
webhookCallbackUrl: data.webhook_callback_url,
|
<SavedTaskForm
|
||||||
proxyLocation: data.proxy_location,
|
initialValues={{
|
||||||
url: data.workflow_definition.blocks[0].url,
|
title: data.title,
|
||||||
navigationGoal: data.workflow_definition.blocks[0].navigation_goal,
|
description: data.description,
|
||||||
dataExtractionGoal:
|
webhookCallbackUrl: data.webhook_callback_url,
|
||||||
data.workflow_definition.blocks[0].data_extraction_goal,
|
proxyLocation: data.proxy_location,
|
||||||
extractedInformationSchema: JSON.stringify(dataSchema, null, 2),
|
url: data.workflow_definition.blocks[0].url,
|
||||||
navigationPayload,
|
navigationGoal: data.workflow_definition.blocks[0].navigation_goal,
|
||||||
maxStepsOverride,
|
dataExtractionGoal:
|
||||||
totpIdentifier: data.workflow_definition.blocks[0].totp_identifier,
|
data.workflow_definition.blocks[0].data_extraction_goal,
|
||||||
totpVerificationUrl:
|
extractedInformationSchema: JSON.stringify(dataSchema, null, 2),
|
||||||
data.workflow_definition.blocks[0].totp_verification_url,
|
navigationPayload,
|
||||||
errorCodeMapping: JSON.stringify(errorCodeMapping, null, 2),
|
maxStepsOverride,
|
||||||
}}
|
totpIdentifier: data.workflow_definition.blocks[0].totp_identifier,
|
||||||
/>
|
totpVerificationUrl:
|
||||||
|
data.workflow_definition.blocks[0].totp_verification_url,
|
||||||
|
errorCodeMapping: JSON.stringify(errorCodeMapping, null, 2),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,31 +15,36 @@ function RetryTask() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CreateNewTaskForm
|
<div className="space-y-4">
|
||||||
initialValues={{
|
<header>
|
||||||
url: task.request.url,
|
<h1 className="text-3xl">Rerun Task</h1>
|
||||||
navigationGoal: task.request.navigation_goal,
|
</header>
|
||||||
navigationPayload:
|
<CreateNewTaskForm
|
||||||
typeof task.request.navigation_payload === "string"
|
initialValues={{
|
||||||
? task.request.navigation_payload
|
url: task.request.url,
|
||||||
: JSON.stringify(task.request.navigation_payload, null, 2),
|
navigationGoal: task.request.navigation_goal,
|
||||||
dataExtractionGoal: task.request.data_extraction_goal,
|
navigationPayload:
|
||||||
extractedInformationSchema:
|
typeof task.request.navigation_payload === "string"
|
||||||
typeof task.request.extracted_information_schema === "string"
|
? task.request.navigation_payload
|
||||||
? task.request.extracted_information_schema
|
: JSON.stringify(task.request.navigation_payload, null, 2),
|
||||||
: JSON.stringify(
|
dataExtractionGoal: task.request.data_extraction_goal,
|
||||||
task.request.extracted_information_schema,
|
extractedInformationSchema:
|
||||||
null,
|
typeof task.request.extracted_information_schema === "string"
|
||||||
2,
|
? task.request.extracted_information_schema
|
||||||
),
|
: JSON.stringify(
|
||||||
webhookCallbackUrl: task.request.webhook_callback_url,
|
task.request.extracted_information_schema,
|
||||||
totpIdentifier: task.request.totp_identifier,
|
null,
|
||||||
totpVerificationUrl: task.request.totp_verification_url,
|
2,
|
||||||
errorCodeMapping: task.request.error_code_mapping
|
),
|
||||||
? JSON.stringify(task.request.error_code_mapping, null, 2)
|
webhookCallbackUrl: task.request.webhook_callback_url,
|
||||||
: "",
|
totpIdentifier: task.request.totp_identifier,
|
||||||
}}
|
totpVerificationUrl: task.request.totp_verification_url,
|
||||||
/>
|
errorCodeMapping: task.request.error_code_mapping
|
||||||
|
? JSON.stringify(task.request.error_code_mapping, null, 2)
|
||||||
|
: "",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user