@perses-dev/tracing-gantt-chart-plugin 0.13.0 → 0.14.0-beta.2

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 (223) hide show
  1. package/__mf/js/{TracingGanttChart.ca3d72b7.js → TracingGanttChart.4460ff1c.js} +4 -4
  2. package/__mf/js/async/121.5b3411ef.js +2 -0
  3. package/__mf/js/async/192.b0550d58.js +1 -0
  4. package/__mf/js/async/2.2a545358.js +1 -0
  5. package/__mf/js/async/235.831bea3e.js +1 -0
  6. package/__mf/js/async/247.e4d2c197.js +1 -0
  7. package/__mf/js/async/274.eee92e86.js +2 -0
  8. package/__mf/js/async/356.43c6ada2.js +1 -0
  9. package/__mf/js/async/392.a3f49cf0.js +2 -0
  10. package/__mf/js/async/407.6e0c3fb4.js +4 -0
  11. package/__mf/js/async/407.6e0c3fb4.js.LICENSE.txt +9 -0
  12. package/__mf/js/async/43.cbae1eef.js +2 -0
  13. package/__mf/js/async/436.4db73a03.js +110 -0
  14. package/__mf/js/async/470.8d6cfc01.js +2 -0
  15. package/__mf/js/async/496.9a3d3d3d.js +1 -0
  16. package/__mf/js/async/587.849f1255.js +1 -0
  17. package/__mf/js/async/588.39275df8.js +1 -0
  18. package/__mf/js/async/616.4d217c10.js +1 -0
  19. package/__mf/js/async/665.2b61216d.js +2 -0
  20. package/__mf/js/async/672.790df7d1.js +1 -0
  21. package/__mf/js/async/71.4eb8fa2f.js +1 -0
  22. package/__mf/js/async/77.27ff39b8.js +1 -0
  23. package/__mf/js/async/776.f19f62f3.js +43 -0
  24. package/__mf/js/async/{30.991f7ee4.js.LICENSE.txt → 776.f19f62f3.js.LICENSE.txt} +41 -1
  25. package/__mf/js/async/873.a00a9302.js +1 -0
  26. package/__mf/js/async/941.7ee2dbf0.js +2 -0
  27. package/__mf/js/async/968.b61d3c02.js +1 -0
  28. package/__mf/js/async/978.4227a27e.js +1 -0
  29. package/__mf/js/async/__federation_expose_TracingGanttChart.303e7806.js +1 -0
  30. package/__mf/js/async/lib-router.a8607481.js +2 -0
  31. package/__mf/js/{main.9e057781.js → main.7b791d2a.js} +2 -2
  32. package/lib/PanelActions.d.ts +3 -3
  33. package/lib/PanelActions.d.ts.map +1 -1
  34. package/lib/PanelActions.js +4 -4
  35. package/lib/PanelActions.js.map +1 -1
  36. package/lib/TracingGanttChart/DetailPane/Attributes.d.ts +4 -4
  37. package/lib/TracingGanttChart/DetailPane/Attributes.d.ts.map +1 -1
  38. package/lib/TracingGanttChart/DetailPane/Attributes.js +4 -4
  39. package/lib/TracingGanttChart/DetailPane/Attributes.js.map +1 -1
  40. package/lib/TracingGanttChart/DetailPane/DetailPane.d.ts +3 -3
  41. package/lib/TracingGanttChart/DetailPane/DetailPane.d.ts.map +1 -1
  42. package/lib/TracingGanttChart/DetailPane/DetailPane.js +6 -6
  43. package/lib/TracingGanttChart/DetailPane/DetailPane.js.map +1 -1
  44. package/lib/TracingGanttChart/DetailPane/SpanEvents.d.ts +3 -3
  45. package/lib/TracingGanttChart/DetailPane/SpanEvents.d.ts.map +1 -1
  46. package/lib/TracingGanttChart/DetailPane/SpanEvents.js +7 -7
  47. package/lib/TracingGanttChart/DetailPane/SpanEvents.js.map +1 -1
  48. package/lib/TracingGanttChart/DetailPane/SpanLinks.d.ts +3 -3
  49. package/lib/TracingGanttChart/DetailPane/SpanLinks.d.ts.map +1 -1
  50. package/lib/TracingGanttChart/DetailPane/SpanLinks.js +4 -4
  51. package/lib/TracingGanttChart/DetailPane/SpanLinks.js.map +1 -1
  52. package/lib/TracingGanttChart/GanttTable/GanttTable.d.ts +4 -4
  53. package/lib/TracingGanttChart/GanttTable/GanttTable.d.ts.map +1 -1
  54. package/lib/TracingGanttChart/GanttTable/GanttTable.js +8 -8
  55. package/lib/TracingGanttChart/GanttTable/GanttTable.js.map +1 -1
  56. package/lib/TracingGanttChart/GanttTable/GanttTableHeader.d.ts +3 -3
  57. package/lib/TracingGanttChart/GanttTable/GanttTableHeader.d.ts.map +1 -1
  58. package/lib/TracingGanttChart/GanttTable/GanttTableHeader.js +3 -3
  59. package/lib/TracingGanttChart/GanttTable/GanttTableHeader.js.map +1 -1
  60. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.d.ts +1 -1
  61. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.d.ts.map +1 -1
  62. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js +2 -2
  63. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js.map +1 -1
  64. package/lib/TracingGanttChart/GanttTable/GanttTableRow.d.ts +3 -3
  65. package/lib/TracingGanttChart/GanttTable/GanttTableRow.d.ts.map +1 -1
  66. package/lib/TracingGanttChart/GanttTable/GanttTableRow.js +5 -5
  67. package/lib/TracingGanttChart/GanttTable/GanttTableRow.js.map +1 -1
  68. package/lib/TracingGanttChart/GanttTable/ResizableDivider.d.ts +1 -1
  69. package/lib/TracingGanttChart/GanttTable/ResizableDivider.d.ts.map +1 -1
  70. package/lib/TracingGanttChart/GanttTable/ResizableDivider.js +3 -3
  71. package/lib/TracingGanttChart/GanttTable/ResizableDivider.js.map +1 -1
  72. package/lib/TracingGanttChart/GanttTable/SpanDuration.d.ts +4 -4
  73. package/lib/TracingGanttChart/GanttTable/SpanDuration.d.ts.map +1 -1
  74. package/lib/TracingGanttChart/GanttTable/SpanDuration.js +4 -4
  75. package/lib/TracingGanttChart/GanttTable/SpanDuration.js.map +1 -1
  76. package/lib/TracingGanttChart/GanttTable/SpanIndents.d.ts +2 -2
  77. package/lib/TracingGanttChart/GanttTable/SpanIndents.d.ts.map +1 -1
  78. package/lib/TracingGanttChart/GanttTable/SpanIndents.js +5 -5
  79. package/lib/TracingGanttChart/GanttTable/SpanIndents.js.map +1 -1
  80. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.d.ts +3 -3
  81. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.d.ts.map +1 -1
  82. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.js +5 -5
  83. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.js.map +1 -1
  84. package/lib/TracingGanttChart/GanttTable/SpanName.d.ts +3 -3
  85. package/lib/TracingGanttChart/GanttTable/SpanName.d.ts.map +1 -1
  86. package/lib/TracingGanttChart/GanttTable/SpanName.js +5 -5
  87. package/lib/TracingGanttChart/GanttTable/SpanName.js.map +1 -1
  88. package/lib/TracingGanttChart/MiniGanttChart/Canvas.d.ts +4 -4
  89. package/lib/TracingGanttChart/MiniGanttChart/Canvas.d.ts.map +1 -1
  90. package/lib/TracingGanttChart/MiniGanttChart/Canvas.js +8 -8
  91. package/lib/TracingGanttChart/MiniGanttChart/Canvas.js.map +1 -1
  92. package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.d.ts +4 -4
  93. package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.d.ts.map +1 -1
  94. package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.js +4 -4
  95. package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.js.map +1 -1
  96. package/lib/TracingGanttChart/MiniGanttChart/draw.d.ts +1 -1
  97. package/lib/TracingGanttChart/MiniGanttChart/draw.d.ts.map +1 -1
  98. package/lib/TracingGanttChart/MiniGanttChart/draw.js +2 -2
  99. package/lib/TracingGanttChart/MiniGanttChart/draw.js.map +1 -1
  100. package/lib/TracingGanttChart/Search.d.ts +2 -2
  101. package/lib/TracingGanttChart/Search.d.ts.map +1 -1
  102. package/lib/TracingGanttChart/Search.js +7 -7
  103. package/lib/TracingGanttChart/Search.js.map +1 -1
  104. package/lib/TracingGanttChart/Ticks.d.ts +3 -3
  105. package/lib/TracingGanttChart/Ticks.d.ts.map +1 -1
  106. package/lib/TracingGanttChart/Ticks.js +3 -3
  107. package/lib/TracingGanttChart/Ticks.js.map +1 -1
  108. package/lib/TracingGanttChart/TraceHeaderBar.d.ts +3 -3
  109. package/lib/TracingGanttChart/TraceHeaderBar.d.ts.map +1 -1
  110. package/lib/TracingGanttChart/TraceHeaderBar.js +6 -6
  111. package/lib/TracingGanttChart/TraceHeaderBar.js.map +1 -1
  112. package/lib/TracingGanttChart/TracingGanttChart.d.ts +3 -3
  113. package/lib/TracingGanttChart/TracingGanttChart.d.ts.map +1 -1
  114. package/lib/TracingGanttChart/TracingGanttChart.js +13 -11
  115. package/lib/TracingGanttChart/TracingGanttChart.js.map +1 -1
  116. package/lib/TracingGanttChart/palette.js +1 -1
  117. package/lib/TracingGanttChart/palette.js.map +1 -1
  118. package/lib/TracingGanttChart/trace.d.ts +2 -2
  119. package/lib/TracingGanttChart/trace.d.ts.map +1 -1
  120. package/lib/TracingGanttChart/trace.js +1 -1
  121. package/lib/TracingGanttChart/trace.js.map +1 -1
  122. package/lib/TracingGanttChart/utils.d.ts +3 -3
  123. package/lib/TracingGanttChart/utils.d.ts.map +1 -1
  124. package/lib/TracingGanttChart/utils.js +2 -2
  125. package/lib/TracingGanttChart/utils.js.map +1 -1
  126. package/lib/TracingGanttChart.d.ts +3 -3
  127. package/lib/TracingGanttChart.d.ts.map +1 -1
  128. package/lib/TracingGanttChart.js +3 -3
  129. package/lib/TracingGanttChart.js.map +1 -1
  130. package/lib/TracingGanttChartPanel.d.ts +4 -4
  131. package/lib/TracingGanttChartPanel.d.ts.map +1 -1
  132. package/lib/TracingGanttChartPanel.js +4 -4
  133. package/lib/TracingGanttChartPanel.js.map +1 -1
  134. package/lib/bootstrap.js +2 -2
  135. package/lib/getPluginModule.d.ts +1 -1
  136. package/lib/getPluginModule.d.ts.map +1 -1
  137. package/lib/getPluginModule.js +3 -1
  138. package/lib/getPluginModule.js.map +1 -1
  139. package/lib/index-federation.js +1 -1
  140. package/lib/index.js +4 -4
  141. package/lib/index.js.map +1 -1
  142. package/lib/setup-tests.d.ts +1 -1
  143. package/lib/setup-tests.d.ts.map +1 -1
  144. package/lib/setup-tests.js +2 -2
  145. package/lib/setup-tests.js.map +1 -1
  146. package/lib/test/convert/jaeger.d.ts +1 -1
  147. package/lib/test/convert/jaeger.d.ts.map +1 -1
  148. package/lib/test/convert/jaeger.js.map +1 -1
  149. package/mf-manifest.json +35 -34
  150. package/mf-stats.json +35 -34
  151. package/package.json +10 -10
  152. package/__mf/js/async/121.1fc97c57.js +0 -2
  153. package/__mf/js/async/177.27fced63.js +0 -1
  154. package/__mf/js/async/192.ea308602.js +0 -1
  155. package/__mf/js/async/193.6692daa9.js +0 -1
  156. package/__mf/js/async/2.c5f68593.js +0 -1
  157. package/__mf/js/async/235.4f4ad5f0.js +0 -1
  158. package/__mf/js/async/274.03fc3289.js +0 -2
  159. package/__mf/js/async/30.991f7ee4.js +0 -39
  160. package/__mf/js/async/356.2e3c02c9.js +0 -1
  161. package/__mf/js/async/392.eb9b3bb9.js +0 -2
  162. package/__mf/js/async/43.b9d7bc56.js +0 -2
  163. package/__mf/js/async/47.514dc87f.js +0 -1
  164. package/__mf/js/async/470.9743e21d.js +0 -2
  165. package/__mf/js/async/546.b40699cb.js +0 -24
  166. package/__mf/js/async/546.b40699cb.js.LICENSE.txt +0 -19
  167. package/__mf/js/async/570.9d51e826.js +0 -7
  168. package/__mf/js/async/570.9d51e826.js.LICENSE.txt +0 -39
  169. package/__mf/js/async/581.aa52d024.js +0 -1
  170. package/__mf/js/async/587.f49a06d9.js +0 -1
  171. package/__mf/js/async/588.46394f24.js +0 -1
  172. package/__mf/js/async/616.09a93b54.js +0 -1
  173. package/__mf/js/async/71.f0d71a40.js +0 -1
  174. package/__mf/js/async/873.34370b2c.js +0 -1
  175. package/__mf/js/async/887.027eb62b.js +0 -110
  176. package/__mf/js/async/941.3d671d54.js +0 -2
  177. package/__mf/js/async/968.1ac51448.js +0 -1
  178. package/__mf/js/async/978.0c50ecf5.js +0 -1
  179. package/__mf/js/async/__federation_expose_TracingGanttChart.9c074bea.js +0 -1
  180. package/__mf/js/async/lib-router.5f492283.js +0 -2
  181. package/lib/cjs/PanelActions.js +0 -88
  182. package/lib/cjs/TracingGanttChart/DetailPane/Attributes.js +0 -204
  183. package/lib/cjs/TracingGanttChart/DetailPane/DetailPane.js +0 -129
  184. package/lib/cjs/TracingGanttChart/DetailPane/SpanEvents.js +0 -113
  185. package/lib/cjs/TracingGanttChart/DetailPane/SpanLinks.js +0 -72
  186. package/lib/cjs/TracingGanttChart/GanttTable/GanttTable.js +0 -154
  187. package/lib/cjs/TracingGanttChart/GanttTable/GanttTableHeader.js +0 -64
  188. package/lib/cjs/TracingGanttChart/GanttTable/GanttTableProvider.js +0 -60
  189. package/lib/cjs/TracingGanttChart/GanttTable/GanttTableRow.js +0 -77
  190. package/lib/cjs/TracingGanttChart/GanttTable/ResizableDivider.js +0 -98
  191. package/lib/cjs/TracingGanttChart/GanttTable/SpanDuration.js +0 -81
  192. package/lib/cjs/TracingGanttChart/GanttTable/SpanIndents.js +0 -97
  193. package/lib/cjs/TracingGanttChart/GanttTable/SpanLinksButton.js +0 -108
  194. package/lib/cjs/TracingGanttChart/GanttTable/SpanName.js +0 -83
  195. package/lib/cjs/TracingGanttChart/MiniGanttChart/Canvas.js +0 -256
  196. package/lib/cjs/TracingGanttChart/MiniGanttChart/MiniGanttChart.js +0 -59
  197. package/lib/cjs/TracingGanttChart/MiniGanttChart/draw.js +0 -45
  198. package/lib/cjs/TracingGanttChart/Search.js +0 -154
  199. package/lib/cjs/TracingGanttChart/Ticks.js +0 -106
  200. package/lib/cjs/TracingGanttChart/TraceHeaderBar.js +0 -159
  201. package/lib/cjs/TracingGanttChart/TracingGanttChart.js +0 -122
  202. package/lib/cjs/TracingGanttChart/palette.js +0 -83
  203. package/lib/cjs/TracingGanttChart/trace.js +0 -137
  204. package/lib/cjs/TracingGanttChart/utils.js +0 -117
  205. package/lib/cjs/TracingGanttChart.js +0 -37
  206. package/lib/cjs/TracingGanttChartPanel.js +0 -66
  207. package/lib/cjs/bootstrap.js +0 -26
  208. package/lib/cjs/env.d.js +0 -14
  209. package/lib/cjs/gantt-chart-model.js +0 -28
  210. package/lib/cjs/getPluginModule.js +0 -39
  211. package/lib/cjs/index-federation.js +0 -55
  212. package/lib/cjs/index.js +0 -39
  213. package/lib/cjs/setup-tests.js +0 -19
  214. package/lib/cjs/test/convert/jaeger.js +0 -86
  215. /package/__mf/css/async/{570.85c2cbf6.css → 776.85c2cbf6.css} +0 -0
  216. /package/__mf/js/async/{121.1fc97c57.js.LICENSE.txt → 121.5b3411ef.js.LICENSE.txt} +0 -0
  217. /package/__mf/js/async/{274.03fc3289.js.LICENSE.txt → 274.eee92e86.js.LICENSE.txt} +0 -0
  218. /package/__mf/js/async/{392.eb9b3bb9.js.LICENSE.txt → 392.a3f49cf0.js.LICENSE.txt} +0 -0
  219. /package/__mf/js/async/{43.b9d7bc56.js.LICENSE.txt → 43.cbae1eef.js.LICENSE.txt} +0 -0
  220. /package/__mf/js/async/{887.027eb62b.js.LICENSE.txt → 436.4db73a03.js.LICENSE.txt} +0 -0
  221. /package/__mf/js/async/{470.9743e21d.js.LICENSE.txt → 470.8d6cfc01.js.LICENSE.txt} +0 -0
  222. /package/__mf/js/async/{941.3d671d54.js.LICENSE.txt → 941.7ee2dbf0.js.LICENSE.txt} +0 -0
  223. /package/__mf/js/async/{lib-router.5f492283.js.LICENSE.txt → lib-router.a8607481.js.LICENSE.txt} +0 -0
@@ -1,98 +0,0 @@
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, "ResizableDivider", {
18
- enumerable: true,
19
- get: function() {
20
- return ResizableDivider;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _react = require("react");
25
- const _material = require("@mui/material");
26
- const _pluginsystem = require("@perses-dev/plugin-system");
27
- function ResizableDivider(props) {
28
- const { parentRef, spacing = 0, onMove } = props;
29
- const [isResizing, setResizing] = (0, _react.useState)(false);
30
- const handleMouseDown = (e)=>{
31
- // disable any default actions (text selection, etc.)
32
- e.preventDefault();
33
- setResizing(true);
34
- };
35
- // need stable reference for window.removeEventListener() in useEffect() below
36
- const handleMouseMove = (0, _pluginsystem.useEvent)((e)=>{
37
- if (!parentRef.current) return;
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;
43
- if (0.05 <= leftPercent && leftPercent <= 0.95) {
44
- onMove(leftPercent);
45
- }
46
- });
47
- // need stable reference for window.removeEventListener() in useEffect() below
48
- const handleMouseUp = (0, _pluginsystem.useEvent)(()=>{
49
- setResizing(false);
50
- });
51
- // capture mouseMove and mouseUp outside the element by attaching them to the window object
52
- (0, _react.useEffect)(()=>{
53
- function startMouseAction() {
54
- window.addEventListener('mousemove', handleMouseMove);
55
- window.addEventListener('mouseup', handleMouseUp);
56
- document.body.style.cursor = 'col-resize';
57
- }
58
- function stopMouseAction() {
59
- window.removeEventListener('mousemove', handleMouseMove);
60
- window.removeEventListener('mouseup', handleMouseUp);
61
- document.body.style.cursor = 'inherit';
62
- }
63
- if (isResizing) {
64
- startMouseAction();
65
- } else {
66
- stopMouseAction();
67
- }
68
- return stopMouseAction;
69
- }, [
70
- isResizing,
71
- handleMouseMove,
72
- handleMouseUp
73
- ]);
74
- // prevent onClick event when clicking on a divider
75
- const stopEventPropagation = (e)=>e.stopPropagation();
76
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(ResizableDividerBox, {
77
- onMouseDown: handleMouseDown,
78
- onClick: stopEventPropagation
79
- });
80
- }
81
- const ResizableDividerBox = (0, _material.styled)(_material.Box)(({ theme })=>({
82
- position: 'relative',
83
- width: '1px',
84
- minWidth: '1px',
85
- height: '100%',
86
- backgroundColor: theme.palette.divider,
87
- cursor: 'col-resize',
88
- // increase clickable area from 1px to 7px
89
- '&:before': {
90
- position: 'absolute',
91
- width: '7px',
92
- left: '-3px',
93
- top: 0,
94
- bottom: 0,
95
- content: '" "',
96
- zIndex: 1
97
- }
98
- }));
@@ -1,81 +0,0 @@
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, "SpanDuration", {
18
- enumerable: true,
19
- get: function() {
20
- return SpanDuration;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _material = require("@mui/material");
25
- const _components = require("@perses-dev/components");
26
- const _utils = require("../utils");
27
- const _Ticks = require("../Ticks");
28
- function SpanDuration(props) {
29
- const { options, span, viewport } = props;
30
- const muiTheme = (0, _material.useTheme)();
31
- const chartsTheme = (0, _components.useChartsTheme)();
32
- const spanDuration = span.endTimeUnixMs - span.startTimeUnixMs;
33
- const viewportDuration = viewport.endTimeUnixMs - viewport.startTimeUnixMs;
34
- const relativeDuration = spanDuration / viewportDuration;
35
- const relativeStart = (span.startTimeUnixMs - viewport.startTimeUnixMs) / viewportDuration;
36
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
37
- sx: {
38
- position: 'relative',
39
- height: '100%',
40
- flexGrow: 1,
41
- overflow: 'hidden'
42
- },
43
- children: [
44
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_Ticks.Ticks, {}),
45
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
46
- "data-testid": "span-duration-bar",
47
- sx: {
48
- position: 'absolute',
49
- top: 0,
50
- bottom: 0,
51
- margin: 'auto',
52
- minWidth: `${_utils.minSpanWidthPx}px`,
53
- height: '8px',
54
- borderRadius: muiTheme.shape.borderRadius
55
- },
56
- style: {
57
- left: `${relativeStart * 100}%`,
58
- width: `${relativeDuration * 100}%`,
59
- backgroundColor: (0, _utils.getSpanColor)(muiTheme, chartsTheme, options.visual?.palette?.mode, span)
60
- }
61
- }),
62
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
63
- sx: {
64
- position: 'absolute',
65
- top: '50%',
66
- transform: 'translateY(-50%)',
67
- padding: '0 8px',
68
- color: muiTheme.palette.grey[700],
69
- fontSize: '.7rem'
70
- },
71
- style: /* print span duration on right side of the span bar, if there is space */ relativeStart + relativeDuration < 0.95 ? {
72
- left: `${(relativeStart + relativeDuration) * 100}%`
73
- } : {
74
- left: `${relativeStart * 100}%`,
75
- transform: 'translateY(-50%) translateX(-100%)'
76
- },
77
- children: (0, _utils.formatDuration)(spanDuration)
78
- })
79
- ]
80
- });
81
- }
@@ -1,97 +0,0 @@
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, "SpanIndents", {
18
- enumerable: true,
19
- get: function() {
20
- return SpanIndents;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _material = require("@mui/material");
25
- const _ChevronDown = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronDown"));
26
- const _ChevronRight = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronRight"));
27
- const _react = require("react");
28
- const _GanttTableProvider = require("./GanttTableProvider");
29
- function _interop_require_default(obj) {
30
- return obj && obj.__esModule ? obj : {
31
- default: obj
32
- };
33
- }
34
- const MIN_INDENT_WIDTH = 8;
35
- const MAX_INDENT_WIDTH = 24;
36
- function SpanIndents(props) {
37
- const { span } = props;
38
- const { collapsedSpans, setCollapsedSpans, visibleSpans, hoveredParent, setHoveredParent } = (0, _GanttTableProvider.useGanttTableContext)();
39
- const theme = (0, _material.useTheme)();
40
- const handleToggleClick = (0, _react.useCallback)((e)=>{
41
- e.stopPropagation();
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
- });
51
- }, [
52
- span,
53
- setCollapsedSpans
54
- ]);
55
- const handleIconMouseEnter = (0, _react.useCallback)(()=>{
56
- setHoveredParent(span.spanId);
57
- }, [
58
- span,
59
- setHoveredParent
60
- ]);
61
- const spans = [
62
- span
63
- ];
64
- let parent = span.parentSpan;
65
- while(parent){
66
- spans.unshift(parent);
67
- parent = parent.parentSpan;
68
- }
69
- // on first render visibleSpans is empty, therefore let's use MAX_INDENT_WIDTH to avoid an animation on page load.
70
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
71
- children: spans.map((span, i)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(SpanIndentBox, {
72
- style: {
73
- width: i === spans.length - 1 || visibleSpans.length === 0 || visibleSpans.includes(span.spanId) ? MAX_INDENT_WIDTH : MIN_INDENT_WIDTH,
74
- borderLeft: `${hoveredParent === (span.parentSpanId ?? '') ? 3 : 1}px solid ${theme.palette.divider}`
75
- },
76
- onMouseEnter: ()=>setHoveredParent(span.parentSpanId ?? ''),
77
- onMouseLeave: ()=>setHoveredParent(undefined),
78
- children: i === spans.length - 1 && span.childSpans.length > 0 && (collapsedSpans.has(span.spanId) ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronRight.default, {
79
- titleAccess: "expand",
80
- onClick: handleToggleClick,
81
- onMouseEnter: handleIconMouseEnter
82
- }) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronDown.default, {
83
- titleAccess: "collapse",
84
- onClick: handleToggleClick,
85
- onMouseEnter: handleIconMouseEnter
86
- }))
87
- }, span.spanId))
88
- });
89
- }
90
- const SpanIndentBox = (0, _material.styled)('div')({
91
- display: 'flex',
92
- height: '100%',
93
- alignItems: 'center',
94
- justifyContent: 'flex-end',
95
- flexShrink: 0,
96
- transition: 'width 1s'
97
- });
@@ -1,108 +0,0 @@
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, "SpanLinksButton", {
18
- enumerable: true,
19
- get: function() {
20
- return SpanLinksButton;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _material = require("@mui/material");
25
- const _react = require("react");
26
- const _Launch = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Launch"));
27
- const _components = require("@perses-dev/components");
28
- const _pluginsystem = require("@perses-dev/plugin-system");
29
- function _interop_require_default(obj) {
30
- return obj && obj.__esModule ? obj : {
31
- default: obj
32
- };
33
- }
34
- function SpanLinksButton(props) {
35
- const { customLinks, span } = props;
36
- const variableValues = (0, _pluginsystem.useAllVariableValues)();
37
- const { RouterComponent } = (0, _pluginsystem.useRouterContext)();
38
- const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
39
- const isOpen = Boolean(anchorEl);
40
- if (!RouterComponent || !customLinks.links.span) {
41
- return null;
42
- }
43
- // if there is a single span link, render the button directly without a menu
44
- if (span.links.length === 1 && span.links[0]) {
45
- const link = span.links[0];
46
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.InfoTooltip, {
47
- description: "open linked span",
48
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
49
- size: "small",
50
- component: RouterComponent,
51
- to: (0, _pluginsystem.replaceVariablesInString)(customLinks.links.span, variableValues, {
52
- ...customLinks.variables,
53
- traceId: link.traceId,
54
- spanId: link.spanId
55
- }),
56
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Launch.default, {
57
- fontSize: "inherit"
58
- })
59
- })
60
- });
61
- }
62
- const handleOpenMenu = (event)=>{
63
- // do not propagate onClick event to the table row (otherwise, the detail pane would open)
64
- event.stopPropagation();
65
- setAnchorEl(event.currentTarget);
66
- };
67
- const handleClose = (event)=>{
68
- // Closing the menu, i.e. clicking on the fullscreen transparent MUI backdrop element, does trigger a click on the table row (which opens the detail pane).
69
- // Therefore, stop propagating this event
70
- event.stopPropagation();
71
- setAnchorEl(null);
72
- };
73
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
74
- children: [
75
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.InfoTooltip, {
76
- description: `${span.links.length} linked spans`,
77
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
78
- "aria-label": "span links",
79
- "aria-haspopup": "true",
80
- "aria-expanded": isOpen ? 'true' : undefined,
81
- size: "small",
82
- onClick: handleOpenMenu,
83
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Launch.default, {
84
- fontSize: "inherit"
85
- })
86
- })
87
- }),
88
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
89
- anchorEl: anchorEl,
90
- open: isOpen,
91
- onClose: handleClose,
92
- children: span.links.map((link)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.MenuItem, {
93
- component: RouterComponent,
94
- onClick: handleClose,
95
- to: (0, _pluginsystem.replaceVariablesInString)(customLinks.links.span, variableValues, {
96
- ...customLinks.variables,
97
- traceId: link.traceId,
98
- spanId: link.spanId
99
- }),
100
- children: [
101
- "Open linked span ",
102
- link.spanId
103
- ]
104
- }, link.spanId))
105
- })
106
- ]
107
- });
108
- }
@@ -1,83 +0,0 @@
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, "SpanName", {
18
- enumerable: true,
19
- get: function() {
20
- return SpanName;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _material = require("@mui/material");
25
- const _AlertCircleOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/AlertCircleOutline"));
26
- const _utils = require("../utils");
27
- const _SpanIndents = require("./SpanIndents");
28
- const _SpanLinksButton = require("./SpanLinksButton");
29
- function _interop_require_default(obj) {
30
- return obj && obj.__esModule ? obj : {
31
- default: obj
32
- };
33
- }
34
- function SpanName(props) {
35
- const { customLinks, span, nameColumnWidth } = props;
36
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
37
- direction: "row",
38
- sx: {
39
- alignItems: 'center'
40
- },
41
- style: {
42
- width: `${nameColumnWidth * 100}%`
43
- },
44
- children: [
45
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_SpanIndents.SpanIndents, {
46
- span: span
47
- }),
48
- (0, _utils.spanHasError)(span) && /*#__PURE__*/ (0, _jsxruntime.jsx)(_AlertCircleOutline.default, {
49
- titleAccess: "error",
50
- color: "error",
51
- sx: {
52
- marginRight: '5px'
53
- }
54
- }),
55
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
56
- sx: {
57
- whiteSpace: 'nowrap',
58
- overflow: 'hidden'
59
- },
60
- children: [
61
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("strong", {
62
- children: [
63
- span.resource.serviceName,
64
- ":"
65
- ]
66
- }),
67
- " ",
68
- span.name
69
- ]
70
- }),
71
- customLinks && customLinks.links.span && span.links.length > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
72
- sx: {
73
- marginLeft: 'auto',
74
- px: 1
75
- },
76
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_SpanLinksButton.SpanLinksButton, {
77
- customLinks: customLinks,
78
- span: span
79
- })
80
- })
81
- ]
82
- });
83
- }