Merge pull request #698 from automatisch/issue-695
feat(web): hide empty error tab in execution step
This commit is contained in:
@@ -51,6 +51,7 @@ export default function ExecutionStep(
|
|||||||
|
|
||||||
const validationStatusIcon =
|
const validationStatusIcon =
|
||||||
executionStep.status === 'success' ? validIcon : errorIcon;
|
executionStep.status === 'success' ? validIcon : errorIcon;
|
||||||
|
const hasError = !!executionStep.errorDetails;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Wrapper elevation={1} data-test="execution-step">
|
<Wrapper elevation={1} data-test="execution-step">
|
||||||
@@ -86,7 +87,7 @@ export default function ExecutionStep(
|
|||||||
>
|
>
|
||||||
<Tab label="Data in" data-test="data-in-tab" />
|
<Tab label="Data in" data-test="data-in-tab" />
|
||||||
<Tab label="Data out" data-test="data-out-tab" />
|
<Tab label="Data out" data-test="data-out-tab" />
|
||||||
<Tab label="Error" data-test="error-tab" />
|
{hasError && <Tab label="Error" data-test="error-tab" />}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@@ -98,9 +99,11 @@ export default function ExecutionStep(
|
|||||||
<JSONViewer data={executionStep.dataOut} />
|
<JSONViewer data={executionStep.dataOut} />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|
||||||
<TabPanel value={activeTabIndex} index={2}>
|
{hasError && (
|
||||||
<JSONViewer data={executionStep.errorDetails} />
|
<TabPanel value={activeTabIndex} index={2}>
|
||||||
</TabPanel>
|
<JSONViewer data={executionStep.errorDetails} />
|
||||||
|
</TabPanel>
|
||||||
|
)}
|
||||||
</Content>
|
</Content>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user