Reuse proxy location when set (#1394)

This commit is contained in:
Shuchang Zheng
2024-12-16 07:50:13 -08:00
committed by GitHub
parent e2f886d9a3
commit 1b7ff69f85
2 changed files with 12 additions and 1 deletions

View File

@@ -27,6 +27,10 @@ function WorkflowRunParameters() {
(parameter) => parameter.parameter_type === "workflow",
);
const proxyLocation = location.state
? (location.state.proxyLocation as ProxyLocation)
: null;
const initialValues = location.state?.data
? location.state.data
: workflowParameters?.reduce(
@@ -95,7 +99,10 @@ function WorkflowRunParameters() {
initialValues={initialValues}
workflowParameters={workflowParameters}
initialSettings={{
proxyLocation: workflow.proxy_location ?? ProxyLocation.Residential,
proxyLocation:
proxyLocation ??
workflow.proxy_location ??
ProxyLocation.Residential,
webhookCallbackUrl: workflow.webhook_callback_url ?? "",
}}
/>