remove placeholder text for blocks without in the the workflow run ui (#3465)
This commit is contained in:
@@ -91,12 +91,6 @@ export const getOrderedBlockLabels = (workflow?: WorkflowApiResponse) => {
|
|||||||
return blockLabels;
|
return blockLabels;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getCommentForBlockWithoutCode = (blockLabel: string) => {
|
|
||||||
return `
|
|
||||||
# block '${blockLabel}' code goes here
|
|
||||||
`;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getCode = (
|
export const getCode = (
|
||||||
orderedBlockLabels: string[],
|
orderedBlockLabels: string[],
|
||||||
blockScripts?: {
|
blockScripts?: {
|
||||||
@@ -114,7 +108,6 @@ export const getCode = (
|
|||||||
const code = blockScripts?.[blockLabel];
|
const code = blockScripts?.[blockLabel];
|
||||||
|
|
||||||
if (!code) {
|
if (!code) {
|
||||||
blockCode.push(getCommentForBlockWithoutCode(blockLabel));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ function WorkflowRunCode(props?: Props) {
|
|||||||
pollIntervalMs: !isFinalized ? 3000 : undefined,
|
pollIntervalMs: !isFinalized ? 3000 : undefined,
|
||||||
});
|
});
|
||||||
const orderedBlockLabels = getOrderedBlockLabels(workflow);
|
const orderedBlockLabels = getOrderedBlockLabels(workflow);
|
||||||
const code = getCode(orderedBlockLabels, blockScripts).join("");
|
const code = getCode(orderedBlockLabels, blockScripts).join("").trim();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setCacheKeyValue(
|
setCacheKeyValue(
|
||||||
|
|||||||
Reference in New Issue
Block a user