Put headings in new task form pages (#895)

This commit is contained in:
Kerem Yilmaz
2024-10-02 08:27:33 -07:00
committed by GitHub
parent 054de55b11
commit c5399e73a1
2 changed files with 63 additions and 48 deletions

View File

@@ -15,31 +15,36 @@ function RetryTask() {
}
return (
<CreateNewTaskForm
initialValues={{
url: task.request.url,
navigationGoal: task.request.navigation_goal,
navigationPayload:
typeof task.request.navigation_payload === "string"
? task.request.navigation_payload
: JSON.stringify(task.request.navigation_payload, null, 2),
dataExtractionGoal: task.request.data_extraction_goal,
extractedInformationSchema:
typeof task.request.extracted_information_schema === "string"
? task.request.extracted_information_schema
: JSON.stringify(
task.request.extracted_information_schema,
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 className="space-y-4">
<header>
<h1 className="text-3xl">Rerun Task</h1>
</header>
<CreateNewTaskForm
initialValues={{
url: task.request.url,
navigationGoal: task.request.navigation_goal,
navigationPayload:
typeof task.request.navigation_payload === "string"
? task.request.navigation_payload
: JSON.stringify(task.request.navigation_payload, null, 2),
dataExtractionGoal: task.request.data_extraction_goal,
extractedInformationSchema:
typeof task.request.extracted_information_schema === "string"
? task.request.extracted_information_schema
: JSON.stringify(
task.request.extracted_information_schema,
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>
);
}