Add errorIconColor prop to TraceSpanData (#26509)

pull/26534/head
Zoltán Bedi 5 years ago committed by GitHub
parent d0e15561c7
commit cd8049d8a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      packages/grafana-data/src/types/trace.ts
  2. 12
      packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.tsx

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

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

Loading…
Cancel
Save