chore(tracing): render error snapshot as Action (#6241)

This commit is contained in:
Pavel Feldman 2021-04-20 00:19:17 -07:00 committed by GitHub
parent 23dfaf9e9b
commit f9af4c3755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -27,7 +27,6 @@
color: #555;
overflow: auto;
outline: none;
padding: 5px 0 0 5px;
}
.action-entry {
@ -37,7 +36,7 @@
align-items: center;
white-space: nowrap;
line-height: 28px;
padding-left: 3px;
padding-left: 5px;
}
.action-entry.highlighted,
@ -68,7 +67,6 @@
.action-error {
color: red;
top: 2px;
position: relative;
margin-right: 2px;
}

View File

@ -32,7 +32,7 @@ export const SnapshotTab: React.FunctionComponent<{
const snapshotMap = new Map<string, { title: string, snapshotName: string }>();
for (const snapshot of actionEntry?.snapshots || [])
snapshotMap.set(snapshot.title, snapshot);
const actionSnapshot = snapshotMap.get('action') || snapshotMap.get('before');
const actionSnapshot = snapshotMap.get('action') || snapshotMap.get('after');
const snapshots = [actionSnapshot ? { ...actionSnapshot, title: 'action' } : undefined, snapshotMap.get('before'), snapshotMap.get('after')].filter(Boolean) as { title: string, snapshotName: string }[];
if (snapshotIndex >= snapshots.length)