Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Sep 10, 2024
2 parents 373b963 + bd70af1 commit 14bab77
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/pages/Team/deploy/Container/Traces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ export const TeamDeployContainerTraces = () => {
setSelectedTrace(trace.trace_id === selectedTrace ? null : trace.trace_id);
}}
>
{trace.status_code && (
<RodItem status={trace.status_code}></RodItem>
)}
<DateItem>{trace.date}</DateItem>
<ResourceItem>{trace.resource ?? ''}</ResourceItem>
<DurationItem>{trace.duration_ms ?? ''}ms</DurationItem>
Expand Down Expand Up @@ -274,6 +277,21 @@ const ResourceItem = styled.div`
white-space: nowrap;
`;

const RodItem = styled.div<{ status: number }>`
width: 8px;
padding-left: 3px;
display: flex;
align-items: center;
justify-content: center;
font-variant-numeric: tabular-nums;
background-color: ${props => {
if (props.status < 300) return theme.color.green;
if (props.status < 400) return theme.color.infoDark1;
if (props.status < 500) return theme.color.brown;
return theme.color.red;
}};
`;

const DurationItem = styled.div`
width: 10%;
min-width: 100px;
Expand Down

0 comments on commit 14bab77

Please sign in to comment.