@perses-dev/splunk-plugin 0.1.0 → 0.2.0-beta.1

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 (152) hide show
  1. package/__mf/js/{Splunk.6f71e9ce.js → Splunk.31e2854f.js} +4 -4
  2. package/__mf/js/async/121.2e756764.js +2 -0
  3. package/__mf/js/async/181.dc89accd.js +2 -0
  4. package/__mf/js/async/196.9b979757.js +1 -0
  5. package/__mf/js/async/208.b72a041c.js +102 -0
  6. package/__mf/js/async/403.4e0c341a.js +4 -0
  7. package/__mf/js/async/403.4e0c341a.js.LICENSE.txt +9 -0
  8. package/__mf/js/async/470.aad78617.js +2 -0
  9. package/__mf/js/async/562.50672091.js +2 -0
  10. package/__mf/js/async/770.84637d80.js +43 -0
  11. package/__mf/js/async/{332.fc51c4d5.js.LICENSE.txt → 770.84637d80.js.LICENSE.txt} +66 -1
  12. package/__mf/js/async/941.41972212.js +2 -0
  13. package/__mf/js/async/957.553506b9.js +1 -0
  14. package/__mf/js/async/963.5f78f579.js +1 -0
  15. package/__mf/js/async/982.11d34b45.js +10 -0
  16. package/__mf/js/async/__federation_expose_SplunkDatasource.981f2e0b.js +2 -0
  17. package/__mf/js/async/__federation_expose_SplunkLogQuery.3588c915.js +2 -0
  18. package/__mf/js/async/__federation_expose_SplunkTimeSeriesQuery.aa1e18a7.js +2 -0
  19. package/__mf/js/async/lib-router.56503757.js +2 -0
  20. package/__mf/js/{main.ccd342d6.js → main.fc89e87c.js} +3 -3
  21. package/lib/bootstrap.js +2 -2
  22. package/lib/datasources/index.js +1 -1
  23. package/lib/datasources/index.js.map +1 -1
  24. package/lib/datasources/splunk-datasource/SplunkDatasource.d.ts +3 -3
  25. package/lib/datasources/splunk-datasource/SplunkDatasource.d.ts.map +1 -1
  26. package/lib/datasources/splunk-datasource/SplunkDatasource.js +2 -2
  27. package/lib/datasources/splunk-datasource/SplunkDatasource.js.map +1 -1
  28. package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.d.ts +2 -2
  29. package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.d.ts.map +1 -1
  30. package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.js +1 -1
  31. package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.js.map +1 -1
  32. package/lib/datasources/splunk-datasource/index.js +3 -3
  33. package/lib/datasources/splunk-datasource/index.js.map +1 -1
  34. package/lib/datasources/splunk-datasource/splunk-datasource-types.d.ts +1 -1
  35. package/lib/datasources/splunk-datasource/splunk-datasource-types.d.ts.map +1 -1
  36. package/lib/datasources/splunk-datasource/splunk-datasource-types.js.map +1 -1
  37. package/lib/getPluginModule.d.ts +1 -1
  38. package/lib/getPluginModule.d.ts.map +1 -1
  39. package/lib/getPluginModule.js +3 -1
  40. package/lib/getPluginModule.js.map +1 -1
  41. package/lib/index-federation.js +1 -1
  42. package/lib/index.js +4 -4
  43. package/lib/index.js.map +1 -1
  44. package/lib/model/index.js +2 -2
  45. package/lib/model/index.js.map +1 -1
  46. package/lib/model/splunk-client.d.ts +1 -1
  47. package/lib/model/splunk-client.d.ts.map +1 -1
  48. package/lib/model/splunk-client.js +1 -1
  49. package/lib/model/splunk-client.js.map +1 -1
  50. package/lib/queries/index.js +2 -2
  51. package/lib/queries/index.js.map +1 -1
  52. package/lib/queries/splunk-log-query/SplunkLogQuery.d.ts +2 -2
  53. package/lib/queries/splunk-log-query/SplunkLogQuery.d.ts.map +1 -1
  54. package/lib/queries/splunk-log-query/SplunkLogQuery.js +4 -6
  55. package/lib/queries/splunk-log-query/SplunkLogQuery.js.map +1 -1
  56. package/lib/queries/splunk-log-query/SplunkLogQueryEditor.d.ts +3 -3
  57. package/lib/queries/splunk-log-query/SplunkLogQueryEditor.d.ts.map +1 -1
  58. package/lib/queries/splunk-log-query/SplunkLogQueryEditor.js +3 -3
  59. package/lib/queries/splunk-log-query/SplunkLogQueryEditor.js.map +1 -1
  60. package/lib/queries/splunk-log-query/get-splunk-log-data.d.ts +2 -2
  61. package/lib/queries/splunk-log-query/get-splunk-log-data.d.ts.map +1 -1
  62. package/lib/queries/splunk-log-query/get-splunk-log-data.js +2 -2
  63. package/lib/queries/splunk-log-query/get-splunk-log-data.js.map +1 -1
  64. package/lib/queries/splunk-log-query/index.js +4 -4
  65. package/lib/queries/splunk-log-query/index.js.map +1 -1
  66. package/lib/queries/splunk-log-query/log-query-plugin-interface.d.ts +2 -2
  67. package/lib/queries/splunk-log-query/log-query-plugin-interface.d.ts.map +1 -1
  68. package/lib/queries/splunk-log-query/log-query-plugin-interface.js.map +1 -1
  69. package/lib/queries/splunk-log-query/splunk-log-query-types.d.ts +2 -2
  70. package/lib/queries/splunk-log-query/splunk-log-query-types.d.ts.map +1 -1
  71. package/lib/queries/splunk-log-query/splunk-log-query-types.js.map +1 -1
  72. package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.d.ts +2 -2
  73. package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.d.ts.map +1 -1
  74. package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js +4 -6
  75. package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js.map +1 -1
  76. package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.d.ts +3 -3
  77. package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.d.ts.map +1 -1
  78. package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js +3 -3
  79. package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js.map +1 -1
  80. package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.d.ts +2 -2
  81. package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.d.ts.map +1 -1
  82. package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.js +2 -2
  83. package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.js.map +1 -1
  84. package/lib/queries/splunk-time-series-query/index.js +4 -4
  85. package/lib/queries/splunk-time-series-query/index.js.map +1 -1
  86. package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.d.ts +2 -2
  87. package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.d.ts.map +1 -1
  88. package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.js.map +1 -1
  89. package/lib/setup-tests.d.ts +1 -1
  90. package/lib/setup-tests.d.ts.map +1 -1
  91. package/lib/setup-tests.js +2 -2
  92. package/lib/setup-tests.js.map +1 -1
  93. package/mf-manifest.json +41 -44
  94. package/mf-stats.json +41 -44
  95. package/package.json +10 -9
  96. package/__mf/js/async/116.9f39e2dc.js +0 -7
  97. package/__mf/js/async/116.9f39e2dc.js.LICENSE.txt +0 -64
  98. package/__mf/js/async/121.0ceb8113.js +0 -2
  99. package/__mf/js/async/181.4d01713c.js +0 -2
  100. package/__mf/js/async/332.fc51c4d5.js +0 -139
  101. package/__mf/js/async/386.da241588.js +0 -2
  102. package/__mf/js/async/470.e7f915b7.js +0 -2
  103. package/__mf/js/async/537.880623e7.js +0 -1
  104. package/__mf/js/async/558.db2f2486.js +0 -1
  105. package/__mf/js/async/756.8162c322.js +0 -24
  106. package/__mf/js/async/756.8162c322.js.LICENSE.txt +0 -44
  107. package/__mf/js/async/842.601cf14f.js +0 -1
  108. package/__mf/js/async/941.693e183d.js +0 -2
  109. package/__mf/js/async/963.0f837958.js +0 -1
  110. package/__mf/js/async/982.e5647ac8.js +0 -10
  111. package/__mf/js/async/__federation_expose_SplunkDatasource.b9438a9e.js +0 -2
  112. package/__mf/js/async/__federation_expose_SplunkLogQuery.8d011abe.js +0 -2
  113. package/__mf/js/async/__federation_expose_SplunkTimeSeriesQuery.264a58b9.js +0 -2
  114. package/__mf/js/async/lib-router.31611676.js +0 -2
  115. package/lib/cjs/bootstrap.js +0 -27
  116. package/lib/cjs/datasources/index.js +0 -30
  117. package/lib/cjs/datasources/splunk-datasource/SplunkDatasource.js +0 -69
  118. package/lib/cjs/datasources/splunk-datasource/SplunkDatasourceEditor.js +0 -71
  119. package/lib/cjs/datasources/splunk-datasource/index.js +0 -32
  120. package/lib/cjs/datasources/splunk-datasource/splunk-datasource-types.js +0 -16
  121. package/lib/cjs/env.d.js +0 -14
  122. package/lib/cjs/getPluginModule.js +0 -39
  123. package/lib/cjs/index-federation.js +0 -55
  124. package/lib/cjs/index.js +0 -39
  125. package/lib/cjs/model/index.js +0 -31
  126. package/lib/cjs/model/splunk-client-types.js +0 -16
  127. package/lib/cjs/model/splunk-client.js +0 -151
  128. package/lib/cjs/queries/constants.js +0 -25
  129. package/lib/cjs/queries/index.js +0 -31
  130. package/lib/cjs/queries/splunk-log-query/SplunkLogQuery.js +0 -43
  131. package/lib/cjs/queries/splunk-log-query/SplunkLogQueryEditor.js +0 -95
  132. package/lib/cjs/queries/splunk-log-query/get-splunk-log-data.js +0 -127
  133. package/lib/cjs/queries/splunk-log-query/index.js +0 -33
  134. package/lib/cjs/queries/splunk-log-query/log-query-plugin-interface.js +0 -16
  135. package/lib/cjs/queries/splunk-log-query/splunk-log-query-types.js +0 -16
  136. package/lib/cjs/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js +0 -43
  137. package/lib/cjs/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js +0 -95
  138. package/lib/cjs/queries/splunk-time-series-query/get-splunk-time-series-data.js +0 -106
  139. package/lib/cjs/queries/splunk-time-series-query/index.js +0 -33
  140. package/lib/cjs/queries/splunk-time-series-query/splunk-time-series-query-types.js +0 -16
  141. package/lib/cjs/setup-tests.js +0 -19
  142. /package/__mf/css/async/{116.85c2cbf6.css → 770.85c2cbf6.css} +0 -0
  143. /package/__mf/js/async/{121.0ceb8113.js.LICENSE.txt → 121.2e756764.js.LICENSE.txt} +0 -0
  144. /package/__mf/js/async/{181.4d01713c.js.LICENSE.txt → 181.dc89accd.js.LICENSE.txt} +0 -0
  145. /package/__mf/js/async/{470.e7f915b7.js.LICENSE.txt → 470.aad78617.js.LICENSE.txt} +0 -0
  146. /package/__mf/js/async/{386.da241588.js.LICENSE.txt → 562.50672091.js.LICENSE.txt} +0 -0
  147. /package/__mf/js/async/{941.693e183d.js.LICENSE.txt → 941.41972212.js.LICENSE.txt} +0 -0
  148. /package/__mf/js/async/{982.e5647ac8.js.LICENSE.txt → 982.11d34b45.js.LICENSE.txt} +0 -0
  149. /package/__mf/js/async/{__federation_expose_SplunkDatasource.b9438a9e.js.LICENSE.txt → __federation_expose_SplunkDatasource.981f2e0b.js.LICENSE.txt} +0 -0
  150. /package/__mf/js/async/{__federation_expose_SplunkLogQuery.8d011abe.js.LICENSE.txt → __federation_expose_SplunkLogQuery.3588c915.js.LICENSE.txt} +0 -0
  151. /package/__mf/js/async/{__federation_expose_SplunkTimeSeriesQuery.264a58b9.js.LICENSE.txt → __federation_expose_SplunkTimeSeriesQuery.aa1e18a7.js.LICENSE.txt} +0 -0
  152. /package/__mf/js/async/{lib-router.31611676.js.LICENSE.txt → lib-router.56503757.js.LICENSE.txt} +0 -0
@@ -1,95 +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, "SplunkTimeSeriesQueryEditor", {
18
- enumerable: true,
19
- get: function() {
20
- return SplunkTimeSeriesQueryEditor;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _pluginsystem = require("@perses-dev/plugin-system");
25
- const _material = require("@mui/material");
26
- const _immer = require("immer");
27
- const DATASOURCE_KIND = 'SplunkDatasource';
28
- const DEFAULT_DATASOURCE = {
29
- kind: DATASOURCE_KIND
30
- };
31
- function SplunkTimeSeriesQueryEditor(props) {
32
- const { onChange, value } = props;
33
- const { datasource, query } = value;
34
- const datasourceSelectValue = datasource ?? DEFAULT_DATASOURCE;
35
- const selectedDatasource = (0, _pluginsystem.useDatasourceSelectValueToSelector)(datasourceSelectValue, DATASOURCE_KIND);
36
- const handleDatasourceChange = (newDatasourceSelection)=>{
37
- if (!(0, _pluginsystem.isVariableDatasource)(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) {
38
- onChange((0, _immer.produce)(value, (draft)=>{
39
- draft.datasource = newDatasourceSelection;
40
- }));
41
- return;
42
- }
43
- throw new Error('Got unexpected non SplunkQuery datasource selection');
44
- };
45
- const handleQueryChange = (newQuery)=>{
46
- onChange((0, _immer.produce)(value, (draft)=>{
47
- draft.query = newQuery;
48
- }));
49
- };
50
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
51
- spacing: 1.5,
52
- paddingBottom: 1,
53
- children: [
54
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
55
- children: [
56
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
57
- sx: {
58
- display: 'block',
59
- marginBottom: '4px',
60
- fontWeight: 500
61
- },
62
- children: "Datasource"
63
- }),
64
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
65
- datasourcePluginKind: DATASOURCE_KIND,
66
- value: selectedDatasource,
67
- onChange: handleDatasourceChange,
68
- label: "Splunk Datasource",
69
- notched: true
70
- })
71
- ]
72
- }),
73
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
74
- children: [
75
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
76
- sx: {
77
- display: 'block',
78
- marginBottom: '4px',
79
- fontWeight: 500
80
- },
81
- children: "SPL Query"
82
- }),
83
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
84
- fullWidth: true,
85
- multiline: true,
86
- rows: 4,
87
- value: query,
88
- onChange: (e)=>handleQueryChange(e.target.value),
89
- placeholder: "search index=main | timechart count"
90
- })
91
- ]
92
- })
93
- ]
94
- });
95
- }
@@ -1,106 +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, "getSplunkTimeSeriesData", {
18
- enumerable: true,
19
- get: function() {
20
- return getSplunkTimeSeriesData;
21
- }
22
- });
23
- const _pluginsystem = require("@perses-dev/plugin-system");
24
- const _constants = require("../constants");
25
- function convertResultsToTimeSeries(results) {
26
- const resultsArray = Array.isArray(results) ? results : [
27
- results
28
- ];
29
- if (resultsArray.length === 0) return [];
30
- const firstResult = resultsArray[0];
31
- if (!firstResult) return [];
32
- const metricKeys = Object.keys(firstResult).filter((key)=>key !== '_time');
33
- return metricKeys.map((metricKey)=>({
34
- name: metricKey,
35
- values: resultsArray.map((result)=>{
36
- const timestamp = new Date(result._time).getTime() / 1000;
37
- const value = Number(result[metricKey]) || 0;
38
- return [
39
- timestamp,
40
- value
41
- ];
42
- }),
43
- labels: {
44
- metric: metricKey
45
- }
46
- }));
47
- }
48
- const getSplunkTimeSeriesData = async (spec, context)=>{
49
- if (!spec.query) {
50
- return {
51
- series: [],
52
- timeRange: {
53
- start: context.timeRange.start,
54
- end: context.timeRange.end
55
- },
56
- stepMs: 60000
57
- };
58
- }
59
- const query = (0, _pluginsystem.replaceVariables)(spec.query, context.variableState);
60
- const client = await context.datasourceStore.getDatasourceClient(spec.datasource ?? _constants.DEFAULT_DATASOURCE);
61
- const datasourceSpec = await context.datasourceStore.getDatasource(spec.datasource ?? _constants.DEFAULT_DATASOURCE);
62
- const allowedEndpoints = datasourceSpec.plugin.spec?.proxy?.spec?.allowedEndpoints || [];
63
- const hasExportEndpoint = allowedEndpoints.some((ep)=>ep.endpointPattern?.includes('/export'));
64
- const { start, end } = context.timeRange;
65
- const earliest_time = Math.floor(start.getTime() / 1000).toString();
66
- const latest_time = Math.floor(end.getTime() / 1000).toString();
67
- let resultsResponse;
68
- if (hasExportEndpoint) {
69
- resultsResponse = await client.exportSearch({
70
- search: query,
71
- earliest_time: spec.earliest || earliest_time,
72
- latest_time: spec.latest || latest_time
73
- });
74
- } else {
75
- const jobResponse = await client.createJob({
76
- search: query,
77
- earliest_time: spec.earliest || earliest_time,
78
- latest_time: spec.latest || latest_time
79
- });
80
- const jobId = jobResponse.sid;
81
- let jobStatus;
82
- do {
83
- await new Promise((resolve)=>setTimeout(resolve, 500)); // Wait 500ms between polls
84
- jobStatus = await client.getJobStatus(jobId);
85
- if (!jobStatus || !jobStatus.entry?.[0]?.content) {
86
- console.warn('Failed to get job status or job status response is malformed', {
87
- jobStatus
88
- });
89
- break;
90
- }
91
- }while (!jobStatus.entry?.[0]?.content?.isDone)
92
- resultsResponse = await client.getJobResults(jobId);
93
- }
94
- const convertedSeries = convertResultsToTimeSeries(resultsResponse.results);
95
- return {
96
- series: convertedSeries,
97
- timeRange: {
98
- start,
99
- end
100
- },
101
- stepMs: context.suggestedStepMs || 60000,
102
- metadata: {
103
- executedQueryString: query
104
- }
105
- };
106
- };
@@ -1,33 +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
- _export_star(require("./get-splunk-time-series-data"), exports);
18
- _export_star(require("./SplunkTimeSeriesQuery"), exports);
19
- _export_star(require("./SplunkTimeSeriesQueryEditor"), exports);
20
- _export_star(require("./splunk-time-series-query-types"), exports);
21
- function _export_star(from, to) {
22
- Object.keys(from).forEach(function(k) {
23
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
24
- Object.defineProperty(to, k, {
25
- enumerable: true,
26
- get: function() {
27
- return from[k];
28
- }
29
- });
30
- }
31
- });
32
- return from;
33
- }
@@ -1,16 +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
- });
@@ -1,19 +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
- require("@testing-library/jest-dom");
18
- // Always mock e-charts during tests since we don't have a proper canvas in jsdom
19
- jest.mock('echarts/core');