From 3a652b28057543d8a82c3858a0e52c85fc77211b Mon Sep 17 00:00:00 2001 From: songyu-bytedance Date: Tue, 16 Dec 2025 13:57:32 +0800 Subject: [PATCH 1/3] fix(threshold): optimize labels display with tooltip and ellipsis in cleaning result --- .../ui/components/table-columns/labels-column.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/components/table-columns/labels-column.tsx b/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/components/table-columns/labels-column.tsx index 0f1b57d4..122960d8 100644 --- a/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/components/table-columns/labels-column.tsx +++ b/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/components/table-columns/labels-column.tsx @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Tooltip } from '@arco-design/web-react'; import { CellRender } from '@veaiops/components'; import type React from 'react'; @@ -29,9 +30,13 @@ export const LabelsColumn: React.FC<{
{Object.entries(labels).map(([key, value]) => (
- - {`${key}: ${value}`} - + + + + {`${key}: ${value}`} + + +
))}
From a9ce519553783078e45e3230dda37ad154d9a13d Mon Sep 17 00:00:00 2001 From: songyu-bytedance Date: Tue, 16 Dec 2025 14:12:20 +0800 Subject: [PATCH 2/3] fix(threshold): use tailwind css for tooltip wrapper in labels column --- .../task-config/ui/components/table-columns/labels-column.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/components/table-columns/labels-column.tsx b/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/components/table-columns/labels-column.tsx index 122960d8..987ee2ea 100644 --- a/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/components/table-columns/labels-column.tsx +++ b/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/components/table-columns/labels-column.tsx @@ -31,7 +31,7 @@ export const LabelsColumn: React.FC<{ {Object.entries(labels).map(([key, value]) => (
- + {`${key}: ${value}`} From 6dd957be433d8cba530ebc84efa47d4e191ea92c Mon Sep 17 00:00:00 2001 From: songyu-bytedance Date: Tue, 16 Dec 2025 15:00:09 +0800 Subject: [PATCH 3/3] fix(threshold): add auto-refresh for task version table - implement polling mechanism for task version table to track async status updates - replace console.log with logger.info for consistent logging - auto-refresh every 3 seconds when table is mounted --- docs/dist | 1 + .../ui/version/hooks/use-rerun-drawer.tsx | 6 ++++++ .../features/task-config/ui/version/table.tsx | 14 ++++++++++++++ 3 files changed, 21 insertions(+) create mode 120000 docs/dist diff --git a/docs/dist b/docs/dist new file mode 120000 index 00000000..417ec0f8 --- /dev/null +++ b/docs/dist @@ -0,0 +1 @@ +/Users/bytedance/Desktop/ve-arch/agent/veaiops/docs/.output/public \ No newline at end of file diff --git a/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/version/hooks/use-rerun-drawer.tsx b/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/version/hooks/use-rerun-drawer.tsx index 8dbaf677..1bb6ac87 100644 --- a/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/version/hooks/use-rerun-drawer.tsx +++ b/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/version/hooks/use-rerun-drawer.tsx @@ -13,6 +13,7 @@ // limitations under the License. import { Button, Drawer, Form, Message } from '@arco-design/web-react'; +import { logger } from '@veaiops/utils'; import type { IntelligentThresholdTaskVersion, RerunIntelligentThresholdTaskRequest, @@ -111,6 +112,11 @@ export const useRerunDrawer = ( // Refresh table data to show new version results if (tableRef.current?.refresh) { + logger.info({ + message: + '[useRerunDrawer] Rerun successful, triggering single table refresh', + source: 'useRerunDrawer', + }); const refreshResult = await tableRef.current.refresh(); return refreshResult ?? true; } diff --git a/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/version/table.tsx b/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/version/table.tsx index 01e3fcc9..65277c7f 100644 --- a/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/version/table.tsx +++ b/frontend/apps/veaiops/src/modules/threshold/features/task-config/ui/version/table.tsx @@ -14,6 +14,8 @@ import type { CustomTableActionType } from '@veaiops/components'; import type { BaseQuery, BaseRecord } from '@veaiops/types'; +import { logger } from '@veaiops/utils'; +import { useInterval } from 'ahooks'; import { useRef } from 'react'; import { useAlarmDrawer, @@ -49,6 +51,18 @@ const TaskVersionTable: React.FC = ({ tableRef, }); + // Auto refresh table data every 3 seconds to update task status + useInterval(() => { + // Only refresh when tableRef is available + if (tableRef.current?.refresh) { + logger.debug({ + message: '[TaskVersionTable] Auto refreshing task versions', + source: 'TaskVersionTable', + }); + tableRef.current.refresh(); + } + }, 3000); + return ( <> {tableElement}