diff --git a/ui/src/main/webapp/components/table/CustomTable.jsx b/ui/src/main/webapp/components/table/CustomTable.jsx index c057efc53..e045d5d43 100755 --- a/ui/src/main/webapp/components/table/CustomTable.jsx +++ b/ui/src/main/webapp/components/table/CustomTable.jsx @@ -25,6 +25,7 @@ function CustomTable({ handleSort, sortDir, sortKey, + tableConfig }) { const unifiedConfigs = getUnifiedConfigs(); const [entityModal, setEntityModal] = useState({ open: false }); @@ -32,11 +33,6 @@ function CustomTable({ const { rowData } = useContext(TableContext); - const tableConfig = - page === PAGE_INPUT - ? unifiedConfigs.pages.inputs.table - : unifiedConfigs.pages.configuration.tabs.filter((x) => x.name === serviceName)[0] - .table; const { moreInfo, header } = tableConfig; const headers = tableConfig.header; @@ -237,12 +233,12 @@ function CustomTable({ handleToggleActionClick={handleToggleActionClick} {...(moreInfo ? { - expansionRow: getExpansionRow( - columns.length, - row, - moreInfo - ), - } + expansionRow: getExpansionRow( + columns.length, + row, + moreInfo + ), + } : {})} /> ); diff --git a/ui/src/main/webapp/components/table/TableExpansionRow.jsx b/ui/src/main/webapp/components/table/TableExpansionRow.jsx index 77373e3c3..185e376fd 100644 --- a/ui/src/main/webapp/components/table/TableExpansionRow.jsx +++ b/ui/src/main/webapp/components/table/TableExpansionRow.jsx @@ -34,7 +34,12 @@ function getExpansionRowData(row, moreInfo) { } export function getExpansionRow(colSpan, row, moreInfo) { - const { customRow } = getUnifiedConfigs().pages.inputs.table; + + const inputs = getUnifiedConfigs().pages?.inputs; + + const customRow = inputs?.table + ? (inputs.table.customRow) + : (inputs.services.find((service) => service.name === row.serviceName).table?.customRow); return ( diff --git a/ui/src/main/webapp/components/table/TableFilter.jsx b/ui/src/main/webapp/components/table/TableFilter.jsx index 4b75d0e93..0f4809cf0 100644 --- a/ui/src/main/webapp/components/table/TableFilter.jsx +++ b/ui/src/main/webapp/components/table/TableFilter.jsx @@ -1,8 +1,13 @@ -import React from 'react'; +import React, { useContext } from 'react'; import Text from '@splunk/react-ui/Text'; import PropTypes from 'prop-types'; +import TableContext from '../../context/TableContext'; function TableFilter(props) { + + const { searchText } = useContext(TableContext); + + // We need to remove this function later const debounce = (func, wait) => { let timeout; @@ -34,7 +39,8 @@ function TableFilter(props) { ); } diff --git a/ui/src/main/webapp/components/table/TableHeader.jsx b/ui/src/main/webapp/components/table/TableHeader.jsx index 41c3842a0..35b36f6d4 100755 --- a/ui/src/main/webapp/components/table/TableHeader.jsx +++ b/ui/src/main/webapp/components/table/TableHeader.jsx @@ -24,7 +24,7 @@ const TableFilterWrapper = styled.div` width: 100%; `; -function TableHeader({ page, services, totalElement, handleRequestModalOpen }) { +function TableHeader({ page, isOuterTable, services, totalElement, handleRequestModalOpen }) { const { pageSize, currentPage, @@ -82,7 +82,7 @@ function TableHeader({ page, services, totalElement, handleRequestModalOpen }) { - {getSearchTypeDropdown()} + {isOuterTable ? getSearchTypeDropdown() : null} ) : null} @@ -101,7 +101,7 @@ function TableHeader({ page, services, totalElement, handleRequestModalOpen }) { alwaysShowLastPageLink totalPages={Math.ceil(totalElement / pageSize)} /> - {page === PAGE_INPUT ? null : ( + {page === PAGE_INPUT && isOuterTable ? null : (