fix(tdengine): display timezone timestamps and tags correctly

This commit is contained in:
zipg authored and GitHub committed 2026-08-22 19:17:05 +08:00
1 parent 2fee435b33
commit 36c9500a4e
9 files changed
+177 -40

No files matched your search

@@ -5577,6 +5577,7 @@ function cellDetailFor(rowIndex: number, columnIndex: number): DataGridCellDetai
canEditCell: canEditCellItem(item, columnIndex),
isDraft: !!item.isDraft,
}),
databaseType: resolvedDatabaseType.value,
isValuePreviewTruncated: isLargeValuePreview(item, columnIndex),
});
}
@@ -5706,7 +5707,7 @@ const activeCellDetailTabs = computed(() => {
const activeBinaryHexBytes = computed(() => {
if (activeCellDetailTab.value !== "hexViewer") return null;
const detail = activeCellDetail.value;
return detail ? parseBinaryCellBytes(detail.value, detail.type) : null;
return detail ? parseBinaryCellBytes(detail.value, detail.type, resolvedDatabaseType.value) : null;
});
const activeBinaryHexRows = computed(() => (activeBinaryHexBytes.value ? buildBinaryHexViewRows(activeBinaryHexBytes.value) : []));
@@ -6326,7 +6327,7 @@ function formatCell(value: CellValue, columnIndex?: number, originalBytes?: numb
columnInfo: displayColumnInfo,
});
if (arrayDisplay !== undefined) return arrayDisplay;
const binaryDisplay = formatter ? null : binaryCellDisplayText(value, columnIndex === undefined ? undefined : allColumnTypes.value[columnIndex], originalBytes);
const binaryDisplay = formatter ? null : binaryCellDisplayText(value, columnIndex === undefined ? undefined : allColumnTypes.value[columnIndex], originalBytes, resolvedDatabaseType.value);
if (binaryDisplay !== null) return binaryDisplay;
const s = applyColumnFormatter(value, formatter);
return limitDisplay ? limitDataGridCellDisplay(s, resolvedDatabaseType.value === "sqlserver" ? SQLSERVER_DATA_GRID_CELL_DISPLAY_MAX_LENGTH : undefined) : s;
@@ -8922,7 +8923,7 @@ function copyDetailColumnName() {
function canDownloadDetailBinaryValue(detail: DataGridCellDetail | null): boolean {
if (!detail) return false;
const item = getRowItem(detail.rowId);
return (isLargeValuePreview(item, detail.colIndex) && isBinaryCellColumnType(detail.type)) || canDownloadBinaryCellValue(detail.value, detail.type);
return (resolvedDatabaseType.value !== "tdengine" && isLargeValuePreview(item, detail.colIndex) && isBinaryCellColumnType(detail.type)) || canDownloadBinaryCellValue(detail.value, detail.type, resolvedDatabaseType.value);
}
function canImportDetailBinaryValue(detail: DataGridCellDetail | null): boolean {
@@ -8972,7 +8973,7 @@ async function downloadDetailBinaryValue(detail: DataGridCellDetail | null, mode
if (!(await hydrateLargeValueCell(detail.rowId, detail.colIndex))) return;
const resolvedDetail = cellDetailFor(detail.rowNumber - 1, detail.colIndex);
if (!resolvedDetail) return;
const payload = binaryCellDownloadPayload(resolvedDetail.value, mode, resolvedDetail.type);
const payload = binaryCellDownloadPayload(resolvedDetail.value, mode, resolvedDetail.type, resolvedDatabaseType.value);
const fileName = binaryCellDownloadFileName({
column: resolvedDetail.column,
rowNumber: resolvedDetail.rowNumber,