|
79 | 79 | ShowHover="true"
|
80 | 80 | ItemKey="@(r => r.Span.SpanId)"
|
81 | 81 | OnRowClick="@(r => r.ExecuteOnDefault(d => OnShowPropertiesAsync(d, buttonId: null)))">
|
82 |
| - <AspireTemplateColumn ColumnId="@NameColumn" ColumnManager="@_manager" UseCustomHeaderTemplate="false" Title="@Loc[nameof(Dashboard.Resources.TraceDetail.TraceDetailNameHeader)]" Class="expand-col"> |
83 |
| - <div class="col-long-content" title="@context.GetTooltip(_applications)"> |
84 |
| - @{ |
85 |
| - var isServerOrConsumer = context.Span.Kind == OtlpSpanKind.Server || context.Span.Kind == OtlpSpanKind.Consumer; |
86 |
| - // Indent the span name based on the depth of the span. |
87 |
| - var marginLeft = (context.Depth - 1) * 15; |
| 82 | + <AspireTemplateColumn ColumnId="@NameColumn" ColumnManager="@_manager" UseCustomHeaderTemplate="false" Title="@Loc[nameof(Dashboard.Resources.TraceDetail.TraceDetailNameHeader)]" Tooltip="true" TooltipText="@(c => c.GetTooltip(_applications))" Class="expand-col"> |
| 83 | + @{ |
| 84 | + var isServerOrConsumer = context.Span.Kind == OtlpSpanKind.Server || context.Span.Kind == OtlpSpanKind.Consumer; |
| 85 | + // Indent the span name based on the depth of the span. |
| 86 | + var marginLeft = (context.Depth - 1) * 15; |
88 | 87 |
|
89 |
| - // We want to have consistent margin for both client and server spans. |
90 |
| - string spanNameContainerStyle; |
91 |
| - if (!isServerOrConsumer) |
| 88 | + // We want to have consistent margin for both client and server spans. |
| 89 | + string spanNameContainerStyle; |
| 90 | + if (!isServerOrConsumer) |
92 | 91 | {
|
93 | 92 | // Client span has 19px extra content:
|
94 | 93 | // - 5px extra margin-left
|
95 | 94 | // - 5px border
|
96 | 95 | // - 9px padding-left
|
97 | 96 | spanNameContainerStyle = $"margin-left: 5px; border-left-color: {ColorGenerator.Instance.GetColorHexByKey(GetResourceName(context.Span.Source))}; border-left-width: 5px; border-left-style: solid; padding-left: 9px;";
|
98 | 97 | }
|
99 |
| - else |
100 |
| - { |
101 |
| - // Span with icon has 19px extra content: |
102 |
| - // - 16px icon |
103 |
| - // - 3px padding-left |
104 |
| - spanNameContainerStyle = string.Empty; |
105 |
| - } |
| 98 | + else |
| 99 | + { |
| 100 | + // Span with icon has 19px extra content: |
| 101 | + // - 16px icon |
| 102 | + // - 3px padding-left |
| 103 | + spanNameContainerStyle = string.Empty; |
106 | 104 | }
|
| 105 | + } |
107 | 106 |
|
108 |
| - <span style="margin-left: @(marginLeft)px;"> |
109 |
| - <span class="span-collapse-symbol"> |
110 |
| - @if (context.Children.Count > 0) |
111 |
| - { |
112 |
| - <span @onclick:stopPropagation="true" class="main-grid-expand-container @(context.IsCollapsed ? "main-grid-collapsed" : "main-grid-expanded")"> |
113 |
| - <FluentButton Appearance="Appearance.Stealth" Style="width:20px;height:24px;min-width:20px;vertical-align:middle;" OnClick="@(() => OnToggleCollapse(context))"> |
114 |
| - <FluentIcon Icon="Icons.Regular.Size12.ChevronRight" Color="Color.Neutral" /> |
115 |
| - </FluentButton> |
116 |
| - </span> |
117 |
| - } |
118 |
| - </span> |
119 |
| - <span class="span-name-container" style="@spanNameContainerStyle"> |
120 |
| - @if (isServerOrConsumer) |
121 |
| - { |
122 |
| - <FluentIcon Class="span-kind-icon" |
123 |
| - Color="Color.Custom" |
124 |
| - CustomColor="@ColorGenerator.Instance.GetColorHexByKey(GetResourceName(context.Span.Source))" |
125 |
| - Value="@GetSpanIcon(context.Span)"/> |
126 |
| - } |
| 107 | + <span style="margin-left: @(marginLeft)px;"> |
| 108 | + <span @onclick:stopPropagation="true" class="main-grid-expand-container @(context.IsCollapsed ? "main-grid-collapsed" : "main-grid-expanded")"> |
| 109 | + @if (context.Children.Count > 0) |
| 110 | + { |
| 111 | + <FluentButton Appearance="Appearance.Stealth" Class="main-grid-expand-button" OnClick="@(() => OnToggleCollapse(context))"> |
| 112 | + <FluentIcon Icon="Icons.Regular.Size12.ChevronRight" Color="Color.Neutral" /> |
| 113 | + </FluentButton> |
| 114 | + } |
| 115 | + </span> |
| 116 | + <span class="span-name-container" style="@spanNameContainerStyle"> |
| 117 | + @if (isServerOrConsumer) |
| 118 | + { |
| 119 | + <FluentIcon Class="span-kind-icon" |
| 120 | + Color="Color.Custom" |
| 121 | + CustomColor="@ColorGenerator.Instance.GetColorHexByKey(GetResourceName(context.Span.Source))" |
| 122 | + Value="@GetSpanIcon(context.Span)"/> |
| 123 | + } |
127 | 124 |
|
128 |
| - @if (context.IsError) |
129 |
| - { |
130 |
| - <FluentIcon Icon="Icons.Filled.Size12.ErrorCircle" Color="Color.Error" Class="trace-tag-icon"/> |
131 |
| - } |
132 |
| - @GetResourceName(context.Span.Source) |
133 |
| - @if (context.HasUninstrumentedPeer) |
134 |
| - { |
135 |
| - <span class="uninstrumented-peer"> |
136 |
| - @{ |
137 |
| - Icon icon; |
138 |
| - if (context.Span.Attributes.HasKey("db.system")) |
139 |
| - { |
140 |
| - icon = new Icons.Filled.Size16.Database(); |
141 |
| - } |
142 |
| - else if (context.Span.Attributes.HasKey("messaging.system")) |
143 |
| - { |
144 |
| - icon = new Icons.Filled.Size16.Mail(); |
145 |
| - } |
146 |
| - else |
147 |
| - { |
148 |
| - // Everything else. |
149 |
| - icon = new Icons.Filled.Size16.ArrowCircleRight(); |
150 |
| - } |
| 125 | + @if (context.IsError) |
| 126 | + { |
| 127 | + <FluentIcon Icon="Icons.Filled.Size12.ErrorCircle" Color="Color.Error" Class="trace-tag-icon"/> |
| 128 | + } |
| 129 | + @GetResourceName(context.Span.Source) |
| 130 | + @if (context.HasUninstrumentedPeer) |
| 131 | + { |
| 132 | + <span class="uninstrumented-peer"> |
| 133 | + @{ |
| 134 | + Icon icon; |
| 135 | + if (context.Span.Attributes.HasKey("db.system")) |
| 136 | + { |
| 137 | + icon = new Icons.Filled.Size16.Database(); |
151 | 138 | }
|
152 |
| - <FluentIcon |
153 |
| - Style="@($"fill: {ColorGenerator.Instance.GetColorHexByKey(context.UninstrumentedPeer)};")" |
154 |
| - Value="icon" |
155 |
| - Class="uninstrumented-peer-icon"/> |
156 |
| - @context.UninstrumentedPeer |
157 |
| - </span> |
158 |
| - } |
159 |
| - <span class="span-row-name">@SpanWaterfallViewModel.GetDisplaySummary(context.Span)</span> |
160 |
| - </span> |
| 139 | + else if (context.Span.Attributes.HasKey("messaging.system")) |
| 140 | + { |
| 141 | + icon = new Icons.Filled.Size16.Mail(); |
| 142 | + } |
| 143 | + else |
| 144 | + { |
| 145 | + // Everything else. |
| 146 | + icon = new Icons.Filled.Size16.ArrowCircleRight(); |
| 147 | + } |
| 148 | + } |
| 149 | + <FluentIcon |
| 150 | + Style="@($"fill: {ColorGenerator.Instance.GetColorHexByKey(context.UninstrumentedPeer)};")" |
| 151 | + Value="icon" |
| 152 | + Class="uninstrumented-peer-icon"/> |
| 153 | + @context.UninstrumentedPeer |
| 154 | + </span> |
| 155 | + } |
| 156 | + <span class="span-row-name">@SpanWaterfallViewModel.GetDisplaySummary(context.Span)</span> |
161 | 157 | </span>
|
162 |
| - </div> |
| 158 | + </span> |
163 | 159 | </AspireTemplateColumn>
|
164 | 160 | <AspireTemplateColumn ColumnId="@TicksColumn" ColumnManager="@_manager" UseCustomHeaderTemplate="false">
|
165 | 161 | <HeaderCellItemTemplate>
|
|
0 commit comments