From cc9881343e6d1a980966d70fe673339c7b8990bd Mon Sep 17 00:00:00 2001 From: jackyin Date: Wed, 16 Oct 2024 18:29:29 +0800 Subject: [PATCH] Explore: Explore Log Download doesn't have same time format (#94519) * Fixes #94296 * format code * format code * remove the timezone * fix bug * format code * update unit test * modified csv data order * format code * delete csv change --- public/app/features/inspector/utils/download.test.ts | 2 +- public/app/features/inspector/utils/download.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/inspector/utils/download.test.ts b/public/app/features/inspector/utils/download.test.ts index 6735731dabb..fe39b2d61e7 100644 --- a/public/app/features/inspector/utils/download.test.ts +++ b/public/app/features/inspector/utils/download.test.ts @@ -105,7 +105,7 @@ describe('inspector download', () => { rows: [{ timeEpochMs: 100, entry: 'testEntry' } as unknown as LogRowModel], }, 'test', - `testLabel: 1\nsecondTestLabel: 2\n\n\n${dateTimeFormat(100, { defaultWithMS: true })}\ttestEntry\n`, + `testLabel: 1\nsecondTestLabel: 2\n\n\n100\ttestEntry\n`, ], ])('should, when logsModel is %s and title is %s, resolve in %s', async (logsModel, title, expected) => { downloadLogsModelAsTxt(logsModel, title); diff --git a/public/app/features/inspector/utils/download.ts b/public/app/features/inspector/utils/download.ts index 2a7c203677b..9f55548aea4 100644 --- a/public/app/features/inspector/utils/download.ts +++ b/public/app/features/inspector/utils/download.ts @@ -30,7 +30,7 @@ export function downloadLogsModelAsTxt(logsModel: Pick { - const newRow = dateTimeFormat(row.timeEpochMs, { defaultWithMS: true }) + '\t' + row.entry + '\n'; + const newRow = row.timeEpochMs + '\t' + row.entry + '\n'; textToDownload = textToDownload + newRow; });