Skip to content

Commit

Permalink
New and Unmanaged runs header (distributed-system-analysis#3548)
Browse files Browse the repository at this point in the history
PBENCH-1265
  • Loading branch information
MVarshini authored Sep 6, 2023
1 parent c02e7de commit bf9f936
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ import {
Thead,
Tr,
} from "@patternfly/react-table";
import {
MetaDataModal,
MetadataRow,
NewRunsRow,
RenderPagination,
} from "./common-component";
import { MetadataRow, NewRunsRow, RenderPagination } from "./common-component";
import React, { useCallback, useState } from "react";
import {
deleteDataset,
Expand All @@ -42,13 +37,9 @@ import { uid } from "utils/helper";

const NewRunsComponent = () => {
const dispatch = useDispatch();
const {
newRuns,
initNewRuns,
selectedRuns,
isMetadataModalOpen,
checkedItems,
} = useSelector((state) => state.overview);
const { newRuns, initNewRuns, selectedRuns, checkedItems } = useSelector(
(state) => state.overview
);

const [perPage, setPerPage] = useState(ROWS_PER_PAGE);
const [page, setPage] = useState(START_PAGE_NUMBER);
Expand Down Expand Up @@ -245,7 +236,6 @@ const NewRunsComponent = () => {
/>
</InnerScrollContainer>
</OuterScrollContainer>
{isMetadataModalOpen && <MetaDataModal />}
</div>
);
};
Expand Down
4 changes: 3 additions & 1 deletion dashboard/src/modules/components/OverviewComponent/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from "@patternfly/react-core";
import {
Heading,
MetaDataModal,
NewRunsHeading,
NoExpiringRuns,
Separator,
Expand Down Expand Up @@ -97,9 +98,9 @@ const OverviewComponent = () => {
New and Unmanaged
</AccordionToggle>
<AccordionContent isHidden={!expanded.has("newRuns")}>
<NewRunsHeading />
{newRuns.length > 0 ? (
<>
<NewRunsHeading />
<NewRunsComponent />
</>
) : (
Expand All @@ -116,6 +117,7 @@ const OverviewComponent = () => {
{savedRuns.length > 0 ? <SavedRunsComponent /> : <EmptyTable />}
</Card>
<RelayComponent />
<MetaDataModal />
</>
)}
</div>
Expand Down

0 comments on commit bf9f936

Please sign in to comment.