Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/bugfix/ZKUI-206-fix-double-workf…
Browse files Browse the repository at this point in the history
…low-table' into w/1.5/bugfix/ZKUI-206-fix-double-workflow-table
  • Loading branch information
JBWatenbergScality committed Jun 29, 2022
2 parents e74e4db + ccc968b commit c9afe8f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 27 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenko-ui",
"version": "1.5.0-preview.4",
"version": "1.5.0-preview.5",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
43 changes: 19 additions & 24 deletions src/react/databrowser/buckets/BucketDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,29 @@ const NotFound = () => (
function BucketDetails({ bucket, ingestionStates }: Props) {
const { pathname } = useLocation();
const query = useQueryParams();
const tabName = query.get('tab');
const queryObject = Object.fromEntries(query.entries());

const details = () => {
if (!bucket) {
return <NotFound />;
}

if (tabName === 'workflow') {
return <Workflow bucketName={bucket.Name}></Workflow>;
} else
return <Overview bucket={bucket} ingestionStates={ingestionStates} />;
};

return (
<ContentSection>
<CustomTabs>
<CustomTabs.Tab label="Overview" path={pathname}>
{details()}
</CustomTabs.Tab>
<CustomTabs.Tab
label="Workflow"
path={pathname}
query={{ ...queryObject, tab: 'workflow' }}
>
{details()}
</CustomTabs.Tab>
</CustomTabs>
{bucket && (
<CustomTabs>
<CustomTabs.Tab
label="Overview"
path={pathname}
query={{ ...queryObject, tab: null }}
>
<Overview bucket={bucket} ingestionStates={ingestionStates} />
</CustomTabs.Tab>
<CustomTabs.Tab
label="Workflow"
path={pathname}
query={{ ...queryObject, tab: 'workflow' }}
>
<Workflow bucketName={bucket.Name}></Workflow>
</CustomTabs.Tab>
</CustomTabs>
)}
{!bucket && <NotFound />}
</ContentSection>
);
}
Expand Down

0 comments on commit c9afe8f

Please sign in to comment.