@perses-dev/tracing-gantt-chart-plugin 0.12.0 → 0.13.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/__mf/css/async/558.85c2cbf6.css +1 -0
  2. package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
  3. package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
  4. package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
  5. package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
  6. package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
  7. package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
  8. package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
  9. package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
  10. package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
  11. package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
  12. package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
  13. package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
  14. package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
  15. package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
  16. package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
  17. package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
  18. package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
  19. package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
  20. package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
  21. package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
  22. package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
  23. package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
  24. package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
  25. package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
  26. package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
  27. package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
  28. package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
  29. package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
  30. package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
  31. package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
  32. package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
  33. package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
  34. package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
  35. package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
  36. package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
  37. package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
  38. package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
  39. package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
  40. package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
  41. package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
  42. package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
  43. package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
  44. package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
  45. package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
  46. package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
  47. package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
  48. package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
  49. package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
  50. package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
  51. package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
  52. package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
  53. package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
  54. package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
  55. package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
  56. package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
  57. package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
  58. package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
  59. package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
  60. package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
  61. package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
  62. package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
  63. package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
  64. package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
  65. package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
  66. package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
  67. package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
  68. package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
  69. package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
  70. package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
  71. package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
  72. package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
  73. package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
  74. package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
  75. package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
  76. package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
  77. package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
  78. package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
  79. package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
  80. package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
  81. package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
  82. package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
  83. package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
  84. package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
  85. package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
  86. package/__mf/js/TracingGanttChart.a69ad65c.js +7 -0
  87. package/__mf/js/async/121.5475779f.js +2 -0
  88. package/__mf/js/async/177.50257b88.js +1 -0
  89. package/__mf/js/async/192.a0a2e63b.js +1 -0
  90. package/__mf/js/async/2.d2c2e5a6.js +1 -0
  91. package/__mf/js/async/207.dcd0ae82.js +110 -0
  92. package/__mf/js/async/{666.4cf9c453.js.LICENSE.txt → 207.dcd0ae82.js.LICENSE.txt} +1 -1
  93. package/__mf/js/async/235.b42801b1.js +1 -0
  94. package/__mf/js/async/274.5c518455.js +2 -0
  95. package/__mf/js/async/356.fc2da489.js +1 -0
  96. package/__mf/js/async/366.0baba713.js +24 -0
  97. package/__mf/js/async/{648.490fd7f4.js.LICENSE.txt → 366.0baba713.js.LICENSE.txt} +1 -1
  98. package/__mf/js/async/392.6c066266.js +2 -0
  99. package/__mf/js/async/43.e395f769.js +2 -0
  100. package/__mf/js/async/470.4e137e17.js +2 -0
  101. package/__mf/js/async/472.8aa138b3.js +1 -0
  102. package/__mf/js/async/558.c4505dfb.js +7 -0
  103. package/__mf/js/async/{716.0d0974df.js.LICENSE.txt → 558.c4505dfb.js.LICENSE.txt} +19 -1
  104. package/__mf/js/async/581.530a1cbc.js +1 -0
  105. package/__mf/js/async/587.dbc05176.js +1 -0
  106. package/__mf/js/async/588.f5afdb25.js +1 -0
  107. package/__mf/js/async/616.268fac9b.js +1 -0
  108. package/__mf/js/async/71.79ef5248.js +1 -0
  109. package/__mf/js/async/729.b8d22843.js +39 -0
  110. package/__mf/js/async/873.76af63d7.js +1 -0
  111. package/__mf/js/async/895.7c3edbda.js +1 -0
  112. package/__mf/js/async/941.70c6480d.js +2 -0
  113. package/__mf/js/async/968.68803274.js +1 -0
  114. package/__mf/js/async/978.ca0b1b55.js +1 -0
  115. package/__mf/js/async/__federation_expose_TracingGanttChart.2f3100da.js +1 -0
  116. package/__mf/js/async/lib-router.69a7062a.js +2 -0
  117. package/__mf/js/main.62d36e4e.js +7 -0
  118. package/lib/PanelActions.d.ts +2 -1
  119. package/lib/PanelActions.d.ts.map +1 -1
  120. package/lib/PanelActions.js.map +1 -1
  121. package/lib/TracingGanttChart/DetailPane/Attributes.d.ts +2 -1
  122. package/lib/TracingGanttChart/DetailPane/Attributes.d.ts.map +1 -1
  123. package/lib/TracingGanttChart/DetailPane/Attributes.js +45 -8
  124. package/lib/TracingGanttChart/DetailPane/Attributes.js.map +1 -1
  125. package/lib/TracingGanttChart/DetailPane/SpanEvents.js.map +1 -1
  126. package/lib/TracingGanttChart/GanttTable/GanttTable.d.ts +2 -0
  127. package/lib/TracingGanttChart/GanttTable/GanttTable.d.ts.map +1 -1
  128. package/lib/TracingGanttChart/GanttTable/GanttTable.js +64 -25
  129. package/lib/TracingGanttChart/GanttTable/GanttTable.js.map +1 -1
  130. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.d.ts +2 -2
  131. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.d.ts.map +1 -1
  132. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js +1 -1
  133. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js.map +1 -1
  134. package/lib/TracingGanttChart/GanttTable/GanttTableRow.d.ts +5 -0
  135. package/lib/TracingGanttChart/GanttTable/GanttTableRow.d.ts.map +1 -1
  136. package/lib/TracingGanttChart/GanttTable/GanttTableRow.js +14 -2
  137. package/lib/TracingGanttChart/GanttTable/GanttTableRow.js.map +1 -1
  138. package/lib/TracingGanttChart/GanttTable/ResizableDivider.d.ts.map +1 -1
  139. package/lib/TracingGanttChart/GanttTable/ResizableDivider.js +6 -2
  140. package/lib/TracingGanttChart/GanttTable/ResizableDivider.js.map +1 -1
  141. package/lib/TracingGanttChart/GanttTable/SpanIndents.d.ts.map +1 -1
  142. package/lib/TracingGanttChart/GanttTable/SpanIndents.js +10 -10
  143. package/lib/TracingGanttChart/GanttTable/SpanIndents.js.map +1 -1
  144. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.d.ts +2 -1
  145. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.d.ts.map +1 -1
  146. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.js +1 -1
  147. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.js.map +1 -1
  148. package/lib/TracingGanttChart/MiniGanttChart/draw.d.ts.map +1 -1
  149. package/lib/TracingGanttChart/MiniGanttChart/draw.js +2 -6
  150. package/lib/TracingGanttChart/MiniGanttChart/draw.js.map +1 -1
  151. package/lib/TracingGanttChart/Search.d.ts +15 -0
  152. package/lib/TracingGanttChart/Search.d.ts.map +1 -0
  153. package/lib/TracingGanttChart/Search.js +133 -0
  154. package/lib/TracingGanttChart/Search.js.map +1 -0
  155. package/lib/TracingGanttChart/TraceHeaderBar.d.ts +9 -0
  156. package/lib/TracingGanttChart/TraceHeaderBar.d.ts.map +1 -0
  157. package/lib/TracingGanttChart/TraceHeaderBar.js +126 -0
  158. package/lib/TracingGanttChart/TraceHeaderBar.js.map +1 -0
  159. package/lib/TracingGanttChart/TracingGanttChart.d.ts.map +1 -1
  160. package/lib/TracingGanttChart/TracingGanttChart.js +14 -8
  161. package/lib/TracingGanttChart/TracingGanttChart.js.map +1 -1
  162. package/lib/TracingGanttChart/trace.d.ts +5 -0
  163. package/lib/TracingGanttChart/trace.d.ts.map +1 -1
  164. package/lib/TracingGanttChart/trace.js +10 -0
  165. package/lib/TracingGanttChart/trace.js.map +1 -1
  166. package/lib/cjs/TracingGanttChart/DetailPane/Attributes.js +47 -7
  167. package/lib/cjs/TracingGanttChart/GanttTable/GanttTable.js +63 -24
  168. package/lib/cjs/TracingGanttChart/GanttTable/GanttTableProvider.js +1 -1
  169. package/lib/cjs/TracingGanttChart/GanttTable/GanttTableRow.js +14 -2
  170. package/lib/cjs/TracingGanttChart/GanttTable/ResizableDivider.js +6 -2
  171. package/lib/cjs/TracingGanttChart/GanttTable/SpanIndents.js +10 -10
  172. package/lib/cjs/TracingGanttChart/GanttTable/SpanLinksButton.js +1 -1
  173. package/lib/cjs/TracingGanttChart/MiniGanttChart/draw.js +2 -6
  174. package/lib/cjs/TracingGanttChart/Search.js +154 -0
  175. package/lib/cjs/TracingGanttChart/TraceHeaderBar.js +139 -0
  176. package/lib/cjs/TracingGanttChart/TracingGanttChart.js +13 -7
  177. package/lib/cjs/TracingGanttChart/trace.js +18 -3
  178. package/mf-manifest.json +61 -50
  179. package/mf-stats.json +72 -50
  180. package/package.json +6 -5
  181. package/__mf/css/async/442.d3010b86.css +0 -1
  182. package/__mf/css/async/61.d3010b86.css +0 -1
  183. package/__mf/css/async/823.d3010b86.css +0 -1
  184. package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
  185. package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
  186. package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
  187. package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
  188. package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
  189. package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
  190. package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
  191. package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
  192. package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
  193. package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
  194. package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
  195. package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
  196. package/__mf/js/TracingGanttChart.3fc3e41c.js +0 -6
  197. package/__mf/js/async/121.cb300887.js +0 -2
  198. package/__mf/js/async/157.77f5f5a1.js +0 -39
  199. package/__mf/js/async/177.cf9df204.js +0 -1
  200. package/__mf/js/async/192.f723a636.js +0 -1
  201. package/__mf/js/async/2.e3ce4ee4.js +0 -1
  202. package/__mf/js/async/235.806ca841.js +0 -1
  203. package/__mf/js/async/274.457dda65.js +0 -2
  204. package/__mf/js/async/356.7ea3eee9.js +0 -1
  205. package/__mf/js/async/392.c563796d.js +0 -2
  206. package/__mf/js/async/43.55c495e3.js +0 -2
  207. package/__mf/js/async/439.63c7b180.js +0 -1
  208. package/__mf/js/async/470.f5dfd429.js +0 -2
  209. package/__mf/js/async/587.3a4d8eed.js +0 -1
  210. package/__mf/js/async/588.a1fce2da.js +0 -1
  211. package/__mf/js/async/616.25399954.js +0 -1
  212. package/__mf/js/async/648.490fd7f4.js +0 -22
  213. package/__mf/js/async/666.4cf9c453.js +0 -110
  214. package/__mf/js/async/71.ec1919d7.js +0 -1
  215. package/__mf/js/async/716.0d0974df.js +0 -7
  216. package/__mf/js/async/751.b7c40fc8.js +0 -1
  217. package/__mf/js/async/873.0f298220.js +0 -1
  218. package/__mf/js/async/895.eb528fc2.js +0 -1
  219. package/__mf/js/async/941.065a3eec.js +0 -2
  220. package/__mf/js/async/968.5f7ccf5e.js +0 -1
  221. package/__mf/js/async/978.151ab551.js +0 -1
  222. package/__mf/js/async/__federation_expose_TracingGanttChart.f8e58924.js +0 -1
  223. package/__mf/js/async/lib-router.aed93ee9.js +0 -2
  224. package/__mf/js/main.0a854251.js +0 -6
  225. package/lib/TracingGanttChart/TraceDetails.d.ts +0 -7
  226. package/lib/TracingGanttChart/TraceDetails.d.ts.map +0 -1
  227. package/lib/TracingGanttChart/TraceDetails.js +0 -90
  228. package/lib/TracingGanttChart/TraceDetails.js.map +0 -1
  229. package/lib/cjs/TracingGanttChart/TraceDetails.js +0 -98
  230. /package/__mf/js/async/{121.cb300887.js.LICENSE.txt → 121.5475779f.js.LICENSE.txt} +0 -0
  231. /package/__mf/js/async/{274.457dda65.js.LICENSE.txt → 274.5c518455.js.LICENSE.txt} +0 -0
  232. /package/__mf/js/async/{392.c563796d.js.LICENSE.txt → 392.6c066266.js.LICENSE.txt} +0 -0
  233. /package/__mf/js/async/{43.55c495e3.js.LICENSE.txt → 43.e395f769.js.LICENSE.txt} +0 -0
  234. /package/__mf/js/async/{470.f5dfd429.js.LICENSE.txt → 470.4e137e17.js.LICENSE.txt} +0 -0
  235. /package/__mf/js/async/{157.77f5f5a1.js.LICENSE.txt → 729.b8d22843.js.LICENSE.txt} +0 -0
  236. /package/__mf/js/async/{941.065a3eec.js.LICENSE.txt → 941.70c6480d.js.LICENSE.txt} +0 -0
  237. /package/__mf/js/async/{lib-router.aed93ee9.js.LICENSE.txt → lib-router.69a7062a.js.LICENSE.txt} +0 -0
@@ -24,34 +24,81 @@ const _jsxruntime = require("react/jsx-runtime");
24
24
  const _reactvirtuoso = require("react-virtuoso");
25
25
  const _react = require("react");
26
26
  const _material = require("@mui/material");
27
+ const _trace = require("../trace");
27
28
  const _GanttTableProvider = require("./GanttTableProvider");
28
29
  const _GanttTableRow = require("./GanttTableRow");
29
30
  const _GanttTableHeader = require("./GanttTableHeader");
30
31
  const _ResizableDivider = require("./ResizableDivider");
31
32
  function GanttTable(props) {
32
- const { options, customLinks, trace, viewport, selectedSpan, onSpanClick } = props;
33
- const { collapsedSpans, setVisibleSpans } = (0, _GanttTableProvider.useGanttTableContext)();
33
+ const { options, customLinks, trace, viewport, selectedSpan, onSpanClick, matchingSpanIds, focusedSpanId } = props;
34
+ const { collapsedSpans, setCollapsedSpans, setVisibleSpans } = (0, _GanttTableProvider.useGanttTableContext)();
34
35
  const [nameColumnWidth, setNameColumnWidth] = (0, _react.useState)(0.25);
35
36
  const tableRef = (0, _react.useRef)(null);
37
+ const virtuosoRef = (0, _react.useRef)(null);
36
38
  const theme = (0, _material.useTheme)();
39
+ // Recursively flatten the span tree to a list of rows, hiding collapsed child spans.
37
40
  const rows = (0, _react.useMemo)(()=>{
38
41
  const rows = [];
39
- for (const rootSpan of trace.rootSpans){
40
- treeToRows(rows, rootSpan, collapsedSpans);
41
- }
42
+ (0, _trace.forEachSpan)(trace.rootSpans, (span)=>{
43
+ rows.push(span);
44
+ if (collapsedSpans.has(span.spanId)) {
45
+ return false;
46
+ }
47
+ });
42
48
  return rows;
43
49
  }, [
44
50
  trace.rootSpans,
45
51
  collapsedSpans
46
52
  ]);
47
- const selectedSpanIndex = (0, _react.useMemo)(()=>{
48
- if (!selectedSpan) return undefined;
49
- for(let i = 0; i < rows.length; i++){
50
- if (rows[i]?.spanId === selectedSpan.spanId) {
51
- return i;
52
- }
53
+ const matchingSpanIdSet = (0, _react.useMemo)(()=>new Set(matchingSpanIds ?? []), [
54
+ matchingSpanIds
55
+ ]);
56
+ // Auto-expand collapsed ancestors when focusing a search match
57
+ (0, _react.useEffect)(()=>{
58
+ if (!focusedSpanId) return;
59
+ const span = trace.spanById.get(focusedSpanId);
60
+ if (!span) return;
61
+ const ancestorIds = new Set();
62
+ let parent = span.parentSpan;
63
+ while(parent){
64
+ ancestorIds.add(parent.spanId);
65
+ parent = parent.parentSpan;
66
+ }
67
+ if (ancestorIds.size > 0) {
68
+ setCollapsedSpans((prev)=>{
69
+ const next = new Set(prev);
70
+ let changed = false;
71
+ for (const id of ancestorIds){
72
+ if (next.delete(id)) changed = true;
73
+ }
74
+ return changed ? next : prev;
75
+ });
53
76
  }
54
- return undefined;
77
+ }, [
78
+ focusedSpanId,
79
+ trace.spanById,
80
+ setCollapsedSpans
81
+ ]);
82
+ // Scroll to focused span when using prev/next buttons in search bar.
83
+ (0, _react.useEffect)(()=>{
84
+ if (!focusedSpanId || !virtuosoRef.current) return;
85
+ const index = rows.findIndex((r)=>r.spanId === focusedSpanId);
86
+ if (index >= 0) {
87
+ virtuosoRef.current.scrollToIndex({
88
+ index,
89
+ align: 'center'
90
+ });
91
+ }
92
+ }, [
93
+ focusedSpanId,
94
+ rows
95
+ ]);
96
+ // Set the top most index in the Virtuoso table to the selected span
97
+ // Required e.g. when navigating from another page.
98
+ const initialTopMostSpanIndex = (0, _react.useMemo)(()=>{
99
+ if (!selectedSpan) return 0;
100
+ const index = rows.findIndex((r)=>r.spanId === selectedSpan.spanId);
101
+ return index >= 0 ? index : 0;
55
102
  }, [
56
103
  rows,
57
104
  selectedSpan
@@ -85,14 +132,17 @@ function GanttTable(props) {
85
132
  divider: divider
86
133
  }),
87
134
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactvirtuoso.Virtuoso, {
135
+ ref: virtuosoRef,
88
136
  data: rows,
89
- initialTopMostItemIndex: selectedSpanIndex ?? 0,
137
+ initialTopMostItemIndex: initialTopMostSpanIndex,
90
138
  itemContent: (_, span)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_GanttTableRow.GanttTableRow, {
91
139
  options: options,
92
140
  customLinks: customLinks,
93
141
  span: span,
94
142
  viewport: viewport,
95
143
  selected: span === selectedSpan,
144
+ matched: matchingSpanIdSet.has(span.spanId),
145
+ focused: span.spanId === focusedSpanId,
96
146
  nameColumnWidth: nameColumnWidth,
97
147
  divider: divider,
98
148
  onClick: onSpanClick
@@ -102,14 +152,3 @@ function GanttTable(props) {
102
152
  ]
103
153
  });
104
154
  }
105
- /**
106
- * treeToRows recursively transforms the span tree to a list of rows and
107
- * hides collapsed child spans.
108
- */ function treeToRows(rows, span, collapsedSpans) {
109
- rows.push(span);
110
- if (!collapsedSpans.includes(span.spanId)) {
111
- for (const child of span.childSpans){
112
- treeToRows(rows, child, collapsedSpans);
113
- }
114
- }
115
- }
@@ -36,7 +36,7 @@ const _react = require("react");
36
36
  const GanttTableContext = /*#__PURE__*/ (0, _react.createContext)(undefined);
37
37
  function GanttTableProvider(props) {
38
38
  const { children } = props;
39
- const [collapsedSpans, setCollapsedSpans] = (0, _react.useState)([]);
39
+ const [collapsedSpans, setCollapsedSpans] = (0, _react.useState)(new Set());
40
40
  const [visibleSpans, setVisibleSpans] = (0, _react.useState)([]);
41
41
  const [hoveredParent, setHoveredParent] = (0, _react.useState)(undefined);
42
42
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(GanttTableContext.Provider, {
@@ -27,16 +27,28 @@ const _utils = require("../utils");
27
27
  const _SpanName = require("./SpanName");
28
28
  const _SpanDuration = require("./SpanDuration");
29
29
  const GanttTableRow = /*#__PURE__*/ (0, _react.memo)(function GanttTableRow(props) {
30
- const { options, customLinks, span, viewport, selected, nameColumnWidth, divider, onClick } = props;
30
+ const { options, customLinks, span, viewport, selected, matched, focused, nameColumnWidth, divider, onClick } = props;
31
31
  const theme = (0, _material.useTheme)();
32
32
  const handleOnClick = ()=>{
33
33
  // ignore event if triggered by selecting text
34
34
  if (document.getSelection()?.type === 'Range') return;
35
35
  onClick(span);
36
36
  };
37
+ let backgroundColor;
38
+ if (selected) {
39
+ backgroundColor = theme.palette.action.focus;
40
+ } else if (focused) {
41
+ backgroundColor = theme.palette.action.selected;
42
+ } else if (matched) {
43
+ backgroundColor = theme.palette.action.hover;
44
+ }
37
45
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(RowContainer, {
38
46
  sx: {
39
- backgroundColor: selected ? theme.palette.action.selected : 'inherit'
47
+ backgroundColor,
48
+ // overwrite hover if background color is set (selected, focused or matched)
49
+ '&:hover': backgroundColor ? {
50
+ backgroundColor
51
+ } : undefined
40
52
  },
41
53
  direction: "row",
42
54
  onClick: handleOnClick,
@@ -35,8 +35,11 @@ function ResizableDivider(props) {
35
35
  // need stable reference for window.removeEventListener() in useEffect() below
36
36
  const handleMouseMove = (0, _pluginsystem.useEvent)((e)=>{
37
37
  if (!parentRef.current) return;
38
- const offsetX = e.clientX - parentRef.current.getBoundingClientRect().left + spacing;
39
- const leftPercent = offsetX / parentRef.current.getBoundingClientRect().width;
38
+ const parentRect = parentRef.current.getBoundingClientRect();
39
+ // The parent can be a flex row, for example: [leftPercent] [gap] [divider] [gap] [1-leftPercent].
40
+ // Without considering spacing, leftPercent would be wrong because it ignores the flex gap between the divider and the element.
41
+ const offsetX = e.clientX - parentRect.left + spacing;
42
+ const leftPercent = offsetX / parentRect.width;
40
43
  if (0.05 <= leftPercent && leftPercent <= 0.95) {
41
44
  onMove(leftPercent);
42
45
  }
@@ -78,6 +81,7 @@ function ResizableDivider(props) {
78
81
  const ResizableDividerBox = (0, _material.styled)(_material.Box)(({ theme })=>({
79
82
  position: 'relative',
80
83
  width: '1px',
84
+ minWidth: '1px',
81
85
  height: '100%',
82
86
  backgroundColor: theme.palette.divider,
83
87
  cursor: 'col-resize',
@@ -39,17 +39,17 @@ function SpanIndents(props) {
39
39
  const theme = (0, _material.useTheme)();
40
40
  const handleToggleClick = (0, _react.useCallback)((e)=>{
41
41
  e.stopPropagation();
42
- if (collapsedSpans.includes(span.spanId)) {
43
- setCollapsedSpans(collapsedSpans.filter((spanId)=>spanId !== span.spanId));
44
- } else {
45
- setCollapsedSpans([
46
- ...collapsedSpans,
47
- span.spanId
48
- ]);
49
- }
42
+ setCollapsedSpans((prev)=>{
43
+ const next = new Set(prev);
44
+ if (next.has(span.spanId)) {
45
+ next.delete(span.spanId);
46
+ } else {
47
+ next.add(span.spanId);
48
+ }
49
+ return next;
50
+ });
50
51
  }, [
51
52
  span,
52
- collapsedSpans,
53
53
  setCollapsedSpans
54
54
  ]);
55
55
  const handleIconMouseEnter = (0, _react.useCallback)(()=>{
@@ -75,7 +75,7 @@ function SpanIndents(props) {
75
75
  },
76
76
  onMouseEnter: ()=>setHoveredParent(span.parentSpanId ?? ''),
77
77
  onMouseLeave: ()=>setHoveredParent(undefined),
78
- children: i === spans.length - 1 && span.childSpans.length > 0 && (collapsedSpans.includes(span.spanId) ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronRight.default, {
78
+ children: i === spans.length - 1 && span.childSpans.length > 0 && (collapsedSpans.has(span.spanId) ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronRight.default, {
79
79
  titleAccess: "expand",
80
80
  onClick: handleToggleClick,
81
81
  onMouseEnter: handleIconMouseEnter
@@ -41,7 +41,7 @@ function SpanLinksButton(props) {
41
41
  return null;
42
42
  }
43
43
  // if there is a single span link, render the button directly without a menu
44
- if (span.links.length == 1 && span.links[0]) {
44
+ if (span.links.length === 1 && span.links[0]) {
45
45
  const link = span.links[0];
46
46
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.InfoTooltip, {
47
47
  description: "open linked span",
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "drawSpans", {
20
20
  return drawSpans;
21
21
  }
22
22
  });
23
+ const _trace = require("../trace");
23
24
  const _utils = require("../utils");
24
25
  const MIN_BAR_HEIGHT = 1;
25
26
  const MAX_BAR_HEIGHT = 7;
@@ -39,11 +40,6 @@ function drawSpans(ctx, width, height, trace, spanColorGenerator) {
39
40
  ctx.rect(Math.round(relativeStart * width), Math.round(y), Math.max(_utils.minSpanWidthPx, Math.round(relativeDuration * width)), barHeight);
40
41
  ctx.fill();
41
42
  y += yChange;
42
- for (const childSpan of span.childSpans){
43
- drawSpan(childSpan);
44
- }
45
43
  };
46
- for (const rootSpan of trace.rootSpans){
47
- drawSpan(rootSpan);
48
- }
44
+ (0, _trace.forEachSpan)(trace.rootSpans, drawSpan);
49
45
  }
@@ -0,0 +1,154 @@
1
+ // Copyright The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
+ });
22
+ }
23
+ _export(exports, {
24
+ get SearchBar () {
25
+ return SearchBar;
26
+ },
27
+ get useSpanSearch () {
28
+ return useSpanSearch;
29
+ }
30
+ });
31
+ const _jsxruntime = require("react/jsx-runtime");
32
+ const _material = require("@mui/material");
33
+ const _ChevronUp = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronUp"));
34
+ const _ChevronDown = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronDown"));
35
+ const _Close = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Close"));
36
+ const _react = require("react");
37
+ const _Attributes = require("./DetailPane/Attributes");
38
+ const _trace = require("./trace");
39
+ function _interop_require_default(obj) {
40
+ return obj && obj.__esModule ? obj : {
41
+ default: obj
42
+ };
43
+ }
44
+ function SearchBar(props) {
45
+ const { search } = props;
46
+ const { searchQuery, setSearchQuery, matchingSpanIds, focusedMatchIndex, setFocusedMatchIndex } = search;
47
+ const hasQuery = searchQuery.length > 0;
48
+ const matchCount = matchingSpanIds.length;
49
+ const hasMatches = matchCount > 0;
50
+ function handlePrev() {
51
+ if (!hasMatches) return;
52
+ setFocusedMatchIndex((focusedMatchIndex - 1 + matchCount) % matchCount);
53
+ }
54
+ function handleNext() {
55
+ if (!hasMatches) return;
56
+ setFocusedMatchIndex((focusedMatchIndex + 1) % matchCount);
57
+ }
58
+ function handleKeyDown(e) {
59
+ if (e.key === 'Enter') {
60
+ e.preventDefault();
61
+ if (e.shiftKey) {
62
+ handlePrev();
63
+ } else {
64
+ handleNext();
65
+ }
66
+ }
67
+ }
68
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
69
+ direction: "row",
70
+ sx: {
71
+ alignItems: 'center',
72
+ gap: 0.5,
73
+ minWidth: 300
74
+ },
75
+ children: [
76
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
77
+ size: "small",
78
+ placeholder: "Search spans...",
79
+ value: searchQuery,
80
+ onChange: (e)=>setSearchQuery(e.target.value),
81
+ onKeyDown: handleKeyDown,
82
+ slotProps: {
83
+ input: {
84
+ endAdornment: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputAdornment, {
85
+ position: "end",
86
+ sx: {
87
+ visibility: hasQuery ? 'visible' : 'hidden',
88
+ whiteSpace: 'nowrap'
89
+ },
90
+ children: hasMatches ? `${focusedMatchIndex + 1}/${matchCount}` : '0/0'
91
+ })
92
+ }
93
+ },
94
+ sx: {
95
+ minWidth: 200
96
+ }
97
+ }),
98
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
99
+ size: "small",
100
+ disabled: !hasMatches,
101
+ "aria-label": "Previous match",
102
+ onClick: handlePrev,
103
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronUp.default, {})
104
+ }),
105
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
106
+ size: "small",
107
+ disabled: !hasMatches,
108
+ "aria-label": "Next match",
109
+ onClick: handleNext,
110
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronDown.default, {})
111
+ }),
112
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
113
+ size: "small",
114
+ disabled: !hasQuery,
115
+ "aria-label": "Clear search",
116
+ onClick: ()=>setSearchQuery(''),
117
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Close.default, {})
118
+ })
119
+ ]
120
+ });
121
+ }
122
+ function spanMatchesQuery(span, query) {
123
+ const attrMatches = (attr)=>attr.key.toLowerCase().includes(query) || (0, _Attributes.renderAttributeValue)(attr.value).toLowerCase().includes(query);
124
+ return span.resource.serviceName?.toLowerCase().includes(query) || span.name.toLowerCase().includes(query) || span.spanId.toLowerCase().includes(query) || span.attributes.some(attrMatches) || span.resource.attributes.some(attrMatches);
125
+ }
126
+ function useSpanSearch(trace) {
127
+ const [searchQuery, setSearchQueryRaw] = (0, _react.useState)('');
128
+ const [focusedMatchIndex, setFocusedMatchIndex] = (0, _react.useState)(0);
129
+ const matchingSpanIds = (0, _react.useMemo)(()=>{
130
+ if (searchQuery.length === 0) return [];
131
+ const query = searchQuery.toLowerCase();
132
+ const matches = [];
133
+ (0, _trace.forEachSpan)(trace.rootSpans, (span)=>{
134
+ if (spanMatchesQuery(span, query)) {
135
+ matches.push(span.spanId);
136
+ }
137
+ });
138
+ return matches;
139
+ }, [
140
+ searchQuery,
141
+ trace.rootSpans
142
+ ]);
143
+ const setSearchQuery = (0, _react.useCallback)((query)=>{
144
+ setSearchQueryRaw(query);
145
+ setFocusedMatchIndex(0);
146
+ }, []);
147
+ return {
148
+ searchQuery,
149
+ setSearchQuery,
150
+ matchingSpanIds,
151
+ focusedMatchIndex,
152
+ setFocusedMatchIndex
153
+ };
154
+ }
@@ -0,0 +1,139 @@
1
+ // Copyright The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "TraceHeaderBar", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return TraceHeaderBar;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _Magnify = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Magnify"));
26
+ const _react = require("react");
27
+ const _components = require("@perses-dev/components");
28
+ const _utils = require("./utils");
29
+ const _Search = require("./Search");
30
+ function _interop_require_default(obj) {
31
+ return obj && obj.__esModule ? obj : {
32
+ default: obj
33
+ };
34
+ }
35
+ const DATE_FORMAT_OPTIONS = {
36
+ year: 'numeric',
37
+ month: 'long',
38
+ day: 'numeric',
39
+ hour: 'numeric',
40
+ minute: 'numeric',
41
+ second: 'numeric',
42
+ fractionalSecondDigits: 3,
43
+ timeZoneName: 'short'
44
+ };
45
+ function TraceHeaderBar(props) {
46
+ const { trace, search } = props;
47
+ const { dateFormatOptionsWithUserTimeZone } = (0, _components.useTimeZone)();
48
+ const dateFormatter = (0, _react.useMemo)(()=>{
49
+ const dateFormatOptions = dateFormatOptionsWithUserTimeZone(DATE_FORMAT_OPTIONS);
50
+ return new Intl.DateTimeFormat(undefined, dateFormatOptions);
51
+ }, [
52
+ dateFormatOptionsWithUserTimeZone
53
+ ]);
54
+ const [showSearch, setShowSearch] = (0, _react.useState)(false);
55
+ const rootSpan = trace.rootSpans[0];
56
+ if (!rootSpan) {
57
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
58
+ children: "Trace contains no spans."
59
+ });
60
+ }
61
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
62
+ direction: "column",
63
+ sx: {
64
+ gap: 1
65
+ },
66
+ children: [
67
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
68
+ direction: "row",
69
+ sx: {
70
+ justifyContent: 'space-between'
71
+ },
72
+ children: [
73
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
74
+ direction: "row",
75
+ sx: {
76
+ gap: 1,
77
+ alignItems: 'center'
78
+ },
79
+ children: [
80
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Typography, {
81
+ variant: "h3",
82
+ children: [
83
+ rootSpan.resource.serviceName,
84
+ ": ",
85
+ rootSpan.name,
86
+ " (",
87
+ (0, _utils.formatDuration)(trace.endTimeUnixMs - trace.startTimeUnixMs),
88
+ ")"
89
+ ]
90
+ }),
91
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
92
+ size: "small",
93
+ onClick: ()=>setShowSearch((prev)=>!prev),
94
+ "aria-label": "Toggle search",
95
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Magnify.default, {
96
+ fontSize: "small"
97
+ })
98
+ })
99
+ ]
100
+ }),
101
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Typography, {
102
+ variant: "h4",
103
+ children: [
104
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Typography, {
105
+ component: "span",
106
+ sx: {
107
+ px: 1
108
+ },
109
+ children: [
110
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("strong", {
111
+ children: "Start:"
112
+ }),
113
+ " ",
114
+ dateFormatter.format(trace.startTimeUnixMs)
115
+ ]
116
+ }),
117
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Typography, {
118
+ component: "span",
119
+ sx: {
120
+ px: 1
121
+ },
122
+ children: [
123
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("strong", {
124
+ children: "Trace ID:"
125
+ }),
126
+ " ",
127
+ rootSpan.traceId
128
+ ]
129
+ })
130
+ ]
131
+ })
132
+ ]
133
+ }),
134
+ showSearch && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Search.SearchBar, {
135
+ search: search
136
+ })
137
+ ]
138
+ });
139
+ }
@@ -29,10 +29,10 @@ const _GanttTable = require("./GanttTable/GanttTable");
29
29
  const _GanttTableProvider = require("./GanttTable/GanttTableProvider");
30
30
  const _ResizableDivider = require("./GanttTable/ResizableDivider");
31
31
  const _trace = require("./trace");
32
- const _TraceDetails = require("./TraceDetails");
32
+ const _TraceHeaderBar = require("./TraceHeaderBar");
33
+ const _Search = require("./Search");
33
34
  function TracingGanttChart(props) {
34
35
  const { options, customLinks, trace: otlpTrace } = props;
35
- const theme = (0, _material.useTheme)();
36
36
  const trace = (0, _react.useMemo)(()=>{
37
37
  try {
38
38
  return (0, _trace.getTraceModel)(otlpTrace);
@@ -47,11 +47,13 @@ function TracingGanttChart(props) {
47
47
  endTimeUnixMs: trace.endTimeUnixMs
48
48
  });
49
49
  const [selectedSpan, setSelectedSpan] = (0, _react.useState)(()=>options.selectedSpanId ? trace.spanById.get(options.selectedSpanId) : undefined);
50
+ const search = (0, _Search.useSpanSearch)(trace);
50
51
  const ganttChart = (0, _react.useRef)(null);
51
52
  // tableWidth only comes to effect if the detail pane is visible.
52
53
  // setTableWidth() is only called by <ResizableDivider />
53
54
  const [tableWidth, setTableWidth] = (0, _react.useState)(0.82);
54
55
  const gap = 2;
56
+ const spacing = ganttChart.current ? parseFloat(getComputedStyle(ganttChart.current).columnGap) || 0 : 0;
55
57
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
56
58
  ref: ganttChart,
57
59
  direction: "row",
@@ -67,8 +69,9 @@ function TracingGanttChart(props) {
67
69
  gap
68
70
  },
69
71
  children: [
70
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_TraceDetails.TraceDetails, {
71
- trace: trace
72
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_TraceHeaderBar.TraceHeaderBar, {
73
+ trace: trace,
74
+ search: search
72
75
  }),
73
76
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_MiniGanttChart.MiniGanttChart, {
74
77
  options: options,
@@ -83,7 +86,9 @@ function TracingGanttChart(props) {
83
86
  trace: trace,
84
87
  viewport: viewport,
85
88
  selectedSpan: selectedSpan,
86
- onSpanClick: setSelectedSpan
89
+ onSpanClick: setSelectedSpan,
90
+ matchingSpanIds: search.matchingSpanIds,
91
+ focusedSpanId: search.matchingSpanIds[search.focusedMatchIndex]
87
92
  })
88
93
  })
89
94
  ]
@@ -92,12 +97,13 @@ function TracingGanttChart(props) {
92
97
  children: [
93
98
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_ResizableDivider.ResizableDivider, {
94
99
  parentRef: ganttChart,
95
- spacing: parseInt(theme.spacing(gap)),
100
+ spacing: spacing,
96
101
  onMove: setTableWidth
97
102
  }),
98
103
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
99
104
  style: {
100
- width: `${(1 - tableWidth) * 100}%`
105
+ width: `${(1 - tableWidth) * 100}%`,
106
+ minWidth: `${(1 - tableWidth) * 100}%`
101
107
  },
102
108
  sx: {
103
109
  overflow: 'auto'
@@ -14,9 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- Object.defineProperty(exports, "getTraceModel", {
18
- enumerable: true,
19
- get: function() {
17
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
+ });
22
+ }
23
+ _export(exports, {
24
+ get forEachSpan () {
25
+ return forEachSpan;
26
+ },
27
+ get getTraceModel () {
20
28
  return getTraceModel;
21
29
  }
22
30
  });
@@ -72,6 +80,13 @@ function getTraceModel(trace) {
72
80
  endTimeUnixMs
73
81
  };
74
82
  }
83
+ function forEachSpan(spans, fn) {
84
+ for (const span of spans){
85
+ if (fn(span) !== false) {
86
+ forEachSpan(span.childSpans, fn);
87
+ }
88
+ }
89
+ }
75
90
  function parseResource(resource) {
76
91
  let serviceName = 'unknown';
77
92
  for (const attr of resource?.attributes ?? []){