diff --git a/src/pages/Connections.tsx b/src/pages/Connections.tsx index 7d8376cd..a865e8ad 100644 --- a/src/pages/Connections.tsx +++ b/src/pages/Connections.tsx @@ -28,6 +28,7 @@ import { } from '@tanstack/solid-table' import byteSize from 'byte-size' import dayjs from 'dayjs' +import { uniq } from 'lodash' import { For, Index, createMemo, createSignal } from 'solid-js' import { twMerge } from 'tailwind-merge' import { closeAllConnectionsAPI, closeSingleConnectionAPI } from '~/apis' @@ -39,6 +40,7 @@ import { import { CONNECTIONS_TABLE_ACCESSOR_KEY, MODAL } from '~/constants' import { formatTimeFromNow } from '~/helpers' import { + allConnections, clientSourceIPTags, connectionsTableColumnOrder, connectionsTableColumnVisibility, @@ -286,6 +288,12 @@ export default () => { getCoreRowModel: getCoreRowModel(), }) + const sourceIPHeader = createMemo(() => + table + .getFlatHeaders() + .find(({ id }) => id === CONNECTIONS_TABLE_ACCESSOR_KEY.SourceIP), + ) + const tabs = createMemo(() => [ { type: ActiveTab.activeConnections, @@ -302,21 +310,40 @@ export default () => { return (