Rename workflow parameter to input parameter (#1071)

This commit is contained in:
Shuchang Zheng
2024-10-28 05:37:37 -07:00
committed by GitHub
parent 3fbd1832ea
commit 4ad6072242
6 changed files with 22 additions and 21 deletions

View File

@@ -133,7 +133,7 @@ function RunWorkflowForm({ workflowParameters, initialValues }: Props) {
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8"> <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
<div className="space-y-8 rounded-lg bg-slate-elevation3 px-6 py-5"> <div className="space-y-8 rounded-lg bg-slate-elevation3 px-6 py-5">
<header> <header>
<h1 className="text-lg">Workflow Parameters</h1> <h1 className="text-lg">Input Parameters</h1>
</header> </header>
{workflowParameters?.map((parameter) => { {workflowParameters?.map((parameter) => {
return ( return (
@@ -198,7 +198,7 @@ function RunWorkflowForm({ workflowParameters, initialValues }: Props) {
); );
})} })}
{workflowParameters.length === 0 && ( {workflowParameters.length === 0 && (
<div>No workflow parameters for this workflow.</div> <div>This workflow doesn't have any input parameters</div>
)} )}
</div> </div>

View File

@@ -493,8 +493,11 @@ function WorkflowRun() {
{Object.entries(parameters).length > 0 && ( {Object.entries(parameters).length > 0 && (
<div className="space-y-4"> <div className="space-y-4">
<header> <header>
<h2 className="text-lg font-semibold">Parameters</h2> <h2 className="text-lg font-semibold">Input Parameter Values</h2>
</header> </header>
{Object.entries(parameters).length === 0 && (
<div>This workflow doesn't have any input parameters.</div>
)}
{Object.entries(parameters).map(([key, value]) => { {Object.entries(parameters).map(([key, value]) => {
return ( return (
<div key={key} className="flex flex-col gap-2"> <div key={key} className="flex flex-col gap-2">

View File

@@ -63,16 +63,20 @@ function WorkflowRunParameters() {
{} as Record<string, unknown>, {} as Record<string, unknown>,
); );
if (isFetching) { const header = (
return (
<div className="space-y-8">
<header className="space-y-5"> <header className="space-y-5">
<h1 className="text-3xl">Run Parameters</h1> <h1 className="text-3xl">Parameters</h1>
<h2 className="text-lg text-slate-400"> <h2 className="text-lg text-slate-400">
Fill the placeholder values that you have linked throughout your Fill the placeholder values that you have linked throughout your
workflow. workflow.
</h2> </h2>
</header> </header>
);
if (isFetching) {
return (
<div className="space-y-8">
{header}
<Skeleton className="h-96 w-full" /> <Skeleton className="h-96 w-full" />
</div> </div>
); );
@@ -84,13 +88,7 @@ function WorkflowRunParameters() {
return ( return (
<div className="space-y-8"> <div className="space-y-8">
<header className="space-y-5"> {header}
<h1 className="text-3xl">Run Parameters</h1>
<h2 className="text-lg text-slate-400">
Fill the placeholder values that you have linked throughout your
workflow.
</h2>
</header>
<RunWorkflowForm <RunWorkflowForm
initialValues={initialValues} initialValues={initialValues}
workflowParameters={workflowParameters} workflowParameters={workflowParameters}

View File

@@ -36,7 +36,7 @@ const workflowParameterTypeOptions = [
function header(type: "workflow" | "credential" | "context") { function header(type: "workflow" | "credential" | "context") {
if (type === "workflow") { if (type === "workflow") {
return "Add Workflow Parameter"; return "Add Input Parameter";
} }
if (type === "credential") { if (type === "credential") {
return "Add Credential Parameter"; return "Add Credential Parameter";

View File

@@ -37,7 +37,7 @@ const workflowParameterTypeOptions = [
function header(type: "workflow" | "credential" | "context") { function header(type: "workflow" | "credential" | "context") {
if (type === "workflow") { if (type === "workflow") {
return "Edit Workflow Parameter"; return "Edit Input Parameter";
} }
if (type === "credential") { if (type === "credential") {
return "Edit Credential Parameter"; return "Edit Credential Parameter";

View File

@@ -54,7 +54,7 @@ function WorkflowParametersPanel() {
<div className="relative w-[25rem] rounded-xl border border-slate-700 bg-slate-950 p-5 shadow-xl"> <div className="relative w-[25rem] rounded-xl border border-slate-700 bg-slate-950 p-5 shadow-xl">
<div className="space-y-4"> <div className="space-y-4">
<header> <header>
<h1 className="text-lg">Workflow Parameters</h1> <h1 className="text-lg">Parameters</h1>
<span className="text-sm text-slate-400"> <span className="text-sm text-slate-400">
Create placeholder values that you can link in nodes. You will be Create placeholder values that you can link in nodes. You will be
prompted to fill them in before running your workflow. prompted to fill them in before running your workflow.
@@ -79,7 +79,7 @@ function WorkflowParametersPanel() {
}); });
}} }}
> >
Workflow Parameter Input Parameter
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
onClick={() => { onClick={() => {