Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
import TableSimple from "~/components/ui/tables/TableSimple";
|
||||
import { WorkflowsTemplateDto } from "../../dtos/WorkflowsTemplateDto";
|
||||
import { t as i18nT } from "i18next";
|
||||
import { getTemplateBlockDescription, getTemplateWorkflowName } from "../../utils/workflowTemplateI18n";
|
||||
|
||||
export default function PreviewWorkflowsTemplate({ template }: { template: WorkflowsTemplateDto }) {
|
||||
return (
|
||||
<div>
|
||||
{template.workflows.map((workflow) => {
|
||||
return (
|
||||
<div key={workflow.name} className="space-y-2">
|
||||
<h3 className="font-medium">{getTemplateWorkflowName(template, workflow, i18nT)}</h3>
|
||||
<TableSimple
|
||||
items={workflow.blocks}
|
||||
headers={[
|
||||
{
|
||||
name: "block",
|
||||
title: i18nT("workflows.templates.blockType"),
|
||||
value: (i) => (
|
||||
<div className="flex-col">
|
||||
<div>{i.type}</div>
|
||||
<div className="text-muted-foreground text-xs">
|
||||
{getTemplateBlockDescription(template, workflow, i, i18nT) || i18nT("workflows.blocks.node.noDescription")}
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "input",
|
||||
title: i18nT("workflows.run.input"),
|
||||
value: (i) =>
|
||||
JSON.stringify({
|
||||
input: i.input,
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user