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
This commit is contained in:
jackyin 2024-10-16 18:29:29 +08:00 committed by GitHub
parent 3990db3a16
commit cc9881343e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -30,7 +30,7 @@ export function downloadLogsModelAsTxt(logsModel: Pick<LogsModel, 'meta' | 'rows
textToDownload = textToDownload + '\n\n';
logsModel.rows.forEach((row) => {
const newRow = dateTimeFormat(row.timeEpochMs, { defaultWithMS: true }) + '\t' + row.entry + '\n';
const newRow = row.timeEpochMs + '\t' + row.entry + '\n';
textToDownload = textToDownload + newRow;
});