@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.
- package/__mf/js/{TracingGanttChart.ca3d72b7.js → TracingGanttChart.4460ff1c.js} +4 -4
- package/__mf/js/async/121.5b3411ef.js +2 -0
- package/__mf/js/async/192.b0550d58.js +1 -0
- package/__mf/js/async/2.2a545358.js +1 -0
- package/__mf/js/async/235.831bea3e.js +1 -0
- package/__mf/js/async/247.e4d2c197.js +1 -0
- package/__mf/js/async/274.eee92e86.js +2 -0
- package/__mf/js/async/356.43c6ada2.js +1 -0
- package/__mf/js/async/392.a3f49cf0.js +2 -0
- package/__mf/js/async/407.6e0c3fb4.js +4 -0
- package/__mf/js/async/407.6e0c3fb4.js.LICENSE.txt +9 -0
- package/__mf/js/async/43.cbae1eef.js +2 -0
- package/__mf/js/async/436.4db73a03.js +110 -0
- package/__mf/js/async/470.8d6cfc01.js +2 -0
- package/__mf/js/async/496.9a3d3d3d.js +1 -0
- package/__mf/js/async/587.849f1255.js +1 -0
- package/__mf/js/async/588.39275df8.js +1 -0
- package/__mf/js/async/616.4d217c10.js +1 -0
- package/__mf/js/async/665.2b61216d.js +2 -0
- package/__mf/js/async/672.790df7d1.js +1 -0
- package/__mf/js/async/71.4eb8fa2f.js +1 -0
- package/__mf/js/async/77.27ff39b8.js +1 -0
- package/__mf/js/async/776.f19f62f3.js +43 -0
- package/__mf/js/async/{30.991f7ee4.js.LICENSE.txt → 776.f19f62f3.js.LICENSE.txt} +41 -1
- package/__mf/js/async/873.a00a9302.js +1 -0
- package/__mf/js/async/941.7ee2dbf0.js +2 -0
- package/__mf/js/async/968.b61d3c02.js +1 -0
- package/__mf/js/async/978.4227a27e.js +1 -0
- package/__mf/js/async/__federation_expose_TracingGanttChart.303e7806.js +1 -0
- package/__mf/js/async/lib-router.a8607481.js +2 -0
- package/__mf/js/{main.9e057781.js → main.7b791d2a.js} +2 -2
- package/lib/PanelActions.d.ts +3 -3
- package/lib/PanelActions.d.ts.map +1 -1
- package/lib/PanelActions.js +4 -4
- package/lib/PanelActions.js.map +1 -1
- package/lib/TracingGanttChart/DetailPane/Attributes.d.ts +4 -4
- package/lib/TracingGanttChart/DetailPane/Attributes.d.ts.map +1 -1
- package/lib/TracingGanttChart/DetailPane/Attributes.js +4 -4
- package/lib/TracingGanttChart/DetailPane/Attributes.js.map +1 -1
- package/lib/TracingGanttChart/DetailPane/DetailPane.d.ts +3 -3
- package/lib/TracingGanttChart/DetailPane/DetailPane.d.ts.map +1 -1
- package/lib/TracingGanttChart/DetailPane/DetailPane.js +6 -6
- package/lib/TracingGanttChart/DetailPane/DetailPane.js.map +1 -1
- package/lib/TracingGanttChart/DetailPane/SpanEvents.d.ts +3 -3
- package/lib/TracingGanttChart/DetailPane/SpanEvents.d.ts.map +1 -1
- package/lib/TracingGanttChart/DetailPane/SpanEvents.js +7 -7
- package/lib/TracingGanttChart/DetailPane/SpanEvents.js.map +1 -1
- package/lib/TracingGanttChart/DetailPane/SpanLinks.d.ts +3 -3
- package/lib/TracingGanttChart/DetailPane/SpanLinks.d.ts.map +1 -1
- package/lib/TracingGanttChart/DetailPane/SpanLinks.js +4 -4
- package/lib/TracingGanttChart/DetailPane/SpanLinks.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTable.d.ts +4 -4
- package/lib/TracingGanttChart/GanttTable/GanttTable.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTable.js +8 -8
- package/lib/TracingGanttChart/GanttTable/GanttTable.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTableHeader.d.ts +3 -3
- package/lib/TracingGanttChart/GanttTable/GanttTableHeader.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTableHeader.js +3 -3
- package/lib/TracingGanttChart/GanttTable/GanttTableHeader.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTableProvider.d.ts +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTableProvider.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js +2 -2
- package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTableRow.d.ts +3 -3
- package/lib/TracingGanttChart/GanttTable/GanttTableRow.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/GanttTableRow.js +5 -5
- package/lib/TracingGanttChart/GanttTable/GanttTableRow.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/ResizableDivider.d.ts +1 -1
- package/lib/TracingGanttChart/GanttTable/ResizableDivider.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/ResizableDivider.js +3 -3
- package/lib/TracingGanttChart/GanttTable/ResizableDivider.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/SpanDuration.d.ts +4 -4
- package/lib/TracingGanttChart/GanttTable/SpanDuration.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/SpanDuration.js +4 -4
- package/lib/TracingGanttChart/GanttTable/SpanDuration.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/SpanIndents.d.ts +2 -2
- package/lib/TracingGanttChart/GanttTable/SpanIndents.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/SpanIndents.js +5 -5
- package/lib/TracingGanttChart/GanttTable/SpanIndents.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/SpanLinksButton.d.ts +3 -3
- package/lib/TracingGanttChart/GanttTable/SpanLinksButton.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/SpanLinksButton.js +5 -5
- package/lib/TracingGanttChart/GanttTable/SpanLinksButton.js.map +1 -1
- package/lib/TracingGanttChart/GanttTable/SpanName.d.ts +3 -3
- package/lib/TracingGanttChart/GanttTable/SpanName.d.ts.map +1 -1
- package/lib/TracingGanttChart/GanttTable/SpanName.js +5 -5
- package/lib/TracingGanttChart/GanttTable/SpanName.js.map +1 -1
- package/lib/TracingGanttChart/MiniGanttChart/Canvas.d.ts +4 -4
- package/lib/TracingGanttChart/MiniGanttChart/Canvas.d.ts.map +1 -1
- package/lib/TracingGanttChart/MiniGanttChart/Canvas.js +8 -8
- package/lib/TracingGanttChart/MiniGanttChart/Canvas.js.map +1 -1
- package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.d.ts +4 -4
- package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.d.ts.map +1 -1
- package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.js +4 -4
- package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.js.map +1 -1
- package/lib/TracingGanttChart/MiniGanttChart/draw.d.ts +1 -1
- package/lib/TracingGanttChart/MiniGanttChart/draw.d.ts.map +1 -1
- package/lib/TracingGanttChart/MiniGanttChart/draw.js +2 -2
- package/lib/TracingGanttChart/MiniGanttChart/draw.js.map +1 -1
- package/lib/TracingGanttChart/Search.d.ts +2 -2
- package/lib/TracingGanttChart/Search.d.ts.map +1 -1
- package/lib/TracingGanttChart/Search.js +7 -7
- package/lib/TracingGanttChart/Search.js.map +1 -1
- package/lib/TracingGanttChart/Ticks.d.ts +3 -3
- package/lib/TracingGanttChart/Ticks.d.ts.map +1 -1
- package/lib/TracingGanttChart/Ticks.js +3 -3
- package/lib/TracingGanttChart/Ticks.js.map +1 -1
- package/lib/TracingGanttChart/TraceHeaderBar.d.ts +3 -3
- package/lib/TracingGanttChart/TraceHeaderBar.d.ts.map +1 -1
- package/lib/TracingGanttChart/TraceHeaderBar.js +6 -6
- package/lib/TracingGanttChart/TraceHeaderBar.js.map +1 -1
- package/lib/TracingGanttChart/TracingGanttChart.d.ts +3 -3
- package/lib/TracingGanttChart/TracingGanttChart.d.ts.map +1 -1
- package/lib/TracingGanttChart/TracingGanttChart.js +13 -11
- package/lib/TracingGanttChart/TracingGanttChart.js.map +1 -1
- package/lib/TracingGanttChart/palette.js +1 -1
- package/lib/TracingGanttChart/palette.js.map +1 -1
- package/lib/TracingGanttChart/trace.d.ts +2 -2
- package/lib/TracingGanttChart/trace.d.ts.map +1 -1
- package/lib/TracingGanttChart/trace.js +1 -1
- package/lib/TracingGanttChart/trace.js.map +1 -1
- package/lib/TracingGanttChart/utils.d.ts +3 -3
- package/lib/TracingGanttChart/utils.d.ts.map +1 -1
- package/lib/TracingGanttChart/utils.js +2 -2
- package/lib/TracingGanttChart/utils.js.map +1 -1
- package/lib/TracingGanttChart.d.ts +3 -3
- package/lib/TracingGanttChart.d.ts.map +1 -1
- package/lib/TracingGanttChart.js +3 -3
- package/lib/TracingGanttChart.js.map +1 -1
- package/lib/TracingGanttChartPanel.d.ts +4 -4
- package/lib/TracingGanttChartPanel.d.ts.map +1 -1
- package/lib/TracingGanttChartPanel.js +4 -4
- package/lib/TracingGanttChartPanel.js.map +1 -1
- package/lib/bootstrap.js +2 -2
- package/lib/getPluginModule.d.ts +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +3 -1
- package/lib/getPluginModule.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/setup-tests.d.ts +1 -1
- package/lib/setup-tests.d.ts.map +1 -1
- package/lib/setup-tests.js +2 -2
- package/lib/setup-tests.js.map +1 -1
- package/lib/test/convert/jaeger.d.ts +1 -1
- package/lib/test/convert/jaeger.d.ts.map +1 -1
- package/lib/test/convert/jaeger.js.map +1 -1
- package/mf-manifest.json +35 -34
- package/mf-stats.json +35 -34
- package/package.json +10 -10
- package/__mf/js/async/121.1fc97c57.js +0 -2
- package/__mf/js/async/177.27fced63.js +0 -1
- package/__mf/js/async/192.ea308602.js +0 -1
- package/__mf/js/async/193.6692daa9.js +0 -1
- package/__mf/js/async/2.c5f68593.js +0 -1
- package/__mf/js/async/235.4f4ad5f0.js +0 -1
- package/__mf/js/async/274.03fc3289.js +0 -2
- package/__mf/js/async/30.991f7ee4.js +0 -39
- package/__mf/js/async/356.2e3c02c9.js +0 -1
- package/__mf/js/async/392.eb9b3bb9.js +0 -2
- package/__mf/js/async/43.b9d7bc56.js +0 -2
- package/__mf/js/async/47.514dc87f.js +0 -1
- package/__mf/js/async/470.9743e21d.js +0 -2
- package/__mf/js/async/546.b40699cb.js +0 -24
- package/__mf/js/async/546.b40699cb.js.LICENSE.txt +0 -19
- package/__mf/js/async/570.9d51e826.js +0 -7
- package/__mf/js/async/570.9d51e826.js.LICENSE.txt +0 -39
- package/__mf/js/async/581.aa52d024.js +0 -1
- package/__mf/js/async/587.f49a06d9.js +0 -1
- package/__mf/js/async/588.46394f24.js +0 -1
- package/__mf/js/async/616.09a93b54.js +0 -1
- package/__mf/js/async/71.f0d71a40.js +0 -1
- package/__mf/js/async/873.34370b2c.js +0 -1
- package/__mf/js/async/887.027eb62b.js +0 -110
- package/__mf/js/async/941.3d671d54.js +0 -2
- package/__mf/js/async/968.1ac51448.js +0 -1
- package/__mf/js/async/978.0c50ecf5.js +0 -1
- package/__mf/js/async/__federation_expose_TracingGanttChart.9c074bea.js +0 -1
- package/__mf/js/async/lib-router.5f492283.js +0 -2
- package/lib/cjs/PanelActions.js +0 -88
- package/lib/cjs/TracingGanttChart/DetailPane/Attributes.js +0 -204
- package/lib/cjs/TracingGanttChart/DetailPane/DetailPane.js +0 -129
- package/lib/cjs/TracingGanttChart/DetailPane/SpanEvents.js +0 -113
- package/lib/cjs/TracingGanttChart/DetailPane/SpanLinks.js +0 -72
- package/lib/cjs/TracingGanttChart/GanttTable/GanttTable.js +0 -154
- package/lib/cjs/TracingGanttChart/GanttTable/GanttTableHeader.js +0 -64
- package/lib/cjs/TracingGanttChart/GanttTable/GanttTableProvider.js +0 -60
- package/lib/cjs/TracingGanttChart/GanttTable/GanttTableRow.js +0 -77
- package/lib/cjs/TracingGanttChart/GanttTable/ResizableDivider.js +0 -98
- package/lib/cjs/TracingGanttChart/GanttTable/SpanDuration.js +0 -81
- package/lib/cjs/TracingGanttChart/GanttTable/SpanIndents.js +0 -97
- package/lib/cjs/TracingGanttChart/GanttTable/SpanLinksButton.js +0 -108
- package/lib/cjs/TracingGanttChart/GanttTable/SpanName.js +0 -83
- package/lib/cjs/TracingGanttChart/MiniGanttChart/Canvas.js +0 -256
- package/lib/cjs/TracingGanttChart/MiniGanttChart/MiniGanttChart.js +0 -59
- package/lib/cjs/TracingGanttChart/MiniGanttChart/draw.js +0 -45
- package/lib/cjs/TracingGanttChart/Search.js +0 -154
- package/lib/cjs/TracingGanttChart/Ticks.js +0 -106
- package/lib/cjs/TracingGanttChart/TraceHeaderBar.js +0 -159
- package/lib/cjs/TracingGanttChart/TracingGanttChart.js +0 -122
- package/lib/cjs/TracingGanttChart/palette.js +0 -83
- package/lib/cjs/TracingGanttChart/trace.js +0 -137
- package/lib/cjs/TracingGanttChart/utils.js +0 -117
- package/lib/cjs/TracingGanttChart.js +0 -37
- package/lib/cjs/TracingGanttChartPanel.js +0 -66
- package/lib/cjs/bootstrap.js +0 -26
- package/lib/cjs/env.d.js +0 -14
- package/lib/cjs/gantt-chart-model.js +0 -28
- package/lib/cjs/getPluginModule.js +0 -39
- package/lib/cjs/index-federation.js +0 -55
- package/lib/cjs/index.js +0 -39
- package/lib/cjs/setup-tests.js +0 -19
- package/lib/cjs/test/convert/jaeger.js +0 -86
- /package/__mf/css/async/{570.85c2cbf6.css → 776.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{121.1fc97c57.js.LICENSE.txt → 121.5b3411ef.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{274.03fc3289.js.LICENSE.txt → 274.eee92e86.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.eb9b3bb9.js.LICENSE.txt → 392.a3f49cf0.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{43.b9d7bc56.js.LICENSE.txt → 43.cbae1eef.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{887.027eb62b.js.LICENSE.txt → 436.4db73a03.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{470.9743e21d.js.LICENSE.txt → 470.8d6cfc01.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.3d671d54.js.LICENSE.txt → 941.7ee2dbf0.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.5f492283.js.LICENSE.txt → lib-router.a8607481.js.LICENSE.txt} +0 -0
|
@@ -1,129 +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, "DetailPane", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return DetailPane;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _material = require("@mui/material");
|
|
25
|
-
const _react = require("react");
|
|
26
|
-
const _Close = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Close"));
|
|
27
|
-
const _Attributes = require("./Attributes");
|
|
28
|
-
const _SpanEvents = require("./SpanEvents");
|
|
29
|
-
const _SpanLinks = require("./SpanLinks");
|
|
30
|
-
function _interop_require_default(obj) {
|
|
31
|
-
return obj && obj.__esModule ? obj : {
|
|
32
|
-
default: obj
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function DetailPane(props) {
|
|
36
|
-
const { customLinks, trace, span, onCloseBtnClick } = props;
|
|
37
|
-
const [tab, setTab] = (0, _react.useState)('attributes');
|
|
38
|
-
// if the events tab is selected, and then a span without events is clicked,
|
|
39
|
-
// we need to switch the current selected tab back to the attributes tab.
|
|
40
|
-
if (tab === 'events' && span.events.length === 0) {
|
|
41
|
-
setTab('attributes');
|
|
42
|
-
}
|
|
43
|
-
// same as above, but for span links
|
|
44
|
-
if (tab === 'links' && span.links.length === 0) {
|
|
45
|
-
setTab('attributes');
|
|
46
|
-
}
|
|
47
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
48
|
-
children: [
|
|
49
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
50
|
-
sx: {
|
|
51
|
-
float: 'right'
|
|
52
|
-
},
|
|
53
|
-
onClick: onCloseBtnClick,
|
|
54
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Close.default, {})
|
|
55
|
-
}),
|
|
56
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
57
|
-
sx: {
|
|
58
|
-
wordBreak: 'break-word'
|
|
59
|
-
},
|
|
60
|
-
children: span.resource.serviceName
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
63
|
-
variant: "h2",
|
|
64
|
-
sx: {
|
|
65
|
-
wordBreak: 'break-word'
|
|
66
|
-
},
|
|
67
|
-
children: span.name
|
|
68
|
-
}),
|
|
69
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
70
|
-
sx: {
|
|
71
|
-
borderBottom: 1,
|
|
72
|
-
borderColor: 'divider'
|
|
73
|
-
},
|
|
74
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Tabs, {
|
|
75
|
-
value: tab,
|
|
76
|
-
onChange: (_, tab)=>setTab(tab),
|
|
77
|
-
variant: "scrollable",
|
|
78
|
-
children: [
|
|
79
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tab, {
|
|
80
|
-
sx: {
|
|
81
|
-
p: 0
|
|
82
|
-
},
|
|
83
|
-
value: "attributes",
|
|
84
|
-
label: "Attributes"
|
|
85
|
-
}),
|
|
86
|
-
span.events.length > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tab, {
|
|
87
|
-
value: "events",
|
|
88
|
-
label: "Events",
|
|
89
|
-
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Chip, {
|
|
90
|
-
label: span.events.length
|
|
91
|
-
}),
|
|
92
|
-
iconPosition: "end",
|
|
93
|
-
sx: {
|
|
94
|
-
minHeight: 48,
|
|
95
|
-
height: 48
|
|
96
|
-
}
|
|
97
|
-
}),
|
|
98
|
-
span.links.length > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tab, {
|
|
99
|
-
value: "links",
|
|
100
|
-
label: "Links",
|
|
101
|
-
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Chip, {
|
|
102
|
-
label: span.links.length
|
|
103
|
-
}),
|
|
104
|
-
iconPosition: "end",
|
|
105
|
-
sx: {
|
|
106
|
-
minHeight: 48,
|
|
107
|
-
height: 48
|
|
108
|
-
}
|
|
109
|
-
})
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
}),
|
|
113
|
-
tab === 'attributes' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Attributes.TraceAttributes, {
|
|
114
|
-
customLinks: customLinks,
|
|
115
|
-
trace: trace,
|
|
116
|
-
span: span
|
|
117
|
-
}),
|
|
118
|
-
tab === 'events' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_SpanEvents.SpanEventList, {
|
|
119
|
-
customLinks: customLinks,
|
|
120
|
-
trace: trace,
|
|
121
|
-
span: span
|
|
122
|
-
}),
|
|
123
|
-
tab === 'links' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_SpanLinks.SpanLinkList, {
|
|
124
|
-
customLinks: customLinks,
|
|
125
|
-
span: span
|
|
126
|
-
})
|
|
127
|
-
]
|
|
128
|
-
});
|
|
129
|
-
}
|
|
@@ -1,113 +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, "SpanEventList", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return SpanEventList;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _material = require("@mui/material");
|
|
25
|
-
const _react = require("react");
|
|
26
|
-
const _ChevronUp = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronUp"));
|
|
27
|
-
const _ChevronDown = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronDown"));
|
|
28
|
-
const _utils = require("../utils");
|
|
29
|
-
const _Attributes = require("./Attributes");
|
|
30
|
-
function _interop_require_default(obj) {
|
|
31
|
-
return obj && obj.__esModule ? obj : {
|
|
32
|
-
default: obj
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function SpanEventList(props) {
|
|
36
|
-
const { customLinks, trace, span } = props;
|
|
37
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
38
|
-
children: span.events.sort((a, b)=>a.timeUnixMs - b.timeUnixMs).map((event, i)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.Fragment, {
|
|
39
|
-
children: [
|
|
40
|
-
i > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Divider, {}),
|
|
41
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(SpanEventItem, {
|
|
42
|
-
customLinks: customLinks,
|
|
43
|
-
trace: trace,
|
|
44
|
-
event: event
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
}, i))
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function SpanEventItem(props) {
|
|
51
|
-
const { customLinks, trace, event } = props;
|
|
52
|
-
const relativeTime = event.timeUnixMs - trace.startTimeUnixMs;
|
|
53
|
-
const [open, setOpen] = (0, _react.useState)(false);
|
|
54
|
-
const handleClick = ()=>{
|
|
55
|
-
setOpen(!open);
|
|
56
|
-
};
|
|
57
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.List, {
|
|
58
|
-
children: [
|
|
59
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.ListItemButton, {
|
|
60
|
-
onClick: handleClick,
|
|
61
|
-
sx: {
|
|
62
|
-
px: 1
|
|
63
|
-
},
|
|
64
|
-
children: [
|
|
65
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemText, {
|
|
66
|
-
primary: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
67
|
-
children: [
|
|
68
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)("strong", {
|
|
69
|
-
children: [
|
|
70
|
-
(0, _utils.formatDuration)(relativeTime),
|
|
71
|
-
":"
|
|
72
|
-
]
|
|
73
|
-
}),
|
|
74
|
-
" ",
|
|
75
|
-
event.name
|
|
76
|
-
]
|
|
77
|
-
}),
|
|
78
|
-
slotProps: {
|
|
79
|
-
primary: {
|
|
80
|
-
noWrap: true
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}),
|
|
84
|
-
open ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronUp.default, {}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronDown.default, {})
|
|
85
|
-
]
|
|
86
|
-
}),
|
|
87
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Collapse, {
|
|
88
|
-
in: open,
|
|
89
|
-
timeout: "auto",
|
|
90
|
-
unmountOnExit: true,
|
|
91
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.List, {
|
|
92
|
-
sx: {
|
|
93
|
-
px: 1
|
|
94
|
-
},
|
|
95
|
-
children: [
|
|
96
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Attributes.AttributeItem, {
|
|
97
|
-
name: "name",
|
|
98
|
-
value: event.name
|
|
99
|
-
}),
|
|
100
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Attributes.AttributeItem, {
|
|
101
|
-
name: "time",
|
|
102
|
-
value: (0, _utils.formatDuration)(relativeTime)
|
|
103
|
-
}),
|
|
104
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Attributes.AttributeItems, {
|
|
105
|
-
customLinks: customLinks,
|
|
106
|
-
attributes: event.attributes
|
|
107
|
-
})
|
|
108
|
-
]
|
|
109
|
-
})
|
|
110
|
-
})
|
|
111
|
-
]
|
|
112
|
-
});
|
|
113
|
-
}
|
|
@@ -1,72 +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, "SpanLinkList", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return SpanLinkList;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _material = require("@mui/material");
|
|
25
|
-
const _react = require("react");
|
|
26
|
-
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
27
|
-
const _Attributes = require("./Attributes");
|
|
28
|
-
function SpanLinkList(props) {
|
|
29
|
-
const { customLinks, span } = props;
|
|
30
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
31
|
-
children: span.links.map((link, i)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.Fragment, {
|
|
32
|
-
children: [
|
|
33
|
-
i > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Divider, {}),
|
|
34
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(SpanLinkItem, {
|
|
35
|
-
link: link,
|
|
36
|
-
customLinks: customLinks
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
}, i))
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
function SpanLinkItem(props) {
|
|
43
|
-
const { customLinks, link } = props;
|
|
44
|
-
const variableValues = (0, _pluginsystem.useAllVariableValues)();
|
|
45
|
-
const traceLink = customLinks?.links.trace ? (0, _pluginsystem.replaceVariablesInString)(customLinks.links.trace, variableValues, {
|
|
46
|
-
...customLinks?.variables,
|
|
47
|
-
traceId: link.traceId
|
|
48
|
-
}) : undefined;
|
|
49
|
-
const spanLink = customLinks?.links.span ? (0, _pluginsystem.replaceVariablesInString)(customLinks.links.span, variableValues, {
|
|
50
|
-
...customLinks?.variables,
|
|
51
|
-
traceId: link.traceId,
|
|
52
|
-
spanId: link.spanId
|
|
53
|
-
}) : undefined;
|
|
54
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.List, {
|
|
55
|
-
children: [
|
|
56
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Attributes.AttributeItem, {
|
|
57
|
-
name: "trace ID",
|
|
58
|
-
value: link.traceId,
|
|
59
|
-
link: traceLink
|
|
60
|
-
}),
|
|
61
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Attributes.AttributeItem, {
|
|
62
|
-
name: "span ID",
|
|
63
|
-
value: link.spanId,
|
|
64
|
-
link: spanLink
|
|
65
|
-
}),
|
|
66
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Attributes.AttributeItems, {
|
|
67
|
-
customLinks: customLinks,
|
|
68
|
-
attributes: link.attributes
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
});
|
|
72
|
-
}
|
|
@@ -1,154 +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, "GanttTable", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return GanttTable;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _reactvirtuoso = require("react-virtuoso");
|
|
25
|
-
const _react = require("react");
|
|
26
|
-
const _material = require("@mui/material");
|
|
27
|
-
const _trace = require("../trace");
|
|
28
|
-
const _GanttTableProvider = require("./GanttTableProvider");
|
|
29
|
-
const _GanttTableRow = require("./GanttTableRow");
|
|
30
|
-
const _GanttTableHeader = require("./GanttTableHeader");
|
|
31
|
-
const _ResizableDivider = require("./ResizableDivider");
|
|
32
|
-
function GanttTable(props) {
|
|
33
|
-
const { options, customLinks, trace, viewport, selectedSpan, onSpanClick, matchingSpanIds, focusedSpanId } = props;
|
|
34
|
-
const { collapsedSpans, setCollapsedSpans, setVisibleSpans } = (0, _GanttTableProvider.useGanttTableContext)();
|
|
35
|
-
const [nameColumnWidth, setNameColumnWidth] = (0, _react.useState)(0.25);
|
|
36
|
-
const tableRef = (0, _react.useRef)(null);
|
|
37
|
-
const virtuosoRef = (0, _react.useRef)(null);
|
|
38
|
-
const theme = (0, _material.useTheme)();
|
|
39
|
-
// Recursively flatten the span tree to a list of rows, hiding collapsed child spans.
|
|
40
|
-
const rows = (0, _react.useMemo)(()=>{
|
|
41
|
-
const rows = [];
|
|
42
|
-
(0, _trace.forEachSpan)(trace.rootSpans, (span)=>{
|
|
43
|
-
rows.push(span);
|
|
44
|
-
if (collapsedSpans.has(span.spanId)) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
return rows;
|
|
49
|
-
}, [
|
|
50
|
-
trace.rootSpans,
|
|
51
|
-
collapsedSpans
|
|
52
|
-
]);
|
|
53
|
-
const matchingSpanIdSet = (0, _react.useMemo)(()=>new Set(matchingSpanIds ?? []), [
|
|
54
|
-
matchingSpanIds
|
|
55
|
-
]);
|
|
56
|
-
// Auto-expand collapsed ancestors when focusing a search match
|
|
57
|
-
(0, _react.useEffect)(()=>{
|
|
58
|
-
if (!focusedSpanId) return;
|
|
59
|
-
const span = trace.spanById.get(focusedSpanId);
|
|
60
|
-
if (!span) return;
|
|
61
|
-
const ancestorIds = new Set();
|
|
62
|
-
let parent = span.parentSpan;
|
|
63
|
-
while(parent){
|
|
64
|
-
ancestorIds.add(parent.spanId);
|
|
65
|
-
parent = parent.parentSpan;
|
|
66
|
-
}
|
|
67
|
-
if (ancestorIds.size > 0) {
|
|
68
|
-
setCollapsedSpans((prev)=>{
|
|
69
|
-
const next = new Set(prev);
|
|
70
|
-
let changed = false;
|
|
71
|
-
for (const id of ancestorIds){
|
|
72
|
-
if (next.delete(id)) changed = true;
|
|
73
|
-
}
|
|
74
|
-
return changed ? next : prev;
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}, [
|
|
78
|
-
focusedSpanId,
|
|
79
|
-
trace.spanById,
|
|
80
|
-
setCollapsedSpans
|
|
81
|
-
]);
|
|
82
|
-
// Scroll to focused span when using prev/next buttons in search bar.
|
|
83
|
-
(0, _react.useEffect)(()=>{
|
|
84
|
-
if (!focusedSpanId || !virtuosoRef.current) return;
|
|
85
|
-
const index = rows.findIndex((r)=>r.spanId === focusedSpanId);
|
|
86
|
-
if (index >= 0) {
|
|
87
|
-
virtuosoRef.current.scrollToIndex({
|
|
88
|
-
index,
|
|
89
|
-
align: 'center'
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}, [
|
|
93
|
-
focusedSpanId,
|
|
94
|
-
rows
|
|
95
|
-
]);
|
|
96
|
-
// Set the top most index in the Virtuoso table to the selected span
|
|
97
|
-
// Required e.g. when navigating from another page.
|
|
98
|
-
const initialTopMostSpanIndex = (0, _react.useMemo)(()=>{
|
|
99
|
-
if (!selectedSpan) return 0;
|
|
100
|
-
const index = rows.findIndex((r)=>r.spanId === selectedSpan.spanId);
|
|
101
|
-
return index >= 0 ? index : 0;
|
|
102
|
-
}, [
|
|
103
|
-
rows,
|
|
104
|
-
selectedSpan
|
|
105
|
-
]);
|
|
106
|
-
const divider = /*#__PURE__*/ (0, _jsxruntime.jsx)(_ResizableDivider.ResizableDivider, {
|
|
107
|
-
parentRef: tableRef,
|
|
108
|
-
onMove: setNameColumnWidth
|
|
109
|
-
});
|
|
110
|
-
// update currently visible spans
|
|
111
|
-
function handleRangeChange({ startIndex, endIndex }) {
|
|
112
|
-
const visibleSpans = [];
|
|
113
|
-
for(let i = startIndex; i <= endIndex; i++){
|
|
114
|
-
visibleSpans.push(rows[i].spanId);
|
|
115
|
-
}
|
|
116
|
-
setVisibleSpans(visibleSpans);
|
|
117
|
-
}
|
|
118
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
119
|
-
ref: tableRef,
|
|
120
|
-
sx: {
|
|
121
|
-
display: 'flex',
|
|
122
|
-
flexDirection: 'column',
|
|
123
|
-
flexGrow: 1,
|
|
124
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
125
|
-
borderRadius: `${theme.shape.borderRadius}px`
|
|
126
|
-
},
|
|
127
|
-
children: [
|
|
128
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_GanttTableHeader.GanttTableHeader, {
|
|
129
|
-
trace: trace,
|
|
130
|
-
viewport: viewport,
|
|
131
|
-
nameColumnWidth: nameColumnWidth,
|
|
132
|
-
divider: divider
|
|
133
|
-
}),
|
|
134
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactvirtuoso.Virtuoso, {
|
|
135
|
-
ref: virtuosoRef,
|
|
136
|
-
data: rows,
|
|
137
|
-
initialTopMostItemIndex: initialTopMostSpanIndex,
|
|
138
|
-
itemContent: (_, span)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_GanttTableRow.GanttTableRow, {
|
|
139
|
-
options: options,
|
|
140
|
-
customLinks: customLinks,
|
|
141
|
-
span: span,
|
|
142
|
-
viewport: viewport,
|
|
143
|
-
selected: span === selectedSpan,
|
|
144
|
-
matched: matchingSpanIdSet.has(span.spanId),
|
|
145
|
-
focused: span.spanId === focusedSpanId,
|
|
146
|
-
nameColumnWidth: nameColumnWidth,
|
|
147
|
-
divider: divider,
|
|
148
|
-
onClick: onSpanClick
|
|
149
|
-
}),
|
|
150
|
-
rangeChanged: handleRangeChange
|
|
151
|
-
})
|
|
152
|
-
]
|
|
153
|
-
});
|
|
154
|
-
}
|
|
@@ -1,64 +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, "GanttTableHeader", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return GanttTableHeader;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _material = require("@mui/material");
|
|
25
|
-
const _utils = require("../utils");
|
|
26
|
-
const _Ticks = require("../Ticks");
|
|
27
|
-
function GanttTableHeader(props) {
|
|
28
|
-
const { trace, viewport, nameColumnWidth, divider } = props;
|
|
29
|
-
const theme = (0, _material.useTheme)();
|
|
30
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
31
|
-
direction: "row",
|
|
32
|
-
alignItems: "center",
|
|
33
|
-
sx: {
|
|
34
|
-
height: _utils.rowHeight,
|
|
35
|
-
fontSize: '0.9rem',
|
|
36
|
-
borderBottom: `1px solid ${theme.palette.divider}`
|
|
37
|
-
},
|
|
38
|
-
children: [
|
|
39
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
40
|
-
style: {
|
|
41
|
-
width: `${nameColumnWidth * 100}%`
|
|
42
|
-
},
|
|
43
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
44
|
-
style: {
|
|
45
|
-
padding: '.25rem'
|
|
46
|
-
},
|
|
47
|
-
children: "Service & Operation"
|
|
48
|
-
})
|
|
49
|
-
}),
|
|
50
|
-
divider,
|
|
51
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
52
|
-
sx: {
|
|
53
|
-
position: 'relative',
|
|
54
|
-
height: '100%',
|
|
55
|
-
flexGrow: 1
|
|
56
|
-
},
|
|
57
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Ticks.TicksHeader, {
|
|
58
|
-
trace: trace,
|
|
59
|
-
viewport: viewport
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
});
|
|
64
|
-
}
|
|
@@ -1,60 +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
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get GanttTableContext () {
|
|
25
|
-
return GanttTableContext;
|
|
26
|
-
},
|
|
27
|
-
get GanttTableProvider () {
|
|
28
|
-
return GanttTableProvider;
|
|
29
|
-
},
|
|
30
|
-
get useGanttTableContext () {
|
|
31
|
-
return useGanttTableContext;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
35
|
-
const _react = require("react");
|
|
36
|
-
const GanttTableContext = /*#__PURE__*/ (0, _react.createContext)(undefined);
|
|
37
|
-
function GanttTableProvider(props) {
|
|
38
|
-
const { children } = props;
|
|
39
|
-
const [collapsedSpans, setCollapsedSpans] = (0, _react.useState)(new Set());
|
|
40
|
-
const [visibleSpans, setVisibleSpans] = (0, _react.useState)([]);
|
|
41
|
-
const [hoveredParent, setHoveredParent] = (0, _react.useState)(undefined);
|
|
42
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(GanttTableContext.Provider, {
|
|
43
|
-
value: {
|
|
44
|
-
collapsedSpans,
|
|
45
|
-
setCollapsedSpans,
|
|
46
|
-
visibleSpans,
|
|
47
|
-
setVisibleSpans,
|
|
48
|
-
hoveredParent,
|
|
49
|
-
setHoveredParent
|
|
50
|
-
},
|
|
51
|
-
children: children
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function useGanttTableContext() {
|
|
55
|
-
const ctx = (0, _react.useContext)(GanttTableContext);
|
|
56
|
-
if (ctx === undefined) {
|
|
57
|
-
throw new Error('No GanttTableContext found. Did you forget a Provider?');
|
|
58
|
-
}
|
|
59
|
-
return ctx;
|
|
60
|
-
}
|
|
@@ -1,77 +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, "GanttTableRow", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return GanttTableRow;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _material = require("@mui/material");
|
|
25
|
-
const _react = require("react");
|
|
26
|
-
const _utils = require("../utils");
|
|
27
|
-
const _SpanName = require("./SpanName");
|
|
28
|
-
const _SpanDuration = require("./SpanDuration");
|
|
29
|
-
const GanttTableRow = /*#__PURE__*/ (0, _react.memo)(function GanttTableRow(props) {
|
|
30
|
-
const { options, customLinks, span, viewport, selected, matched, focused, nameColumnWidth, divider, onClick } = props;
|
|
31
|
-
const theme = (0, _material.useTheme)();
|
|
32
|
-
const handleOnClick = ()=>{
|
|
33
|
-
// ignore event if triggered by selecting text
|
|
34
|
-
if (document.getSelection()?.type === 'Range') return;
|
|
35
|
-
onClick(span);
|
|
36
|
-
};
|
|
37
|
-
let backgroundColor;
|
|
38
|
-
if (selected) {
|
|
39
|
-
backgroundColor = theme.palette.action.focus;
|
|
40
|
-
} else if (focused) {
|
|
41
|
-
backgroundColor = theme.palette.action.selected;
|
|
42
|
-
} else if (matched) {
|
|
43
|
-
backgroundColor = theme.palette.action.hover;
|
|
44
|
-
}
|
|
45
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(RowContainer, {
|
|
46
|
-
sx: {
|
|
47
|
-
backgroundColor,
|
|
48
|
-
// overwrite hover if background color is set (selected, focused or matched)
|
|
49
|
-
'&:hover': backgroundColor ? {
|
|
50
|
-
backgroundColor
|
|
51
|
-
} : undefined
|
|
52
|
-
},
|
|
53
|
-
direction: "row",
|
|
54
|
-
onClick: handleOnClick,
|
|
55
|
-
children: [
|
|
56
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_SpanName.SpanName, {
|
|
57
|
-
customLinks: customLinks,
|
|
58
|
-
span: span,
|
|
59
|
-
nameColumnWidth: nameColumnWidth
|
|
60
|
-
}),
|
|
61
|
-
divider,
|
|
62
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_SpanDuration.SpanDuration, {
|
|
63
|
-
options: options,
|
|
64
|
-
span: span,
|
|
65
|
-
viewport: viewport
|
|
66
|
-
})
|
|
67
|
-
]
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
const RowContainer = (0, _material.styled)(_material.Stack)(({ theme })=>({
|
|
71
|
-
height: _utils.rowHeight,
|
|
72
|
-
'&:hover': {
|
|
73
|
-
backgroundColor: theme.palette.action.hover,
|
|
74
|
-
borderTop: `1px solid ${theme.palette.divider}`,
|
|
75
|
-
borderBottom: `1px solid ${theme.palette.divider}`
|
|
76
|
-
}
|
|
77
|
-
}));
|