Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/dist
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -29,9 +30,13 @@ export const LabelsColumn: React.FC<{
<div className="space-y-1">
{Object.entries(labels).map(([key, value]) => (
<div key={key} className="text-sm">
<CellRender.CustomOutlineTag>
{`${key}: ${value}`}
</CellRender.CustomOutlineTag>
<Tooltip content={`${key}: ${value}`}>
<span className="inline-block max-w-full">
<CellRender.CustomOutlineTag maxWidth={220} ellipsis>
{`${key}: ${value}`}
</CellRender.CustomOutlineTag>
</span>
</Tooltip>
</div>
))}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -49,6 +51,18 @@ const TaskVersionTable: React.FC<TaskVersionTableProps> = ({
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}
Expand Down