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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/__mf/js/TimeSeriesChart.b9caac04.js +7 -0
  2. package/__mf/js/async/121.fde1320e.js +2 -0
  3. package/__mf/js/async/{527.f97d1b86.js → 182.9e1e293f.js} +9 -9
  4. package/__mf/js/async/192.66c6659d.js +1 -0
  5. package/__mf/js/async/2.166bda4f.js +1 -0
  6. package/__mf/js/async/235.76fd7af2.js +1 -0
  7. package/__mf/js/async/274.e4ed32f7.js +2 -0
  8. package/__mf/js/async/319.8e262f9c.js +1 -0
  9. package/__mf/js/async/356.52455d93.js +1 -0
  10. package/__mf/js/async/384.f40367cc.js +1 -0
  11. package/__mf/js/async/392.8cb3dcaa.js +2 -0
  12. package/__mf/js/async/463.f5dc7759.js +7 -0
  13. package/__mf/js/async/{694.0fb9ee5a.js.LICENSE.txt → 463.f5dc7759.js.LICENSE.txt} +41 -1
  14. package/__mf/js/async/465.add3260a.js +1 -0
  15. package/__mf/js/async/470.beedcbcc.js +2 -0
  16. package/__mf/js/async/522.806db24f.js +22 -0
  17. package/__mf/js/async/525.8b92c616.js +37 -0
  18. package/__mf/js/async/587.828c454a.js +1 -0
  19. package/__mf/js/async/597.0c5bd6dd.js +2 -0
  20. package/__mf/js/async/612.b2f31132.js +3 -0
  21. package/__mf/js/async/616.804d525d.js +1 -0
  22. package/__mf/js/async/663.892b9ad5.js +1 -0
  23. package/__mf/js/async/700.25c7e5dd.js +1 -0
  24. package/__mf/js/async/724.f74ffa12.js +1 -0
  25. package/__mf/js/async/730.058dea58.js +2 -0
  26. package/__mf/js/async/865.cb917066.js +2 -0
  27. package/__mf/js/async/941.3bb54150.js +2 -0
  28. package/__mf/js/async/955.52ca0671.js +1 -0
  29. package/__mf/js/async/968.2dd830b3.js +1 -0
  30. package/__mf/js/async/__federation_expose_TimeSeriesChart.4ddb01e0.js +1 -0
  31. package/__mf/js/async/lib-router.ecb51f08.js +2 -0
  32. package/__mf/js/main.f55169be.js +7 -0
  33. package/lib/GeneralSettingsEditor.d.ts +2 -2
  34. package/lib/GeneralSettingsEditor.d.ts.map +1 -1
  35. package/lib/GeneralSettingsEditor.js +7 -7
  36. package/lib/GeneralSettingsEditor.js.map +1 -1
  37. package/lib/QuerySettingsEditor.d.ts +2 -2
  38. package/lib/QuerySettingsEditor.d.ts.map +1 -1
  39. package/lib/QuerySettingsEditor.js +11 -11
  40. package/lib/QuerySettingsEditor.js.map +1 -1
  41. package/lib/TimeSeriesChart.d.ts +3 -3
  42. package/lib/TimeSeriesChart.d.ts.map +1 -1
  43. package/lib/TimeSeriesChart.js +6 -5
  44. package/lib/TimeSeriesChart.js.map +1 -1
  45. package/lib/TimeSeriesChartBase.d.ts +4 -4
  46. package/lib/TimeSeriesChartBase.d.ts.map +1 -1
  47. package/lib/TimeSeriesChartBase.js +12 -12
  48. package/lib/TimeSeriesChartBase.js.map +1 -1
  49. package/lib/TimeSeriesChartPanel.d.ts +4 -4
  50. package/lib/TimeSeriesChartPanel.d.ts.map +1 -1
  51. package/lib/TimeSeriesChartPanel.js +12 -12
  52. package/lib/TimeSeriesChartPanel.js.map +1 -1
  53. package/lib/TimeSeriesExportAction.d.ts +1 -1
  54. package/lib/TimeSeriesExportAction.d.ts.map +1 -1
  55. package/lib/TimeSeriesExportAction.js +5 -5
  56. package/lib/TimeSeriesExportAction.js.map +1 -1
  57. package/lib/VisualOptionsEditor.d.ts +2 -2
  58. package/lib/VisualOptionsEditor.d.ts.map +1 -1
  59. package/lib/VisualOptionsEditor.js +4 -4
  60. package/lib/VisualOptionsEditor.js.map +1 -1
  61. package/lib/YAxisOptionsEditor.d.ts +2 -2
  62. package/lib/YAxisOptionsEditor.d.ts.map +1 -1
  63. package/lib/YAxisOptionsEditor.js +3 -3
  64. package/lib/YAxisOptionsEditor.js.map +1 -1
  65. package/lib/annotations/AnnotationTooltip.d.ts +2 -2
  66. package/lib/annotations/AnnotationTooltip.d.ts.map +1 -1
  67. package/lib/annotations/AnnotationTooltip.js +6 -6
  68. package/lib/annotations/AnnotationTooltip.js.map +1 -1
  69. package/lib/bootstrap.js +2 -2
  70. package/lib/getPluginModule.d.ts +1 -1
  71. package/lib/getPluginModule.d.ts.map +1 -1
  72. package/lib/getPluginModule.js +3 -1
  73. package/lib/getPluginModule.js.map +1 -1
  74. package/lib/index-federation.js +1 -1
  75. package/lib/index.js +9 -9
  76. package/lib/index.js.map +1 -1
  77. package/lib/setup-tests.d.ts +1 -1
  78. package/lib/setup-tests.d.ts.map +1 -1
  79. package/lib/setup-tests.js +2 -2
  80. package/lib/setup-tests.js.map +1 -1
  81. package/lib/test/mock-query-results.d.ts +1 -1
  82. package/lib/test/mock-query-results.d.ts.map +1 -1
  83. package/lib/test/mock-query-results.js.map +1 -1
  84. package/lib/time-series-chart-model.d.ts +3 -3
  85. package/lib/time-series-chart-model.d.ts.map +1 -1
  86. package/lib/time-series-chart-model.js.map +1 -1
  87. package/lib/utils/annotation.d.ts +2 -2
  88. package/lib/utils/annotation.d.ts.map +1 -1
  89. package/lib/utils/annotation.js.map +1 -1
  90. package/lib/utils/data-transform.d.ts +5 -5
  91. package/lib/utils/data-transform.d.ts.map +1 -1
  92. package/lib/utils/data-transform.js +3 -3
  93. package/lib/utils/data-transform.js.map +1 -1
  94. package/lib/utils/palette-gen.d.ts +1 -1
  95. package/lib/utils/palette-gen.d.ts.map +1 -1
  96. package/lib/utils/palette-gen.js +1 -1
  97. package/lib/utils/palette-gen.js.map +1 -1
  98. package/lib/utils/palette.js +1 -1
  99. package/lib/utils/palette.js.map +1 -1
  100. package/lib/utils/timezone-formatter.js +1 -1
  101. package/mf-manifest.json +37 -81
  102. package/mf-stats.json +39 -91
  103. package/package.json +11 -11
  104. package/__mf/js/TimeSeriesChart.42841bce.js +0 -7
  105. package/__mf/js/async/121.c3c0e54f.js +0 -2
  106. package/__mf/js/async/177.2fef2962.js +0 -1
  107. package/__mf/js/async/187.f5e8932b.js +0 -1
  108. package/__mf/js/async/192.c3dd56d5.js +0 -1
  109. package/__mf/js/async/2.60fa4a40.js +0 -1
  110. package/__mf/js/async/208.b9f374ad.js +0 -7
  111. package/__mf/js/async/208.b9f374ad.js.LICENSE.txt +0 -39
  112. package/__mf/js/async/235.d23c8ef0.js +0 -1
  113. package/__mf/js/async/274.72dfa9c8.js +0 -2
  114. package/__mf/js/async/356.8170c96d.js +0 -1
  115. package/__mf/js/async/392.b9ba5bf2.js +0 -2
  116. package/__mf/js/async/470.e09f33b7.js +0 -2
  117. package/__mf/js/async/491.85194549.js +0 -1
  118. package/__mf/js/async/518.2ac1df43.js +0 -38
  119. package/__mf/js/async/52.0d78de2b.js +0 -1
  120. package/__mf/js/async/546.5fecffa4.js +0 -3
  121. package/__mf/js/async/568.45da2c30.js +0 -1
  122. package/__mf/js/async/587.c9460696.js +0 -1
  123. package/__mf/js/async/588.0a1aa144.js +0 -1
  124. package/__mf/js/async/603.3b771310.js +0 -2
  125. package/__mf/js/async/616.79484ac8.js +0 -1
  126. package/__mf/js/async/655.2f794f77.js +0 -1
  127. package/__mf/js/async/694.0fb9ee5a.js +0 -2
  128. package/__mf/js/async/702.785cd635.js +0 -2
  129. package/__mf/js/async/71.8c6cf914.js +0 -1
  130. package/__mf/js/async/724.c45dcf5b.js +0 -1
  131. package/__mf/js/async/873.04a201bf.js +0 -1
  132. package/__mf/js/async/941.b89f8595.js +0 -2
  133. package/__mf/js/async/955.176fe200.js +0 -1
  134. package/__mf/js/async/968.2a9fb1a0.js +0 -1
  135. package/__mf/js/async/978.a9865b23.js +0 -1
  136. package/__mf/js/async/984.83bd5c6d.js +0 -22
  137. package/__mf/js/async/__federation_expose_TimeSeriesChart.0ab11cd4.js +0 -1
  138. package/__mf/js/async/lib-router.319c02cd.js +0 -2
  139. package/__mf/js/main.691eecd6.js +0 -7
  140. package/lib/cjs/GeneralSettingsEditor.js +0 -103
  141. package/lib/cjs/QuerySettingsEditor.js +0 -666
  142. package/lib/cjs/TimeSeriesChart.js +0 -50
  143. package/lib/cjs/TimeSeriesChartBase.js +0 -488
  144. package/lib/cjs/TimeSeriesChartPanel.js +0 -456
  145. package/lib/cjs/TimeSeriesExportAction.js +0 -124
  146. package/lib/cjs/VisualOptionsEditor.js +0 -161
  147. package/lib/cjs/YAxisOptionsEditor.js +0 -118
  148. package/lib/cjs/annotations/AnnotationTooltip.js +0 -370
  149. package/lib/cjs/bootstrap.js +0 -26
  150. package/lib/cjs/env.d.js +0 -14
  151. package/lib/cjs/getPluginModule.js +0 -39
  152. package/lib/cjs/index-federation.js +0 -55
  153. package/lib/cjs/index.js +0 -44
  154. package/lib/cjs/setup-tests.js +0 -19
  155. package/lib/cjs/test/mock-query-results.js +0 -403
  156. package/lib/cjs/time-series-chart-model.js +0 -225
  157. package/lib/cjs/utils/annotation.js +0 -37
  158. package/lib/cjs/utils/data-transform.js +0 -243
  159. package/lib/cjs/utils/palette-gen.js +0 -75
  160. package/lib/cjs/utils/palette.js +0 -83
  161. package/lib/cjs/utils/timezone-formatter.js +0 -48
  162. /package/__mf/css/async/{208.85c2cbf6.css → 463.85c2cbf6.css} +0 -0
  163. /package/__mf/js/async/{121.c3c0e54f.js.LICENSE.txt → 121.fde1320e.js.LICENSE.txt} +0 -0
  164. /package/__mf/js/async/{527.f97d1b86.js.LICENSE.txt → 182.9e1e293f.js.LICENSE.txt} +0 -0
  165. /package/__mf/js/async/{274.72dfa9c8.js.LICENSE.txt → 274.e4ed32f7.js.LICENSE.txt} +0 -0
  166. /package/__mf/js/async/{392.b9ba5bf2.js.LICENSE.txt → 392.8cb3dcaa.js.LICENSE.txt} +0 -0
  167. /package/__mf/js/async/{470.e09f33b7.js.LICENSE.txt → 470.beedcbcc.js.LICENSE.txt} +0 -0
  168. /package/__mf/js/async/{984.83bd5c6d.js.LICENSE.txt → 522.806db24f.js.LICENSE.txt} +0 -0
  169. /package/__mf/js/async/{603.3b771310.js.LICENSE.txt → 597.0c5bd6dd.js.LICENSE.txt} +0 -0
  170. /package/__mf/js/async/{702.785cd635.js.LICENSE.txt → 865.cb917066.js.LICENSE.txt} +0 -0
  171. /package/__mf/js/async/{941.b89f8595.js.LICENSE.txt → 941.3bb54150.js.LICENSE.txt} +0 -0
  172. /package/__mf/js/async/{lib-router.319c02cd.js.LICENSE.txt → lib-router.ecb51f08.js.LICENSE.txt} +0 -0
package/lib/cjs/env.d.js DELETED
@@ -1,14 +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
- /// <reference types="@rsbuild/core/types" />
14
- "use strict";
@@ -1,39 +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, "getPluginModule", {
18
- enumerable: true,
19
- get: function() {
20
- return getPluginModule;
21
- }
22
- });
23
- const _packagejson = /*#__PURE__*/ _interop_require_default(require("../package.json"));
24
- function _interop_require_default(obj) {
25
- return obj && obj.__esModule ? obj : {
26
- default: obj
27
- };
28
- }
29
- function getPluginModule() {
30
- const { name, version, perses } = _packagejson.default;
31
- return {
32
- kind: 'PluginModule',
33
- metadata: {
34
- name,
35
- version
36
- },
37
- spec: perses
38
- };
39
- }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- function _getRequireWildcardCache(nodeInterop) {
3
- if (typeof WeakMap !== "function") return null;
4
- var cacheBabelInterop = new WeakMap();
5
- var cacheNodeInterop = new WeakMap();
6
- return (_getRequireWildcardCache = function(nodeInterop) {
7
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
8
- })(nodeInterop);
9
- }
10
- function _interop_require_wildcard(obj, nodeInterop) {
11
- if (!nodeInterop && obj && obj.__esModule) {
12
- return obj;
13
- }
14
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
15
- return {
16
- default: obj
17
- };
18
- }
19
- var cache = _getRequireWildcardCache(nodeInterop);
20
- if (cache && cache.has(obj)) {
21
- return cache.get(obj);
22
- }
23
- var newObj = {
24
- __proto__: null
25
- };
26
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
27
- for(var key in obj){
28
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
29
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
30
- if (desc && (desc.get || desc.set)) {
31
- Object.defineProperty(newObj, key, desc);
32
- } else {
33
- newObj[key] = obj[key];
34
- }
35
- }
36
- }
37
- newObj.default = obj;
38
- if (cache) {
39
- cache.set(obj, newObj);
40
- }
41
- return newObj;
42
- }
43
- // Copyright The Perses Authors
44
- // Licensed under the Apache License, Version 2.0 (the "License");
45
- // you may not use this file except in compliance with the License.
46
- // You may obtain a copy of the License at
47
- //
48
- // http://www.apache.org/licenses/LICENSE-2.0
49
- //
50
- // Unless required by applicable law or agreed to in writing, software
51
- // distributed under the License is distributed on an "AS IS" BASIS,
52
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53
- // See the License for the specific language governing permissions and
54
- // limitations under the License.
55
- Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./bootstrap")));
package/lib/cjs/index.js DELETED
@@ -1,44 +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, "getPluginModule", {
18
- enumerable: true,
19
- get: function() {
20
- return _getPluginModule.getPluginModule;
21
- }
22
- });
23
- const _getPluginModule = require("./getPluginModule");
24
- _export_star(require("./TimeSeriesChart"), exports);
25
- _export_star(require("./GeneralSettingsEditor"), exports);
26
- _export_star(require("./QuerySettingsEditor"), exports);
27
- _export_star(require("./VisualOptionsEditor"), exports);
28
- _export_star(require("./YAxisOptionsEditor"), exports);
29
- _export_star(require("./TimeSeriesChartPanel"), exports);
30
- _export_star(require("./TimeSeriesChartBase"), exports);
31
- _export_star(require("./time-series-chart-model"), exports);
32
- function _export_star(from, to) {
33
- Object.keys(from).forEach(function(k) {
34
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
35
- Object.defineProperty(to, k, {
36
- enumerable: true,
37
- get: function() {
38
- return from[k];
39
- }
40
- });
41
- }
42
- });
43
- return from;
44
- }
@@ -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');
@@ -1,403 +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 MOCK_NULL_QUERY_RESULT () {
25
- return MOCK_NULL_QUERY_RESULT;
26
- },
27
- get MOCK_TIME_SERIES_DATA_MULTIVALUE () {
28
- return MOCK_TIME_SERIES_DATA_MULTIVALUE;
29
- },
30
- get MOCK_TIME_SERIES_DATA_SINGLEVALUE () {
31
- return MOCK_TIME_SERIES_DATA_SINGLEVALUE;
32
- },
33
- get MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE () {
34
- return MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE;
35
- },
36
- get MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE () {
37
- return MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE;
38
- }
39
- });
40
- const MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE = [
41
- {
42
- status: 'success',
43
- fetchStatus: 'idle',
44
- isLoading: false,
45
- isSuccess: true,
46
- isError: false,
47
- data: {
48
- timeRange: {
49
- start: new Date(1666625490000),
50
- end: new Date(1666625535000)
51
- },
52
- stepMs: 24379,
53
- series: [
54
- {
55
- name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
56
- values: [
57
- [
58
- 1666479357903,
59
- 0.27700745551584494
60
- ],
61
- [
62
- 1666479382282,
63
- 0.27701284657366565
64
- ]
65
- ],
66
- labels: {
67
- device: '/dev/vda1',
68
- env: 'demo',
69
- fstype: 'ext4',
70
- instance: 'demo.do.prometheus.io:9100',
71
- job: 'node',
72
- mountpoint: '/'
73
- }
74
- },
75
- {
76
- name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
77
- values: [
78
- [
79
- 1666479357903,
80
- 0.08486496097624885
81
- ],
82
- [
83
- 1666479382282,
84
- 0.08486496097624885
85
- ]
86
- ],
87
- labels: {
88
- device: '/dev/vda15',
89
- env: 'demo',
90
- fstype: 'vfat',
91
- instance: 'demo.do.prometheus.io:9100',
92
- job: 'node',
93
- mountpoint: '/boot/efi'
94
- }
95
- }
96
- ]
97
- },
98
- dataUpdatedAt: 1666500979895,
99
- error: null,
100
- errorUpdatedAt: 0,
101
- failureCount: 0,
102
- errorUpdateCount: 0,
103
- isFetched: true,
104
- isFetchedAfterMount: true,
105
- isFetching: false,
106
- isRefetching: false,
107
- isLoadingError: false,
108
- isPaused: false,
109
- isPlaceholderData: false,
110
- isPreviousData: false,
111
- isRefetchError: false,
112
- isStale: true
113
- }
114
- ];
115
- const MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE = [
116
- {
117
- status: 'success',
118
- fetchStatus: 'idle',
119
- isLoading: false,
120
- isSuccess: true,
121
- isError: false,
122
- data: {
123
- timeRange: {
124
- start: new Date(1666625535000),
125
- end: new Date(1666625535000)
126
- },
127
- stepMs: 24379,
128
- series: [
129
- {
130
- name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
131
- values: [
132
- [
133
- 1666479357903,
134
- 0.27700745551584494
135
- ]
136
- ],
137
- labels: {
138
- device: '/dev/vda1',
139
- env: 'demo',
140
- fstype: 'ext4',
141
- instance: 'demo.do.prometheus.io:9100',
142
- job: 'node',
143
- mountpoint: '/'
144
- }
145
- },
146
- {
147
- name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
148
- values: [
149
- [
150
- 1666479357903,
151
- 0.08486496097624885
152
- ]
153
- ],
154
- labels: {
155
- device: '/dev/vda15',
156
- env: 'demo',
157
- fstype: 'vfat',
158
- instance: 'demo.do.prometheus.io:9100',
159
- job: 'node',
160
- mountpoint: '/boot/efi'
161
- }
162
- }
163
- ]
164
- },
165
- dataUpdatedAt: 1666500979895,
166
- error: null,
167
- errorUpdatedAt: 0,
168
- failureCount: 0,
169
- errorUpdateCount: 0,
170
- isFetched: true,
171
- isFetchedAfterMount: true,
172
- isFetching: false,
173
- isRefetching: false,
174
- isLoadingError: false,
175
- isPaused: false,
176
- isPlaceholderData: false,
177
- isPreviousData: false,
178
- isRefetchError: false,
179
- isStale: true
180
- }
181
- ];
182
- const MOCK_TIME_SERIES_DATA_MULTIVALUE = {
183
- timeRange: {
184
- start: new Date(1666625490000),
185
- end: new Date(1666625535000)
186
- },
187
- stepMs: 24379,
188
- series: [
189
- {
190
- name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
191
- values: [
192
- [
193
- 1666479357903,
194
- 0.27700745551584494
195
- ],
196
- [
197
- 1666479382282,
198
- 0.27701284657366565
199
- ]
200
- ],
201
- labels: {
202
- device: '/dev/vda1',
203
- env: 'demo',
204
- fstype: 'ext4',
205
- instance: 'demo.do.prometheus.io:9100',
206
- job: 'node',
207
- mountpoint: '/'
208
- }
209
- },
210
- {
211
- name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
212
- values: [
213
- [
214
- 1666479357903,
215
- 0.08486496097624885
216
- ],
217
- [
218
- 1666479382282,
219
- 0.08486496097624885
220
- ]
221
- ],
222
- labels: {
223
- device: '/dev/vda15',
224
- env: 'demo',
225
- fstype: 'vfat',
226
- instance: 'demo.do.prometheus.io:9100',
227
- job: 'node',
228
- mountpoint: '/boot/efi'
229
- }
230
- }
231
- ]
232
- };
233
- const MOCK_TIME_SERIES_DATA_SINGLEVALUE = {
234
- timeRange: {
235
- start: new Date(1666625535000),
236
- end: new Date(1666625535000)
237
- },
238
- stepMs: 24379,
239
- series: [
240
- {
241
- name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
242
- values: [
243
- [
244
- 1666479357903,
245
- 0.27700745551584494
246
- ]
247
- ],
248
- labels: {
249
- device: '/dev/vda1',
250
- env: 'demo',
251
- fstype: 'ext4',
252
- instance: 'demo.do.prometheus.io:9100',
253
- job: 'node',
254
- mountpoint: '/'
255
- }
256
- },
257
- {
258
- name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
259
- values: [
260
- [
261
- 1666479357903,
262
- 0.08486496097624885
263
- ]
264
- ],
265
- labels: {
266
- device: '/dev/vda15',
267
- env: 'demo',
268
- fstype: 'vfat',
269
- instance: 'demo.do.prometheus.io:9100',
270
- job: 'node',
271
- mountpoint: '/boot/efi'
272
- }
273
- }
274
- ]
275
- };
276
- const MOCK_NULL_QUERY_RESULT = [
277
- {
278
- status: 'success',
279
- fetchStatus: 'idle',
280
- isLoading: false,
281
- isSuccess: true,
282
- isError: false,
283
- data: {
284
- timeRange: {
285
- start: new Date(1677376110000),
286
- end: new Date(1677376410000)
287
- },
288
- stepMs: 15000,
289
- series: [
290
- {
291
- name: 'node_memory_Buffers_bytes{env="demo",instance="demo.do.prometheus.io:9100",job="node"}',
292
- values: [
293
- [
294
- 1677376110000,
295
- 40000000
296
- ],
297
- [
298
- 1677376125000,
299
- 40000000
300
- ],
301
- [
302
- 1677376140000,
303
- null
304
- ],
305
- [
306
- 1677376155000,
307
- null
308
- ],
309
- [
310
- 1677376170000,
311
- null
312
- ],
313
- [
314
- 1677376185000,
315
- null
316
- ],
317
- [
318
- 1677376200000,
319
- null
320
- ],
321
- [
322
- 1677376215000,
323
- 40013824
324
- ],
325
- [
326
- 1677376230000,
327
- 40038400
328
- ],
329
- [
330
- 1677376245000,
331
- 40054784
332
- ],
333
- [
334
- 1677376260000,
335
- 40071168
336
- ],
337
- [
338
- 1677376275000,
339
- 40075264
340
- ],
341
- [
342
- 1677376290000,
343
- 40091648
344
- ],
345
- [
346
- 1677376305000,
347
- 40099840
348
- ],
349
- [
350
- 1677376320000,
351
- 40120320
352
- ],
353
- [
354
- 1677376335000,
355
- 40128512
356
- ],
357
- [
358
- 1677376350000,
359
- 40153088
360
- ],
361
- [
362
- 1677376365000,
363
- 40165376
364
- ],
365
- [
366
- 1677376380000,
367
- 40177664
368
- ],
369
- [
370
- 1677376395000,
371
- 40194048
372
- ],
373
- [
374
- 1677376410000,
375
- 40198144
376
- ]
377
- ],
378
- formattedName: 'node_memory_Buffers_bytes{env="demo",instance="demo.do.prometheus.io:9100",job="node"}',
379
- labels: {
380
- env: 'demo',
381
- instance: 'demo.do.prometheus.io:9100',
382
- job: 'node'
383
- }
384
- }
385
- ]
386
- },
387
- dataUpdatedAt: 1677376410000,
388
- error: null,
389
- errorUpdatedAt: 0,
390
- failureCount: 0,
391
- errorUpdateCount: 0,
392
- isFetched: true,
393
- isFetchedAfterMount: true,
394
- isFetching: false,
395
- isRefetching: false,
396
- isLoadingError: false,
397
- isPaused: false,
398
- isPlaceholderData: false,
399
- isPreviousData: false,
400
- isRefetchError: false,
401
- isStale: true
402
- }
403
- ];