Skip to content

Commit

Permalink
keep apiName like they are
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Sep 18, 2024
1 parent 117cf7e commit 3b66b1b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions packages/trace-viewer/src/ui/actionList.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@
color: var(--vscode-charts-blue);
}

.action-green {
display: inline;
flex: none;
padding-left: 5px;
color: var(--vscode-charts-green);
}

.action-red {
display: inline;
flex: none;
padding-left: 5px;
color: var(--vscode-charts-red);
}

.action-list-show-all {
display: flex;
cursor: pointer;
Expand Down
6 changes: 4 additions & 2 deletions packages/trace-viewer/src/ui/actionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ export const renderAction = (
time = 'Timed out';
else if (!isLive)
time = '-';

return <>
<div className='action-title' title={action.apiName}>
{action.class !== 'APIRequestContext' && <span>{action.apiName}</span>}
{action.class === 'APIRequestContext' && <span className='action-selector'>{action.params.method}</span>}
<span>{action.apiName}</span>
{locator && <div className='action-selector' title={locator}>{locator}</div>}
{action.method === 'goto' && action.params.url && <div className='action-url' title={action.params.url}>{action.params.url}</div>}
{action.class === 'APIRequestContext' && action.params.method && <span className='action-selector'>{action.params.method}</span>}
{action.class === 'APIRequestContext' && action.result?.response?.status && <span className={action.result.response.status < 201 ? 'action-green' : action.result.response.status < 500 ? 'action-url' : 'action-red'}>{action.result.response.status}</span>}
{action.class === 'APIRequestContext' && action.params.url && <div className='action-url' title={action.params.url}>{excludeOrigin(action.params.url)}</div>}
</div>
{(showDuration || showBadges) && <div className='spacer'></div>}
Expand Down

0 comments on commit 3b66b1b

Please sign in to comment.