From 8cd88bac0ea26b3180a39532fe902c671b17545c Mon Sep 17 00:00:00 2001 From: Lin Wang Date: Mon, 17 Nov 2025 18:13:07 +0800 Subject: [PATCH 1/3] Make log action menu available on non-filterable time column Signed-off-by: Lin Wang --- .../chat/public/components/chat_window.tsx | 2 +- .../table_cell/non_filterable_table_cell.tsx | 28 +++++++++++++++++++ .../table_row/table_row_content.tsx | 4 +++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/plugins/chat/public/components/chat_window.tsx b/src/plugins/chat/public/components/chat_window.tsx index a3c5a1fa1f58..4ae3cf649d53 100644 --- a/src/plugins/chat/public/components/chat_window.tsx +++ b/src/plugins/chat/public/components/chat_window.tsx @@ -41,7 +41,7 @@ export interface ChatWindowInstance{ interface ChatWindowProps { layoutMode?: ChatLayoutMode; onToggleLayout?: () => void; - onClose: ()=>void; + onClose: () => void; } /** diff --git a/src/plugins/explore/public/components/data_table/table_cell/non_filterable_table_cell.tsx b/src/plugins/explore/public/components/data_table/table_cell/non_filterable_table_cell.tsx index b9a20dc71fdd..20604d3580ad 100644 --- a/src/plugins/explore/public/components/data_table/table_cell/non_filterable_table_cell.tsx +++ b/src/plugins/explore/public/components/data_table/table_cell/non_filterable_table_cell.tsx @@ -10,23 +10,51 @@ */ import React from 'react'; +import { LogActionMenu } from '../../log_action_menu'; +import { OpenSearchSearchHit } from '../../../types/doc_views_types'; +import { useDatasetContext } from '../../../application/context'; export interface NonFilterableTableCellProps { colName: string; className: string; sanitizedCellValue: string; + isTimeField: boolean; + index?: number; + rowData?: OpenSearchSearchHit>; + columnId: string; } export const NonFilterableTableCell: React.FC = ({ colName, className, sanitizedCellValue, + isTimeField, + index, + rowData, + columnId, }) => { + const { dataset } = useDatasetContext(); return (
{/* eslint-disable-next-line react/no-danger */} + + {isTimeField && ( + + {/* Add AI icon before filter buttons - show for all cells except _source */} + {rowData?._source && columnId !== '_source' && ( + + )} + + )}
); diff --git a/src/plugins/explore/public/components/data_table/table_row/table_row_content.tsx b/src/plugins/explore/public/components/data_table/table_row/table_row_content.tsx index 5baf58ebc8f8..01c32919c210 100644 --- a/src/plugins/explore/public/components/data_table/table_row/table_row_content.tsx +++ b/src/plugins/explore/public/components/data_table/table_row/table_row_content.tsx @@ -123,6 +123,10 @@ export const TableRowContent: React.FC = ({ colName={colName} className={getCellClassName(dataset.timeFieldName, colName)} sanitizedCellValue={sanitizedCellValue} + isTimeField={dataset.timeFieldName === colName} + index={index} + rowData={row} + columnId={colName} /> ); } From 3d17c7f3fe1beed24ea331e2ea8da4808ef8d9ba Mon Sep 17 00:00:00 2001 From: "opensearch-changeset-bot[bot]" <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 10:22:06 +0000 Subject: [PATCH 2/3] Changeset file for PR #10927 created/updated --- changelogs/fragments/10927.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/10927.yml diff --git a/changelogs/fragments/10927.yml b/changelogs/fragments/10927.yml new file mode 100644 index 000000000000..98312539c90e --- /dev/null +++ b/changelogs/fragments/10927.yml @@ -0,0 +1,2 @@ +feat: +- [explore]Add log action menu support for non-filterable time columns ([#10927](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/10927)) \ No newline at end of file From ece9e4340fcc42d3ad213afc41a2be8e24dcd02c Mon Sep 17 00:00:00 2001 From: Lin Wang Date: Mon, 17 Nov 2025 18:46:28 +0800 Subject: [PATCH 3/3] Revert changes in chat window Signed-off-by: Lin Wang --- src/plugins/chat/public/components/chat_window.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/chat/public/components/chat_window.tsx b/src/plugins/chat/public/components/chat_window.tsx index 4ae3cf649d53..a3c5a1fa1f58 100644 --- a/src/plugins/chat/public/components/chat_window.tsx +++ b/src/plugins/chat/public/components/chat_window.tsx @@ -41,7 +41,7 @@ export interface ChatWindowInstance{ interface ChatWindowProps { layoutMode?: ChatLayoutMode; onToggleLayout?: () => void; - onClose: () => void; + onClose: ()=>void; } /**