From 60fa0c468958d776c1dc5f39b9e844e29be9ca23 Mon Sep 17 00:00:00 2001 From: Levin Kerschberger Date: Wed, 27 Nov 2024 11:48:18 +0100 Subject: [PATCH] fix: rebasing --- .../features/connections/ConnectionsView.tsx | 12 ++-------- .../table/ConnectionsTableColumns.tsx | 24 +++++++------------ .../connections/ConnectionsView.test.tsx | 3 --- 3 files changed, 11 insertions(+), 28 deletions(-) diff --git a/frontend/src/components/features/connections/ConnectionsView.tsx b/frontend/src/components/features/connections/ConnectionsView.tsx index da8f4466..3a2824db 100644 --- a/frontend/src/components/features/connections/ConnectionsView.tsx +++ b/frontend/src/components/features/connections/ConnectionsView.tsx @@ -1,12 +1,6 @@ import { Connection } from "@/types/Connection"; import ConnectionTable from "./table/ConnectionTable"; -import { - Page, - PageContent, - PageDescription, - PageHeader, - PageTitle, -} from "@/components/ui/page"; +import { Page, PageContent, PageHeader, PageTitle } from "@/components/ui/page"; import useConnectionTable from "@/hooks/features/connections/useConnectionTable"; import ConnectionFilters from "./filter/ConnectionFilters"; import TablePagination from "@/components/ui/table-pagination"; @@ -23,9 +17,7 @@ export default function ConnectionsView({ Connections - - - + diff --git a/frontend/src/components/features/connections/table/ConnectionsTableColumns.tsx b/frontend/src/components/features/connections/table/ConnectionsTableColumns.tsx index d459a177..218fbfa0 100644 --- a/frontend/src/components/features/connections/table/ConnectionsTableColumns.tsx +++ b/frontend/src/components/features/connections/table/ConnectionsTableColumns.tsx @@ -44,21 +44,6 @@ export const ConnectionsTableColumns: ColumnDef[] = [ title: "Connection Status", }, }, - // { - // accessorKey: "vmId", - // header: ({ column }) => { - // return ; - // }, - // cell: ({ row }) => { - // return ( - //
- // {row.getValue("vmId")} - //
- // ); - // }, - // enableGlobalFilter: true, - - // }, { accessorKey: "javaVersion", header: ({ column }) => { @@ -130,6 +115,15 @@ export const ConnectionsTableColumns: ColumnDef[] = [ ); }, }, + { + accessorKey: "attributes", + //@ts-expect-error Seems like a library bug, that filterFn is not found by typescript. + filterFn: "attributeEquals", + meta: { + filterVariant: "attributes", + title: "Java Version", + }, + }, { accessorKey: "details", header: () => { diff --git a/frontend/tests/components/features/connections/ConnectionsView.test.tsx b/frontend/tests/components/features/connections/ConnectionsView.test.tsx index eba39a8e..cc90122b 100644 --- a/frontend/tests/components/features/connections/ConnectionsView.test.tsx +++ b/frontend/tests/components/features/connections/ConnectionsView.test.tsx @@ -17,9 +17,6 @@ describe("ConnectionsView", () => { it("renders ConnectionsView component", () => { render(); expect(screen.getByText("Connections")).toBeInTheDocument(); - expect( - screen.getByText("All currently connected agents.") - ).toBeInTheDocument(); }); it("renders the correct number of connections", () => {