diff --git a/frontend/src/components/ACLPage/List/List.tsx b/frontend/src/components/ACLPage/List/List.tsx index 61a443932..8d04050ff 100644 --- a/frontend/src/components/ACLPage/List/List.tsx +++ b/frontend/src/components/ACLPage/List/List.tsx @@ -26,6 +26,8 @@ import ResourcePageHeading from 'components/common/ResourcePageHeading/ResourceP import BreakableTextCell from 'components/common/NewTable/BreakableTextCell'; import { useQueryPersister } from 'components/common/NewTable/ColumnFilter'; import { ActionPermissionWrapper } from 'components/common/ActionComponent'; +import useFts from 'components/common/Fts/useFts'; +import Fts from 'components/common/Fts/Fts'; import * as S from './List.styled'; @@ -33,7 +35,8 @@ const ACList: React.FC = () => { const { clusterName } = useAppParams<{ clusterName: ClusterName }>(); const [searchParams, setSearchParams] = useSearchParams(); const [search, setSearch] = useState(searchParams.get('q') || ''); - const { data: aclList } = useAcls({ clusterName, search }); + const { isFtsEnabled } = useFts('acl'); + const { data: aclList } = useAcls({ clusterName, search, fts: isFtsEnabled }); const { deleteResource } = useDeleteAcl(clusterName); const modal = useConfirm(true); const theme = useTheme(); @@ -211,6 +214,7 @@ const ACList: React.FC = () => { placeholder="Search by Principal Name" value={search} onChange={setSearch} + extraActions={} /> { - const { data } = useConsumerGroups({ clusterName, search: '' }); + const { isFtsEnabled } = useFts('consumer_groups'); + const { data } = useConsumerGroups({ + clusterName, + search: '', + fts: isFtsEnabled, + }); const consumerGroups = useMemo(() => { return ( data?.consumerGroups?.map((cg) => { diff --git a/frontend/src/components/ClusterPage/ClusterPage.tsx b/frontend/src/components/ClusterPage/ClusterPage.tsx index a0cc13e13..0da4a3c9b 100644 --- a/frontend/src/components/ClusterPage/ClusterPage.tsx +++ b/frontend/src/components/ClusterPage/ClusterPage.tsx @@ -61,6 +61,8 @@ const ClusterPage: React.FC = () => { hasAclViewConfigured: features.includes(ClusterFeaturesEnum.KAFKA_ACL_VIEW) || features.includes(ClusterFeaturesEnum.KAFKA_ACL_EDIT), + ftsEnabled: false, + ftsDefaultEnabled: false, }; }, [clusterName, data]); diff --git a/frontend/src/components/Connect/List/List.tsx b/frontend/src/components/Connect/List/List.tsx index c3a595688..6952ec5b9 100644 --- a/frontend/src/components/Connect/List/List.tsx +++ b/frontend/src/components/Connect/List/List.tsx @@ -9,6 +9,7 @@ import { useSearchParams } from 'react-router-dom'; import { useQueryPersister } from 'components/common/NewTable/ColumnFilter'; import { useLocalStoragePersister } from 'components/common/NewTable/ColumnResizer/lib'; import BreakableTextCell from 'components/common/NewTable/BreakableTextCell'; +import useFts from 'components/common/Fts/useFts'; import ActionsCell from './ActionsCell'; import TopicsCell from './TopicsCell'; @@ -80,9 +81,11 @@ const kafkaConnectColumns: ColumnDef[] = [ const List: React.FC = () => { const { clusterName } = useAppParams(); const [searchParams] = useSearchParams(); + const { isFtsEnabled } = useFts('connects'); const { data: connectors } = useConnectors( clusterName, - searchParams.get('q') || '' + searchParams.get('q') || '', + isFtsEnabled ); const filterPersister = useQueryPersister(kafkaConnectColumns); diff --git a/frontend/src/components/Connect/List/ListPage.tsx b/frontend/src/components/Connect/List/ListPage.tsx index 3b257dd6d..3279c35ee 100644 --- a/frontend/src/components/Connect/List/ListPage.tsx +++ b/frontend/src/components/Connect/List/ListPage.tsx @@ -4,12 +4,15 @@ import { ClusterNameRoute } from 'lib/paths'; import Search from 'components/common/Search/Search'; import PageLoader from 'components/common/PageLoader/PageLoader'; import { useConnectors } from 'lib/hooks/api/kafkaConnect'; +import Fts from 'components/common/Fts/Fts'; +import useFts from 'components/common/Fts/useFts'; import * as S from './ListPage.styled'; import List from './List'; import ConnectorsStatistics from './Statistics/Statistics'; const ListPage: React.FC = () => { + useFts('connects'); const { clusterName } = useAppParams(); const { data, isLoading } = useConnectors(clusterName); @@ -17,7 +20,10 @@ const ListPage: React.FC = () => { <> - + } + /> }> diff --git a/frontend/src/components/ConsumerGroups/List.tsx b/frontend/src/components/ConsumerGroups/List.tsx index 2a8fc619e..ad66e718c 100644 --- a/frontend/src/components/ConsumerGroups/List.tsx +++ b/frontend/src/components/ConsumerGroups/List.tsx @@ -17,11 +17,14 @@ import { useConsumerGroups } from 'lib/hooks/api/consumers'; import Tooltip from 'components/common/Tooltip/Tooltip'; import ResourcePageHeading from 'components/common/ResourcePageHeading/ResourcePageHeading'; import { useLocalStoragePersister } from 'components/common/NewTable/ColumnResizer/lib'; +import useFts from 'components/common/Fts/useFts'; +import Fts from 'components/common/Fts/Fts'; const List = () => { const { clusterName } = useAppParams(); const [searchParams] = useSearchParams(); const navigate = useNavigate(); + const { isFtsEnabled } = useFts('consumer_groups'); const consumerGroups = useConsumerGroups({ clusterName, @@ -32,6 +35,7 @@ const List = () => { page: Number(searchParams.get('page') || 1), perPage: Number(searchParams.get('perPage') || PER_PAGE), search: searchParams.get('q') || '', + fts: isFtsEnabled, }); const columns = React.useMemo[]>( @@ -104,7 +108,10 @@ const List = () => { <> - + } + />
{ const { clusterName } = useAppParams(); const navigate = useNavigate(); const [searchParams] = useSearchParams(); + const { isFtsEnabled } = useFts('schemas'); const { isInitialLoading, isError, @@ -45,6 +48,7 @@ const List: React.FC = () => { sortOrder: (searchParams.get('sortDirection')?.toUpperCase() as SortOrder) || undefined, + fts: isFtsEnabled, }); const columns = React.useMemo[]>( @@ -111,7 +115,10 @@ const List: React.FC = () => { )} - + } + /> {isInitialLoading || isError ? ( diff --git a/frontend/src/components/Topics/List/ListPage.tsx b/frontend/src/components/Topics/List/ListPage.tsx index d8508175c..811bde1a7 100644 --- a/frontend/src/components/Topics/List/ListPage.tsx +++ b/frontend/src/components/Topics/List/ListPage.tsx @@ -12,11 +12,15 @@ import PageLoader from 'components/common/PageLoader/PageLoader'; import TopicTable from 'components/Topics/List/TopicTable'; import { Action, ResourceType } from 'generated-sources'; import ResourcePageHeading from 'components/common/ResourcePageHeading/ResourcePageHeading'; +import Fts from 'components/common/Fts/Fts'; +import useFts from 'components/common/Fts/useFts'; const ListPage: React.FC = () => { const { isReadOnly } = React.useContext(ClusterContext); const [searchParams, setSearchParams] = useSearchParams(); + useFts('topics'); + // Set the search params to the url based on the localStorage value React.useEffect(() => { if (!searchParams.has('perPage')) { @@ -62,7 +66,10 @@ const ListPage: React.FC = () => { )} - + } + />