From bf9f9360a4a8ca76b5662f409c7782a0fa9fda6a Mon Sep 17 00:00:00 2001 From: MVarshini Date: Wed, 6 Sep 2023 21:13:43 +0530 Subject: [PATCH] New and Unmanaged runs header (#3548) PBENCH-1265 --- .../OverviewComponent/NewRunsComponent.jsx | 18 ++++-------------- .../components/OverviewComponent/index.jsx | 4 +++- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/dashboard/src/modules/components/OverviewComponent/NewRunsComponent.jsx b/dashboard/src/modules/components/OverviewComponent/NewRunsComponent.jsx index 249d724279..74364b7cd8 100644 --- a/dashboard/src/modules/components/OverviewComponent/NewRunsComponent.jsx +++ b/dashboard/src/modules/components/OverviewComponent/NewRunsComponent.jsx @@ -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, @@ -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); @@ -245,7 +236,6 @@ const NewRunsComponent = () => { /> - {isMetadataModalOpen && } ); }; diff --git a/dashboard/src/modules/components/OverviewComponent/index.jsx b/dashboard/src/modules/components/OverviewComponent/index.jsx index b18468676c..d9d8d7dc72 100644 --- a/dashboard/src/modules/components/OverviewComponent/index.jsx +++ b/dashboard/src/modules/components/OverviewComponent/index.jsx @@ -12,6 +12,7 @@ import { } from "@patternfly/react-core"; import { Heading, + MetaDataModal, NewRunsHeading, NoExpiringRuns, Separator, @@ -97,9 +98,9 @@ const OverviewComponent = () => { New and Unmanaged + {newRuns.length > 0 ? ( <> - ) : ( @@ -116,6 +117,7 @@ const OverviewComponent = () => { {savedRuns.length > 0 ? : } + )}