Logs: Add millisecond to timestamp in log line (#64372)

* add milliseconds to logrow

* adjust tests to also have milliseconds
This commit is contained in:
Sven Grossmann 2023-03-08 11:39:56 +01:00 committed by GitHub
parent c7a1216cf6
commit 42c32504be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -81,9 +81,9 @@ describe('LogsSamplePanel', () => {
render(
<LogsSamplePanel {...createProps({ queryResponse: { data: [sampleDataFrame], state: LoadingState.Done } })} />
);
expect(screen.getByText('2022-02-22 04:28:11')).toBeInTheDocument();
expect(screen.getByText('2022-02-22 04:28:11.352')).toBeInTheDocument();
expect(screen.getByText('line1')).toBeInTheDocument();
expect(screen.getByText('2022-02-22 09:42:50')).toBeInTheDocument();
expect(screen.getByText('2022-02-22 09:42:50.991')).toBeInTheDocument();
expect(screen.getByText('line2')).toBeInTheDocument();
});

View File

@ -117,6 +117,7 @@ class UnThemedLogRow extends PureComponent<Props, State> {
renderTimeStamp(epochMs: number) {
return dateTimeFormat(epochMs, {
timeZone: this.props.timeZone,
defaultWithMS: true,
});
}