Add errorIconColor prop to TraceSpanData (#26509)

This commit is contained in:
Zoltán Bedi 2020-07-22 18:52:00 +02:00 committed by GitHub
parent d0e15561c7
commit cd8049d8a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -59,6 +59,7 @@ export type TraceSpanData = {
warnings?: string[] | null;
stackTraces?: string[];
flags: number;
errorIconColor?: string;
};
export type TraceSpan = TraceSpanData & {

View File

@ -252,7 +252,6 @@ const getStyles = createStyle((theme: Theme) => {
`,
errorIcon: css`
label: errorIcon;
background: ${autoColor(theme, '#db2828')};
border-radius: 6.5px;
color: ${autoColor(theme, '#fff')};
font-size: 0.85em;
@ -418,7 +417,16 @@ export class UnthemedSpanBarRow extends React.PureComponent<SpanBarRowProps> {
[styles.svcNameChildrenCollapsed]: isParent && !isChildrenExpanded,
})}
>
{showErrorIcon && <IoAlert className={styles.errorIcon} />}
{showErrorIcon && (
<IoAlert
style={{
backgroundColor: span.errorIconColor
? autoColor(theme, span.errorIconColor)
: autoColor(theme, '#db2828'),
}}
className={styles.errorIcon}
/>
)}
{serviceName}{' '}
{rpc && (
<span>