Skip to content

Commit 8f1c8c5

Browse files
committed
feat: 事件插件time字段适配
# Reviewed, transaction id: 28633
1 parent 74bb5e3 commit 8f1c8c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/event/src/datasource/datasource.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,12 @@ export default class DashboardDatasource extends DataSourceApi<QueryData, QueryO
402402
url,
403403
})
404404
.then((data: QueryFetchData) =>
405-
isTableQuery ? data : this.buildFetchSeries(data, options.scopedVars, config.alias, config),
405+
isTableQuery
406+
? data?.map(item => ({
407+
...item,
408+
rows: item?.rows?.map(row => (row?.length ? [row[0] * 1000, ...row.slice(1)] : row)),
409+
}))
410+
: this.buildFetchSeries(data, options.scopedVars, config.alias, config),
406411
)
407412
.catch(() => []),
408413
);

0 commit comments

Comments
 (0)