-
Notifications
You must be signed in to change notification settings - Fork 11
fix: waterfall undefined strings #803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,14 +103,14 @@ export class TraceDetailService implements OnDestroy { | |
| private buildTimeString(trace: Trace, units: string): string { | ||
| return `${new DateFormatter({ mode: DateFormatMode.DateAndTimeWithSeconds }).format( | ||
| trace.startTime as number | ||
| )} for ${trace.duration as string} ${units}`; | ||
| )} for ${trace.duration as string} ${units ?? ''}`.trim(); | ||
| } | ||
|
|
||
| private buildTitleString(trace: Trace): string { | ||
| if (trace.spans?.length === 1) { | ||
| const entrySpan = trace.spans[0]; | ||
|
|
||
| return `${entrySpan.serviceName as string} ${entrySpan.displaySpanName as string}`; | ||
| return `${entrySpan.serviceName as string} ${(entrySpan.displaySpanName as string) ?? ''}`.trim(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't it be correct to do the trim() before generating the string?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case since we also have a space in the middle of the template, I |
||
| } | ||
|
|
||
| return ''; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| export interface SpanNameCellData { | ||
| serviceName: string; | ||
| protocolName: string; | ||
| name: string; | ||
| protocolName?: string; | ||
| apiName?: string; | ||
| color?: string; | ||
| hasError?: boolean; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't see anywhere this was used, so removed it. cc: @anandtiwary to confirm this is okay.