Skip to content

[Web] Fix audit log date matcher error#25344

Merged
rudream merged 1 commit intomasterfrom
yassine/fix-audit-error
May 8, 2023
Merged

[Web] Fix audit log date matcher error#25344
rudream merged 1 commit intomasterfrom
yassine/fix-audit-error

Conversation

@rudream
Copy link
Copy Markdown
Contributor

@rudream rudream commented Apr 28, 2023

Purpose

Fixes a console error and UI freezes when searching through the audit log caused by the date matcher.
image

Implementation

The error was occurring because the time being passed into the matcher function was in a string ISO format, which date-fns functions don't support. Converting it to Date resolved the issue.

Comment thread web/packages/design/src/utils/match/matchers.ts
Copy link
Copy Markdown
Member

@ryanclark ryanclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after a test has been added

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from kimlisa May 2, 2023 13:39
@rudream rudream force-pushed the yassine/fix-audit-error branch from 654f94c to f520355 Compare May 4, 2023 23:35
@rudream rudream requested review from avatus and zmb3 May 4, 2023 23:35
Comment thread web/packages/design/src/utils/match/matchers.test.ts
@rudream rudream requested a review from kimlisa May 5, 2023 21:37
@zmb3
Copy link
Copy Markdown
Collaborator

zmb3 commented May 8, 2023

@rudream let's get this one merged

@rudream rudream force-pushed the yassine/fix-audit-error branch from a7899d6 to 4b1c2dc Compare May 8, 2023 17:48
@rudream rudream enabled auto-merge May 8, 2023 17:48
@rudream rudream added this pull request to the merge queue May 8, 2023
Merged via the queue into master with commit 5bd7240 May 8, 2023
@rudream rudream deleted the yassine/fix-audit-error branch May 8, 2023 18:16
@public-teleport-github-review-bot
Copy link
Copy Markdown

@rudream See the table below for backport results.

Branch Result
branch/v10 Create PR
branch/v11 Create PR
branch/v12 Create PR
branch/v13 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants