@perses-dev/greptimedb-plugin 0.1.0-beta.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 (331) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +41 -0
  3. package/__mf/css/async/8077.85c2cbf6.css +1 -0
  4. package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
  5. package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
  6. package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
  7. package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
  8. package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
  9. package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
  10. package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
  11. package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
  12. package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
  13. package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
  14. package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
  15. package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
  16. package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
  17. package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
  18. package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
  19. package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
  20. package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
  21. package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
  22. package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
  23. package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
  24. package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
  25. package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
  26. package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
  27. package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
  28. package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
  29. package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
  30. package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
  31. package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
  32. package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
  33. package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
  34. package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
  35. package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
  36. package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
  37. package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
  38. package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
  39. package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
  40. package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
  41. package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
  42. package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
  43. package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
  44. package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
  45. package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
  46. package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
  47. package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
  48. package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
  49. package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
  50. package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
  51. package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
  52. package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
  53. package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
  54. package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
  55. package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
  56. package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
  57. package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
  58. package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
  59. package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
  60. package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
  61. package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
  62. package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
  63. package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
  64. package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
  65. package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
  66. package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
  67. package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
  68. package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
  69. package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
  70. package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
  71. package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
  72. package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
  73. package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
  74. package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
  75. package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
  76. package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
  77. package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
  78. package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
  79. package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
  80. package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
  81. package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
  82. package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
  83. package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
  84. package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
  85. package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
  86. package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
  87. package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
  88. package/__mf/js/GreptimeDB.7a063e9e.js +7 -0
  89. package/__mf/js/async/1616.20d43f7e.js +1 -0
  90. package/__mf/js/async/2043.97b1f27f.js +2 -0
  91. package/__mf/js/async/2043.97b1f27f.js.LICENSE.txt +24 -0
  92. package/__mf/js/async/2269.f1322789.js +3 -0
  93. package/__mf/js/async/2386.b7243314.js +2 -0
  94. package/__mf/js/async/2386.b7243314.js.LICENSE.txt +9 -0
  95. package/__mf/js/async/3181.7ac30201.js +2 -0
  96. package/__mf/js/async/3181.7ac30201.js.LICENSE.txt +9 -0
  97. package/__mf/js/async/3247.65183b95.js +2 -0
  98. package/__mf/js/async/3247.65183b95.js.LICENSE.txt +37 -0
  99. package/__mf/js/async/392.91ae0e19.js +2 -0
  100. package/__mf/js/async/392.91ae0e19.js.LICENSE.txt +8 -0
  101. package/__mf/js/async/3944.12d0f358.js +10 -0
  102. package/__mf/js/async/3944.12d0f358.js.LICENSE.txt +17 -0
  103. package/__mf/js/async/4121.06b9cab6.js +2 -0
  104. package/__mf/js/async/4121.06b9cab6.js.LICENSE.txt +9 -0
  105. package/__mf/js/async/5002.0a422150.js +1 -0
  106. package/__mf/js/async/5071.e5cc2bd7.js +1 -0
  107. package/__mf/js/async/5402.eda0fb07.js +101 -0
  108. package/__mf/js/async/5440.7abefadb.js +2 -0
  109. package/__mf/js/async/5440.7abefadb.js.LICENSE.txt +32 -0
  110. package/__mf/js/async/5562.a39a5d1e.js +2 -0
  111. package/__mf/js/async/5562.a39a5d1e.js.LICENSE.txt +9 -0
  112. package/__mf/js/async/5587.a3fb718a.js +1 -0
  113. package/__mf/js/async/6045.10e9fa5a.js +1 -0
  114. package/__mf/js/async/6274.6f0093e7.js +2 -0
  115. package/__mf/js/async/6274.6f0093e7.js.LICENSE.txt +8 -0
  116. package/__mf/js/async/6753.1e42e819.js +1 -0
  117. package/__mf/js/async/7177.78bced1c.js +1 -0
  118. package/__mf/js/async/7192.e0362dae.js +1 -0
  119. package/__mf/js/async/7862.8048abcc.js +2 -0
  120. package/__mf/js/async/7862.8048abcc.js.LICENSE.txt +9 -0
  121. package/__mf/js/async/7968.7b2e2836.js +1 -0
  122. package/__mf/js/async/7978.8cd67008.js +1 -0
  123. package/__mf/js/async/8077.fe9828a3.js +7 -0
  124. package/__mf/js/async/8077.fe9828a3.js.LICENSE.txt +39 -0
  125. package/__mf/js/async/8356.ac21fc24.js +1 -0
  126. package/__mf/js/async/8470.a2e67e3a.js +2 -0
  127. package/__mf/js/async/8470.a2e67e3a.js.LICENSE.txt +19 -0
  128. package/__mf/js/async/873.863f53e4.js +1 -0
  129. package/__mf/js/async/9235.7651eaca.js +1 -0
  130. package/__mf/js/async/941.4155d3cc.js +2 -0
  131. package/__mf/js/async/941.4155d3cc.js.LICENSE.txt +9 -0
  132. package/__mf/js/async/9558.215ad80c.js +1 -0
  133. package/__mf/js/async/9588.2f544a41.js +1 -0
  134. package/__mf/js/async/9877.8766524e.js +38 -0
  135. package/__mf/js/async/9916.2a1eb7a0.js +22 -0
  136. package/__mf/js/async/9916.2a1eb7a0.js.LICENSE.txt +19 -0
  137. package/__mf/js/async/__federation_expose_GreptimeDBDatasource.bf1dec3c.js +2 -0
  138. package/__mf/js/async/__federation_expose_GreptimeDBDatasource.bf1dec3c.js.LICENSE.txt +9 -0
  139. package/__mf/js/async/__federation_expose_GreptimeDBLogQuery.d80b2965.js +21 -0
  140. package/__mf/js/async/__federation_expose_GreptimeDBLogQuery.d80b2965.js.LICENSE.txt +9 -0
  141. package/__mf/js/async/__federation_expose_GreptimeDBTimeSeriesQuery.59cda507.js +21 -0
  142. package/__mf/js/async/__federation_expose_GreptimeDBTimeSeriesQuery.59cda507.js.LICENSE.txt +9 -0
  143. package/__mf/js/async/__federation_expose_GreptimeDBTraceQuery.00464f43.js +21 -0
  144. package/__mf/js/async/__federation_expose_GreptimeDBTraceQuery.00464f43.js.LICENSE.txt +9 -0
  145. package/__mf/js/main.a4e4afce.js +7 -0
  146. package/lib/bootstrap.d.ts +2 -0
  147. package/lib/bootstrap.d.ts.map +1 -0
  148. package/lib/bootstrap.js +19 -0
  149. package/lib/bootstrap.js.map +1 -0
  150. package/lib/cjs/bootstrap.js +26 -0
  151. package/lib/cjs/components/GreptimeDBQLEditor.js +72 -0
  152. package/lib/cjs/components/constants.js +42 -0
  153. package/lib/cjs/components/index.js +31 -0
  154. package/lib/cjs/datasources/greptimedb-datasource/GreptimeDBDatasource.js +53 -0
  155. package/lib/cjs/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js +51 -0
  156. package/lib/cjs/datasources/greptimedb-datasource/greptimedb-datasource-types.js +16 -0
  157. package/lib/cjs/datasources/greptimedb-datasource/index.js +32 -0
  158. package/lib/cjs/datasources/index.js +30 -0
  159. package/lib/cjs/env.d.js +14 -0
  160. package/lib/cjs/getPluginModule.js +39 -0
  161. package/lib/cjs/index-federation.js +55 -0
  162. package/lib/cjs/index.js +38 -0
  163. package/lib/cjs/model/greptimedb-client.js +76 -0
  164. package/lib/cjs/model/greptimedb-data-types.js +16 -0
  165. package/lib/cjs/queries/constants.js +34 -0
  166. package/lib/cjs/queries/greptimedb-log-query/GreptimeDBLogQuery.js +43 -0
  167. package/lib/cjs/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js +108 -0
  168. package/lib/cjs/queries/greptimedb-log-query/get-greptimedb-log-data.js +103 -0
  169. package/lib/cjs/queries/greptimedb-log-query/greptimedb-log-query-types.js +16 -0
  170. package/lib/cjs/queries/greptimedb-log-query/index.js +33 -0
  171. package/lib/cjs/queries/greptimedb-log-query/log-query-plugin-interface.js +16 -0
  172. package/lib/cjs/queries/greptimedb-query-data-model.js +152 -0
  173. package/lib/cjs/queries/greptimedb-time-series-query/GreptimeDBQuery.js +43 -0
  174. package/lib/cjs/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js +107 -0
  175. package/lib/cjs/queries/greptimedb-time-series-query/get-greptimedb-data.js +184 -0
  176. package/lib/cjs/queries/greptimedb-time-series-query/greptimedb-query-types.js +16 -0
  177. package/lib/cjs/queries/greptimedb-time-series-query/index.js +33 -0
  178. package/lib/cjs/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js +40 -0
  179. package/lib/cjs/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js +79 -0
  180. package/lib/cjs/queries/greptimedb-trace-query/get-greptimedb-trace-data.js +518 -0
  181. package/lib/cjs/queries/greptimedb-trace-query/greptimedb-trace-query-types.js +16 -0
  182. package/lib/cjs/queries/greptimedb-trace-query/index.js +33 -0
  183. package/lib/cjs/queries/greptimedb-trace-query/trace-query-sql.js +25 -0
  184. package/lib/cjs/queries/index.js +32 -0
  185. package/lib/cjs/queries/query-editor-model.js +47 -0
  186. package/lib/cjs/setup-tests.js +19 -0
  187. package/lib/components/GreptimeDBQLEditor.d.ts +4 -0
  188. package/lib/components/GreptimeDBQLEditor.d.ts.map +1 -0
  189. package/lib/components/GreptimeDBQLEditor.js +59 -0
  190. package/lib/components/GreptimeDBQLEditor.js.map +1 -0
  191. package/lib/components/constants.d.ts +2 -0
  192. package/lib/components/constants.d.ts.map +1 -0
  193. package/lib/components/constants.js +34 -0
  194. package/lib/components/constants.js.map +1 -0
  195. package/lib/components/index.d.ts +3 -0
  196. package/lib/components/index.d.ts.map +1 -0
  197. package/lib/components/index.js +16 -0
  198. package/lib/components/index.js.map +1 -0
  199. package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.d.ts +4 -0
  200. package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.d.ts.map +1 -0
  201. package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.js +45 -0
  202. package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.js.map +1 -0
  203. package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.d.ts +9 -0
  204. package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.d.ts.map +1 -0
  205. package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js +43 -0
  206. package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js.map +1 -0
  207. package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.d.ts +29 -0
  208. package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.d.ts.map +1 -0
  209. package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.js +15 -0
  210. package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.js.map +1 -0
  211. package/lib/datasources/greptimedb-datasource/index.d.ts +4 -0
  212. package/lib/datasources/greptimedb-datasource/index.d.ts.map +1 -0
  213. package/lib/datasources/greptimedb-datasource/index.js +17 -0
  214. package/lib/datasources/greptimedb-datasource/index.js.map +1 -0
  215. package/lib/datasources/index.d.ts +2 -0
  216. package/lib/datasources/index.d.ts.map +1 -0
  217. package/lib/datasources/index.js +15 -0
  218. package/lib/datasources/index.js.map +1 -0
  219. package/lib/env.d.js +15 -0
  220. package/lib/env.d.js.map +1 -0
  221. package/lib/getPluginModule.d.ts +6 -0
  222. package/lib/getPluginModule.d.ts.map +1 -0
  223. package/lib/getPluginModule.js +28 -0
  224. package/lib/getPluginModule.js.map +1 -0
  225. package/lib/index-federation.d.ts +1 -0
  226. package/lib/index-federation.d.ts.map +1 -0
  227. package/lib/index-federation.js +15 -0
  228. package/lib/index-federation.js.map +1 -0
  229. package/lib/index.d.ts +4 -0
  230. package/lib/index.d.ts.map +1 -0
  231. package/lib/index.js +17 -0
  232. package/lib/index.js.map +1 -0
  233. package/lib/model/greptimedb-client.d.ts +17 -0
  234. package/lib/model/greptimedb-client.d.ts.map +1 -0
  235. package/lib/model/greptimedb-client.js +68 -0
  236. package/lib/model/greptimedb-client.js.map +1 -0
  237. package/lib/model/greptimedb-data-types.d.ts +21 -0
  238. package/lib/model/greptimedb-data-types.d.ts.map +1 -0
  239. package/lib/model/greptimedb-data-types.js +15 -0
  240. package/lib/model/greptimedb-data-types.js.map +1 -0
  241. package/lib/queries/constants.d.ts +5 -0
  242. package/lib/queries/constants.d.ts.map +1 -0
  243. package/lib/queries/constants.js +18 -0
  244. package/lib/queries/constants.js.map +1 -0
  245. package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.d.ts +4 -0
  246. package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.d.ts.map +1 -0
  247. package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.js +35 -0
  248. package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.js.map +1 -0
  249. package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.d.ts +7 -0
  250. package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.d.ts.map +1 -0
  251. package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js +100 -0
  252. package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js.map +1 -0
  253. package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.d.ts +4 -0
  254. package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.d.ts.map +1 -0
  255. package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.js +95 -0
  256. package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.js.map +1 -0
  257. package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.d.ts +6 -0
  258. package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.d.ts.map +1 -0
  259. package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.js +15 -0
  260. package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.js.map +1 -0
  261. package/lib/queries/greptimedb-log-query/index.d.ts +5 -0
  262. package/lib/queries/greptimedb-log-query/index.d.ts.map +1 -0
  263. package/lib/queries/greptimedb-log-query/index.js +18 -0
  264. package/lib/queries/greptimedb-log-query/index.js.map +1 -0
  265. package/lib/queries/greptimedb-log-query/log-query-plugin-interface.d.ts +23 -0
  266. package/lib/queries/greptimedb-log-query/log-query-plugin-interface.d.ts.map +1 -0
  267. package/lib/queries/greptimedb-log-query/log-query-plugin-interface.js +15 -0
  268. package/lib/queries/greptimedb-log-query/log-query-plugin-interface.js.map +1 -0
  269. package/lib/queries/greptimedb-query-data-model.d.ts +18 -0
  270. package/lib/queries/greptimedb-query-data-model.d.ts.map +1 -0
  271. package/lib/queries/greptimedb-query-data-model.js +138 -0
  272. package/lib/queries/greptimedb-query-data-model.js.map +1 -0
  273. package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.d.ts +4 -0
  274. package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.d.ts.map +1 -0
  275. package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.js +35 -0
  276. package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.js.map +1 -0
  277. package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.d.ts +7 -0
  278. package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.d.ts.map +1 -0
  279. package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js +99 -0
  280. package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js.map +1 -0
  281. package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.d.ts +4 -0
  282. package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.d.ts.map +1 -0
  283. package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.js +176 -0
  284. package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.js.map +1 -0
  285. package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.d.ts +7 -0
  286. package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.d.ts.map +1 -0
  287. package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.js +15 -0
  288. package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.js.map +1 -0
  289. package/lib/queries/greptimedb-time-series-query/index.d.ts +5 -0
  290. package/lib/queries/greptimedb-time-series-query/index.d.ts.map +1 -0
  291. package/lib/queries/greptimedb-time-series-query/index.js +18 -0
  292. package/lib/queries/greptimedb-time-series-query/index.js.map +1 -0
  293. package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.d.ts +4 -0
  294. package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.d.ts.map +1 -0
  295. package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js +32 -0
  296. package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js.map +1 -0
  297. package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.d.ts +7 -0
  298. package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.d.ts.map +1 -0
  299. package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js +71 -0
  300. package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js.map +1 -0
  301. package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.d.ts +11 -0
  302. package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.d.ts.map +1 -0
  303. package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.js +466 -0
  304. package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.js.map +1 -0
  305. package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.d.ts +6 -0
  306. package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.d.ts.map +1 -0
  307. package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.js +15 -0
  308. package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.js.map +1 -0
  309. package/lib/queries/greptimedb-trace-query/index.d.ts +5 -0
  310. package/lib/queries/greptimedb-trace-query/index.d.ts.map +1 -0
  311. package/lib/queries/greptimedb-trace-query/index.js +18 -0
  312. package/lib/queries/greptimedb-trace-query/index.js.map +1 -0
  313. package/lib/queries/greptimedb-trace-query/trace-query-sql.d.ts +2 -0
  314. package/lib/queries/greptimedb-trace-query/trace-query-sql.d.ts.map +1 -0
  315. package/lib/queries/greptimedb-trace-query/trace-query-sql.js +17 -0
  316. package/lib/queries/greptimedb-trace-query/trace-query-sql.js.map +1 -0
  317. package/lib/queries/index.d.ts +4 -0
  318. package/lib/queries/index.d.ts.map +1 -0
  319. package/lib/queries/index.js +17 -0
  320. package/lib/queries/index.js.map +1 -0
  321. package/lib/queries/query-editor-model.d.ts +19 -0
  322. package/lib/queries/query-editor-model.d.ts.map +1 -0
  323. package/lib/queries/query-editor-model.js +44 -0
  324. package/lib/queries/query-editor-model.js.map +1 -0
  325. package/lib/setup-tests.d.ts +2 -0
  326. package/lib/setup-tests.d.ts.map +1 -0
  327. package/lib/setup-tests.js +17 -0
  328. package/lib/setup-tests.js.map +1 -0
  329. package/mf-manifest.json +462 -0
  330. package/mf-stats.json +530 -0
  331. package/package.json +86 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/queries/greptimedb-trace-query/get-greptimedb-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 { replaceVariables, TraceQueryPlugin } from '@perses-dev/plugin-system';\nimport { TraceSearchResult } from '@perses-dev/spec';\nimport * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace';\nimport * as otlpcommonv1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/common/v1/common';\nimport { GreptimeDBClient, GreptimeDBQueryResponse } from '../../model/greptimedb-client';\nimport { DEFAULT_DATASOURCE } from '../constants';\nimport {\n GreptimeDBColumnSchema,\n GreptimeDBRecords,\n normalizeRecords,\n toTimestampMs,\n} from '../greptimedb-query-data-model';\nimport { GreptimeDBTraceQuerySpec } from './greptimedb-trace-query-types';\nimport { isLikelyTraceDetailSQL } from './trace-query-sql';\n\ntype Row = unknown[];\ntype ColumnIndexMap = Record<string, number>;\n\ninterface MutableTraceResult {\n traceId: string;\n startTimeUnixMs: number;\n endTimeUnixMs: number;\n rootServiceName: string;\n rootTraceName: string;\n serviceStats: Record<string, { spanCount: number; errorCount: number }>;\n}\n\nexport const getGreptimeDBTraceData: TraceQueryPlugin<GreptimeDBTraceQuerySpec>['getTraceData'] = async (\n spec,\n context\n) => {\n const rawQuery = replaceVariables(spec.query ?? '', context.variableState).trim();\n if (rawQuery.length === 0) {\n return { searchResult: [] };\n }\n\n const datasourceSelector = normalizeDatasourceSelector(spec.datasource);\n const client = (await context.datasourceStore.getDatasourceClient(\n datasourceSelector ?? DEFAULT_DATASOURCE\n )) as GreptimeDBClient;\n const start = context.absoluteTimeRange?.start.getTime().toString() ?? '0';\n const end = context.absoluteTimeRange?.end.getTime().toString() ?? '0';\n\n const response: GreptimeDBQueryResponse = await client.query({ query: rawQuery, start, end });\n if (response.status === 'error') {\n throw new Error(response.error ?? 'GreptimeDB trace query failed');\n }\n\n const records = normalizeRecords(response.data);\n const isDetailQuery = isLikelyTraceDetailSQL(rawQuery);\n\n if (isDetailQuery && isTraceDetailsResult(records)) {\n return {\n trace: convertRowsToTrace(records),\n metadata: {\n executedQueryString: rawQuery,\n },\n };\n }\n\n return {\n searchResult: buildSearchResult(records),\n metadata: {\n executedQueryString: rawQuery,\n },\n };\n};\n\nfunction normalizeDatasourceSelector(\n datasource: GreptimeDBTraceQuerySpec['datasource']\n): GreptimeDBTraceQuerySpec['datasource'] | undefined {\n if (!datasource) {\n return undefined;\n }\n\n // Deep links may carry an empty datasource name. Treat it as \"default datasource for this kind\".\n if (typeof datasource.name === 'string' && datasource.name.trim() === '') {\n const { kind } = datasource;\n return kind ? { kind } : undefined;\n }\n\n return datasource;\n}\n\nfunction buildColumnIndexMap(columns: GreptimeDBColumnSchema[] | undefined): ColumnIndexMap {\n const map: ColumnIndexMap = {};\n (columns ?? []).forEach((c, index) => {\n map[c.name.toLowerCase()] = index;\n });\n return map;\n}\n\n/** GreptimeDB /v1/sql includes data_type on every column_schemas entry. */\nfunction getColumnDataType(columns: GreptimeDBColumnSchema[], index: number): string {\n const column = columns[index];\n if (!column) {\n throw new Error(`GreptimeDB SQL response missing column at index ${index}`);\n }\n const dataType = column.data_type;\n if (!dataType) {\n throw new Error(`GreptimeDB SQL response missing data_type for column \"${column.name}\"`);\n }\n return dataType;\n}\n\nfunction isTraceDetailsResult(records: GreptimeDBRecords | undefined): boolean {\n const columns = records?.schema?.column_schemas ?? [];\n if (columns.length === 0) return false;\n const map = buildColumnIndexMap(columns);\n // Trace detail queries should return span-level columns for gantt visualization.\n return map.trace_id !== undefined && map.span_id !== undefined;\n}\n\nfunction getCell(row: Row, map: ColumnIndexMap, names: string[]): unknown {\n for (const name of names) {\n const idx = map[name.toLowerCase()];\n if (idx !== undefined) {\n return row[idx];\n }\n }\n return undefined;\n}\n\nfunction getString(value: unknown): string | undefined {\n if (value === null || value === undefined) return undefined;\n return String(value);\n}\n\nfunction getNumber(value: unknown): number | undefined {\n if (value === null || value === undefined) return undefined;\n if (typeof value === 'number') return Number.isFinite(value) ? value : undefined;\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction isErrorStatus(value: unknown): boolean {\n const normalized = String(value ?? '')\n .trim()\n .toUpperCase();\n return normalized === 'STATUS_CODE_ERROR' || normalized === 'ERROR' || normalized === '2';\n}\n\nfunction getDurationMs(row: Row, columns: GreptimeDBColumnSchema[] | undefined, map: ColumnIndexMap): number {\n const durationMs = getNumber(getCell(row, map, ['duration_ms']));\n if (durationMs !== undefined) return durationMs;\n\n const durationNano = getNumber(getCell(row, map, ['duration_nano', 'duration_ns']));\n if (durationNano !== undefined) return durationNano / 1_000_000;\n\n const startIndex = map.timestamp ?? map.start_time ?? map.start_time_unix_nano;\n const endIndex = map.timestamp_end ?? map.end_time ?? map.end_time_unix_nano;\n if (columns && startIndex !== undefined && endIndex !== undefined) {\n const startMs = toTimestampMs(row[startIndex], getColumnDataType(columns, startIndex));\n const endMs = toTimestampMs(row[endIndex], getColumnDataType(columns, endIndex));\n if (startMs !== null && endMs !== null) return Math.max(0, endMs - startMs);\n }\n return 0;\n}\n\nfunction getStartMs(row: Row, columns: GreptimeDBColumnSchema[] | undefined, map: ColumnIndexMap): number | undefined {\n const candidates = [\n 'timestamp',\n 'start_time',\n 'start_time_unix_nano',\n 'start_time_unix_ns',\n 'start_time_unix_ms',\n 'start_time_unix',\n ];\n for (const c of candidates) {\n const idx = map[c];\n if (idx === undefined) continue;\n if (!columns) continue;\n const ts = toTimestampMs(row[idx], getColumnDataType(columns, idx));\n if (ts !== null) return ts;\n }\n return undefined;\n}\n\nfunction getEndMs(row: Row, columns: GreptimeDBColumnSchema[] | undefined, map: ColumnIndexMap): number | undefined {\n const candidates = ['timestamp_end', 'end_time', 'end_time_unix_nano', 'end_time_unix_ns', 'end_time_unix_ms'];\n for (const c of candidates) {\n const idx = map[c];\n if (idx === undefined) continue;\n if (!columns) continue;\n const ts = toTimestampMs(row[idx], getColumnDataType(columns, idx));\n if (ts !== null) return ts;\n }\n return undefined;\n}\n\nfunction buildSearchResult(records: GreptimeDBRecords | undefined): TraceSearchResult[] {\n const columns = records?.schema?.column_schemas ?? [];\n const rows = records?.rows ?? [];\n if (!columns.length || !rows.length) return [];\n\n const map = buildColumnIndexMap(columns);\n const traceMap = new Map<string, MutableTraceResult>();\n\n rows.forEach((row) => {\n const traceId = getString(getCell(row, map, ['trace_id', 'traceid', 'traceId']));\n if (!traceId) return;\n\n const startMs = getStartMs(row, columns, map);\n const durationMs = getDurationMs(row, columns, map);\n const endMs = getEndMs(row, columns, map) ?? (startMs !== undefined ? startMs + durationMs : undefined);\n\n const serviceName = getString(getCell(row, map, ['service_name', 'root_service_name'])) ?? 'unknown';\n const spanName =\n getString(getCell(row, map, ['span_name', 'root_trace_name', 'operation_name', 'name'])) ?? '(unknown span)';\n const parentSpanId = getString(getCell(row, map, ['parent_span_id', 'parentspanid', 'parentSpanId']));\n\n const existing = traceMap.get(traceId);\n if (!existing) {\n traceMap.set(traceId, {\n traceId,\n startTimeUnixMs: startMs ?? 0,\n endTimeUnixMs: endMs ?? startMs ?? 0,\n rootServiceName: serviceName,\n rootTraceName: spanName,\n serviceStats: {\n [serviceName]: {\n spanCount: 1,\n errorCount: isErrorStatus(getCell(row, map, ['span_status_code', 'status_code'])) ? 1 : 0,\n },\n },\n });\n return;\n }\n\n if (startMs !== undefined) {\n existing.startTimeUnixMs = existing.startTimeUnixMs === 0 ? startMs : Math.min(existing.startTimeUnixMs, startMs);\n }\n if (endMs !== undefined) {\n existing.endTimeUnixMs = Math.max(existing.endTimeUnixMs, endMs);\n }\n\n if (!parentSpanId) {\n existing.rootTraceName = spanName;\n existing.rootServiceName = serviceName;\n }\n\n if (!existing.serviceStats[serviceName]) {\n existing.serviceStats[serviceName] = { spanCount: 0, errorCount: 0 };\n }\n existing.serviceStats[serviceName]!.spanCount += 1;\n if (isErrorStatus(getCell(row, map, ['span_status_code', 'status_code']))) {\n existing.serviceStats[serviceName]!.errorCount += 1;\n }\n });\n\n return Array.from(traceMap.values())\n .map((entry) => ({\n traceId: entry.traceId,\n startTimeUnixMs: entry.startTimeUnixMs,\n durationMs: Math.max(0, entry.endTimeUnixMs - entry.startTimeUnixMs),\n rootServiceName: entry.rootServiceName,\n rootTraceName: entry.rootTraceName,\n serviceStats: entry.serviceStats,\n }))\n .sort((a, b) => b.startTimeUnixMs - a.startTimeUnixMs);\n}\n\nfunction isIntegerGreptimeDataType(dataType: string): boolean {\n const normalized = dataType.toLowerCase();\n return normalized.includes('int') || normalized.includes('uint') || normalized === 'bigint';\n}\n\n/**\n * span_events JSON only: OTLP timeUnixNano is already nanoseconds (not a GreptimeDB TIMESTAMP column).\n * @see https://docs.greptime.com/user-guide/traces/data-model/\n */\nfunction otlpEventTimeToNanoString(value: unknown): string | undefined {\n if (value === undefined || value === null) return undefined;\n const raw = getNumber(value);\n if (raw !== undefined) return String(BigInt(Math.trunc(raw)));\n const dateMs = new Date(String(value)).getTime();\n if (!Number.isNaN(dateMs)) return String(BigInt(Math.trunc(dateMs)) * 1_000_000n);\n return undefined;\n}\n\n/**\n * SQL column values only (timestamp, timestamp_end, duration_nano, …).\n * Requires data_type from getColumnDataType. GreptimeDB /v1/sql returns numeric cells (and numeric strings).\n * - Timestamp* (TIMESTAMP(9) on opentelemetry_traces) → scale to nanoseconds.\n * - Int64/UInt64 (duration_nano) → already nanoseconds, no scaling.\n */\nexport function toNanoString(value: unknown, dataType: string): string | undefined {\n if (value === undefined || value === null) return undefined;\n const raw = getNumber(value);\n if (raw === undefined) return undefined;\n\n const normalized = dataType.toLowerCase();\n if (normalized.includes('nanosecond')) return String(BigInt(Math.trunc(raw)));\n if (normalized.includes('microsecond')) return String(BigInt(Math.trunc(raw)) * 1000n);\n if (normalized.includes('millisecond')) return String(BigInt(Math.trunc(raw)) * 1_000_000n);\n if (normalized.includes('second')) return String(BigInt(Math.trunc(raw)) * 1_000_000_000n);\n if (isIntegerGreptimeDataType(dataType)) return String(BigInt(Math.trunc(raw)));\n throw new Error(`Unsupported GreptimeDB data_type: ${dataType}`);\n}\n\nfunction parseJsonArray(value: unknown): unknown[] {\n if (Array.isArray(value)) return value;\n if (typeof value === 'string') {\n try {\n const parsed = JSON.parse(value);\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n }\n return [];\n}\n\nfunction toAnyValue(value: unknown): otlpcommonv1.AnyValue {\n return {\n stringValue: typeof value === 'string' ? value : JSON.stringify(value),\n };\n}\n\nfunction toKeyValue(key: string, value: unknown): otlpcommonv1.KeyValue {\n return {\n key,\n value: toAnyValue(value),\n };\n}\n\nfunction parseStatusCode(value: unknown): otlptracev1.Status['code'] {\n const normalized = String(value ?? '')\n .trim()\n .toUpperCase();\n if (!normalized) return undefined;\n if (normalized === 'STATUS_CODE_OK' || normalized === 'OK' || normalized === '1') {\n return otlptracev1.StatusCodeOk;\n }\n if (normalized === 'STATUS_CODE_ERROR' || normalized === 'ERROR' || normalized === '2') {\n return otlptracev1.StatusCodeError;\n }\n return otlptracev1.StatusCodeUnset;\n}\n\nfunction convertRowsToTrace(records: GreptimeDBRecords | undefined): otlptracev1.TracesData {\n const columns = records?.schema?.column_schemas ?? [];\n const rows = records?.rows ?? [];\n if (!columns.length || !rows.length) return { resourceSpans: [] };\n\n const map = buildColumnIndexMap(columns);\n const spanColumns = columns.filter((col) => col.name.startsWith('span_attributes.'));\n const resourceColumns = columns.filter((col) => col.name.startsWith('resource_attributes.'));\n\n const byService = new Map<\n string,\n { resourceAttrs: otlpcommonv1.KeyValue[]; scopeSpans: Map<string, otlptracev1.ScopeSpans> }\n >();\n\n rows.forEach((row) => {\n const traceId = getString(getCell(row, map, ['trace_id', 'traceid', 'traceId']));\n const spanId = getString(getCell(row, map, ['span_id', 'spanid', 'spanId']));\n if (!traceId || !spanId) return;\n\n const parentSpanId = getString(getCell(row, map, ['parent_span_id', 'parentspanid', 'parentSpanId']));\n const name = getString(getCell(row, map, ['span_name', 'name', 'operation_name'])) ?? '(unknown span)';\n const kind = (getString(getCell(row, map, ['span_kind', 'kind'])) ??\n 'SPAN_KIND_UNSPECIFIED') as otlptracev1.Span['kind'];\n const serviceName = getString(getCell(row, map, ['service_name'])) ?? 'unknown';\n const scopeName = getString(getCell(row, map, ['scope_name'])) ?? '';\n const scopeVersion = getString(getCell(row, map, ['scope_version'])) ?? '';\n\n const startIndex = map.timestamp ?? map.start_time ?? map.start_time_unix_nano;\n const endIndex = map.timestamp_end ?? map.end_time ?? map.end_time_unix_nano;\n const durationIndex = map.duration_nano ?? map.duration_ns;\n\n const startTimeUnixNano =\n startIndex !== undefined ? (toNanoString(row[startIndex], getColumnDataType(columns, startIndex)) ?? '0') : '0';\n const endTimeUnixNano =\n (endIndex !== undefined\n ? (toNanoString(row[endIndex], getColumnDataType(columns, endIndex)) ?? '0')\n : undefined) ??\n (durationIndex !== undefined\n ? String(\n BigInt(startTimeUnixNano) +\n BigInt(toNanoString(row[durationIndex], getColumnDataType(columns, durationIndex)) ?? '0')\n )\n : startTimeUnixNano);\n\n const spanAttributes = spanColumns\n .map((c) => {\n const idx = map[c.name.toLowerCase()];\n if (idx === undefined) return undefined;\n const value = row[idx];\n if (value === undefined || value === null || value === '') return undefined;\n return toKeyValue(c.name.replace(/^span_attributes\\./, ''), value);\n })\n .filter((v): v is otlpcommonv1.KeyValue => v !== undefined);\n\n // span_events / span_links: JSON columns (data_type Json). Only events need OTLP time parsing.\n const spanEvents = parseJsonArray(getCell(row, map, ['span_events'])).map((event) => {\n const e = event as Record<string, unknown>;\n const eventTime = otlpEventTimeToNanoString(e.timeUnixNano ?? e.time_unix_nano) ?? startTimeUnixNano;\n const eventName = getString(e.name) ?? 'event';\n const attrs = e.attributes as Record<string, unknown> | undefined;\n const attributes = attrs\n ? Object.entries(attrs).map(([k, v]) => toKeyValue(k, v))\n : ([] as otlpcommonv1.KeyValue[]);\n return {\n timeUnixNano: eventTime,\n name: eventName,\n attributes,\n };\n });\n\n const spanLinks = parseJsonArray(getCell(row, map, ['span_links'])).map((link) => {\n const l = link as Record<string, unknown>;\n const attrs = l.attributes as Record<string, unknown> | undefined;\n const attributes = attrs\n ? Object.entries(attrs).map(([k, v]) => toKeyValue(k, v))\n : ([] as otlpcommonv1.KeyValue[]);\n return {\n traceId: getString(l.traceId ?? l.trace_id) ?? '',\n spanId: getString(l.spanId ?? l.span_id) ?? '',\n attributes,\n };\n });\n\n const statusMessage = getString(getCell(row, map, ['span_status_message'])) ?? '';\n const statusCode = parseStatusCode(getCell(row, map, ['span_status_code', 'status_code']));\n\n const span: otlptracev1.Span = {\n traceId,\n spanId,\n parentSpanId,\n name,\n kind,\n startTimeUnixNano,\n endTimeUnixNano,\n attributes: spanAttributes,\n events: spanEvents,\n links: spanLinks,\n status: {\n message: statusMessage,\n code: statusCode,\n },\n };\n\n if (!byService.has(serviceName)) {\n const resourceAttrs: otlpcommonv1.KeyValue[] = [toKeyValue('service.name', serviceName)];\n resourceColumns.forEach((c) => {\n const idx = map[c.name.toLowerCase()];\n if (idx === undefined) return;\n const value = row[idx];\n if (value === undefined || value === null || value === '') return;\n resourceAttrs.push(toKeyValue(c.name.replace(/^resource_attributes\\./, ''), value));\n });\n byService.set(serviceName, { resourceAttrs, scopeSpans: new Map<string, otlptracev1.ScopeSpans>() });\n }\n\n const serviceGroup = byService.get(serviceName)!;\n const scopeKey = `${scopeName}|${scopeVersion}`;\n if (!serviceGroup.scopeSpans.has(scopeKey)) {\n serviceGroup.scopeSpans.set(scopeKey, {\n scope: {\n name: scopeName,\n version: scopeVersion,\n },\n spans: [],\n });\n }\n serviceGroup.scopeSpans.get(scopeKey)!.spans.push(span);\n });\n\n const resourceSpans: NonNullable<otlptracev1.TracesData['resourceSpans']> = Array.from(byService.entries()).map(\n ([_, value]) => ({\n resource: { attributes: value.resourceAttrs },\n scopeSpans: Array.from(value.scopeSpans.values()),\n })\n );\n\n return {\n resourceSpans,\n };\n}\n"],"names":["replaceVariables","otlptracev1","DEFAULT_DATASOURCE","normalizeRecords","toTimestampMs","isLikelyTraceDetailSQL","getGreptimeDBTraceData","spec","context","rawQuery","query","variableState","trim","length","searchResult","datasourceSelector","normalizeDatasourceSelector","datasource","client","datasourceStore","getDatasourceClient","start","absoluteTimeRange","getTime","toString","end","response","status","Error","error","records","data","isDetailQuery","isTraceDetailsResult","trace","convertRowsToTrace","metadata","executedQueryString","buildSearchResult","undefined","name","kind","buildColumnIndexMap","columns","map","forEach","c","index","toLowerCase","getColumnDataType","column","dataType","data_type","schema","column_schemas","trace_id","span_id","getCell","row","names","idx","getString","value","String","getNumber","Number","isFinite","parsed","isErrorStatus","normalized","toUpperCase","getDurationMs","durationMs","durationNano","startIndex","timestamp","start_time","start_time_unix_nano","endIndex","timestamp_end","end_time","end_time_unix_nano","startMs","endMs","Math","max","getStartMs","candidates","ts","getEndMs","rows","traceMap","Map","traceId","serviceName","spanName","parentSpanId","existing","get","set","startTimeUnixMs","endTimeUnixMs","rootServiceName","rootTraceName","serviceStats","spanCount","errorCount","min","Array","from","values","entry","sort","a","b","isIntegerGreptimeDataType","includes","otlpEventTimeToNanoString","raw","BigInt","trunc","dateMs","Date","isNaN","toNanoString","parseJsonArray","isArray","JSON","parse","toAnyValue","stringValue","stringify","toKeyValue","key","parseStatusCode","StatusCodeOk","StatusCodeError","StatusCodeUnset","resourceSpans","spanColumns","filter","col","startsWith","resourceColumns","byService","spanId","scopeName","scopeVersion","durationIndex","duration_nano","duration_ns","startTimeUnixNano","endTimeUnixNano","spanAttributes","replace","v","spanEvents","event","e","eventTime","timeUnixNano","time_unix_nano","eventName","attrs","attributes","Object","entries","k","spanLinks","link","l","statusMessage","statusCode","span","events","links","message","code","has","resourceAttrs","push","scopeSpans","serviceGroup","scopeKey","scope","version","spans","_","resource"],"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,SAASA,gBAAgB,QAA0B,4BAA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IAAI;gBACtB,IAAIE,UAAUvB,aAAauB,UAAU,QAAQA,UAAU,IAAI;gBAC3DqH,cAAcC,IAAI,CAAChD,WAAWtF,EAAEN,IAAI,CAACkH,OAAO,CAAC,0BAA0B,KAAK5F;YAC9E;YACAkF,UAAU7C,GAAG,CAACL,aAAa;gBAAEqF;gBAAeE,YAAY,IAAIzF;YAAsC;QACpG;QAEA,MAAM0F,eAAetC,UAAU9C,GAAG,CAACJ;QACnC,MAAMyF,WAAW,GAAGrC,UAAU,CAAC,EAAEC,cAAc;QAC/C,IAAI,CAACmC,aAAaD,UAAU,CAACH,GAAG,CAACK,WAAW;YAC1CD,aAAaD,UAAU,CAAClF,GAAG,CAACoF,UAAU;gBACpCC,OAAO;oBACLhJ,MAAM0G;oBACNuC,SAAStC;gBACX;gBACAuC,OAAO,EAAE;YACX;QACF;QACAJ,aAAaD,UAAU,CAACnF,GAAG,CAACqF,UAAWG,KAAK,CAACN,IAAI,CAACP;IACpD;IAEA,MAAMnC,gBAAsE9B,MAAMC,IAAI,CAACmC,UAAUsB,OAAO,IAAI1H,GAAG,CAC7G,CAAC,CAAC+I,GAAG7H,MAAM,GAAM,CAAA;YACf8H,UAAU;gBAAExB,YAAYtG,MAAMqH,aAAa;YAAC;YAC5CE,YAAYzE,MAAMC,IAAI,CAAC/C,MAAMuH,UAAU,CAACvE,MAAM;QAChD,CAAA;IAGF,OAAO;QACL4B;IACF;AACF"}
@@ -0,0 +1,6 @@
1
+ import { DatasourceSelector } from '@perses-dev/spec';
2
+ export interface GreptimeDBTraceQuerySpec {
3
+ query: string;
4
+ datasource?: DatasourceSelector;
5
+ }
6
+ //# sourceMappingURL=greptimedb-trace-query-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greptimedb-trace-query-types.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-trace-query/greptimedb-trace-query-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC"}
@@ -0,0 +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.
13
+ export { };
14
+
15
+ //# sourceMappingURL=greptimedb-trace-query-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/queries/greptimedb-trace-query/greptimedb-trace-query-types.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 { DatasourceSelector } from '@perses-dev/spec';\n\nexport interface GreptimeDBTraceQuerySpec {\n query: string;\n datasource?: DatasourceSelector;\n}\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;AAIjC,WAGC"}
@@ -0,0 +1,5 @@
1
+ export * from './GreptimeDBTraceQuery';
2
+ export * from './GreptimeDBTraceQueryEditor';
3
+ export * from './get-greptimedb-trace-data';
4
+ export * from './greptimedb-trace-query-types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-trace-query/index.ts"],"names":[],"mappings":"AAaA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,18 @@
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
+ export * from './GreptimeDBTraceQuery';
14
+ export * from './GreptimeDBTraceQueryEditor';
15
+ export * from './get-greptimedb-trace-data';
16
+ export * from './greptimedb-trace-query-types';
17
+
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/queries/greptimedb-trace-query/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 './GreptimeDBTraceQuery';\nexport * from './GreptimeDBTraceQueryEditor';\nexport * from './get-greptimedb-trace-data';\nexport * from './greptimedb-trace-query-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,cAAc,yBAAyB;AACvC,cAAc,+BAA+B;AAC7C,cAAc,8BAA8B;AAC5C,cAAc,iCAAiC"}
@@ -0,0 +1,2 @@
1
+ export declare function isLikelyTraceDetailSQL(query: string): boolean;
2
+ //# sourceMappingURL=trace-query-sql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace-query-sql.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-trace-query/trace-query-sql.ts"],"names":[],"mappings":"AAaA,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE7D"}
@@ -0,0 +1,17 @@
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
+ export function isLikelyTraceDetailSQL(query) {
14
+ return /where[\s\S]*trace_id\s*=/i.test(query);
15
+ }
16
+
17
+ //# sourceMappingURL=trace-query-sql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/queries/greptimedb-trace-query/trace-query-sql.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 function isLikelyTraceDetailSQL(query: string): boolean {\n return /where[\\s\\S]*trace_id\\s*=/i.test(query);\n}\n"],"names":["isLikelyTraceDetailSQL","query","test"],"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,SAASA,uBAAuBC,KAAa;IAClD,OAAO,4BAA4BC,IAAI,CAACD;AAC1C"}
@@ -0,0 +1,4 @@
1
+ export * from './greptimedb-time-series-query';
2
+ export * from './greptimedb-log-query';
3
+ export * from './greptimedb-trace-query';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":"AAaA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,17 @@
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
+ export * from './greptimedb-time-series-query';
14
+ export * from './greptimedb-log-query';
15
+ export * from './greptimedb-trace-query';
16
+
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/queries/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 './greptimedb-time-series-query';\nexport * from './greptimedb-log-query';\nexport * from './greptimedb-trace-query';\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,cAAc,iCAAiC;AAC/C,cAAc,yBAAyB;AACvC,cAAc,2BAA2B"}
@@ -0,0 +1,19 @@
1
+ type QuerySpec = {
2
+ query: string;
3
+ };
4
+ /**
5
+ * A hook for managing the `query` state in GreptimeDB query specs. Returns the `query` value, along with
6
+ * `onChange` and `onBlur` event handlers to the input. Keeps a local copy of the user's input and only syncs those
7
+ * changes with the overall spec value once the input is blurred to prevent re-running queries in the panel's preview
8
+ * every time the user types.
9
+ */
10
+ export declare function useQueryState<T extends QuerySpec>(props: {
11
+ value: T;
12
+ onChange: (next: T) => void;
13
+ }): {
14
+ query: string;
15
+ handleQueryChange: (e: string) => void;
16
+ handleQueryBlur: () => void;
17
+ };
18
+ export {};
19
+ //# sourceMappingURL=query-editor-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-editor-model.d.ts","sourceRoot":"","sources":["../../../src/queries/query-editor-model.ts"],"names":[],"mappings":"AAgBA,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE;IACxD,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;CAC7B,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAyBA"}
@@ -0,0 +1,44 @@
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
+ import { produce } from 'immer';
14
+ import { useState } from 'react';
15
+ /**
16
+ * A hook for managing the `query` state in GreptimeDB query specs. Returns the `query` value, along with
17
+ * `onChange` and `onBlur` event handlers to the input. Keeps a local copy of the user's input and only syncs those
18
+ * changes with the overall spec value once the input is blurred to prevent re-running queries in the panel's preview
19
+ * every time the user types.
20
+ */ export function useQueryState(props) {
21
+ const { onChange, value } = props;
22
+ const [query, setQuery] = useState(value.query || '');
23
+ const [lastSyncedQuery, setLastSyncedQuery] = useState(value.query);
24
+ if (value.query !== lastSyncedQuery) {
25
+ setQuery(value.query || '');
26
+ setLastSyncedQuery(value.query);
27
+ }
28
+ const handleQueryChange = (e)=>{
29
+ setQuery(e);
30
+ };
31
+ const handleQueryBlur = ()=>{
32
+ setLastSyncedQuery(query);
33
+ onChange(produce(value, (draft)=>{
34
+ draft.query = query;
35
+ }));
36
+ };
37
+ return {
38
+ query,
39
+ handleQueryChange,
40
+ handleQueryBlur
41
+ };
42
+ }
43
+
44
+ //# sourceMappingURL=query-editor-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/queries/query-editor-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 { produce } from 'immer';\nimport { useState } from 'react';\n\ntype QuerySpec = {\n query: string;\n};\n\n/**\n * A hook for managing the `query` state in GreptimeDB query specs. Returns the `query` value, along with\n * `onChange` and `onBlur` event handlers to the input. Keeps a local copy of the user's input and only syncs those\n * changes with the overall spec value once the input is blurred to prevent re-running queries in the panel's preview\n * every time the user types.\n */\nexport function useQueryState<T extends QuerySpec>(props: {\n value: T;\n onChange: (next: T) => void;\n}): {\n query: string;\n handleQueryChange: (e: string) => void;\n handleQueryBlur: () => void;\n} {\n const { onChange, value } = props;\n\n const [query, setQuery] = useState(value.query || '');\n const [lastSyncedQuery, setLastSyncedQuery] = useState(value.query);\n\n if (value.query !== lastSyncedQuery) {\n setQuery(value.query || '');\n setLastSyncedQuery(value.query);\n }\n\n const handleQueryChange = (e: string): void => {\n setQuery(e);\n };\n\n const handleQueryBlur = (): void => {\n setLastSyncedQuery(query);\n onChange(\n produce(value, (draft) => {\n draft.query = query;\n })\n );\n };\n\n return { query, handleQueryChange, handleQueryBlur };\n}\n"],"names":["produce","useState","useQueryState","props","onChange","value","query","setQuery","lastSyncedQuery","setLastSyncedQuery","handleQueryChange","e","handleQueryBlur","draft"],"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,SAASA,OAAO,QAAQ,QAAQ;AAChC,SAASC,QAAQ,QAAQ,QAAQ;AAMjC;;;;;CAKC,GACD,OAAO,SAASC,cAAmCC,KAGlD;IAKC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAE5B,MAAM,CAACG,OAAOC,SAAS,GAAGN,SAASI,MAAMC,KAAK,IAAI;IAClD,MAAM,CAACE,iBAAiBC,mBAAmB,GAAGR,SAASI,MAAMC,KAAK;IAElE,IAAID,MAAMC,KAAK,KAAKE,iBAAiB;QACnCD,SAASF,MAAMC,KAAK,IAAI;QACxBG,mBAAmBJ,MAAMC,KAAK;IAChC;IAEA,MAAMI,oBAAoB,CAACC;QACzBJ,SAASI;IACX;IAEA,MAAMC,kBAAkB;QACtBH,mBAAmBH;QACnBF,SACEJ,QAAQK,OAAO,CAACQ;YACdA,MAAMP,KAAK,GAAGA;QAChB;IAEJ;IAEA,OAAO;QAAEA;QAAOI;QAAmBE;IAAgB;AACrD"}
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=setup-tests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/setup-tests.ts"],"names":[],"mappings":"AAaA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,17 @@
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
+ import '@testing-library/jest-dom';
14
+ // Always mock e-charts during tests since we don't have a proper canvas in jsdom
15
+ jest.mock('echarts/core');
16
+
17
+ //# sourceMappingURL=setup-tests.js.map
@@ -0,0 +1 @@
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"}