Skip to content

Commit

Permalink
Merge pull request #108 from boomerang-io/fix-243-parametersDescripti…
Browse files Browse the repository at this point in the history
…onColumn

fix: add description column to output params table
  • Loading branch information
marcusdroy authored Nov 17, 2021
2 parents c83a955 + ba70233 commit cf952a4
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
12 changes: 11 additions & 1 deletion src/ApiServer/fixtures/workflowExecution.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,19 @@ const workflowExecution = {
},
{
name: "test",
description: "Test description",
description: null,
value: "Testing value",
},
{
name: "test again",
description: "Test description",
value: null,
},
{
name: "test one more result",
description: null,
value: null,
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ exports[`CreateWorkflow --- Snapshot Test Capturing Snapshot of CreateWorkflow 1
class="bx--bmrg-modal-portal"
>
<div
class="bx--bmrg-modal-overlay --is-open"
class="bx--bmrg-modal-overlay"
>
<div
class="bx--bmrg-modal-container bx--bmrg-modal-composed-container bx--modal-container modal-container-fix-width modalContainer --is-open"
aria-modal="true"
class="bx--bmrg-modal-container bx--bmrg-modal-composed-container bx--modal-container modal-container-fix-width modalContainer"
role="dialog"
tabindex="-1"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ exports[`PreviewConfig --- Snapshot Capturing Snapshot of Task Templates 1`] = `
class="bx--bmrg-modal-portal"
>
<div
class="bx--bmrg-modal-overlay --is-open"
class="bx--bmrg-modal-overlay"
>
<div
class="bx--bmrg-modal-container bx--bmrg-modal-composed-container bx--modal-container modal-container-fix-width --is-open"
aria-modal="true"
class="bx--bmrg-modal-container bx--bmrg-modal-composed-container bx--modal-container modal-container-fix-width"
role="dialog"
tabindex="-1"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ exports[`ImportWorkflow --- Snapshot Test Capturing Snapshot of ImportWorkflow 1
class="bx--bmrg-modal-portal"
>
<div
class="bx--bmrg-modal-overlay --is-open"
class="bx--bmrg-modal-overlay"
>
<div
class="bx--bmrg-modal-container bx--bmrg-modal-flow-container bx--modal-container modal-container-fix-width container --is-open"
aria-modal="true"
class="bx--bmrg-modal-container bx--bmrg-modal-flow-container bx--modal-container modal-container-fix-width container"
role="dialog"
tabindex="-1"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ type Props = {
};

function OutputPropertiesLog({ flowTaskName, flowTaskOutputs, isOutput }: Props) {
let arrayProps: { id: string; key: string; value: string }[] = [];
let arrayProps: { id: string; key: string; value: string; description?: string }[] = [];
if (Array.isArray(flowTaskOutputs)) {
flowTaskOutputs.forEach(
(val: { name: string; description: string; value: string }, index: number) =>
(arrayProps = arrayProps.concat({
id: `${val.name}-${index}`,
key: val.name,
value: `${val.description}${val.value ? " - " + val.value : ""}`,
description: val.description ? val.description : "---",
value: val.value ? val.value : "---",
}))
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ function PropertiesTable({ data: properties, hasJsonValues = false }: Props) {
<StructuredListHead>
<StructuredListRow head>
<StructuredListCell head>Parameter</StructuredListCell>
{!hasJsonValues && <StructuredListCell head>Description</StructuredListCell>}
<StructuredListCell head>Value</StructuredListCell>
</StructuredListRow>
</StructuredListHead>
<StructuredListBody>
{Array.isArray(properties) && properties.map((property: {key: string; value: string;}, i: number) => (
{Array.isArray(properties) && properties.map((property: {key: string; value: string; description?: string;}, i: number) => (
<StructuredListRow key={`row-${i}`}>
<StructuredListCell>{property.key}</StructuredListCell>
{!hasJsonValues && <StructuredListCell>{property?.description ?? "---"}</StructuredListCell>}
<StructuredListCell>
{<code className={styles.code}>{formatPropertyValue(property.value)}</code>}
</StructuredListCell>
Expand Down

0 comments on commit cf952a4

Please sign in to comment.