Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events are in correct order in workbench status progress #3253

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@
<List isPlain isBordered tabIndex={0}>
{events
.slice()
.reverse()
.toSorted(
(a, b) =>

Check warning on line 224 in frontend/src/pages/notebookController/screens/server/StartServerModal.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/pages/notebookController/screens/server/StartServerModal.tsx#L224

Added line #L224 was not covered by tests
new Date(getEventTimestamp(b)).getTime() - new Date(getEventTimestamp(a)).getTime(),
)
.map((event, index) => (
<ListItem key={`notebook-event-${event.metadata.uid ?? index}`}>
{`${getEventTimestamp(event)} [${event.type}] ${event.message}`}
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/pages/projects/notebook/StartNotebookModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { EventKind } from '~/k8sTypes';
import NotebookRouteLink from './NotebookRouteLink';
import { NotebookState } from './types';
import { getEventFullMessage } from './utils';
import { getEventFullMessage, getEventTimestamp } from './utils';

type StartNotebookModalProps = {
isOpen: boolean;
Expand Down Expand Up @@ -164,7 +164,11 @@
<List isPlain isBordered data-id="event-logs">
{events
.slice()
.reverse()
.toSorted(
(a, b) =>
new Date(getEventTimestamp(b)).getTime() -

Check warning on line 169 in frontend/src/pages/projects/notebook/StartNotebookModal.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/pages/projects/notebook/StartNotebookModal.tsx#L168-L169

Added lines #L168 - L169 were not covered by tests
new Date(getEventTimestamp(a)).getTime(),
)
.map((event, index) => (
<ListItem key={`notebook-event-${event.metadata.uid ?? index}`}>
{getEventFullMessage(event)}
Expand Down
Loading