@perses-dev/tracing-gantt-chart-plugin 0.12.0-beta.0 → 0.12.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 (132) hide show
  1. package/__mf/js/{TracingGanttChart.f1ef6924.js → TracingGanttChart.3fc3e41c.js} +3 -3
  2. package/__mf/js/async/{754.2f82ce32.js → 157.77f5f5a1.js} +7 -7
  3. package/__mf/js/async/392.c563796d.js +2 -0
  4. package/__mf/js/async/439.63c7b180.js +1 -0
  5. package/__mf/js/async/648.490fd7f4.js +22 -0
  6. package/__mf/js/async/666.4cf9c453.js +110 -0
  7. package/__mf/js/async/716.0d0974df.js +7 -0
  8. package/__mf/js/async/751.b7c40fc8.js +1 -0
  9. package/__mf/js/async/895.eb528fc2.js +1 -0
  10. package/__mf/js/async/{__federation_expose_TracingGanttChart.eeb93a1d.js → __federation_expose_TracingGanttChart.f8e58924.js} +1 -1
  11. package/__mf/js/async/lib-router.aed93ee9.js +2 -0
  12. package/__mf/js/async/{lib-router.1f330b2a.js.LICENSE.txt → lib-router.aed93ee9.js.LICENSE.txt} +3 -3
  13. package/__mf/js/{main.e0f131ec.js → main.0a854251.js} +3 -3
  14. package/lib/PanelActions.js +1 -1
  15. package/lib/PanelActions.js.map +1 -1
  16. package/lib/TracingGanttChart/DetailPane/Attributes.js +1 -1
  17. package/lib/TracingGanttChart/DetailPane/Attributes.js.map +1 -1
  18. package/lib/TracingGanttChart/DetailPane/DetailPane.js +1 -1
  19. package/lib/TracingGanttChart/DetailPane/DetailPane.js.map +1 -1
  20. package/lib/TracingGanttChart/DetailPane/SpanEvents.js +1 -1
  21. package/lib/TracingGanttChart/DetailPane/SpanEvents.js.map +1 -1
  22. package/lib/TracingGanttChart/DetailPane/SpanLinks.js +1 -1
  23. package/lib/TracingGanttChart/DetailPane/SpanLinks.js.map +1 -1
  24. package/lib/TracingGanttChart/GanttTable/GanttTable.js +1 -1
  25. package/lib/TracingGanttChart/GanttTable/GanttTable.js.map +1 -1
  26. package/lib/TracingGanttChart/GanttTable/GanttTableHeader.js +1 -1
  27. package/lib/TracingGanttChart/GanttTable/GanttTableHeader.js.map +1 -1
  28. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js +1 -1
  29. package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js.map +1 -1
  30. package/lib/TracingGanttChart/GanttTable/GanttTableRow.js +1 -1
  31. package/lib/TracingGanttChart/GanttTable/GanttTableRow.js.map +1 -1
  32. package/lib/TracingGanttChart/GanttTable/ResizableDivider.js +1 -1
  33. package/lib/TracingGanttChart/GanttTable/ResizableDivider.js.map +1 -1
  34. package/lib/TracingGanttChart/GanttTable/SpanDuration.js +1 -1
  35. package/lib/TracingGanttChart/GanttTable/SpanDuration.js.map +1 -1
  36. package/lib/TracingGanttChart/GanttTable/SpanIndents.js +1 -1
  37. package/lib/TracingGanttChart/GanttTable/SpanIndents.js.map +1 -1
  38. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.js +1 -1
  39. package/lib/TracingGanttChart/GanttTable/SpanLinksButton.js.map +1 -1
  40. package/lib/TracingGanttChart/GanttTable/SpanName.js +1 -1
  41. package/lib/TracingGanttChart/GanttTable/SpanName.js.map +1 -1
  42. package/lib/TracingGanttChart/MiniGanttChart/Canvas.js +1 -1
  43. package/lib/TracingGanttChart/MiniGanttChart/Canvas.js.map +1 -1
  44. package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.js +1 -1
  45. package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.js.map +1 -1
  46. package/lib/TracingGanttChart/MiniGanttChart/draw.js +1 -1
  47. package/lib/TracingGanttChart/MiniGanttChart/draw.js.map +1 -1
  48. package/lib/TracingGanttChart/Ticks.js +1 -1
  49. package/lib/TracingGanttChart/Ticks.js.map +1 -1
  50. package/lib/TracingGanttChart/TraceDetails.js +1 -1
  51. package/lib/TracingGanttChart/TraceDetails.js.map +1 -1
  52. package/lib/TracingGanttChart/TracingGanttChart.js +1 -1
  53. package/lib/TracingGanttChart/TracingGanttChart.js.map +1 -1
  54. package/lib/TracingGanttChart/palette.js +1 -1
  55. package/lib/TracingGanttChart/palette.js.map +1 -1
  56. package/lib/TracingGanttChart/trace.js +1 -1
  57. package/lib/TracingGanttChart/trace.js.map +1 -1
  58. package/lib/TracingGanttChart/utils.js +1 -1
  59. package/lib/TracingGanttChart/utils.js.map +1 -1
  60. package/lib/TracingGanttChart.js +1 -1
  61. package/lib/TracingGanttChart.js.map +1 -1
  62. package/lib/TracingGanttChartPanel.d.ts.map +1 -1
  63. package/lib/TracingGanttChartPanel.js +6 -1
  64. package/lib/TracingGanttChartPanel.js.map +1 -1
  65. package/lib/bootstrap.js +1 -1
  66. package/lib/bootstrap.js.map +1 -1
  67. package/lib/cjs/PanelActions.js +1 -1
  68. package/lib/cjs/TracingGanttChart/DetailPane/Attributes.js +1 -1
  69. package/lib/cjs/TracingGanttChart/DetailPane/DetailPane.js +1 -1
  70. package/lib/cjs/TracingGanttChart/DetailPane/SpanEvents.js +1 -1
  71. package/lib/cjs/TracingGanttChart/DetailPane/SpanLinks.js +1 -1
  72. package/lib/cjs/TracingGanttChart/GanttTable/GanttTable.js +1 -1
  73. package/lib/cjs/TracingGanttChart/GanttTable/GanttTableHeader.js +1 -1
  74. package/lib/cjs/TracingGanttChart/GanttTable/GanttTableProvider.js +1 -1
  75. package/lib/cjs/TracingGanttChart/GanttTable/GanttTableRow.js +1 -1
  76. package/lib/cjs/TracingGanttChart/GanttTable/ResizableDivider.js +1 -1
  77. package/lib/cjs/TracingGanttChart/GanttTable/SpanDuration.js +1 -1
  78. package/lib/cjs/TracingGanttChart/GanttTable/SpanIndents.js +1 -1
  79. package/lib/cjs/TracingGanttChart/GanttTable/SpanLinksButton.js +1 -1
  80. package/lib/cjs/TracingGanttChart/GanttTable/SpanName.js +1 -1
  81. package/lib/cjs/TracingGanttChart/MiniGanttChart/Canvas.js +1 -1
  82. package/lib/cjs/TracingGanttChart/MiniGanttChart/MiniGanttChart.js +1 -1
  83. package/lib/cjs/TracingGanttChart/MiniGanttChart/draw.js +1 -1
  84. package/lib/cjs/TracingGanttChart/Ticks.js +1 -1
  85. package/lib/cjs/TracingGanttChart/TraceDetails.js +1 -1
  86. package/lib/cjs/TracingGanttChart/TracingGanttChart.js +1 -1
  87. package/lib/cjs/TracingGanttChart/palette.js +1 -1
  88. package/lib/cjs/TracingGanttChart/trace.js +1 -1
  89. package/lib/cjs/TracingGanttChart/utils.js +1 -1
  90. package/lib/cjs/TracingGanttChart.js +1 -1
  91. package/lib/cjs/TracingGanttChartPanel.js +6 -1
  92. package/lib/cjs/bootstrap.js +1 -1
  93. package/lib/cjs/env.d.js +1 -1
  94. package/lib/cjs/gantt-chart-model.js +1 -1
  95. package/lib/cjs/getPluginModule.js +12 -0
  96. package/lib/cjs/index-federation.js +1 -1
  97. package/lib/cjs/index.js +12 -0
  98. package/lib/cjs/setup-tests.js +1 -1
  99. package/lib/cjs/test/convert/jaeger.js +1 -1
  100. package/lib/env.d.js +1 -1
  101. package/lib/env.d.js.map +1 -1
  102. package/lib/gantt-chart-model.js +1 -1
  103. package/lib/gantt-chart-model.js.map +1 -1
  104. package/lib/getPluginModule.d.ts.map +1 -1
  105. package/lib/getPluginModule.js +12 -0
  106. package/lib/getPluginModule.js.map +1 -1
  107. package/lib/index-federation.js +1 -1
  108. package/lib/index-federation.js.map +1 -1
  109. package/lib/index.d.ts.map +1 -1
  110. package/lib/index.js +12 -0
  111. package/lib/index.js.map +1 -1
  112. package/lib/setup-tests.js +1 -1
  113. package/lib/setup-tests.js.map +1 -1
  114. package/lib/test/convert/jaeger.js +1 -1
  115. package/lib/test/convert/jaeger.js.map +1 -1
  116. package/mf-manifest.json +17 -18
  117. package/mf-stats.json +17 -18
  118. package/package.json +4 -4
  119. package/__mf/js/async/252.0e9814ef.js +0 -22
  120. package/__mf/js/async/392.6a9270a8.js +0 -2
  121. package/__mf/js/async/557.d2605567.js +0 -1
  122. package/__mf/js/async/558.a4e7ed47.js +0 -1
  123. package/__mf/js/async/622.632bfcaa.js +0 -7
  124. package/__mf/js/async/728.b805adfd.js +0 -1
  125. package/__mf/js/async/953.c4774074.js +0 -1
  126. package/__mf/js/async/986.56030b97.js +0 -110
  127. package/__mf/js/async/lib-router.1f330b2a.js +0 -2
  128. /package/__mf/js/async/{754.2f82ce32.js.LICENSE.txt → 157.77f5f5a1.js.LICENSE.txt} +0 -0
  129. /package/__mf/js/async/{392.6a9270a8.js.LICENSE.txt → 392.c563796d.js.LICENSE.txt} +0 -0
  130. /package/__mf/js/async/{252.0e9814ef.js.LICENSE.txt → 648.490fd7f4.js.LICENSE.txt} +0 -0
  131. /package/__mf/js/async/{986.56030b97.js.LICENSE.txt → 666.4cf9c453.js.LICENSE.txt} +0 -0
  132. /package/__mf/js/async/{622.632bfcaa.js.LICENSE.txt → 716.0d0974df.js.LICENSE.txt} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // Copyright 2025 The Perses Authors
2
+ // Copyright The Perses Authors
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/TracingGanttChart/TraceDetails.tsx"],"sourcesContent":["// Copyright 2025 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Stack, Typography } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { useTimeZone } from '@perses-dev/components';\nimport { formatDuration } from './utils';\nimport { Trace } from './trace';\n\nconst DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions = {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n fractionalSecondDigits: 3,\n timeZoneName: 'short',\n};\n\nexport interface TraceDetailsProps {\n trace: Trace;\n}\n\nexport function TraceDetails(props: TraceDetailsProps): ReactElement {\n const { trace } = props;\n\n const { dateFormatOptionsWithUserTimeZone } = useTimeZone();\n const dateFormatOptions = dateFormatOptionsWithUserTimeZone(DATE_FORMAT_OPTIONS);\n const dateFormatter = new Intl.DateTimeFormat(undefined, dateFormatOptions);\n\n const rootSpan = trace.rootSpans[0];\n if (!rootSpan) {\n return <Typography>Trace contains no spans.</Typography>;\n }\n\n return (\n <Stack direction=\"row\" sx={{ justifyContent: 'space-between' }}>\n <Typography variant=\"h3\">\n {rootSpan.resource.serviceName}: {rootSpan.name} ({formatDuration(trace.endTimeUnixMs - trace.startTimeUnixMs)})\n </Typography>\n <Typography variant=\"h4\">\n <Typography component=\"span\" sx={{ px: 1 }}>\n <strong>Start:</strong> {dateFormatter.format(trace.startTimeUnixMs)}\n </Typography>\n <Typography component=\"span\" sx={{ px: 1 }}>\n <strong>Trace ID:</strong> {rootSpan.traceId}\n </Typography>\n </Typography>\n </Stack>\n );\n}\n"],"names":["Stack","Typography","useTimeZone","formatDuration","DATE_FORMAT_OPTIONS","year","month","day","hour","minute","second","fractionalSecondDigits","timeZoneName","TraceDetails","props","trace","dateFormatOptionsWithUserTimeZone","dateFormatOptions","dateFormatter","Intl","DateTimeFormat","undefined","rootSpan","rootSpans","direction","sx","justifyContent","variant","resource","serviceName","name","endTimeUnixMs","startTimeUnixMs","component","px","strong","format","traceId"],"mappings":";AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,KAAK,EAAEC,UAAU,QAAQ,gBAAgB;AAElD,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,cAAc,QAAQ,UAAU;AAGzC,MAAMC,sBAAkD;IACtDC,MAAM;IACNC,OAAO;IACPC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,wBAAwB;IACxBC,cAAc;AAChB;AAMA,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAElB,MAAM,EAAEE,iCAAiC,EAAE,GAAGd;IAC9C,MAAMe,oBAAoBD,kCAAkCZ;IAC5D,MAAMc,gBAAgB,IAAIC,KAAKC,cAAc,CAACC,WAAWJ;IAEzD,MAAMK,WAAWP,MAAMQ,SAAS,CAAC,EAAE;IACnC,IAAI,CAACD,UAAU;QACb,qBAAO,KAACrB;sBAAW;;IACrB;IAEA,qBACE,MAACD;QAAMwB,WAAU;QAAMC,IAAI;YAAEC,gBAAgB;QAAgB;;0BAC3D,MAACzB;gBAAW0B,SAAQ;;oBACjBL,SAASM,QAAQ,CAACC,WAAW;oBAAC;oBAAGP,SAASQ,IAAI;oBAAC;oBAAG3B,eAAeY,MAAMgB,aAAa,GAAGhB,MAAMiB,eAAe;oBAAE;;;0BAEjH,MAAC/B;gBAAW0B,SAAQ;;kCAClB,MAAC1B;wBAAWgC,WAAU;wBAAOR,IAAI;4BAAES,IAAI;wBAAE;;0CACvC,KAACC;0CAAO;;4BAAe;4BAAEjB,cAAckB,MAAM,CAACrB,MAAMiB,eAAe;;;kCAErE,MAAC/B;wBAAWgC,WAAU;wBAAOR,IAAI;4BAAES,IAAI;wBAAE;;0CACvC,KAACC;0CAAO;;4BAAkB;4BAAEb,SAASe,OAAO;;;;;;;AAKtD"}
1
+ {"version":3,"sources":["../../../src/TracingGanttChart/TraceDetails.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Stack, Typography } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { useTimeZone } from '@perses-dev/components';\nimport { formatDuration } from './utils';\nimport { Trace } from './trace';\n\nconst DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions = {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n fractionalSecondDigits: 3,\n timeZoneName: 'short',\n};\n\nexport interface TraceDetailsProps {\n trace: Trace;\n}\n\nexport function TraceDetails(props: TraceDetailsProps): ReactElement {\n const { trace } = props;\n\n const { dateFormatOptionsWithUserTimeZone } = useTimeZone();\n const dateFormatOptions = dateFormatOptionsWithUserTimeZone(DATE_FORMAT_OPTIONS);\n const dateFormatter = new Intl.DateTimeFormat(undefined, dateFormatOptions);\n\n const rootSpan = trace.rootSpans[0];\n if (!rootSpan) {\n return <Typography>Trace contains no spans.</Typography>;\n }\n\n return (\n <Stack direction=\"row\" sx={{ justifyContent: 'space-between' }}>\n <Typography variant=\"h3\">\n {rootSpan.resource.serviceName}: {rootSpan.name} ({formatDuration(trace.endTimeUnixMs - trace.startTimeUnixMs)})\n </Typography>\n <Typography variant=\"h4\">\n <Typography component=\"span\" sx={{ px: 1 }}>\n <strong>Start:</strong> {dateFormatter.format(trace.startTimeUnixMs)}\n </Typography>\n <Typography component=\"span\" sx={{ px: 1 }}>\n <strong>Trace ID:</strong> {rootSpan.traceId}\n </Typography>\n </Typography>\n </Stack>\n );\n}\n"],"names":["Stack","Typography","useTimeZone","formatDuration","DATE_FORMAT_OPTIONS","year","month","day","hour","minute","second","fractionalSecondDigits","timeZoneName","TraceDetails","props","trace","dateFormatOptionsWithUserTimeZone","dateFormatOptions","dateFormatter","Intl","DateTimeFormat","undefined","rootSpan","rootSpans","direction","sx","justifyContent","variant","resource","serviceName","name","endTimeUnixMs","startTimeUnixMs","component","px","strong","format","traceId"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,KAAK,EAAEC,UAAU,QAAQ,gBAAgB;AAElD,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,cAAc,QAAQ,UAAU;AAGzC,MAAMC,sBAAkD;IACtDC,MAAM;IACNC,OAAO;IACPC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,wBAAwB;IACxBC,cAAc;AAChB;AAMA,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAElB,MAAM,EAAEE,iCAAiC,EAAE,GAAGd;IAC9C,MAAMe,oBAAoBD,kCAAkCZ;IAC5D,MAAMc,gBAAgB,IAAIC,KAAKC,cAAc,CAACC,WAAWJ;IAEzD,MAAMK,WAAWP,MAAMQ,SAAS,CAAC,EAAE;IACnC,IAAI,CAACD,UAAU;QACb,qBAAO,KAACrB;sBAAW;;IACrB;IAEA,qBACE,MAACD;QAAMwB,WAAU;QAAMC,IAAI;YAAEC,gBAAgB;QAAgB;;0BAC3D,MAACzB;gBAAW0B,SAAQ;;oBACjBL,SAASM,QAAQ,CAACC,WAAW;oBAAC;oBAAGP,SAASQ,IAAI;oBAAC;oBAAG3B,eAAeY,MAAMgB,aAAa,GAAGhB,MAAMiB,eAAe;oBAAE;;;0BAEjH,MAAC/B;gBAAW0B,SAAQ;;kCAClB,MAAC1B;wBAAWgC,WAAU;wBAAOR,IAAI;4BAAES,IAAI;wBAAE;;0CACvC,KAACC;0CAAO;;4BAAe;4BAAEjB,cAAckB,MAAM,CAACrB,MAAMiB,eAAe;;;kCAErE,MAAC/B;wBAAWgC,WAAU;wBAAOR,IAAI;4BAAES,IAAI;wBAAE;;0CACvC,KAACC;0CAAO;;4BAAkB;4BAAEb,SAASe,OAAO;;;;;;;AAKtD"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- // Copyright 2024 The Perses Authors
2
+ // Copyright The Perses Authors
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/TracingGanttChart/TracingGanttChart.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, useMemo, useRef, useState } from 'react';\nimport { Box, Stack, useTheme } from '@mui/material';\nimport { otlptracev1 } from '@perses-dev/core';\nimport { CustomLinks, TracingGanttChartOptions } from '../gantt-chart-model';\nimport { MiniGanttChart } from './MiniGanttChart/MiniGanttChart';\nimport { DetailPane } from './DetailPane/DetailPane';\nimport { Viewport } from './utils';\nimport { GanttTable } from './GanttTable/GanttTable';\nimport { GanttTableProvider } from './GanttTable/GanttTableProvider';\nimport { ResizableDivider } from './GanttTable/ResizableDivider';\nimport { getTraceModel, Span } from './trace';\nimport { TraceDetails } from './TraceDetails';\n\nexport interface TracingGanttChartProps {\n options: TracingGanttChartOptions;\n customLinks?: CustomLinks;\n trace: otlptracev1.TracesData;\n}\n\n/**\n * The core GanttChart panel for Perses.\n *\n * The UI/UX of this panel is based on Jaeger UI, licensed under Apache License, Version 2.0.\n * https://github.com/jaegertracing/jaeger-ui\n */\nexport function TracingGanttChart(props: TracingGanttChartProps): ReactElement {\n const { options, customLinks, trace: otlpTrace } = props;\n\n const theme = useTheme();\n const trace = useMemo(() => {\n try {\n return getTraceModel(otlpTrace);\n } catch (e) {\n throw new Error(`Error: unable to parse trace: ${e}`);\n }\n }, [otlpTrace]);\n const [viewport, setViewport] = useState<Viewport>({\n startTimeUnixMs: trace.startTimeUnixMs,\n endTimeUnixMs: trace.endTimeUnixMs,\n });\n const [selectedSpan, setSelectedSpan] = useState<Span | undefined>(() =>\n options.selectedSpanId ? trace.spanById.get(options.selectedSpanId) : undefined\n );\n\n const ganttChart = useRef<HTMLDivElement>(null);\n // tableWidth only comes to effect if the detail pane is visible.\n // setTableWidth() is only called by <ResizableDivider />\n const [tableWidth, setTableWidth] = useState<number>(0.82);\n const gap = 2;\n\n return (\n <Stack ref={ganttChart} direction=\"row\" sx={{ height: '100%', minHeight: '240px', gap }}>\n <Stack sx={{ flexGrow: 1, gap }}>\n <TraceDetails trace={trace} />\n <MiniGanttChart options={options} trace={trace} viewport={viewport} setViewport={setViewport} />\n <GanttTableProvider>\n <GanttTable\n options={options}\n customLinks={customLinks}\n trace={trace}\n viewport={viewport}\n selectedSpan={selectedSpan}\n onSpanClick={setSelectedSpan}\n />\n </GanttTableProvider>\n </Stack>\n {selectedSpan && (\n <>\n <ResizableDivider parentRef={ganttChart} spacing={parseInt(theme.spacing(gap))} onMove={setTableWidth} />\n <Box style={{ width: `${(1 - tableWidth) * 100}%` }} sx={{ overflow: 'auto' }}>\n <DetailPane\n customLinks={customLinks}\n trace={trace}\n span={selectedSpan}\n onCloseBtnClick={() => setSelectedSpan(undefined)}\n />\n </Box>\n </>\n )}\n </Stack>\n );\n}\n"],"names":["useMemo","useRef","useState","Box","Stack","useTheme","MiniGanttChart","DetailPane","GanttTable","GanttTableProvider","ResizableDivider","getTraceModel","TraceDetails","TracingGanttChart","props","options","customLinks","trace","otlpTrace","theme","e","Error","viewport","setViewport","startTimeUnixMs","endTimeUnixMs","selectedSpan","setSelectedSpan","selectedSpanId","spanById","get","undefined","ganttChart","tableWidth","setTableWidth","gap","ref","direction","sx","height","minHeight","flexGrow","onSpanClick","parentRef","spacing","parseInt","onMove","style","width","overflow","span","onCloseBtnClick"],"mappings":";AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAAuBA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAChE,SAASC,GAAG,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,gBAAgB;AAGrD,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,UAAU,QAAQ,0BAA0B;AAErD,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAASC,aAAa,QAAc,UAAU;AAC9C,SAASC,YAAY,QAAQ,iBAAiB;AAQ9C;;;;;CAKC,GACD,OAAO,SAASC,kBAAkBC,KAA6B;IAC7D,MAAM,EAAEC,OAAO,EAAEC,WAAW,EAAEC,OAAOC,SAAS,EAAE,GAAGJ;IAEnD,MAAMK,QAAQd;IACd,MAAMY,QAAQjB,QAAQ;QACpB,IAAI;YACF,OAAOW,cAAcO;QACvB,EAAE,OAAOE,GAAG;YACV,MAAM,IAAIC,MAAM,CAAC,8BAA8B,EAAED,GAAG;QACtD;IACF,GAAG;QAACF;KAAU;IACd,MAAM,CAACI,UAAUC,YAAY,GAAGrB,SAAmB;QACjDsB,iBAAiBP,MAAMO,eAAe;QACtCC,eAAeR,MAAMQ,aAAa;IACpC;IACA,MAAM,CAACC,cAAcC,gBAAgB,GAAGzB,SAA2B,IACjEa,QAAQa,cAAc,GAAGX,MAAMY,QAAQ,CAACC,GAAG,CAACf,QAAQa,cAAc,IAAIG;IAGxE,MAAMC,aAAa/B,OAAuB;IAC1C,iEAAiE;IACjE,yDAAyD;IACzD,MAAM,CAACgC,YAAYC,cAAc,GAAGhC,SAAiB;IACrD,MAAMiC,MAAM;IAEZ,qBACE,MAAC/B;QAAMgC,KAAKJ;QAAYK,WAAU;QAAMC,IAAI;YAAEC,QAAQ;YAAQC,WAAW;YAASL;QAAI;;0BACpF,MAAC/B;gBAAMkC,IAAI;oBAAEG,UAAU;oBAAGN;gBAAI;;kCAC5B,KAACvB;wBAAaK,OAAOA;;kCACrB,KAACX;wBAAeS,SAASA;wBAASE,OAAOA;wBAAOK,UAAUA;wBAAUC,aAAaA;;kCACjF,KAACd;kCACC,cAAA,KAACD;4BACCO,SAASA;4BACTC,aAAaA;4BACbC,OAAOA;4BACPK,UAAUA;4BACVI,cAAcA;4BACdgB,aAAaf;;;;;YAIlBD,8BACC;;kCACE,KAAChB;wBAAiBiC,WAAWX;wBAAYY,SAASC,SAAS1B,MAAMyB,OAAO,CAACT;wBAAOW,QAAQZ;;kCACxF,KAAC/B;wBAAI4C,OAAO;4BAAEC,OAAO,GAAG,AAAC,CAAA,IAAIf,UAAS,IAAK,IAAI,CAAC,CAAC;wBAAC;wBAAGK,IAAI;4BAAEW,UAAU;wBAAO;kCAC1E,cAAA,KAAC1C;4BACCS,aAAaA;4BACbC,OAAOA;4BACPiC,MAAMxB;4BACNyB,iBAAiB,IAAMxB,gBAAgBI;;;;;;;AAOrD"}
1
+ {"version":3,"sources":["../../../src/TracingGanttChart/TracingGanttChart.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, useMemo, useRef, useState } from 'react';\nimport { Box, Stack, useTheme } from '@mui/material';\nimport { otlptracev1 } from '@perses-dev/core';\nimport { CustomLinks, TracingGanttChartOptions } from '../gantt-chart-model';\nimport { MiniGanttChart } from './MiniGanttChart/MiniGanttChart';\nimport { DetailPane } from './DetailPane/DetailPane';\nimport { Viewport } from './utils';\nimport { GanttTable } from './GanttTable/GanttTable';\nimport { GanttTableProvider } from './GanttTable/GanttTableProvider';\nimport { ResizableDivider } from './GanttTable/ResizableDivider';\nimport { getTraceModel, Span } from './trace';\nimport { TraceDetails } from './TraceDetails';\n\nexport interface TracingGanttChartProps {\n options: TracingGanttChartOptions;\n customLinks?: CustomLinks;\n trace: otlptracev1.TracesData;\n}\n\n/**\n * The core GanttChart panel for Perses.\n *\n * The UI/UX of this panel is based on Jaeger UI, licensed under Apache License, Version 2.0.\n * https://github.com/jaegertracing/jaeger-ui\n */\nexport function TracingGanttChart(props: TracingGanttChartProps): ReactElement {\n const { options, customLinks, trace: otlpTrace } = props;\n\n const theme = useTheme();\n const trace = useMemo(() => {\n try {\n return getTraceModel(otlpTrace);\n } catch (e) {\n throw new Error(`Error: unable to parse trace: ${e}`);\n }\n }, [otlpTrace]);\n const [viewport, setViewport] = useState<Viewport>({\n startTimeUnixMs: trace.startTimeUnixMs,\n endTimeUnixMs: trace.endTimeUnixMs,\n });\n const [selectedSpan, setSelectedSpan] = useState<Span | undefined>(() =>\n options.selectedSpanId ? trace.spanById.get(options.selectedSpanId) : undefined\n );\n\n const ganttChart = useRef<HTMLDivElement>(null);\n // tableWidth only comes to effect if the detail pane is visible.\n // setTableWidth() is only called by <ResizableDivider />\n const [tableWidth, setTableWidth] = useState<number>(0.82);\n const gap = 2;\n\n return (\n <Stack ref={ganttChart} direction=\"row\" sx={{ height: '100%', minHeight: '240px', gap }}>\n <Stack sx={{ flexGrow: 1, gap }}>\n <TraceDetails trace={trace} />\n <MiniGanttChart options={options} trace={trace} viewport={viewport} setViewport={setViewport} />\n <GanttTableProvider>\n <GanttTable\n options={options}\n customLinks={customLinks}\n trace={trace}\n viewport={viewport}\n selectedSpan={selectedSpan}\n onSpanClick={setSelectedSpan}\n />\n </GanttTableProvider>\n </Stack>\n {selectedSpan && (\n <>\n <ResizableDivider parentRef={ganttChart} spacing={parseInt(theme.spacing(gap))} onMove={setTableWidth} />\n <Box style={{ width: `${(1 - tableWidth) * 100}%` }} sx={{ overflow: 'auto' }}>\n <DetailPane\n customLinks={customLinks}\n trace={trace}\n span={selectedSpan}\n onCloseBtnClick={() => setSelectedSpan(undefined)}\n />\n </Box>\n </>\n )}\n </Stack>\n );\n}\n"],"names":["useMemo","useRef","useState","Box","Stack","useTheme","MiniGanttChart","DetailPane","GanttTable","GanttTableProvider","ResizableDivider","getTraceModel","TraceDetails","TracingGanttChart","props","options","customLinks","trace","otlpTrace","theme","e","Error","viewport","setViewport","startTimeUnixMs","endTimeUnixMs","selectedSpan","setSelectedSpan","selectedSpanId","spanById","get","undefined","ganttChart","tableWidth","setTableWidth","gap","ref","direction","sx","height","minHeight","flexGrow","onSpanClick","parentRef","spacing","parseInt","onMove","style","width","overflow","span","onCloseBtnClick"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAAuBA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAChE,SAASC,GAAG,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,gBAAgB;AAGrD,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,UAAU,QAAQ,0BAA0B;AAErD,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAASC,aAAa,QAAc,UAAU;AAC9C,SAASC,YAAY,QAAQ,iBAAiB;AAQ9C;;;;;CAKC,GACD,OAAO,SAASC,kBAAkBC,KAA6B;IAC7D,MAAM,EAAEC,OAAO,EAAEC,WAAW,EAAEC,OAAOC,SAAS,EAAE,GAAGJ;IAEnD,MAAMK,QAAQd;IACd,MAAMY,QAAQjB,QAAQ;QACpB,IAAI;YACF,OAAOW,cAAcO;QACvB,EAAE,OAAOE,GAAG;YACV,MAAM,IAAIC,MAAM,CAAC,8BAA8B,EAAED,GAAG;QACtD;IACF,GAAG;QAACF;KAAU;IACd,MAAM,CAACI,UAAUC,YAAY,GAAGrB,SAAmB;QACjDsB,iBAAiBP,MAAMO,eAAe;QACtCC,eAAeR,MAAMQ,aAAa;IACpC;IACA,MAAM,CAACC,cAAcC,gBAAgB,GAAGzB,SAA2B,IACjEa,QAAQa,cAAc,GAAGX,MAAMY,QAAQ,CAACC,GAAG,CAACf,QAAQa,cAAc,IAAIG;IAGxE,MAAMC,aAAa/B,OAAuB;IAC1C,iEAAiE;IACjE,yDAAyD;IACzD,MAAM,CAACgC,YAAYC,cAAc,GAAGhC,SAAiB;IACrD,MAAMiC,MAAM;IAEZ,qBACE,MAAC/B;QAAMgC,KAAKJ;QAAYK,WAAU;QAAMC,IAAI;YAAEC,QAAQ;YAAQC,WAAW;YAASL;QAAI;;0BACpF,MAAC/B;gBAAMkC,IAAI;oBAAEG,UAAU;oBAAGN;gBAAI;;kCAC5B,KAACvB;wBAAaK,OAAOA;;kCACrB,KAACX;wBAAeS,SAASA;wBAASE,OAAOA;wBAAOK,UAAUA;wBAAUC,aAAaA;;kCACjF,KAACd;kCACC,cAAA,KAACD;4BACCO,SAASA;4BACTC,aAAaA;4BACbC,OAAOA;4BACPK,UAAUA;4BACVI,cAAcA;4BACdgB,aAAaf;;;;;YAIlBD,8BACC;;kCACE,KAAChB;wBAAiBiC,WAAWX;wBAAYY,SAASC,SAAS1B,MAAMyB,OAAO,CAACT;wBAAOW,QAAQZ;;kCACxF,KAAC/B;wBAAI4C,OAAO;4BAAEC,OAAO,GAAG,AAAC,CAAA,IAAIf,UAAS,IAAK,IAAI,CAAC,CAAC;wBAAC;wBAAGK,IAAI;4BAAEW,UAAU;wBAAO;kCAC1E,cAAA,KAAC1C;4BACCS,aAAaA;4BACbC,OAAOA;4BACPiC,MAAMxB;4BACNyB,iBAAiB,IAAMxB,gBAAgBI;;;;;;;AAOrD"}
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/TracingGanttChart/palette.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport ColorHash from 'color-hash';\n\n// Valid hue values are 0 to 360 and can be adjusted to control the generated colors.\n// More info: https://github.com/zenozeng/color-hash#custom-hue\n// Picked min of 20 and max of 360 to exclude common threshold colors (red).\n// Items with \"error\" in them will always be generated as red.\nconst ERROR_HUE_CUTOFF = 20;\nconst colorGenerator = new ColorHash({ hue: { min: ERROR_HUE_CUTOFF, max: 360 } });\nconst redColorGenerator = new ColorHash({ hue: { min: 0, max: ERROR_HUE_CUTOFF } });\n\nfunction computeConsistentColor(name: string, error: boolean): string {\n const [hue, saturation, lightness] = error ? redColorGenerator.hsl(name) : colorGenerator.hsl(name);\n const saturationPercent = `${(saturation * 100).toFixed(0)}%`;\n const lightnessPercent = `${(lightness * 100).toFixed(0)}%`;\n return `hsla(${hue.toFixed(2)},${saturationPercent},${lightnessPercent},0.9)`;\n}\n\n// To check whether a color has already been generated for a given string.\n// TODO: Predefined color aliases will be defined here\nconst colorLookup: Record<string, string> = {};\n\n/**\n * Return a consistent color for (name, error) tuple\n */\nexport function getConsistentColor(name: string, error: boolean): string {\n const key = `${name}_____${error}`;\n let value = colorLookup[key];\n if (!value) {\n value = computeConsistentColor(name, error);\n colorLookup[key] = value;\n }\n return value;\n}\n\nexport function getConsistentCategoricalColor(\n name: string,\n error: boolean,\n categoricalPalette: string[],\n errorPalette: string[]\n): string {\n const palette = error ? errorPalette : categoricalPalette;\n if (palette.length === 0) {\n console.warn('getConsistentCategoricalColor() called with empty color palette, fallback to #000');\n return '#000';\n }\n\n let hash = 0;\n for (let i = 0; i < name.length; i++) {\n hash = name.charCodeAt(i) + ((hash << 5) - hash);\n }\n\n return palette[Math.abs(hash) % palette.length] ?? '#000';\n}\n"],"names":["ColorHash","ERROR_HUE_CUTOFF","colorGenerator","hue","min","max","redColorGenerator","computeConsistentColor","name","error","saturation","lightness","hsl","saturationPercent","toFixed","lightnessPercent","colorLookup","getConsistentColor","key","value","getConsistentCategoricalColor","categoricalPalette","errorPalette","palette","length","console","warn","hash","i","charCodeAt","Math","abs"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,eAAe,aAAa;AAEnC,qFAAqF;AACrF,+DAA+D;AAC/D,4EAA4E;AAC5E,8DAA8D;AAC9D,MAAMC,mBAAmB;AACzB,MAAMC,iBAAiB,IAAIF,UAAU;IAAEG,KAAK;QAAEC,KAAKH;QAAkBI,KAAK;IAAI;AAAE;AAChF,MAAMC,oBAAoB,IAAIN,UAAU;IAAEG,KAAK;QAAEC,KAAK;QAAGC,KAAKJ;IAAiB;AAAE;AAEjF,SAASM,uBAAuBC,IAAY,EAAEC,KAAc;IAC1D,MAAM,CAACN,KAAKO,YAAYC,UAAU,GAAGF,QAAQH,kBAAkBM,GAAG,CAACJ,QAAQN,eAAeU,GAAG,CAACJ;IAC9F,MAAMK,oBAAoB,GAAG,AAACH,CAAAA,aAAa,GAAE,EAAGI,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,MAAMC,mBAAmB,GAAG,AAACJ,CAAAA,YAAY,GAAE,EAAGG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3D,OAAO,CAAC,KAAK,EAAEX,IAAIW,OAAO,CAAC,GAAG,CAAC,EAAED,kBAAkB,CAAC,EAAEE,iBAAiB,KAAK,CAAC;AAC/E;AAEA,0EAA0E;AAC1E,sDAAsD;AACtD,MAAMC,cAAsC,CAAC;AAE7C;;CAEC,GACD,OAAO,SAASC,mBAAmBT,IAAY,EAAEC,KAAc;IAC7D,MAAMS,MAAM,GAAGV,KAAK,KAAK,EAAEC,OAAO;IAClC,IAAIU,QAAQH,WAAW,CAACE,IAAI;IAC5B,IAAI,CAACC,OAAO;QACVA,QAAQZ,uBAAuBC,MAAMC;QACrCO,WAAW,CAACE,IAAI,GAAGC;IACrB;IACA,OAAOA;AACT;AAEA,OAAO,SAASC,8BACdZ,IAAY,EACZC,KAAc,EACdY,kBAA4B,EAC5BC,YAAsB;IAEtB,MAAMC,UAAUd,QAAQa,eAAeD;IACvC,IAAIE,QAAQC,MAAM,KAAK,GAAG;QACxBC,QAAQC,IAAI,CAAC;QACb,OAAO;IACT;IAEA,IAAIC,OAAO;IACX,IAAK,IAAIC,IAAI,GAAGA,IAAIpB,KAAKgB,MAAM,EAAEI,IAAK;QACpCD,OAAOnB,KAAKqB,UAAU,CAACD,KAAM,CAAA,AAACD,CAAAA,QAAQ,CAAA,IAAKA,IAAG;IAChD;IAEA,OAAOJ,OAAO,CAACO,KAAKC,GAAG,CAACJ,QAAQJ,QAAQC,MAAM,CAAC,IAAI;AACrD"}
1
+ {"version":3,"sources":["../../../src/TracingGanttChart/palette.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport ColorHash from 'color-hash';\n\n// Valid hue values are 0 to 360 and can be adjusted to control the generated colors.\n// More info: https://github.com/zenozeng/color-hash#custom-hue\n// Picked min of 20 and max of 360 to exclude common threshold colors (red).\n// Items with \"error\" in them will always be generated as red.\nconst ERROR_HUE_CUTOFF = 20;\nconst colorGenerator = new ColorHash({ hue: { min: ERROR_HUE_CUTOFF, max: 360 } });\nconst redColorGenerator = new ColorHash({ hue: { min: 0, max: ERROR_HUE_CUTOFF } });\n\nfunction computeConsistentColor(name: string, error: boolean): string {\n const [hue, saturation, lightness] = error ? redColorGenerator.hsl(name) : colorGenerator.hsl(name);\n const saturationPercent = `${(saturation * 100).toFixed(0)}%`;\n const lightnessPercent = `${(lightness * 100).toFixed(0)}%`;\n return `hsla(${hue.toFixed(2)},${saturationPercent},${lightnessPercent},0.9)`;\n}\n\n// To check whether a color has already been generated for a given string.\n// TODO: Predefined color aliases will be defined here\nconst colorLookup: Record<string, string> = {};\n\n/**\n * Return a consistent color for (name, error) tuple\n */\nexport function getConsistentColor(name: string, error: boolean): string {\n const key = `${name}_____${error}`;\n let value = colorLookup[key];\n if (!value) {\n value = computeConsistentColor(name, error);\n colorLookup[key] = value;\n }\n return value;\n}\n\nexport function getConsistentCategoricalColor(\n name: string,\n error: boolean,\n categoricalPalette: string[],\n errorPalette: string[]\n): string {\n const palette = error ? errorPalette : categoricalPalette;\n if (palette.length === 0) {\n console.warn('getConsistentCategoricalColor() called with empty color palette, fallback to #000');\n return '#000';\n }\n\n let hash = 0;\n for (let i = 0; i < name.length; i++) {\n hash = name.charCodeAt(i) + ((hash << 5) - hash);\n }\n\n return palette[Math.abs(hash) % palette.length] ?? '#000';\n}\n"],"names":["ColorHash","ERROR_HUE_CUTOFF","colorGenerator","hue","min","max","redColorGenerator","computeConsistentColor","name","error","saturation","lightness","hsl","saturationPercent","toFixed","lightnessPercent","colorLookup","getConsistentColor","key","value","getConsistentCategoricalColor","categoricalPalette","errorPalette","palette","length","console","warn","hash","i","charCodeAt","Math","abs"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,eAAe,aAAa;AAEnC,qFAAqF;AACrF,+DAA+D;AAC/D,4EAA4E;AAC5E,8DAA8D;AAC9D,MAAMC,mBAAmB;AACzB,MAAMC,iBAAiB,IAAIF,UAAU;IAAEG,KAAK;QAAEC,KAAKH;QAAkBI,KAAK;IAAI;AAAE;AAChF,MAAMC,oBAAoB,IAAIN,UAAU;IAAEG,KAAK;QAAEC,KAAK;QAAGC,KAAKJ;IAAiB;AAAE;AAEjF,SAASM,uBAAuBC,IAAY,EAAEC,KAAc;IAC1D,MAAM,CAACN,KAAKO,YAAYC,UAAU,GAAGF,QAAQH,kBAAkBM,GAAG,CAACJ,QAAQN,eAAeU,GAAG,CAACJ;IAC9F,MAAMK,oBAAoB,GAAG,AAACH,CAAAA,aAAa,GAAE,EAAGI,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,MAAMC,mBAAmB,GAAG,AAACJ,CAAAA,YAAY,GAAE,EAAGG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3D,OAAO,CAAC,KAAK,EAAEX,IAAIW,OAAO,CAAC,GAAG,CAAC,EAAED,kBAAkB,CAAC,EAAEE,iBAAiB,KAAK,CAAC;AAC/E;AAEA,0EAA0E;AAC1E,sDAAsD;AACtD,MAAMC,cAAsC,CAAC;AAE7C;;CAEC,GACD,OAAO,SAASC,mBAAmBT,IAAY,EAAEC,KAAc;IAC7D,MAAMS,MAAM,GAAGV,KAAK,KAAK,EAAEC,OAAO;IAClC,IAAIU,QAAQH,WAAW,CAACE,IAAI;IAC5B,IAAI,CAACC,OAAO;QACVA,QAAQZ,uBAAuBC,MAAMC;QACrCO,WAAW,CAACE,IAAI,GAAGC;IACrB;IACA,OAAOA;AACT;AAEA,OAAO,SAASC,8BACdZ,IAAY,EACZC,KAAc,EACdY,kBAA4B,EAC5BC,YAAsB;IAEtB,MAAMC,UAAUd,QAAQa,eAAeD;IACvC,IAAIE,QAAQC,MAAM,KAAK,GAAG;QACxBC,QAAQC,IAAI,CAAC;QACb,OAAO;IACT;IAEA,IAAIC,OAAO;IACX,IAAK,IAAIC,IAAI,GAAGA,IAAIpB,KAAKgB,MAAM,EAAEI,IAAK;QACpCD,OAAOnB,KAAKqB,UAAU,CAACD,KAAM,CAAA,AAACD,CAAAA,QAAQ,CAAA,IAAKA,IAAG;IAChD;IAEA,OAAOJ,OAAO,CAACO,KAAKC,GAAG,CAACJ,QAAQJ,QAAQC,MAAM,CAAC,IAAI;AACrD"}
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/TracingGanttChart/trace.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { otlpcommonv1, otlpresourcev1, otlptracev1 } from '@perses-dev/core';\nimport { sortedIndexBy } from 'lodash';\n\n/** holds the trace and computed properties required for the Gantt chart */\nexport interface Trace {\n trace: otlptracev1.TracesData;\n\n /**\n * if a trace is incomplete (e.g. a parent span has not been received yet),\n * this branch of the span tree will be appended to the root\n */\n rootSpans: Span[];\n spanById: Map<string, Span>;\n startTimeUnixMs: number;\n endTimeUnixMs: number;\n}\n\nexport interface Span {\n resource: Resource;\n scope: otlpcommonv1.InstrumentationScope;\n parentSpan?: Span;\n /** child spans, sorted by startTime */\n childSpans: Span[];\n\n traceId: string;\n spanId: string;\n parentSpanId?: string;\n name: string;\n kind?: string;\n startTimeUnixMs: number;\n endTimeUnixMs: number;\n attributes: otlpcommonv1.KeyValue[];\n events: Event[];\n links: Link[];\n status: otlptracev1.Status;\n}\n\nexport interface Resource {\n serviceName?: string;\n attributes: otlpcommonv1.KeyValue[];\n}\n\nexport interface Event {\n timeUnixMs: number;\n name: string;\n attributes: otlpcommonv1.KeyValue[];\n}\n\nexport interface Link {\n traceId: string;\n spanId: string;\n attributes: otlpcommonv1.KeyValue[];\n}\n\n/**\n * getTraceModel builds a tree of spans from an OTLP trace,\n * and precomputes common fields, for example the start and end time of a trace.\n * Time complexity: O(2n)\n */\nexport function getTraceModel(trace: otlptracev1.TracesData): Trace {\n // first pass: build lookup table <spanId, Span> and compute min/max\n const spanById = new Map<string, Span>();\n const rootSpans: Span[] = [];\n let startTimeUnixMs: number = 0;\n let endTimeUnixMs: number = 0;\n for (const resourceSpan of trace.resourceSpans) {\n const resource = parseResource(resourceSpan.resource);\n\n for (const scopeSpan of resourceSpan.scopeSpans) {\n const scope = parseScope(scopeSpan.scope);\n\n for (const otelSpan of scopeSpan.spans) {\n const span: Span = {\n resource,\n scope,\n childSpans: [],\n ...parseSpan(otelSpan),\n };\n spanById.set(otelSpan.spanId, span);\n\n if (startTimeUnixMs === 0 || span.startTimeUnixMs < startTimeUnixMs) {\n startTimeUnixMs = span.startTimeUnixMs;\n }\n if (endTimeUnixMs === 0 || span.endTimeUnixMs > endTimeUnixMs) {\n endTimeUnixMs = span.endTimeUnixMs;\n }\n }\n }\n }\n\n // second pass: build tree based on parentSpanId property\n for (const [, span] of spanById) {\n if (!span.parentSpanId) {\n rootSpans.push(span);\n continue;\n }\n\n const parent = spanById.get(span.parentSpanId);\n if (!parent) {\n console.trace(`span ${span.spanId} has parent ${span.parentSpanId} which has not been received yet`);\n rootSpans.push(span);\n continue;\n }\n\n span.parentSpan = parent;\n const insertChildSpanAt = sortedIndexBy(parent.childSpans, span, (s) => s.startTimeUnixMs);\n parent.childSpans.splice(insertChildSpanAt, 0, span);\n }\n\n return { trace, rootSpans, spanById, startTimeUnixMs, endTimeUnixMs };\n}\n\nfunction parseResource(resource?: otlpresourcev1.Resource): Resource {\n let serviceName = 'unknown';\n for (const attr of resource?.attributes ?? []) {\n if (attr.key === 'service.name' && 'stringValue' in attr.value) {\n serviceName = attr.value.stringValue;\n break;\n }\n }\n\n return {\n serviceName,\n attributes: resource?.attributes ?? [],\n };\n}\n\nfunction parseScope(scope?: otlpcommonv1.InstrumentationScope): otlpcommonv1.InstrumentationScope {\n return scope ?? {};\n}\n\n/**\n * parseSpan parses the Span API type to the internal representation\n * i.e. convert strings to numbers etc.\n */\nfunction parseSpan(span: otlptracev1.Span): Omit<Span, 'resource' | 'scope' | 'childSpans'> {\n return {\n traceId: span.traceId,\n spanId: span.spanId,\n parentSpanId: span.parentSpanId,\n name: span.name,\n kind: span.kind,\n startTimeUnixMs: parseInt(span.startTimeUnixNano) * 1e-6, // convert to milliseconds because JS cannot handle numbers larger than 9007199254740991\n endTimeUnixMs: parseInt(span.endTimeUnixNano) * 1e-6,\n attributes: span.attributes ?? [],\n events: (span.events ?? []).map(parseEvent),\n links: (span.links ?? []).map(parseLink),\n status: span.status ?? {},\n };\n}\n\nfunction parseEvent(event: otlptracev1.Event): Event {\n return {\n timeUnixMs: parseInt(event.timeUnixNano) * 1e-6, // convert to milliseconds because JS cannot handle numbers larger than 9007199254740991\n name: event.name,\n attributes: event.attributes ?? [],\n };\n}\n\nfunction parseLink(link: otlptracev1.Link): Link {\n return {\n traceId: link.traceId,\n spanId: link.spanId,\n attributes: link.attributes ?? [],\n };\n}\n"],"names":["sortedIndexBy","getTraceModel","trace","spanById","Map","rootSpans","startTimeUnixMs","endTimeUnixMs","resourceSpan","resourceSpans","resource","parseResource","scopeSpan","scopeSpans","scope","parseScope","otelSpan","spans","span","childSpans","parseSpan","set","spanId","parentSpanId","push","parent","get","console","parentSpan","insertChildSpanAt","s","splice","serviceName","attr","attributes","key","value","stringValue","traceId","name","kind","parseInt","startTimeUnixNano","endTimeUnixNano","events","map","parseEvent","links","parseLink","status","event","timeUnixMs","timeUnixNano","link"],"mappings":"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"}
1
+ {"version":3,"sources":["../../../src/TracingGanttChart/trace.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { otlpcommonv1, otlpresourcev1, otlptracev1 } from '@perses-dev/core';\nimport { sortedIndexBy } from 'lodash';\n\n/** holds the trace and computed properties required for the Gantt chart */\nexport interface Trace {\n trace: otlptracev1.TracesData;\n\n /**\n * if a trace is incomplete (e.g. a parent span has not been received yet),\n * this branch of the span tree will be appended to the root\n */\n rootSpans: Span[];\n spanById: Map<string, Span>;\n startTimeUnixMs: number;\n endTimeUnixMs: number;\n}\n\nexport interface Span {\n resource: Resource;\n scope: otlpcommonv1.InstrumentationScope;\n parentSpan?: Span;\n /** child spans, sorted by startTime */\n childSpans: Span[];\n\n traceId: string;\n spanId: string;\n parentSpanId?: string;\n name: string;\n kind?: string;\n startTimeUnixMs: number;\n endTimeUnixMs: number;\n attributes: otlpcommonv1.KeyValue[];\n events: Event[];\n links: Link[];\n status: otlptracev1.Status;\n}\n\nexport interface Resource {\n serviceName?: string;\n attributes: otlpcommonv1.KeyValue[];\n}\n\nexport interface Event {\n timeUnixMs: number;\n name: string;\n attributes: otlpcommonv1.KeyValue[];\n}\n\nexport interface Link {\n traceId: string;\n spanId: string;\n attributes: otlpcommonv1.KeyValue[];\n}\n\n/**\n * getTraceModel builds a tree of spans from an OTLP trace,\n * and precomputes common fields, for example the start and end time of a trace.\n * Time complexity: O(2n)\n */\nexport function getTraceModel(trace: otlptracev1.TracesData): Trace {\n // first pass: build lookup table <spanId, Span> and compute min/max\n const spanById = new Map<string, Span>();\n const rootSpans: Span[] = [];\n let startTimeUnixMs: number = 0;\n let endTimeUnixMs: number = 0;\n for (const resourceSpan of trace.resourceSpans) {\n const resource = parseResource(resourceSpan.resource);\n\n for (const scopeSpan of resourceSpan.scopeSpans) {\n const scope = parseScope(scopeSpan.scope);\n\n for (const otelSpan of scopeSpan.spans) {\n const span: Span = {\n resource,\n scope,\n childSpans: [],\n ...parseSpan(otelSpan),\n };\n spanById.set(otelSpan.spanId, span);\n\n if (startTimeUnixMs === 0 || span.startTimeUnixMs < startTimeUnixMs) {\n startTimeUnixMs = span.startTimeUnixMs;\n }\n if (endTimeUnixMs === 0 || span.endTimeUnixMs > endTimeUnixMs) {\n endTimeUnixMs = span.endTimeUnixMs;\n }\n }\n }\n }\n\n // second pass: build tree based on parentSpanId property\n for (const [, span] of spanById) {\n if (!span.parentSpanId) {\n rootSpans.push(span);\n continue;\n }\n\n const parent = spanById.get(span.parentSpanId);\n if (!parent) {\n console.trace(`span ${span.spanId} has parent ${span.parentSpanId} which has not been received yet`);\n rootSpans.push(span);\n continue;\n }\n\n span.parentSpan = parent;\n const insertChildSpanAt = sortedIndexBy(parent.childSpans, span, (s) => s.startTimeUnixMs);\n parent.childSpans.splice(insertChildSpanAt, 0, span);\n }\n\n return { trace, rootSpans, spanById, startTimeUnixMs, endTimeUnixMs };\n}\n\nfunction parseResource(resource?: otlpresourcev1.Resource): Resource {\n let serviceName = 'unknown';\n for (const attr of resource?.attributes ?? []) {\n if (attr.key === 'service.name' && 'stringValue' in attr.value) {\n serviceName = attr.value.stringValue;\n break;\n }\n }\n\n return {\n serviceName,\n attributes: resource?.attributes ?? [],\n };\n}\n\nfunction parseScope(scope?: otlpcommonv1.InstrumentationScope): otlpcommonv1.InstrumentationScope {\n return scope ?? {};\n}\n\n/**\n * parseSpan parses the Span API type to the internal representation\n * i.e. convert strings to numbers etc.\n */\nfunction parseSpan(span: otlptracev1.Span): Omit<Span, 'resource' | 'scope' | 'childSpans'> {\n return {\n traceId: span.traceId,\n spanId: span.spanId,\n parentSpanId: span.parentSpanId,\n name: span.name,\n kind: span.kind,\n startTimeUnixMs: parseInt(span.startTimeUnixNano) * 1e-6, // convert to milliseconds because JS cannot handle numbers larger than 9007199254740991\n endTimeUnixMs: parseInt(span.endTimeUnixNano) * 1e-6,\n attributes: span.attributes ?? [],\n events: (span.events ?? []).map(parseEvent),\n links: (span.links ?? []).map(parseLink),\n status: span.status ?? {},\n };\n}\n\nfunction parseEvent(event: otlptracev1.Event): Event {\n return {\n timeUnixMs: parseInt(event.timeUnixNano) * 1e-6, // convert to milliseconds because JS cannot handle numbers larger than 9007199254740991\n name: event.name,\n attributes: event.attributes ?? [],\n };\n}\n\nfunction parseLink(link: otlptracev1.Link): Link {\n return {\n traceId: link.traceId,\n spanId: link.spanId,\n attributes: link.attributes ?? [],\n };\n}\n"],"names":["sortedIndexBy","getTraceModel","trace","spanById","Map","rootSpans","startTimeUnixMs","endTimeUnixMs","resourceSpan","resourceSpans","resource","parseResource","scopeSpan","scopeSpans","scope","parseScope","otelSpan","spans","span","childSpans","parseSpan","set","spanId","parentSpanId","push","parent","get","console","parentSpan","insertChildSpanAt","s","splice","serviceName","attr","attributes","key","value","stringValue","traceId","name","kind","parseInt","startTimeUnixNano","endTimeUnixNano","events","map","parseEvent","links","parseLink","status","event","timeUnixMs","timeUnixNano","link"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/TracingGanttChart/utils.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesChartsTheme } from '@perses-dev/components';\nimport { Theme } from '@mui/material';\nimport { otlptracev1 } from '@perses-dev/core';\nimport { getConsistentCategoricalColor, getConsistentColor } from './palette';\nimport { Span } from './trace';\n\n/**\n * Viewport contains the current zoom, i.e. which timeframe of the trace should be visible\n */\nexport interface Viewport {\n startTimeUnixMs: number;\n endTimeUnixMs: number;\n}\n\n/** minimum span width, i.e. increase width if the calculated width is too small to be visible */\nexport const minSpanWidthPx = 2;\nexport const rowHeight = '2rem';\nexport const spanHasError = (span: Span): boolean => span.status?.code === otlptracev1.StatusCodeError;\n\nexport function getServiceColor(\n muiTheme: Theme,\n chartsTheme: PersesChartsTheme,\n paletteMode: 'auto' | 'categorical' | undefined,\n serviceName: string,\n error = false\n): string {\n switch (paletteMode) {\n case 'categorical': {\n // ECharts type for color is not always an array but it is always an array in ChartsProvider\n const categoricalPalette = chartsTheme.echartsTheme.color as string[];\n const errorPalette = [muiTheme.palette.error.light, muiTheme.palette.error.main, muiTheme.palette.error.dark];\n return getConsistentCategoricalColor(serviceName, error, categoricalPalette, errorPalette);\n }\n\n default:\n return getConsistentColor(serviceName, error);\n }\n}\n\nexport function getSpanColor(\n muiTheme: Theme,\n chartsTheme: PersesChartsTheme,\n paletteMode: 'auto' | 'categorical' | undefined,\n span: Span\n): string {\n return getServiceColor(muiTheme, chartsTheme, paletteMode, span.resource.serviceName ?? '', spanHasError(span));\n}\n\nexport function formatDuration(timeMs: number): string {\n if (timeMs < 1) {\n return `${Math.round(timeMs * 1000)}μs`;\n }\n if (timeMs < 1000) {\n return `${+timeMs.toFixed(2)}ms`;\n }\n return `${+(timeMs / 1000).toFixed(2)}s`;\n}\n"],"names":["otlptracev1","getConsistentCategoricalColor","getConsistentColor","minSpanWidthPx","rowHeight","spanHasError","span","status","code","StatusCodeError","getServiceColor","muiTheme","chartsTheme","paletteMode","serviceName","error","categoricalPalette","echartsTheme","color","errorPalette","palette","light","main","dark","getSpanColor","resource","formatDuration","timeMs","Math","round","toFixed"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,6BAA6B,EAAEC,kBAAkB,QAAQ,YAAY;AAW9E,+FAA+F,GAC/F,OAAO,MAAMC,iBAAiB,EAAE;AAChC,OAAO,MAAMC,YAAY,OAAO;AAChC,OAAO,MAAMC,eAAe,CAACC,OAAwBA,KAAKC,MAAM,EAAEC,SAASR,YAAYS,eAAe,CAAC;AAEvG,OAAO,SAASC,gBACdC,QAAe,EACfC,WAA8B,EAC9BC,WAA+C,EAC/CC,WAAmB,EACnBC,QAAQ,KAAK;IAEb,OAAQF;QACN,KAAK;YAAe;gBAClB,4FAA4F;gBAC5F,MAAMG,qBAAqBJ,YAAYK,YAAY,CAACC,KAAK;gBACzD,MAAMC,eAAe;oBAACR,SAASS,OAAO,CAACL,KAAK,CAACM,KAAK;oBAAEV,SAASS,OAAO,CAACL,KAAK,CAACO,IAAI;oBAAEX,SAASS,OAAO,CAACL,KAAK,CAACQ,IAAI;iBAAC;gBAC7G,OAAOtB,8BAA8Ba,aAAaC,OAAOC,oBAAoBG;YAC/E;QAEA;YACE,OAAOjB,mBAAmBY,aAAaC;IAC3C;AACF;AAEA,OAAO,SAASS,aACdb,QAAe,EACfC,WAA8B,EAC9BC,WAA+C,EAC/CP,IAAU;IAEV,OAAOI,gBAAgBC,UAAUC,aAAaC,aAAaP,KAAKmB,QAAQ,CAACX,WAAW,IAAI,IAAIT,aAAaC;AAC3G;AAEA,OAAO,SAASoB,eAAeC,MAAc;IAC3C,IAAIA,SAAS,GAAG;QACd,OAAO,GAAGC,KAAKC,KAAK,CAACF,SAAS,MAAM,EAAE,CAAC;IACzC;IACA,IAAIA,SAAS,MAAM;QACjB,OAAO,GAAG,CAACA,OAAOG,OAAO,CAAC,GAAG,EAAE,CAAC;IAClC;IACA,OAAO,GAAG,CAAC,AAACH,CAAAA,SAAS,IAAG,EAAGG,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1C"}
1
+ {"version":3,"sources":["../../../src/TracingGanttChart/utils.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesChartsTheme } from '@perses-dev/components';\nimport { Theme } from '@mui/material';\nimport { otlptracev1 } from '@perses-dev/core';\nimport { getConsistentCategoricalColor, getConsistentColor } from './palette';\nimport { Span } from './trace';\n\n/**\n * Viewport contains the current zoom, i.e. which timeframe of the trace should be visible\n */\nexport interface Viewport {\n startTimeUnixMs: number;\n endTimeUnixMs: number;\n}\n\n/** minimum span width, i.e. increase width if the calculated width is too small to be visible */\nexport const minSpanWidthPx = 2;\nexport const rowHeight = '2rem';\nexport const spanHasError = (span: Span): boolean => span.status?.code === otlptracev1.StatusCodeError;\n\nexport function getServiceColor(\n muiTheme: Theme,\n chartsTheme: PersesChartsTheme,\n paletteMode: 'auto' | 'categorical' | undefined,\n serviceName: string,\n error = false\n): string {\n switch (paletteMode) {\n case 'categorical': {\n // ECharts type for color is not always an array but it is always an array in ChartsProvider\n const categoricalPalette = chartsTheme.echartsTheme.color as string[];\n const errorPalette = [muiTheme.palette.error.light, muiTheme.palette.error.main, muiTheme.palette.error.dark];\n return getConsistentCategoricalColor(serviceName, error, categoricalPalette, errorPalette);\n }\n\n default:\n return getConsistentColor(serviceName, error);\n }\n}\n\nexport function getSpanColor(\n muiTheme: Theme,\n chartsTheme: PersesChartsTheme,\n paletteMode: 'auto' | 'categorical' | undefined,\n span: Span\n): string {\n return getServiceColor(muiTheme, chartsTheme, paletteMode, span.resource.serviceName ?? '', spanHasError(span));\n}\n\nexport function formatDuration(timeMs: number): string {\n if (timeMs < 1) {\n return `${Math.round(timeMs * 1000)}μs`;\n }\n if (timeMs < 1000) {\n return `${+timeMs.toFixed(2)}ms`;\n }\n return `${+(timeMs / 1000).toFixed(2)}s`;\n}\n"],"names":["otlptracev1","getConsistentCategoricalColor","getConsistentColor","minSpanWidthPx","rowHeight","spanHasError","span","status","code","StatusCodeError","getServiceColor","muiTheme","chartsTheme","paletteMode","serviceName","error","categoricalPalette","echartsTheme","color","errorPalette","palette","light","main","dark","getSpanColor","resource","formatDuration","timeMs","Math","round","toFixed"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,6BAA6B,EAAEC,kBAAkB,QAAQ,YAAY;AAW9E,+FAA+F,GAC/F,OAAO,MAAMC,iBAAiB,EAAE;AAChC,OAAO,MAAMC,YAAY,OAAO;AAChC,OAAO,MAAMC,eAAe,CAACC,OAAwBA,KAAKC,MAAM,EAAEC,SAASR,YAAYS,eAAe,CAAC;AAEvG,OAAO,SAASC,gBACdC,QAAe,EACfC,WAA8B,EAC9BC,WAA+C,EAC/CC,WAAmB,EACnBC,QAAQ,KAAK;IAEb,OAAQF;QACN,KAAK;YAAe;gBAClB,4FAA4F;gBAC5F,MAAMG,qBAAqBJ,YAAYK,YAAY,CAACC,KAAK;gBACzD,MAAMC,eAAe;oBAACR,SAASS,OAAO,CAACL,KAAK,CAACM,KAAK;oBAAEV,SAASS,OAAO,CAACL,KAAK,CAACO,IAAI;oBAAEX,SAASS,OAAO,CAACL,KAAK,CAACQ,IAAI;iBAAC;gBAC7G,OAAOtB,8BAA8Ba,aAAaC,OAAOC,oBAAoBG;YAC/E;QAEA;YACE,OAAOjB,mBAAmBY,aAAaC;IAC3C;AACF;AAEA,OAAO,SAASS,aACdb,QAAe,EACfC,WAA8B,EAC9BC,WAA+C,EAC/CP,IAAU;IAEV,OAAOI,gBAAgBC,UAAUC,aAAaC,aAAaP,KAAKmB,QAAQ,CAACX,WAAW,IAAI,IAAIT,aAAaC;AAC3G;AAEA,OAAO,SAASoB,eAAeC,MAAc;IAC3C,IAAIA,SAAS,GAAG;QACd,OAAO,GAAGC,KAAKC,KAAK,CAACF,SAAS,MAAM,EAAE,CAAC;IACzC;IACA,IAAIA,SAAS,MAAM;QACjB,OAAO,GAAG,CAACA,OAAOG,OAAO,CAAC,GAAG,EAAE,CAAC;IAClC;IACA,OAAO,GAAG,CAAC,AAACH,CAAAA,SAAS,IAAG,EAAGG,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1C"}
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TracingGanttChart.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PanelPlugin } from '@perses-dev/plugin-system';\nimport { createInitialTracingGanttChartOptions, TracingGanttChartOptions } from './gantt-chart-model';\nimport { TracingGanttChartPanel, TracingGanttChartPanelProps } from './TracingGanttChartPanel';\nimport { DownloadTraceAction } from './PanelActions';\n\nexport const TracingGanttChart: PanelPlugin<TracingGanttChartOptions, TracingGanttChartPanelProps> = {\n PanelComponent: TracingGanttChartPanel,\n supportedQueryTypes: ['TraceQuery'],\n createInitialOptions: createInitialTracingGanttChartOptions,\n actions: [{ component: DownloadTraceAction }],\n};\n"],"names":["createInitialTracingGanttChartOptions","TracingGanttChartPanel","DownloadTraceAction","TracingGanttChart","PanelComponent","supportedQueryTypes","createInitialOptions","actions","component"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,qCAAqC,QAAkC,sBAAsB;AACtG,SAASC,sBAAsB,QAAqC,2BAA2B;AAC/F,SAASC,mBAAmB,QAAQ,iBAAiB;AAErD,OAAO,MAAMC,oBAAwF;IACnGC,gBAAgBH;IAChBI,qBAAqB;QAAC;KAAa;IACnCC,sBAAsBN;IACtBO,SAAS;QAAC;YAAEC,WAAWN;QAAoB;KAAE;AAC/C,EAAE"}
1
+ {"version":3,"sources":["../../src/TracingGanttChart.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PanelPlugin } from '@perses-dev/plugin-system';\nimport { createInitialTracingGanttChartOptions, TracingGanttChartOptions } from './gantt-chart-model';\nimport { TracingGanttChartPanel, TracingGanttChartPanelProps } from './TracingGanttChartPanel';\nimport { DownloadTraceAction } from './PanelActions';\n\nexport const TracingGanttChart: PanelPlugin<TracingGanttChartOptions, TracingGanttChartPanelProps> = {\n PanelComponent: TracingGanttChartPanel,\n supportedQueryTypes: ['TraceQuery'],\n createInitialOptions: createInitialTracingGanttChartOptions,\n actions: [{ component: DownloadTraceAction }],\n};\n"],"names":["createInitialTracingGanttChartOptions","TracingGanttChartPanel","DownloadTraceAction","TracingGanttChart","PanelComponent","supportedQueryTypes","createInitialOptions","actions","component"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,qCAAqC,QAAkC,sBAAsB;AACtG,SAASC,sBAAsB,QAAqC,2BAA2B;AAC/F,SAASC,mBAAmB,QAAQ,iBAAiB;AAErD,OAAO,MAAMC,oBAAwF;IACnGC,gBAAgBH;IAChBI,qBAAqB;QAAC;KAAa;IACnCC,sBAAsBN;IACtBO,SAAS;QAAC;YAAEC,WAAWN;QAAoB;KAAE;AAC/C,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"TracingGanttChartPanel.d.ts","sourceRoot":"","sources":["../../src/TracingGanttChartPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAe,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAC;AAE1F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,YAAY,CA8BvF"}
1
+ {"version":3,"file":"TracingGanttChartPanel.d.ts","sourceRoot":"","sources":["../../src/TracingGanttChartPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAe,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAC;AAE1F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,YAAY,CAoCvF"}
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -23,6 +23,11 @@ export function TracingGanttChartPanel(props) {
23
23
  message: "This panel does not support more than one query."
24
24
  });
25
25
  }
26
+ if (queryResults[0]?.data.searchResult) {
27
+ return /*#__PURE__*/ _jsx(TextOverlay, {
28
+ message: "This panel does not support displaying trace search results. Please enter a trace id in the query field instead."
29
+ });
30
+ }
26
31
  const trace = queryResults[0]?.data.trace;
27
32
  if (!trace) {
28
33
  return /*#__PURE__*/ _jsx(NoDataOverlay, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TracingGanttChartPanel.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PanelProps } from '@perses-dev/plugin-system';\nimport { NoDataOverlay, TextOverlay, useChartsTheme } from '@perses-dev/components';\nimport { Box } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { TraceData } from '@perses-dev/core';\nimport { CustomLinks, TracingGanttChartOptions } from './gantt-chart-model';\nimport { TracingGanttChart } from './TracingGanttChart/TracingGanttChart';\n\nexport type TracingGanttChartPanelProps = PanelProps<TracingGanttChartOptions, TraceData>;\n\nexport function TracingGanttChartPanel(props: TracingGanttChartPanelProps): ReactElement {\n const { spec, queryResults } = props;\n const chartsTheme = useChartsTheme();\n const contentPadding = chartsTheme.container.padding.default;\n\n if (queryResults.length > 1) {\n return <TextOverlay message=\"This panel does not support more than one query.\" />;\n }\n\n const trace = queryResults[0]?.data.trace;\n if (!trace) {\n return <NoDataOverlay resource=\"trace\" />;\n }\n\n const pluginSpec = queryResults[0]?.definition.spec.plugin.spec as { datasource?: { name?: string } } | undefined;\n const datasourceName = pluginSpec?.datasource?.name;\n const customLinks: CustomLinks | undefined = spec.links\n ? {\n variables: {\n datasourceName: datasourceName ?? '',\n },\n links: spec.links,\n }\n : undefined;\n\n return (\n <Box sx={{ height: '100%', padding: `${contentPadding}px` }}>\n <TracingGanttChart options={spec} customLinks={customLinks} trace={trace} />\n </Box>\n );\n}\n"],"names":["NoDataOverlay","TextOverlay","useChartsTheme","Box","TracingGanttChart","TracingGanttChartPanel","props","spec","queryResults","chartsTheme","contentPadding","container","padding","default","length","message","trace","data","resource","pluginSpec","definition","plugin","datasourceName","datasource","name","customLinks","links","variables","undefined","sx","height","options"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,aAAa,EAAEC,WAAW,EAAEC,cAAc,QAAQ,yBAAyB;AACpF,SAASC,GAAG,QAAQ,gBAAgB;AAIpC,SAASC,iBAAiB,QAAQ,wCAAwC;AAI1E,OAAO,SAASC,uBAAuBC,KAAkC;IACvE,MAAM,EAAEC,IAAI,EAAEC,YAAY,EAAE,GAAGF;IAC/B,MAAMG,cAAcP;IACpB,MAAMQ,iBAAiBD,YAAYE,SAAS,CAACC,OAAO,CAACC,OAAO;IAE5D,IAAIL,aAAaM,MAAM,GAAG,GAAG;QAC3B,qBAAO,KAACb;YAAYc,SAAQ;;IAC9B;IAEA,MAAMC,QAAQR,YAAY,CAAC,EAAE,EAAES,KAAKD;IACpC,IAAI,CAACA,OAAO;QACV,qBAAO,KAAChB;YAAckB,UAAS;;IACjC;IAEA,MAAMC,aAAaX,YAAY,CAAC,EAAE,EAAEY,WAAWb,KAAKc,OAAOd;IAC3D,MAAMe,iBAAiBH,YAAYI,YAAYC;IAC/C,MAAMC,cAAuClB,KAAKmB,KAAK,GACnD;QACEC,WAAW;YACTL,gBAAgBA,kBAAkB;QACpC;QACAI,OAAOnB,KAAKmB,KAAK;IACnB,IACAE;IAEJ,qBACE,KAACzB;QAAI0B,IAAI;YAAEC,QAAQ;YAAQlB,SAAS,GAAGF,eAAe,EAAE,CAAC;QAAC;kBACxD,cAAA,KAACN;YAAkB2B,SAASxB;YAAMkB,aAAaA;YAAaT,OAAOA;;;AAGzE"}
1
+ {"version":3,"sources":["../../src/TracingGanttChartPanel.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PanelProps } from '@perses-dev/plugin-system';\nimport { NoDataOverlay, TextOverlay, useChartsTheme } from '@perses-dev/components';\nimport { Box } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { TraceData } from '@perses-dev/core';\nimport { CustomLinks, TracingGanttChartOptions } from './gantt-chart-model';\nimport { TracingGanttChart } from './TracingGanttChart/TracingGanttChart';\n\nexport type TracingGanttChartPanelProps = PanelProps<TracingGanttChartOptions, TraceData>;\n\nexport function TracingGanttChartPanel(props: TracingGanttChartPanelProps): ReactElement {\n const { spec, queryResults } = props;\n const chartsTheme = useChartsTheme();\n const contentPadding = chartsTheme.container.padding.default;\n\n if (queryResults.length > 1) {\n return <TextOverlay message=\"This panel does not support more than one query.\" />;\n }\n\n if (queryResults[0]?.data.searchResult) {\n return (\n <TextOverlay message=\"This panel does not support displaying trace search results. Please enter a trace id in the query field instead.\" />\n );\n }\n\n const trace = queryResults[0]?.data.trace;\n if (!trace) {\n return <NoDataOverlay resource=\"trace\" />;\n }\n\n const pluginSpec = queryResults[0]?.definition.spec.plugin.spec as { datasource?: { name?: string } } | undefined;\n const datasourceName = pluginSpec?.datasource?.name;\n const customLinks: CustomLinks | undefined = spec.links\n ? {\n variables: {\n datasourceName: datasourceName ?? '',\n },\n links: spec.links,\n }\n : undefined;\n\n return (\n <Box sx={{ height: '100%', padding: `${contentPadding}px` }}>\n <TracingGanttChart options={spec} customLinks={customLinks} trace={trace} />\n </Box>\n );\n}\n"],"names":["NoDataOverlay","TextOverlay","useChartsTheme","Box","TracingGanttChart","TracingGanttChartPanel","props","spec","queryResults","chartsTheme","contentPadding","container","padding","default","length","message","data","searchResult","trace","resource","pluginSpec","definition","plugin","datasourceName","datasource","name","customLinks","links","variables","undefined","sx","height","options"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,aAAa,EAAEC,WAAW,EAAEC,cAAc,QAAQ,yBAAyB;AACpF,SAASC,GAAG,QAAQ,gBAAgB;AAIpC,SAASC,iBAAiB,QAAQ,wCAAwC;AAI1E,OAAO,SAASC,uBAAuBC,KAAkC;IACvE,MAAM,EAAEC,IAAI,EAAEC,YAAY,EAAE,GAAGF;IAC/B,MAAMG,cAAcP;IACpB,MAAMQ,iBAAiBD,YAAYE,SAAS,CAACC,OAAO,CAACC,OAAO;IAE5D,IAAIL,aAAaM,MAAM,GAAG,GAAG;QAC3B,qBAAO,KAACb;YAAYc,SAAQ;;IAC9B;IAEA,IAAIP,YAAY,CAAC,EAAE,EAAEQ,KAAKC,cAAc;QACtC,qBACE,KAAChB;YAAYc,SAAQ;;IAEzB;IAEA,MAAMG,QAAQV,YAAY,CAAC,EAAE,EAAEQ,KAAKE;IACpC,IAAI,CAACA,OAAO;QACV,qBAAO,KAAClB;YAAcmB,UAAS;;IACjC;IAEA,MAAMC,aAAaZ,YAAY,CAAC,EAAE,EAAEa,WAAWd,KAAKe,OAAOf;IAC3D,MAAMgB,iBAAiBH,YAAYI,YAAYC;IAC/C,MAAMC,cAAuCnB,KAAKoB,KAAK,GACnD;QACEC,WAAW;YACTL,gBAAgBA,kBAAkB;QACpC;QACAI,OAAOpB,KAAKoB,KAAK;IACnB,IACAE;IAEJ,qBACE,KAAC1B;QAAI2B,IAAI;YAAEC,QAAQ;YAAQnB,SAAS,GAAGF,eAAe,EAAE,CAAC;QAAC;kBACxD,cAAA,KAACN;YAAkB4B,SAASzB;YAAMmB,aAAaA;YAAaR,OAAOA;;;AAGzE"}
package/lib/bootstrap.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- // Copyright 2024 The Perses Authors
2
+ // Copyright The Perses Authors
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/bootstrap.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nconst root = ReactDOM.createRoot(document.getElementById('root')!);\nroot.render(<React.StrictMode></React.StrictMode>);\n"],"names":["React","ReactDOM","root","createRoot","document","getElementById","render","StrictMode"],"mappings":";AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,OAAOC,cAAc,mBAAmB;AAExC,MAAMC,OAAOD,SAASE,UAAU,CAACC,SAASC,cAAc,CAAC;AACzDH,KAAKI,MAAM,eAAC,KAACN,MAAMO,UAAU"}
1
+ {"version":3,"sources":["../../src/bootstrap.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nconst root = ReactDOM.createRoot(document.getElementById('root')!);\nroot.render(<React.StrictMode></React.StrictMode>);\n"],"names":["React","ReactDOM","root","createRoot","document","getElementById","render","StrictMode"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,OAAOC,cAAc,mBAAmB;AAExC,MAAMC,OAAOD,SAASE,UAAU,CAACC,SAASC,cAAc,CAAC;AACzDH,KAAKI,MAAM,eAAC,KAACN,MAAMO,UAAU"}
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -33,6 +33,11 @@ function TracingGanttChartPanel(props) {
33
33
  message: "This panel does not support more than one query."
34
34
  });
35
35
  }
36
+ if (queryResults[0]?.data.searchResult) {
37
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.TextOverlay, {
38
+ message: "This panel does not support displaying trace search results. Please enter a trace id in the query field instead."
39
+ });
40
+ }
36
41
  const trace = queryResults[0]?.data.trace;
37
42
  if (!trace) {
38
43
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.NoDataOverlay, {
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
package/lib/cjs/env.d.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,3 +1,15 @@
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.
1
13
  "use strict";
2
14
  Object.defineProperty(exports, "__esModule", {
3
15
  value: true
@@ -40,7 +40,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
40
40
  }
41
41
  return newObj;
42
42
  }
43
- // Copyright 2024 The Perses Authors
43
+ // Copyright The Perses Authors
44
44
  // Licensed under the Apache License, Version 2.0 (the "License");
45
45
  // you may not use this file except in compliance with the License.
46
46
  // You may obtain a copy of the License at
package/lib/cjs/index.js CHANGED
@@ -1,3 +1,15 @@
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.
1
13
  "use strict";
2
14
  Object.defineProperty(exports, "__esModule", {
3
15
  value: true
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
package/lib/env.d.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
package/lib/env.d.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/env.d.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/// <reference types=\"@rsbuild/core/types\" />\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,6CAA6C"}
1
+ {"version":3,"sources":["../../src/env.d.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/// <reference types=\"@rsbuild/core/types\" />\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,6CAA6C"}
@@ -1,4 +1,4 @@
1
- // Copyright 2024 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at