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

View File

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

View File

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

View File

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

View File

@@ -37,7 +37,7 @@ const workflowParameterTypeOptions = [
function header(type: "workflow" | "credential" | "context") {
if (type === "workflow") {
return "Edit Workflow Parameter";
return "Edit Input Parameter";
}
if (type === "credential") {
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="space-y-4">
<header>
<h1 className="text-lg">Workflow Parameters</h1>
<h1 className="text-lg">Parameters</h1>
<span className="text-sm text-slate-400">
Create placeholder values that you can link in nodes. You will be
prompted to fill them in before running your workflow.
@@ -79,7 +79,7 @@ function WorkflowParametersPanel() {
});
}}
>
Workflow Parameter
Input Parameter
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => {