@perses-dev/table-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 (216) hide show
  1. package/__mf/js/{Table.73b9cec1.js → Table.cede74c3.js} +3 -3
  2. package/__mf/js/async/1186.76f7a9c4.js +2 -0
  3. package/__mf/js/async/1522.f490bae9.js +22 -0
  4. package/__mf/js/async/1616.e459f6f7.js +1 -0
  5. package/__mf/js/async/2035.e9f08b1d.js +1 -0
  6. package/__mf/js/async/2043.ddbebd72.js +2 -0
  7. package/__mf/js/async/2251.2ab11c45.js +7 -0
  8. package/__mf/js/async/{1589.124ce93d.js.LICENSE.txt → 2251.2ab11c45.js.LICENSE.txt} +41 -1
  9. package/__mf/js/async/2465.b442bc56.js +1 -0
  10. package/__mf/js/async/2650.b874a7cd.js +3 -0
  11. package/__mf/js/async/392.3b464b91.js +2 -0
  12. package/__mf/js/async/3923.7b9985ff.js +1 -0
  13. package/__mf/js/async/4077.dfd731dd.js +1 -0
  14. package/__mf/js/async/4121.ed15fe74.js +2 -0
  15. package/__mf/js/async/4496.487e4f10.js +1 -0
  16. package/__mf/js/async/5002.fc50985b.js +1 -0
  17. package/__mf/js/async/5054.a0d861ae.js +1 -0
  18. package/__mf/js/async/5071.1e325f38.js +1 -0
  19. package/__mf/js/async/5153.8a046a40.js +1 -0
  20. package/__mf/js/async/5587.c9c77660.js +1 -0
  21. package/__mf/js/async/{868.507e984c.js → 5741.ef0c5df4.js} +6 -6
  22. package/__mf/js/async/6274.db89316a.js +2 -0
  23. package/__mf/js/async/7192.7e6af5a2.js +1 -0
  24. package/__mf/js/async/7534.63c81960.js +1 -0
  25. package/__mf/js/async/7862.cbf7b286.js +2 -0
  26. package/__mf/js/async/7968.f91456c8.js +1 -0
  27. package/__mf/js/async/7978.4553ce86.js +1 -0
  28. package/__mf/js/async/8356.d5d8a6a3.js +1 -0
  29. package/__mf/js/async/8470.f35cd609.js +2 -0
  30. package/__mf/js/async/873.fc45c2c6.js +1 -0
  31. package/__mf/js/async/8985.6cc7edf9.js +37 -0
  32. package/__mf/js/async/9148.1ff77cf0.js +1 -0
  33. package/__mf/js/async/9207.ca6ac0b2.js +1 -0
  34. package/__mf/js/async/9235.78a103e9.js +1 -0
  35. package/__mf/js/async/9321.ddbe25a2.js +1 -0
  36. package/__mf/js/async/941.96941f4e.js +2 -0
  37. package/__mf/js/async/9588.039ce076.js +1 -0
  38. package/__mf/js/async/__federation_expose_Table.e7708af8.js +1 -0
  39. package/__mf/js/async/lib-router.e968bcc8.js +2 -0
  40. package/__mf/js/{main.7b15c841.js → main.7815ee7c.js} +2 -2
  41. package/lib/Table.d.ts +3 -3
  42. package/lib/Table.d.ts.map +1 -1
  43. package/lib/Table.js +4 -4
  44. package/lib/Table.js.map +1 -1
  45. package/lib/TableExportAction.d.ts +3 -3
  46. package/lib/TableExportAction.d.ts.map +1 -1
  47. package/lib/TableExportAction.js +6 -6
  48. package/lib/TableExportAction.js.map +1 -1
  49. package/lib/bootstrap.js +2 -2
  50. package/lib/components/CellsEditor/CellsEditor.d.ts +2 -2
  51. package/lib/components/CellsEditor/CellsEditor.d.ts.map +1 -1
  52. package/lib/components/CellsEditor/CellsEditor.js +1 -1
  53. package/lib/components/CellsEditor/CellsEditor.js.map +1 -1
  54. package/lib/components/CellsEditor/index.js +1 -1
  55. package/lib/components/CellsEditor/index.js.map +1 -1
  56. package/lib/components/ColumnsEditor/ColumnEditor.d.ts +5 -4
  57. package/lib/components/ColumnsEditor/ColumnEditor.d.ts.map +1 -1
  58. package/lib/components/ColumnsEditor/ColumnEditor.js +29 -15
  59. package/lib/components/ColumnsEditor/ColumnEditor.js.map +1 -1
  60. package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts +3 -3
  61. package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts.map +1 -1
  62. package/lib/components/ColumnsEditor/ColumnEditorContainer.js +11 -10
  63. package/lib/components/ColumnsEditor/ColumnEditorContainer.js.map +1 -1
  64. package/lib/components/ColumnsEditor/ColumnsEditor.d.ts +4 -3
  65. package/lib/components/ColumnsEditor/ColumnsEditor.d.ts.map +1 -1
  66. package/lib/components/ColumnsEditor/ColumnsEditor.js +7 -6
  67. package/lib/components/ColumnsEditor/ColumnsEditor.js.map +1 -1
  68. package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts +2 -2
  69. package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts.map +1 -1
  70. package/lib/components/ColumnsEditor/DataLinkEditorDialog.js +4 -4
  71. package/lib/components/ColumnsEditor/DataLinkEditorDialog.js.map +1 -1
  72. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts +2 -2
  73. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts.map +1 -1
  74. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +4 -4
  75. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js.map +1 -1
  76. package/lib/components/ColumnsEditor/index.js +3 -3
  77. package/lib/components/ColumnsEditor/index.js.map +1 -1
  78. package/lib/components/ConditionalPanel.d.ts +3 -3
  79. package/lib/components/ConditionalPanel.d.ts.map +1 -1
  80. package/lib/components/ConditionalPanel.js +7 -7
  81. package/lib/components/ConditionalPanel.js.map +1 -1
  82. package/lib/components/EmbeddedPanel.d.ts +3 -3
  83. package/lib/components/EmbeddedPanel.d.ts.map +1 -1
  84. package/lib/components/EmbeddedPanel.js +4 -4
  85. package/lib/components/EmbeddedPanel.js.map +1 -1
  86. package/lib/components/TableCellsEditor.d.ts +3 -3
  87. package/lib/components/TableCellsEditor.d.ts.map +1 -1
  88. package/lib/components/TableCellsEditor.js +1 -1
  89. package/lib/components/TableCellsEditor.js.map +1 -1
  90. package/lib/components/TableColumnsEditor.d.ts +3 -3
  91. package/lib/components/TableColumnsEditor.d.ts.map +1 -1
  92. package/lib/components/TableColumnsEditor.js +3 -2
  93. package/lib/components/TableColumnsEditor.js.map +1 -1
  94. package/lib/components/TableItemSelectionActionsEditor.d.ts +2 -2
  95. package/lib/components/TableItemSelectionActionsEditor.d.ts.map +1 -1
  96. package/lib/components/TableItemSelectionActionsEditor.js +2 -2
  97. package/lib/components/TableItemSelectionActionsEditor.js.map +1 -1
  98. package/lib/components/TablePanel.d.ts +4 -4
  99. package/lib/components/TablePanel.d.ts.map +1 -1
  100. package/lib/components/TablePanel.js +196 -99
  101. package/lib/components/TablePanel.js.map +1 -1
  102. package/lib/components/TableSettingsEditor.d.ts +2 -2
  103. package/lib/components/TableSettingsEditor.d.ts.map +1 -1
  104. package/lib/components/TableSettingsEditor.js +16 -2
  105. package/lib/components/TableSettingsEditor.js.map +1 -1
  106. package/lib/components/TableTransformsEditor.d.ts +2 -2
  107. package/lib/components/TableTransformsEditor.d.ts.map +1 -1
  108. package/lib/components/TableTransformsEditor.js +2 -2
  109. package/lib/components/TableTransformsEditor.js.map +1 -1
  110. package/lib/components/index.js +9 -9
  111. package/lib/components/index.js.map +1 -1
  112. package/lib/getPluginModule.d.ts +1 -1
  113. package/lib/getPluginModule.d.ts.map +1 -1
  114. package/lib/getPluginModule.js +3 -1
  115. package/lib/getPluginModule.js.map +1 -1
  116. package/lib/index-federation.js +1 -1
  117. package/lib/index.js +4 -4
  118. package/lib/index.js.map +1 -1
  119. package/lib/models/index.js +2 -2
  120. package/lib/models/index.js.map +1 -1
  121. package/lib/models/model.d.ts +1 -1
  122. package/lib/models/model.d.ts.map +1 -1
  123. package/lib/models/model.js.map +1 -1
  124. package/lib/models/table-model.d.ts +4 -3
  125. package/lib/models/table-model.d.ts.map +1 -1
  126. package/lib/models/table-model.js +2 -2
  127. package/lib/models/table-model.js.map +1 -1
  128. package/lib/setup-tests.d.ts +1 -1
  129. package/lib/setup-tests.d.ts.map +1 -1
  130. package/lib/setup-tests.js +8 -2
  131. package/lib/setup-tests.js.map +1 -1
  132. package/lib/table-data-utils.d.ts +3 -3
  133. package/lib/table-data-utils.d.ts.map +1 -1
  134. package/lib/table-data-utils.js.map +1 -1
  135. package/lib/test/mock-query-results.d.ts +1 -1
  136. package/lib/test/mock-query-results.d.ts.map +1 -1
  137. package/lib/test/mock-query-results.js.map +1 -1
  138. package/mf-manifest.json +48 -46
  139. package/mf-stats.json +52 -47
  140. package/package.json +11 -11
  141. package/__mf/js/async/1432.4e515509.js +0 -1
  142. package/__mf/js/async/1589.124ce93d.js +0 -2
  143. package/__mf/js/async/1616.4828085d.js +0 -1
  144. package/__mf/js/async/2043.1f09864b.js +0 -2
  145. package/__mf/js/async/2082.231e8397.js +0 -1
  146. package/__mf/js/async/2842.a52597e6.js +0 -1
  147. package/__mf/js/async/392.b6035b41.js +0 -2
  148. package/__mf/js/async/3981.52e94742.js +0 -3
  149. package/__mf/js/async/4014.cf88a118.js +0 -7
  150. package/__mf/js/async/4014.cf88a118.js.LICENSE.txt +0 -39
  151. package/__mf/js/async/4121.e7df36d6.js +0 -2
  152. package/__mf/js/async/5002.3eb39a8c.js +0 -1
  153. package/__mf/js/async/5021.c663603d.js +0 -1
  154. package/__mf/js/async/5071.839a8f1a.js +0 -1
  155. package/__mf/js/async/5481.6496fac9.js +0 -2
  156. package/__mf/js/async/5587.a8a428db.js +0 -1
  157. package/__mf/js/async/6274.8edae86d.js +0 -2
  158. package/__mf/js/async/629.8cff215d.js +0 -1
  159. package/__mf/js/async/6811.9d4b123a.js +0 -38
  160. package/__mf/js/async/7177.e0e5ba2f.js +0 -1
  161. package/__mf/js/async/7192.692181c8.js +0 -1
  162. package/__mf/js/async/7413.c9310b8a.js +0 -1
  163. package/__mf/js/async/7968.3a9a982e.js +0 -1
  164. package/__mf/js/async/7978.116e4d81.js +0 -1
  165. package/__mf/js/async/7984.a8edc213.js +0 -22
  166. package/__mf/js/async/8356.152d5686.js +0 -1
  167. package/__mf/js/async/8470.b9762117.js +0 -2
  168. package/__mf/js/async/873.264fedc9.js +0 -1
  169. package/__mf/js/async/9051.c4deebd7.js +0 -1
  170. package/__mf/js/async/9235.c67cdb1d.js +0 -1
  171. package/__mf/js/async/941.cc458a98.js +0 -2
  172. package/__mf/js/async/9588.d23e2ed3.js +0 -1
  173. package/__mf/js/async/9701.9c4cea02.js +0 -1
  174. package/__mf/js/async/__federation_expose_Table.5d0cfb46.js +0 -1
  175. package/__mf/js/async/lib-router.3493bbf9.js +0 -2
  176. package/lib/cjs/Table.js +0 -62
  177. package/lib/cjs/TableExportAction.js +0 -180
  178. package/lib/cjs/bootstrap.js +0 -26
  179. package/lib/cjs/components/CellsEditor/CellsEditor.js +0 -30
  180. package/lib/cjs/components/CellsEditor/index.js +0 -30
  181. package/lib/cjs/components/ColumnsEditor/ColumnEditor.js +0 -289
  182. package/lib/cjs/components/ColumnsEditor/ColumnEditorContainer.js +0 -152
  183. package/lib/cjs/components/ColumnsEditor/ColumnsEditor.js +0 -108
  184. package/lib/cjs/components/ColumnsEditor/DataLinkEditorDialog.js +0 -139
  185. package/lib/cjs/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +0 -124
  186. package/lib/cjs/components/ColumnsEditor/index.js +0 -32
  187. package/lib/cjs/components/ConditionalPanel.js +0 -367
  188. package/lib/cjs/components/EmbeddedPanel.js +0 -52
  189. package/lib/cjs/components/TableCellsEditor.js +0 -36
  190. package/lib/cjs/components/TableColumnsEditor.js +0 -36
  191. package/lib/cjs/components/TableItemSelectionActionsEditor.js +0 -44
  192. package/lib/cjs/components/TablePanel.js +0 -845
  193. package/lib/cjs/components/TableSettingsEditor.js +0 -144
  194. package/lib/cjs/components/TableTransformsEditor.js +0 -36
  195. package/lib/cjs/components/index.js +0 -38
  196. package/lib/cjs/env.d.js +0 -14
  197. package/lib/cjs/getPluginModule.js +0 -39
  198. package/lib/cjs/index-federation.js +0 -55
  199. package/lib/cjs/index.js +0 -39
  200. package/lib/cjs/models/index.js +0 -31
  201. package/lib/cjs/models/model.js +0 -16
  202. package/lib/cjs/models/table-model.js +0 -278
  203. package/lib/cjs/setup-tests.js +0 -19
  204. package/lib/cjs/table-data-utils.js +0 -84
  205. package/lib/cjs/test/mock-query-results.js +0 -524
  206. /package/__mf/css/async/{4014.85c2cbf6.css → 2251.85c2cbf6.css} +0 -0
  207. /package/__mf/js/async/{7984.a8edc213.js.LICENSE.txt → 1522.f490bae9.js.LICENSE.txt} +0 -0
  208. /package/__mf/js/async/{2043.1f09864b.js.LICENSE.txt → 2043.ddbebd72.js.LICENSE.txt} +0 -0
  209. /package/__mf/js/async/{392.b6035b41.js.LICENSE.txt → 392.3b464b91.js.LICENSE.txt} +0 -0
  210. /package/__mf/js/async/{4121.e7df36d6.js.LICENSE.txt → 4121.ed15fe74.js.LICENSE.txt} +0 -0
  211. /package/__mf/js/async/{868.507e984c.js.LICENSE.txt → 5741.ef0c5df4.js.LICENSE.txt} +0 -0
  212. /package/__mf/js/async/{6274.8edae86d.js.LICENSE.txt → 6274.db89316a.js.LICENSE.txt} +0 -0
  213. /package/__mf/js/async/{5481.6496fac9.js.LICENSE.txt → 7862.cbf7b286.js.LICENSE.txt} +0 -0
  214. /package/__mf/js/async/{8470.b9762117.js.LICENSE.txt → 8470.f35cd609.js.LICENSE.txt} +0 -0
  215. /package/__mf/js/async/{941.cc458a98.js.LICENSE.txt → 941.96941f4e.js.LICENSE.txt} +0 -0
  216. /package/__mf/js/async/{lib-router.3493bbf9.js.LICENSE.txt → lib-router.e968bcc8.js.LICENSE.txt} +0 -0
@@ -1,524 +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_MULTI_QUERY_DATA_EMPTY () {
25
- return MOCK_MULTI_QUERY_DATA_EMPTY;
26
- },
27
- get MOCK_MULTI_QUERY_DATA_Q1 () {
28
- return MOCK_MULTI_QUERY_DATA_Q1;
29
- },
30
- get MOCK_MULTI_QUERY_DATA_Q2 () {
31
- return MOCK_MULTI_QUERY_DATA_Q2;
32
- },
33
- get MOCK_MULTI_QUERY_DATA_WITH_ZERO () {
34
- return MOCK_MULTI_QUERY_DATA_WITH_ZERO;
35
- },
36
- get MOCK_NULL_QUERY_RESULT () {
37
- return MOCK_NULL_QUERY_RESULT;
38
- },
39
- get MOCK_TIME_SERIES_DATA_MULTIVALUE () {
40
- return MOCK_TIME_SERIES_DATA_MULTIVALUE;
41
- },
42
- get MOCK_TIME_SERIES_DATA_SINGLEVALUE () {
43
- return MOCK_TIME_SERIES_DATA_SINGLEVALUE;
44
- },
45
- get MOCK_TIME_SERIES_QUERY_DEFINITION () {
46
- return MOCK_TIME_SERIES_QUERY_DEFINITION;
47
- },
48
- get MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE () {
49
- return MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE;
50
- },
51
- get MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE () {
52
- return MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE;
53
- }
54
- });
55
- const MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE = [
56
- {
57
- status: 'success',
58
- fetchStatus: 'idle',
59
- isLoading: false,
60
- isSuccess: true,
61
- isError: false,
62
- data: {
63
- timeRange: {
64
- start: new Date(1666625490000),
65
- end: new Date(1666625535000)
66
- },
67
- stepMs: 24379,
68
- series: [
69
- {
70
- name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
71
- values: [
72
- [
73
- 1666479357903,
74
- 0.27700745551584494
75
- ],
76
- [
77
- 1666479382282,
78
- 0.27701284657366565
79
- ]
80
- ],
81
- labels: {
82
- device: '/dev/vda1',
83
- env: 'demo',
84
- fstype: 'ext4',
85
- instance: 'demo.do.prometheus.io:9100',
86
- job: 'node',
87
- mountpoint: '/'
88
- }
89
- },
90
- {
91
- name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
92
- values: [
93
- [
94
- 1666479357903,
95
- 0.08486496097624885
96
- ],
97
- [
98
- 1666479382282,
99
- 0.08486496097624885
100
- ]
101
- ],
102
- labels: {
103
- device: '/dev/vda15',
104
- env: 'demo',
105
- fstype: 'vfat',
106
- instance: 'demo.do.prometheus.io:9100',
107
- job: 'node',
108
- mountpoint: '/boot/efi'
109
- }
110
- }
111
- ]
112
- },
113
- dataUpdatedAt: 1666500979895,
114
- error: null,
115
- errorUpdatedAt: 0,
116
- failureCount: 0,
117
- errorUpdateCount: 0,
118
- isFetched: true,
119
- isFetchedAfterMount: true,
120
- isFetching: false,
121
- isRefetching: false,
122
- isLoadingError: false,
123
- isPaused: false,
124
- isPlaceholderData: false,
125
- isPreviousData: false,
126
- isRefetchError: false,
127
- isStale: true
128
- }
129
- ];
130
- const MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE = [
131
- {
132
- status: 'success',
133
- fetchStatus: 'idle',
134
- isLoading: false,
135
- isSuccess: true,
136
- isError: false,
137
- data: {
138
- timeRange: {
139
- start: new Date(1666625535000),
140
- end: new Date(1666625535000)
141
- },
142
- stepMs: 24379,
143
- series: [
144
- {
145
- name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
146
- values: [
147
- [
148
- 1666479357903,
149
- 0.27700745551584494
150
- ]
151
- ],
152
- labels: {
153
- device: '/dev/vda1',
154
- env: 'demo',
155
- fstype: 'ext4',
156
- instance: 'demo.do.prometheus.io:9100',
157
- job: 'node',
158
- mountpoint: '/'
159
- }
160
- },
161
- {
162
- name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
163
- values: [
164
- [
165
- 1666479357903,
166
- 0.08486496097624885
167
- ]
168
- ],
169
- labels: {
170
- device: '/dev/vda15',
171
- env: 'demo',
172
- fstype: 'vfat',
173
- instance: 'demo.do.prometheus.io:9100',
174
- job: 'node',
175
- mountpoint: '/boot/efi'
176
- }
177
- }
178
- ]
179
- },
180
- dataUpdatedAt: 1666500979895,
181
- error: null,
182
- errorUpdatedAt: 0,
183
- failureCount: 0,
184
- errorUpdateCount: 0,
185
- isFetched: true,
186
- isFetchedAfterMount: true,
187
- isFetching: false,
188
- isRefetching: false,
189
- isLoadingError: false,
190
- isPaused: false,
191
- isPlaceholderData: false,
192
- isPreviousData: false,
193
- isRefetchError: false,
194
- isStale: true
195
- }
196
- ];
197
- const MOCK_TIME_SERIES_DATA_MULTIVALUE = {
198
- timeRange: {
199
- start: new Date(1666625490000),
200
- end: new Date(1666625535000)
201
- },
202
- stepMs: 24379,
203
- series: [
204
- {
205
- name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
206
- values: [
207
- [
208
- 1666479357903,
209
- 0.27700745551584494
210
- ],
211
- [
212
- 1666479382282,
213
- 0.27701284657366565
214
- ]
215
- ],
216
- labels: {
217
- device: '/dev/vda1',
218
- env: 'demo',
219
- fstype: 'ext4',
220
- instance: 'demo.do.prometheus.io:9100',
221
- job: 'node',
222
- mountpoint: '/'
223
- }
224
- },
225
- {
226
- name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
227
- values: [
228
- [
229
- 1666479357903,
230
- 0.08486496097624885
231
- ],
232
- [
233
- 1666479382282,
234
- 0.08486496097624885
235
- ]
236
- ],
237
- labels: {
238
- device: '/dev/vda15',
239
- env: 'demo',
240
- fstype: 'vfat',
241
- instance: 'demo.do.prometheus.io:9100',
242
- job: 'node',
243
- mountpoint: '/boot/efi'
244
- }
245
- }
246
- ]
247
- };
248
- const MOCK_TIME_SERIES_DATA_SINGLEVALUE = {
249
- timeRange: {
250
- start: new Date(1666625535000),
251
- end: new Date(1666625535000)
252
- },
253
- stepMs: 24379,
254
- series: [
255
- {
256
- name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
257
- values: [
258
- [
259
- 1666479357903,
260
- 0.27700745551584494
261
- ]
262
- ],
263
- labels: {
264
- device: '/dev/vda1',
265
- env: 'demo',
266
- fstype: 'ext4',
267
- instance: 'demo.do.prometheus.io:9100',
268
- job: 'node',
269
- mountpoint: '/'
270
- }
271
- },
272
- {
273
- name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
274
- values: [
275
- [
276
- 1666479357903,
277
- 0.08486496097624885
278
- ]
279
- ],
280
- labels: {
281
- device: '/dev/vda15',
282
- env: 'demo',
283
- fstype: 'vfat',
284
- instance: 'demo.do.prometheus.io:9100',
285
- job: 'node',
286
- mountpoint: '/boot/efi'
287
- }
288
- }
289
- ]
290
- };
291
- const MOCK_NULL_QUERY_RESULT = [
292
- {
293
- status: 'success',
294
- fetchStatus: 'idle',
295
- isLoading: false,
296
- isSuccess: true,
297
- isError: false,
298
- data: {
299
- timeRange: {
300
- start: new Date(1677376110000),
301
- end: new Date(1677376410000)
302
- },
303
- stepMs: 15000,
304
- series: [
305
- {
306
- name: 'node_memory_Buffers_bytes{env="demo",instance="demo.do.prometheus.io:9100",job="node"}',
307
- values: [
308
- [
309
- 1677376110000,
310
- 40000000
311
- ],
312
- [
313
- 1677376125000,
314
- 40000000
315
- ],
316
- [
317
- 1677376140000,
318
- null
319
- ],
320
- [
321
- 1677376155000,
322
- null
323
- ],
324
- [
325
- 1677376170000,
326
- null
327
- ],
328
- [
329
- 1677376185000,
330
- null
331
- ],
332
- [
333
- 1677376200000,
334
- null
335
- ],
336
- [
337
- 1677376215000,
338
- 40013824
339
- ],
340
- [
341
- 1677376230000,
342
- 40038400
343
- ],
344
- [
345
- 1677376245000,
346
- 40054784
347
- ],
348
- [
349
- 1677376260000,
350
- 40071168
351
- ],
352
- [
353
- 1677376275000,
354
- 40075264
355
- ],
356
- [
357
- 1677376290000,
358
- 40091648
359
- ],
360
- [
361
- 1677376305000,
362
- 40099840
363
- ],
364
- [
365
- 1677376320000,
366
- 40120320
367
- ],
368
- [
369
- 1677376335000,
370
- 40128512
371
- ],
372
- [
373
- 1677376350000,
374
- 40153088
375
- ],
376
- [
377
- 1677376365000,
378
- 40165376
379
- ],
380
- [
381
- 1677376380000,
382
- 40177664
383
- ],
384
- [
385
- 1677376395000,
386
- 40194048
387
- ],
388
- [
389
- 1677376410000,
390
- 40198144
391
- ]
392
- ],
393
- formattedName: 'node_memory_Buffers_bytes{env="demo",instance="demo.do.prometheus.io:9100",job="node"}',
394
- labels: {
395
- env: 'demo',
396
- instance: 'demo.do.prometheus.io:9100',
397
- job: 'node'
398
- }
399
- }
400
- ]
401
- },
402
- dataUpdatedAt: 1677376410000,
403
- error: null,
404
- errorUpdatedAt: 0,
405
- failureCount: 0,
406
- errorUpdateCount: 0,
407
- isFetched: true,
408
- isFetchedAfterMount: true,
409
- isFetching: false,
410
- isRefetching: false,
411
- isLoadingError: false,
412
- isPaused: false,
413
- isPlaceholderData: false,
414
- isPreviousData: false,
415
- isRefetchError: false,
416
- isStale: true
417
- }
418
- ];
419
- const MOCK_MULTI_QUERY_DATA_Q1 = {
420
- timeRange: {
421
- start: new Date(1666625535000),
422
- end: new Date(1666625535000)
423
- },
424
- stepMs: 24379,
425
- series: [
426
- {
427
- name: 'namespace="ns-a"',
428
- values: [
429
- [
430
- 1666479357903,
431
- 100
432
- ]
433
- ],
434
- labels: {
435
- namespace: 'ns-a'
436
- }
437
- },
438
- {
439
- name: 'namespace="ns-b"',
440
- values: [
441
- [
442
- 1666479357903,
443
- 200
444
- ]
445
- ],
446
- labels: {
447
- namespace: 'ns-b'
448
- }
449
- }
450
- ]
451
- };
452
- const MOCK_MULTI_QUERY_DATA_Q2 = {
453
- timeRange: {
454
- start: new Date(1666625535000),
455
- end: new Date(1666625535000)
456
- },
457
- stepMs: 24379,
458
- series: [
459
- {
460
- name: 'namespace="ns-a"',
461
- values: [
462
- [
463
- 1666479357903,
464
- 50
465
- ]
466
- ],
467
- labels: {
468
- namespace: 'ns-a'
469
- }
470
- }
471
- ]
472
- };
473
- const MOCK_MULTI_QUERY_DATA_WITH_ZERO = {
474
- timeRange: {
475
- start: new Date(1666625535000),
476
- end: new Date(1666625535000)
477
- },
478
- stepMs: 24379,
479
- series: [
480
- {
481
- name: 'namespace="ns-a"',
482
- values: [
483
- [
484
- 1666479357903,
485
- 50
486
- ]
487
- ],
488
- labels: {
489
- namespace: 'ns-a'
490
- }
491
- },
492
- {
493
- name: 'namespace="ns-b"',
494
- values: [
495
- [
496
- 1666479357903,
497
- 0
498
- ]
499
- ],
500
- labels: {
501
- namespace: 'ns-b'
502
- }
503
- }
504
- ]
505
- };
506
- const MOCK_MULTI_QUERY_DATA_EMPTY = {
507
- timeRange: {
508
- start: new Date(1666625535000),
509
- end: new Date(1666625535000)
510
- },
511
- stepMs: 24379,
512
- series: []
513
- };
514
- const MOCK_TIME_SERIES_QUERY_DEFINITION = {
515
- kind: 'TimeSeriesQuery',
516
- spec: {
517
- plugin: {
518
- kind: 'PrometheusTimeSeriesQuery',
519
- spec: {
520
- query: ''
521
- }
522
- }
523
- }
524
- };