@perses-dev/trace-table-plugin 0.10.0-beta.0 → 0.10.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 (81) hide show
  1. package/__mf/js/{TraceTable.c6c7597d.js → TraceTable.f0d0cb51.js} +5 -5
  2. package/__mf/js/async/196.5c494bea.js +7 -0
  3. package/__mf/js/async/392.8f099d88.js +2 -0
  4. package/__mf/js/async/{289.c722d41d.js → 587.6db21278.js} +10 -10
  5. package/__mf/js/async/648.26a0d707.js +22 -0
  6. package/__mf/js/async/734.aabfe3a4.js +2 -0
  7. package/__mf/js/async/824.2c0b9a86.js +2 -0
  8. package/__mf/js/async/{587.6b047404.js → 825.70097a96.js} +1 -1
  9. package/__mf/js/async/{670.41f6b1c0.js → 935.4f599ceb.js} +10 -10
  10. package/__mf/js/async/__federation_expose_TraceTable.767e72d3.js +1 -0
  11. package/__mf/js/async/lib-router.a75e6c79.js +2 -0
  12. package/__mf/js/async/{lib-router.d2b2e61c.js.LICENSE.txt → lib-router.a75e6c79.js.LICENSE.txt} +3 -3
  13. package/__mf/js/{main.7ceb822f.js → main.a6429794.js} +5 -5
  14. package/lib/DataTable.d.ts.map +1 -1
  15. package/lib/DataTable.js +120 -48
  16. package/lib/DataTable.js.map +1 -1
  17. package/lib/TraceTable.d.ts.map +1 -1
  18. package/lib/TraceTable.js +8 -1
  19. package/lib/TraceTable.js.map +1 -1
  20. package/lib/TraceTableItemSelectionActionsEditor.d.ts +7 -0
  21. package/lib/TraceTableItemSelectionActionsEditor.d.ts.map +1 -0
  22. package/lib/TraceTableItemSelectionActionsEditor.js +37 -0
  23. package/lib/TraceTableItemSelectionActionsEditor.js.map +1 -0
  24. package/lib/TraceTablePanel.js +1 -1
  25. package/lib/TraceTablePanel.js.map +1 -1
  26. package/lib/bootstrap.js +1 -1
  27. package/lib/bootstrap.js.map +1 -1
  28. package/lib/cjs/DataTable.js +119 -47
  29. package/lib/cjs/TraceTable.js +8 -1
  30. package/lib/cjs/TraceTableItemSelectionActionsEditor.js +45 -0
  31. package/lib/cjs/TraceTablePanel.js +1 -1
  32. package/lib/cjs/bootstrap.js +1 -1
  33. package/lib/cjs/env.d.js +1 -1
  34. package/lib/cjs/getPluginModule.js +12 -0
  35. package/lib/cjs/index-federation.js +1 -1
  36. package/lib/cjs/index.js +13 -0
  37. package/lib/cjs/setup-tests.js +1 -1
  38. package/lib/cjs/test/mock-trace-data.js +1 -1
  39. package/lib/cjs/trace-table-model.js +1 -4
  40. package/lib/cjs/utils/palette.js +1 -1
  41. package/lib/cjs/utils/utils.js +1 -1
  42. package/lib/env.d.js +1 -1
  43. package/lib/env.d.js.map +1 -1
  44. package/lib/getPluginModule.d.ts.map +1 -1
  45. package/lib/getPluginModule.js +12 -0
  46. package/lib/getPluginModule.js.map +1 -1
  47. package/lib/index-federation.js +1 -1
  48. package/lib/index-federation.js.map +1 -1
  49. package/lib/index.d.ts +1 -0
  50. package/lib/index.d.ts.map +1 -1
  51. package/lib/index.js +13 -0
  52. package/lib/index.js.map +1 -1
  53. package/lib/setup-tests.js +1 -1
  54. package/lib/setup-tests.js.map +1 -1
  55. package/lib/test/mock-trace-data.js +1 -1
  56. package/lib/test/mock-trace-data.js.map +1 -1
  57. package/lib/trace-table-model.d.ts +3 -0
  58. package/lib/trace-table-model.d.ts.map +1 -1
  59. package/lib/trace-table-model.js +1 -4
  60. package/lib/trace-table-model.js.map +1 -1
  61. package/lib/utils/palette.js +1 -1
  62. package/lib/utils/palette.js.map +1 -1
  63. package/lib/utils/utils.js +1 -1
  64. package/lib/utils/utils.js.map +1 -1
  65. package/mf-manifest.json +19 -19
  66. package/mf-stats.json +21 -21
  67. package/package.json +4 -4
  68. package/__mf/js/async/252.97530343.js +0 -22
  69. package/__mf/js/async/352.82a86d42.js +0 -7
  70. package/__mf/js/async/392.ba8c2c55.js +0 -2
  71. package/__mf/js/async/549.fb982abf.js +0 -2
  72. package/__mf/js/async/894.f6f489dd.js +0 -2
  73. package/__mf/js/async/__federation_expose_TraceTable.a6b14cb7.js +0 -1
  74. package/__mf/js/async/lib-router.d2b2e61c.js +0 -2
  75. /package/__mf/js/async/{352.82a86d42.js.LICENSE.txt → 196.5c494bea.js.LICENSE.txt} +0 -0
  76. /package/__mf/js/async/{392.ba8c2c55.js.LICENSE.txt → 392.8f099d88.js.LICENSE.txt} +0 -0
  77. /package/__mf/js/async/{289.c722d41d.js.LICENSE.txt → 587.6db21278.js.LICENSE.txt} +0 -0
  78. /package/__mf/js/async/{252.97530343.js.LICENSE.txt → 648.26a0d707.js.LICENSE.txt} +0 -0
  79. /package/__mf/js/async/{549.fb982abf.js.LICENSE.txt → 734.aabfe3a4.js.LICENSE.txt} +0 -0
  80. /package/__mf/js/async/{894.f6f489dd.js.LICENSE.txt → 824.2c0b9a86.js.LICENSE.txt} +0 -0
  81. /package/__mf/js/async/{670.41f6b1c0.js.LICENSE.txt → 935.4f599ceb.js.LICENSE.txt} +0 -0
@@ -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
@@ -24,6 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
25
  const _core = require("@perses-dev/core");
26
26
  const _pluginsystem = require("@perses-dev/plugin-system");
27
+ const _dashboards = require("@perses-dev/dashboards");
27
28
  const _Information = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Information"));
28
29
  const _components = require("@perses-dev/components");
29
30
  const _xdatagrid = require("@mui/x-data-grid");
@@ -48,27 +49,75 @@ function DataTable(props) {
48
49
  const muiTheme = (0, _material.useTheme)();
49
50
  const chartsTheme = (0, _components.useChartsTheme)();
50
51
  const variableValues = (0, _pluginsystem.useAllVariableValues)();
52
+ const selectionEnabled = options.selection?.enabled ?? false;
53
+ const { selectionMap, setSelection, clearSelection } = (0, _components.useSelection)();
54
+ const itemActionsConfig = options.actions;
55
+ const showItemActions = itemActionsConfig?.enabled && itemActionsConfig?.displayWithItem;
56
+ const actionsList = showItemActions ? itemActionsConfig.actionsList : undefined;
57
+ const { getItemActionButtons, confirmDialog } = (0, _dashboards.useSelectionItemActions)({
58
+ actions: actionsList,
59
+ variableState: variableValues
60
+ });
61
+ // Convert selectionMap to DataGrid's row selection model
62
+ const rowSelectionModel = (0, _react.useMemo)(()=>{
63
+ return Array.from(selectionMap.keys());
64
+ }, [
65
+ selectionMap
66
+ ]);
51
67
  const paletteMode = options.visual?.palette?.mode;
52
68
  const serviceColorGenerator = (0, _react.useCallback)((serviceName)=>(0, _utils.getServiceColor)(muiTheme, chartsTheme, paletteMode, serviceName), [
53
69
  muiTheme,
54
70
  chartsTheme,
55
71
  paletteMode
56
72
  ]);
57
- const rows = [];
58
- for (const query of result){
59
- const pluginSpec = query.definition.spec.plugin.spec;
60
- const datasourceName = pluginSpec?.datasource?.name;
61
- for (const trace of query.data?.searchResult || []){
62
- const traceLink = options.links?.trace ? (0, _pluginsystem.replaceVariablesInString)(options.links.trace, variableValues, {
63
- datasourceName: datasourceName ?? '',
64
- traceId: trace.traceId
65
- }) : undefined;
66
- rows.push({
67
- ...trace,
68
- traceLink
69
- });
73
+ const rows = (0, _react.useMemo)(()=>{
74
+ const result_rows = [];
75
+ for (const query of result){
76
+ const pluginSpec = query.definition.spec.plugin.spec;
77
+ const datasourceName = pluginSpec?.datasource?.name;
78
+ for (const trace of query.data?.searchResult || []){
79
+ const traceLink = options.links?.trace ? (0, _pluginsystem.replaceVariablesInString)(options.links.trace, variableValues, {
80
+ datasourceName: datasourceName ?? '',
81
+ traceId: trace.traceId
82
+ }) : undefined;
83
+ result_rows.push({
84
+ ...trace,
85
+ traceLink
86
+ });
87
+ }
70
88
  }
71
- }
89
+ return result_rows;
90
+ }, [
91
+ result,
92
+ options.links?.trace,
93
+ variableValues
94
+ ]);
95
+ const rowsById = (0, _react.useMemo)(()=>{
96
+ const map = new Map();
97
+ rows.forEach((row)=>map.set(row.traceId, row));
98
+ return map;
99
+ }, [
100
+ rows
101
+ ]);
102
+ const handleRowSelectionModelChange = (0, _react.useCallback)((newSelectionModel)=>{
103
+ const selectedIds = newSelectionModel;
104
+ if (selectedIds.length === 0) {
105
+ clearSelection();
106
+ } else {
107
+ const newSelection = selectedIds.map((id)=>{
108
+ const row = rowsById.get(id);
109
+ return row ? {
110
+ id,
111
+ item: row
112
+ } : null;
113
+ }).filter((entry)=>entry !== null);
114
+ setSelection(newSelection);
115
+ }
116
+ }, [
117
+ rowsById,
118
+ setSelection,
119
+ clearSelection
120
+ ]);
72
121
  const columns = (0, _react.useMemo)(()=>[
73
122
  {
74
123
  field: 'name',
@@ -166,41 +215,64 @@ function DataTable(props) {
166
215
  children: DATE_FORMATTER(new Date(row.startTimeUnixMs))
167
216
  }, `st-${row.traceId}`)
168
217
  })
169
- }
218
+ },
219
+ ...actionsList && actionsList.length > 0 ? [
220
+ {
221
+ field: 'actions',
222
+ headerName: 'Actions',
223
+ flex: actionsList.length,
224
+ display: 'flex',
225
+ type: 'actions',
226
+ getActions: ({ row })=>getItemActionButtons({
227
+ id: row.traceId,
228
+ data: row
229
+ })
230
+ }
231
+ ] : []
170
232
  ], [
171
- serviceColorGenerator
233
+ serviceColorGenerator,
234
+ actionsList,
235
+ getItemActionButtons
172
236
  ]);
173
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_xdatagrid.DataGrid, {
174
- sx: {
175
- borderWidth: 0
176
- },
177
- columns: columns,
178
- rows: rows,
179
- getRowId: (row)=>row.traceId,
180
- getRowHeight: ()=>'auto',
181
- getEstimatedRowHeight: ()=>66,
182
- disableRowSelectionOnClick: true,
183
- pageSizeOptions: [
184
- 10,
185
- 20,
186
- 50,
187
- 100
188
- ],
189
- initialState: {
190
- pagination: {
191
- paginationModel: {
192
- pageSize: 20
193
- }
194
- },
195
- sorting: {
196
- sortModel: [
197
- {
198
- field: 'startTimeUnixMs',
199
- sort: 'desc'
237
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
238
+ children: [
239
+ confirmDialog,
240
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_xdatagrid.DataGrid, {
241
+ sx: {
242
+ borderWidth: 0
243
+ },
244
+ columns: columns,
245
+ rows: rows,
246
+ getRowId: (row)=>row.traceId,
247
+ getRowHeight: ()=>'auto',
248
+ getEstimatedRowHeight: ()=>66,
249
+ checkboxSelection: selectionEnabled,
250
+ rowSelectionModel: selectionEnabled ? rowSelectionModel : undefined,
251
+ onRowSelectionModelChange: selectionEnabled ? handleRowSelectionModelChange : undefined,
252
+ disableRowSelectionOnClick: !selectionEnabled,
253
+ pageSizeOptions: [
254
+ 10,
255
+ 20,
256
+ 50,
257
+ 100
258
+ ],
259
+ initialState: {
260
+ pagination: {
261
+ paginationModel: {
262
+ pageSize: 20
263
+ }
264
+ },
265
+ sorting: {
266
+ sortModel: [
267
+ {
268
+ field: 'startTimeUnixMs',
269
+ sort: 'desc'
270
+ }
271
+ ]
200
272
  }
201
- ]
202
- }
203
- }
273
+ }
274
+ })
275
+ ]
204
276
  });
205
277
  }
206
278
  function TraceName({ row: trace }) {
@@ -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
@@ -20,10 +20,17 @@ Object.defineProperty(exports, "TraceTable", {
20
20
  return TraceTable;
21
21
  }
22
22
  });
23
+ const _TraceTableItemSelectionActionsEditor = require("./TraceTableItemSelectionActionsEditor");
23
24
  const _TraceTablePanel = require("./TraceTablePanel");
24
25
  const _tracetablemodel = require("./trace-table-model");
25
26
  const TraceTable = {
26
27
  PanelComponent: _TraceTablePanel.TraceTablePanel,
28
+ panelOptionsEditorComponents: [
29
+ {
30
+ label: 'Item Actions',
31
+ content: _TraceTableItemSelectionActionsEditor.TraceTableItemSelectionActionsEditor
32
+ }
33
+ ],
27
34
  supportedQueryTypes: [
28
35
  'TraceQuery'
29
36
  ],
@@ -0,0 +1,45 @@
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, "TraceTableItemSelectionActionsEditor", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return TraceTableItemSelectionActionsEditor;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _pluginsystem = require("@perses-dev/plugin-system");
25
+ function TraceTableItemSelectionActionsEditor(props) {
26
+ const { onChange, value } = props;
27
+ const handleActionsChange = (actions)=>{
28
+ onChange({
29
+ ...value,
30
+ actions
31
+ });
32
+ };
33
+ const handleSelectionChange = (selection)=>{
34
+ onChange({
35
+ ...value,
36
+ selection
37
+ });
38
+ };
39
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.ItemSelectionActionsEditor, {
40
+ actionOptions: value.actions,
41
+ onChangeActions: handleActionsChange,
42
+ selectionOptions: value.selection,
43
+ onChangeSelection: handleSelectionChange
44
+ });
45
+ }
@@ -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
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,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
@@ -12,6 +24,7 @@ _export_star(require("./DataTable"), exports);
12
24
  const _getPluginModule = require("./getPluginModule");
13
25
  _export_star(require("./trace-table-model"), exports);
14
26
  _export_star(require("./TraceTable"), exports);
27
+ _export_star(require("./TraceTableItemSelectionActionsEditor"), exports);
15
28
  _export_star(require("./TraceTablePanel"), exports);
16
29
  function _export_star(from, to) {
17
30
  Object.keys(from).forEach(function(k) {
@@ -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 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 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
@@ -10,9 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- /**
14
- * The Options object type supported by the TraceTable panel plugin.
15
- */ // Note: The interface attributes must match schemas/trace-table.cue
16
13
  "use strict";
17
14
  Object.defineProperty(exports, "__esModule", {
18
15
  value: true
@@ -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
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 +1 @@
1
- {"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAGnF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
1
+ {"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAGnF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
@@ -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
  import packageJson from '../package.json';
2
14
  /**
3
15
  * Returns the plugin module information from package.json
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AACA,OAAOA,iBAAiB,kBAAkB;AAE1C;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGJ;IAClC,OAAO;QACLK,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
1
+ {"version":3,"sources":["../../src/getPluginModule.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 { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,OAAOA,iBAAiB,kBAAkB;AAE1C;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGJ;IAClC,OAAO;QACLK,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
@@ -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/index-federation.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('./bootstrap');\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,MAAM,CAAC"}
1
+ {"version":3,"sources":["../../src/index-federation.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('./bootstrap');\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,MAAM,CAAC"}
package/lib/index.d.ts CHANGED
@@ -2,5 +2,6 @@ export * from './DataTable';
2
2
  export { getPluginModule } from './getPluginModule';
3
3
  export * from './trace-table-model';
4
4
  export * from './TraceTable';
5
+ export * from './TraceTableItemSelectionActionsEditor';
5
6
  export * from './TraceTablePanel';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,wCAAwC,CAAC;AACvD,cAAc,mBAAmB,CAAC"}
package/lib/index.js CHANGED
@@ -1,7 +1,20 @@
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
  export * from './DataTable';
2
14
  export { getPluginModule } from './getPluginModule';
3
15
  export * from './trace-table-model';
4
16
  export * from './TraceTable';
17
+ export * from './TraceTableItemSelectionActionsEditor';
5
18
  export * from './TraceTablePanel';
6
19
 
7
20
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './DataTable';\nexport { getPluginModule } from './getPluginModule';\nexport * from './trace-table-model';\nexport * from './TraceTable';\nexport * from './TraceTablePanel';\n"],"names":["getPluginModule"],"mappings":"AAAA,cAAc,cAAc;AAC5B,SAASA,eAAe,QAAQ,oBAAoB;AACpD,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,oBAAoB"}
1
+ {"version":3,"sources":["../../src/index.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\nexport * from './DataTable';\nexport { getPluginModule } from './getPluginModule';\nexport * from './trace-table-model';\nexport * from './TraceTable';\nexport * from './TraceTableItemSelectionActionsEditor';\nexport * from './TraceTablePanel';\n"],"names":["getPluginModule"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,cAAc;AAC5B,SAASA,eAAe,QAAQ,oBAAoB;AACpD,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,yCAAyC;AACvD,cAAc,oBAAoB"}
@@ -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 +1 @@
1
- {"version":3,"sources":["../../src/setup-tests.ts"],"sourcesContent":["// Copyright 2023 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 '@testing-library/jest-dom';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"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,OAAO,4BAA4B;AAEnC,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
1
+ {"version":3,"sources":["../../src/setup-tests.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 '@testing-library/jest-dom';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"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,OAAO,4BAA4B;AAEnC,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
@@ -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 +1 @@
1
- {"version":3,"sources":["../../../src/test/mock-trace-data.ts"],"sourcesContent":["// Copyright 2023 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 { TraceData } from '@perses-dev/core';\n\n/**\n * Mock data we get from getTraceData() in @perses/tempo-plugin.\n */\nexport const MOCK_TRACE_SEARCH_RESULT: TraceData = {\n searchResult: [\n {\n startTimeUnixMs: 1702915645000, // unix epoch time in milliseconds\n durationMs: 100,\n serviceStats: {\n 'service-name': {\n spanCount: 10,\n },\n 'second-service-name': {\n spanCount: 3,\n errorCount: 2,\n },\n },\n traceId: '123',\n rootServiceName: 'service-name',\n rootTraceName: 'span-name',\n },\n ],\n metadata: {\n executedQueryString: '{duration > 500ms}',\n },\n};\n\nexport const MOCK_TRACE_SEARCH_RESULT_EMPTY: TraceData = {\n searchResult: [],\n metadata: {\n executedQueryString: '{duration > 500ms}',\n },\n};\n\n/**\n * Mocks results obtained from useTraceQueries() in @perses/plugin-system/runtime.\n * This function uses then React TanStack function useQueries(fooQuery) to\n * handle fetching.\n */\nexport const MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT = [\n {\n status: 'success',\n fetchStatus: 'idle',\n isLoading: false,\n isSuccess: true,\n isError: false,\n data: MOCK_TRACE_SEARCH_RESULT,\n dataUpdatedAt: 1666500979895,\n definition: {\n kind: 'TraceQuery',\n spec: {\n plugin: {\n kind: 'TempoTraceQuery',\n spec: {\n query: '{}',\n datasource: {\n kind: 'TempoDatasource',\n name: 'tempolocal',\n },\n },\n },\n },\n },\n error: null,\n errorUpdatedAt: 0,\n failureCount: 0,\n errorUpdateCount: 0,\n isFetched: true,\n isFetchedAfterMount: true,\n isFetching: false,\n isRefetching: false,\n isLoadingError: false,\n isPaused: false,\n isPlaceholderData: false,\n isPreviousData: false,\n isRefetchError: false,\n isStale: true,\n },\n];\n\nexport const MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT_EMPTY = [\n {\n status: 'success',\n fetchStatus: 'idle',\n isLoading: false,\n isSuccess: true,\n isError: false,\n data: MOCK_TRACE_SEARCH_RESULT_EMPTY,\n dataUpdatedAt: 1666500979895,\n error: null,\n errorUpdatedAt: 0,\n failureCount: 0,\n errorUpdateCount: 0,\n isFetched: true,\n isFetchedAfterMount: true,\n isFetching: false,\n isRefetching: false,\n isLoadingError: false,\n isPaused: false,\n isPlaceholderData: false,\n isPreviousData: false,\n isRefetchError: false,\n isStale: true,\n },\n];\n"],"names":["MOCK_TRACE_SEARCH_RESULT","searchResult","startTimeUnixMs","durationMs","serviceStats","spanCount","errorCount","traceId","rootServiceName","rootTraceName","metadata","executedQueryString","MOCK_TRACE_SEARCH_RESULT_EMPTY","MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT","status","fetchStatus","isLoading","isSuccess","isError","data","dataUpdatedAt","definition","kind","spec","plugin","query","datasource","name","error","errorUpdatedAt","failureCount","errorUpdateCount","isFetched","isFetchedAfterMount","isFetching","isRefetching","isLoadingError","isPaused","isPlaceholderData","isPreviousData","isRefetchError","isStale","MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT_EMPTY"],"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;;CAEC,GACD,OAAO,MAAMA,2BAAsC;IACjDC,cAAc;QACZ;YACEC,iBAAiB;YACjBC,YAAY;YACZC,cAAc;gBACZ,gBAAgB;oBACdC,WAAW;gBACb;gBACA,uBAAuB;oBACrBA,WAAW;oBACXC,YAAY;gBACd;YACF;YACAC,SAAS;YACTC,iBAAiB;YACjBC,eAAe;QACjB;KACD;IACDC,UAAU;QACRC,qBAAqB;IACvB;AACF,EAAE;AAEF,OAAO,MAAMC,iCAA4C;IACvDX,cAAc,EAAE;IAChBS,UAAU;QACRC,qBAAqB;IACvB;AACF,EAAE;AAEF;;;;CAIC,GACD,OAAO,MAAME,wCAAwC;IACnD;QACEC,QAAQ;QACRC,aAAa;QACbC,WAAW;QACXC,WAAW;QACXC,SAAS;QACTC,MAAMnB;QACNoB,eAAe;QACfC,YAAY;YACVC,MAAM;YACNC,MAAM;gBACJC,QAAQ;oBACNF,MAAM;oBACNC,MAAM;wBACJE,OAAO;wBACPC,YAAY;4BACVJ,MAAM;4BACNK,MAAM;wBACR;oBACF;gBACF;YACF;QACF;QACAC,OAAO;QACPC,gBAAgB;QAChBC,cAAc;QACdC,kBAAkB;QAClBC,WAAW;QACXC,qBAAqB;QACrBC,YAAY;QACZC,cAAc;QACdC,gBAAgB;QAChBC,UAAU;QACVC,mBAAmB;QACnBC,gBAAgB;QAChBC,gBAAgB;QAChBC,SAAS;IACX;CACD,CAAC;AAEF,OAAO,MAAMC,8CAA8C;IACzD;QACE5B,QAAQ;QACRC,aAAa;QACbC,WAAW;QACXC,WAAW;QACXC,SAAS;QACTC,MAAMP;QACNQ,eAAe;QACfQ,OAAO;QACPC,gBAAgB;QAChBC,cAAc;QACdC,kBAAkB;QAClBC,WAAW;QACXC,qBAAqB;QACrBC,YAAY;QACZC,cAAc;QACdC,gBAAgB;QAChBC,UAAU;QACVC,mBAAmB;QACnBC,gBAAgB;QAChBC,gBAAgB;QAChBC,SAAS;IACX;CACD,CAAC"}
1
+ {"version":3,"sources":["../../../src/test/mock-trace-data.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 { TraceData } from '@perses-dev/core';\n\n/**\n * Mock data we get from getTraceData() in @perses/tempo-plugin.\n */\nexport const MOCK_TRACE_SEARCH_RESULT: TraceData = {\n searchResult: [\n {\n startTimeUnixMs: 1702915645000, // unix epoch time in milliseconds\n durationMs: 100,\n serviceStats: {\n 'service-name': {\n spanCount: 10,\n },\n 'second-service-name': {\n spanCount: 3,\n errorCount: 2,\n },\n },\n traceId: '123',\n rootServiceName: 'service-name',\n rootTraceName: 'span-name',\n },\n ],\n metadata: {\n executedQueryString: '{duration > 500ms}',\n },\n};\n\nexport const MOCK_TRACE_SEARCH_RESULT_EMPTY: TraceData = {\n searchResult: [],\n metadata: {\n executedQueryString: '{duration > 500ms}',\n },\n};\n\n/**\n * Mocks results obtained from useTraceQueries() in @perses/plugin-system/runtime.\n * This function uses then React TanStack function useQueries(fooQuery) to\n * handle fetching.\n */\nexport const MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT = [\n {\n status: 'success',\n fetchStatus: 'idle',\n isLoading: false,\n isSuccess: true,\n isError: false,\n data: MOCK_TRACE_SEARCH_RESULT,\n dataUpdatedAt: 1666500979895,\n definition: {\n kind: 'TraceQuery',\n spec: {\n plugin: {\n kind: 'TempoTraceQuery',\n spec: {\n query: '{}',\n datasource: {\n kind: 'TempoDatasource',\n name: 'tempolocal',\n },\n },\n },\n },\n },\n error: null,\n errorUpdatedAt: 0,\n failureCount: 0,\n errorUpdateCount: 0,\n isFetched: true,\n isFetchedAfterMount: true,\n isFetching: false,\n isRefetching: false,\n isLoadingError: false,\n isPaused: false,\n isPlaceholderData: false,\n isPreviousData: false,\n isRefetchError: false,\n isStale: true,\n },\n];\n\nexport const MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT_EMPTY = [\n {\n status: 'success',\n fetchStatus: 'idle',\n isLoading: false,\n isSuccess: true,\n isError: false,\n data: MOCK_TRACE_SEARCH_RESULT_EMPTY,\n dataUpdatedAt: 1666500979895,\n error: null,\n errorUpdatedAt: 0,\n failureCount: 0,\n errorUpdateCount: 0,\n isFetched: true,\n isFetchedAfterMount: true,\n isFetching: false,\n isRefetching: false,\n isLoadingError: false,\n isPaused: false,\n isPlaceholderData: false,\n isPreviousData: false,\n isRefetchError: false,\n isStale: true,\n },\n];\n"],"names":["MOCK_TRACE_SEARCH_RESULT","searchResult","startTimeUnixMs","durationMs","serviceStats","spanCount","errorCount","traceId","rootServiceName","rootTraceName","metadata","executedQueryString","MOCK_TRACE_SEARCH_RESULT_EMPTY","MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT","status","fetchStatus","isLoading","isSuccess","isError","data","dataUpdatedAt","definition","kind","spec","plugin","query","datasource","name","error","errorUpdatedAt","failureCount","errorUpdateCount","isFetched","isFetchedAfterMount","isFetching","isRefetching","isLoadingError","isPaused","isPlaceholderData","isPreviousData","isRefetchError","isStale","MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT_EMPTY"],"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;;CAEC,GACD,OAAO,MAAMA,2BAAsC;IACjDC,cAAc;QACZ;YACEC,iBAAiB;YACjBC,YAAY;YACZC,cAAc;gBACZ,gBAAgB;oBACdC,WAAW;gBACb;gBACA,uBAAuB;oBACrBA,WAAW;oBACXC,YAAY;gBACd;YACF;YACAC,SAAS;YACTC,iBAAiB;YACjBC,eAAe;QACjB;KACD;IACDC,UAAU;QACRC,qBAAqB;IACvB;AACF,EAAE;AAEF,OAAO,MAAMC,iCAA4C;IACvDX,cAAc,EAAE;IAChBS,UAAU;QACRC,qBAAqB;IACvB;AACF,EAAE;AAEF;;;;CAIC,GACD,OAAO,MAAME,wCAAwC;IACnD;QACEC,QAAQ;QACRC,aAAa;QACbC,WAAW;QACXC,WAAW;QACXC,SAAS;QACTC,MAAMnB;QACNoB,eAAe;QACfC,YAAY;YACVC,MAAM;YACNC,MAAM;gBACJC,QAAQ;oBACNF,MAAM;oBACNC,MAAM;wBACJE,OAAO;wBACPC,YAAY;4BACVJ,MAAM;4BACNK,MAAM;wBACR;oBACF;gBACF;YACF;QACF;QACAC,OAAO;QACPC,gBAAgB;QAChBC,cAAc;QACdC,kBAAkB;QAClBC,WAAW;QACXC,qBAAqB;QACrBC,YAAY;QACZC,cAAc;QACdC,gBAAgB;QAChBC,UAAU;QACVC,mBAAmB;QACnBC,gBAAgB;QAChBC,gBAAgB;QAChBC,SAAS;IACX;CACD,CAAC;AAEF,OAAO,MAAMC,8CAA8C;IACzD;QACE5B,QAAQ;QACRC,aAAa;QACbC,WAAW;QACXC,WAAW;QACXC,SAAS;QACTC,MAAMP;QACNQ,eAAe;QACfQ,OAAO;QACPC,gBAAgB;QAChBC,cAAc;QACdC,kBAAkB;QAClBC,WAAW;QACXC,qBAAqB;QACrBC,YAAY;QACZC,cAAc;QACdC,gBAAgB;QAChBC,UAAU;QACVC,mBAAmB;QACnBC,gBAAgB;QAChBC,gBAAgB;QAChBC,SAAS;IACX;CACD,CAAC"}
@@ -1,9 +1,12 @@
1
+ import { ActionOptions, SelectionOptions } from '@perses-dev/plugin-system';
1
2
  /**
2
3
  * The Options object type supported by the TraceTable panel plugin.
3
4
  */
4
5
  export interface TraceTableOptions {
5
6
  visual?: TraceTableVisualOptions;
6
7
  links?: TraceTableCustomLinks;
8
+ selection?: SelectionOptions;
9
+ actions?: ActionOptions;
7
10
  }
8
11
  export interface TraceTableVisualOptions {
9
12
  palette?: TraceTablePaletteOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"trace-table-model.d.ts","sourceRoot":"","sources":["../../src/trace-table-model.ts"],"names":[],"mappings":"AAaA;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,KAAK,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,iBAAiB,CAElE"}
1
+ {"version":3,"file":"trace-table-model.d.ts","sourceRoot":"","sources":["../../src/trace-table-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE5E;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,iBAAiB,CAElE"}
@@ -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
@@ -10,9 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- /**
14
- * The Options object type supported by the TraceTable panel plugin.
15
- */ // Note: The interface attributes must match schemas/trace-table.cue
16
13
  /**
17
14
  * Creates the initial/empty options for a TraceTable panel.
18
15
  */ export function createInitialTraceTableOptions() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/trace-table-model.ts"],"sourcesContent":["// Copyright 2023 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/**\n * The Options object type supported by the TraceTable panel plugin.\n */\n// Note: The interface attributes must match schemas/trace-table.cue\nexport interface TraceTableOptions {\n visual?: TraceTableVisualOptions;\n links?: TraceTableCustomLinks;\n}\n\nexport interface TraceTableVisualOptions {\n palette?: TraceTablePaletteOptions;\n}\n\nexport interface TraceTablePaletteOptions {\n mode: 'auto' | 'categorical';\n}\n\nexport interface TraceTableCustomLinks {\n /**\n * Link to a trace.\n * Supported variables: datasourceName, traceId\n */\n trace?: string;\n}\n\n/**\n * Creates the initial/empty options for a TraceTable panel.\n */\nexport function createInitialTraceTableOptions(): TraceTableOptions {\n return {};\n}\n"],"names":["createInitialTraceTableOptions"],"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;;CAEC,GACD,oEAAoE;AAsBpE;;CAEC,GACD,OAAO,SAASA;IACd,OAAO,CAAC;AACV"}
1
+ {"version":3,"sources":["../../src/trace-table-model.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 { ActionOptions, SelectionOptions } from '@perses-dev/plugin-system';\n\n/**\n * The Options object type supported by the TraceTable panel plugin.\n */\n// Note: The interface attributes must match schemas/trace-table.cue\nexport interface TraceTableOptions {\n visual?: TraceTableVisualOptions;\n links?: TraceTableCustomLinks;\n selection?: SelectionOptions;\n actions?: ActionOptions;\n}\n\nexport interface TraceTableVisualOptions {\n palette?: TraceTablePaletteOptions;\n}\n\nexport interface TraceTablePaletteOptions {\n mode: 'auto' | 'categorical';\n}\n\nexport interface TraceTableCustomLinks {\n /**\n * Link to a trace.\n * Supported variables: datasourceName, traceId\n */\n trace?: string;\n}\n\n/**\n * Creates the initial/empty options for a TraceTable panel.\n */\nexport function createInitialTraceTableOptions(): TraceTableOptions {\n return {};\n}\n"],"names":["createInitialTraceTableOptions"],"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;AA+BjC;;CAEC,GACD,OAAO,SAASA;IACd,OAAO,CAAC;AACV"}
@@ -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