diff --git a/apps/desktop/src/components/editor/QueryHistory.vue b/apps/desktop/src/components/editor/QueryHistory.vue index 9894979fee..93f1a79e37 100644 --- a/apps/desktop/src/components/editor/QueryHistory.vue +++ b/apps/desktop/src/components/editor/QueryHistory.vue @@ -17,6 +17,7 @@ import { hasHistoryDateRange, historyDateRangeIsValid, type HistoryDateRange } f import { HISTORY_ROW_HEIGHT, HISTORY_SCROLL_BUFFER, shouldVirtualizeHistory } from "@/lib/history/historyVirtualList"; import { historyConnectionHasSelectedDatabase } from "@/lib/history/historySearch"; import { historyEntrySource } from "@/lib/history/historyEntrySource"; +import { formatQueryDuration } from "@/lib/format/duration"; import type { HistoryConnectionFilter, HistoryDatabaseFilter, HistoryEntry, HistorySearchRequest } from "@/lib/backend/api"; import { copyToClipboard } from "@/lib/common/clipboard"; import { executeWithProductionSqlGuard } from "@/lib/database/productionExecutionGuard"; @@ -356,7 +357,7 @@ function detailsRows(entry: HistoryEntry) { [t("history.detail.database"), entry.database || "-"], [t("history.detail.target"), entry.target || "-"], [t("history.detail.time"), formatFullTime(entry.executed_at)], - [t("history.detail.duration"), `${entry.execution_time_ms}ms`], + [t("history.detail.duration"), formatQueryDuration(entry.execution_time_ms)], [t("history.detail.affectedRows"), entry.affected_rows ?? "-"], [t("history.detail.rollback"), canRollbackHistoryEntry(entry) ? t("history.rollbackAvailable") : t("history.rollbackUnavailable")], [t("history.detail.status"), entry.success ? t("history.success") : t("history.failed")], @@ -707,7 +708,7 @@ onBeforeUnmount(() => { - {{ entry.success ? `${entry.execution_time_ms}ms` : t("history.failed") }} + {{ entry.success ? formatQueryDuration(entry.execution_time_ms) : t("history.failed") }} diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index 79adae8f95..3255805a1e 100644 --- a/apps/desktop/src/components/grid/DataGrid.vue +++ b/apps/desktop/src/components/grid/DataGrid.vue @@ -337,6 +337,7 @@ import { useSettingsStore } from "@/stores/settingsStore"; import { databaseSortSupportedForDatabase, simpleDataGridOrderByMatchesSort, simpleDataGridOrderByReferencesMissingColumn, type DataGridSortDirection, type DataGridSortMode } from "@/lib/dataGrid/dataGridSort"; import { resolveGridFocusRestoreTarget, shouldRestoreDataGridFocusAfterEditCommit } from "@/lib/dataGrid/dataGridFocusRestore"; import { buildOrderedGridRows, type GridInsertRowPosition, type GridNewRowPlacement } from "@/lib/dataGrid/gridNewRowPlacement"; +import { formatQueryDuration } from "@/lib/format/duration"; import { DATA_GRID_CONDITION_TOOLBAR_MIN_WIDTH, DATA_GRID_TOOLBAR_ACTION_COLLAPSE_ORDER, @@ -13989,7 +13990,7 @@ useUpdateBlocker(() => (hasPendingChanges.value || hasPendingDataEditorDraft.val (truncated) {{ t("grid.rowsAffected", { count: result.affected_rows }) }} - {{ result.execution_time_ms }}ms + {{ formatQueryDuration(result.execution_time_ms) }}