@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.
- package/LICENSE +201 -0
- package/README.md +41 -0
- package/__mf/css/async/8077.85c2cbf6.css +1 -0
- package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
- package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
- package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
- package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
- package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
- package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
- package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
- package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
- package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
- package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
- package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
- package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
- package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
- package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
- package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
- package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
- package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
- package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
- package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
- package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
- package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
- package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
- package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
- package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
- package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
- package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
- package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
- package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
- package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
- package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
- package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
- package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
- package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
- package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
- package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
- package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
- package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
- package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
- package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
- package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
- package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
- package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
- package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
- package/__mf/js/GreptimeDB.7a063e9e.js +7 -0
- package/__mf/js/async/1616.20d43f7e.js +1 -0
- package/__mf/js/async/2043.97b1f27f.js +2 -0
- package/__mf/js/async/2043.97b1f27f.js.LICENSE.txt +24 -0
- package/__mf/js/async/2269.f1322789.js +3 -0
- package/__mf/js/async/2386.b7243314.js +2 -0
- package/__mf/js/async/2386.b7243314.js.LICENSE.txt +9 -0
- package/__mf/js/async/3181.7ac30201.js +2 -0
- package/__mf/js/async/3181.7ac30201.js.LICENSE.txt +9 -0
- package/__mf/js/async/3247.65183b95.js +2 -0
- package/__mf/js/async/3247.65183b95.js.LICENSE.txt +37 -0
- package/__mf/js/async/392.91ae0e19.js +2 -0
- package/__mf/js/async/392.91ae0e19.js.LICENSE.txt +8 -0
- package/__mf/js/async/3944.12d0f358.js +10 -0
- package/__mf/js/async/3944.12d0f358.js.LICENSE.txt +17 -0
- package/__mf/js/async/4121.06b9cab6.js +2 -0
- package/__mf/js/async/4121.06b9cab6.js.LICENSE.txt +9 -0
- package/__mf/js/async/5002.0a422150.js +1 -0
- package/__mf/js/async/5071.e5cc2bd7.js +1 -0
- package/__mf/js/async/5402.eda0fb07.js +101 -0
- package/__mf/js/async/5440.7abefadb.js +2 -0
- package/__mf/js/async/5440.7abefadb.js.LICENSE.txt +32 -0
- package/__mf/js/async/5562.a39a5d1e.js +2 -0
- package/__mf/js/async/5562.a39a5d1e.js.LICENSE.txt +9 -0
- package/__mf/js/async/5587.a3fb718a.js +1 -0
- package/__mf/js/async/6045.10e9fa5a.js +1 -0
- package/__mf/js/async/6274.6f0093e7.js +2 -0
- package/__mf/js/async/6274.6f0093e7.js.LICENSE.txt +8 -0
- package/__mf/js/async/6753.1e42e819.js +1 -0
- package/__mf/js/async/7177.78bced1c.js +1 -0
- package/__mf/js/async/7192.e0362dae.js +1 -0
- package/__mf/js/async/7862.8048abcc.js +2 -0
- package/__mf/js/async/7862.8048abcc.js.LICENSE.txt +9 -0
- package/__mf/js/async/7968.7b2e2836.js +1 -0
- package/__mf/js/async/7978.8cd67008.js +1 -0
- package/__mf/js/async/8077.fe9828a3.js +7 -0
- package/__mf/js/async/8077.fe9828a3.js.LICENSE.txt +39 -0
- package/__mf/js/async/8356.ac21fc24.js +1 -0
- package/__mf/js/async/8470.a2e67e3a.js +2 -0
- package/__mf/js/async/8470.a2e67e3a.js.LICENSE.txt +19 -0
- package/__mf/js/async/873.863f53e4.js +1 -0
- package/__mf/js/async/9235.7651eaca.js +1 -0
- package/__mf/js/async/941.4155d3cc.js +2 -0
- package/__mf/js/async/941.4155d3cc.js.LICENSE.txt +9 -0
- package/__mf/js/async/9558.215ad80c.js +1 -0
- package/__mf/js/async/9588.2f544a41.js +1 -0
- package/__mf/js/async/9877.8766524e.js +38 -0
- package/__mf/js/async/9916.2a1eb7a0.js +22 -0
- package/__mf/js/async/9916.2a1eb7a0.js.LICENSE.txt +19 -0
- package/__mf/js/async/__federation_expose_GreptimeDBDatasource.bf1dec3c.js +2 -0
- package/__mf/js/async/__federation_expose_GreptimeDBDatasource.bf1dec3c.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_GreptimeDBLogQuery.d80b2965.js +21 -0
- package/__mf/js/async/__federation_expose_GreptimeDBLogQuery.d80b2965.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_GreptimeDBTimeSeriesQuery.59cda507.js +21 -0
- package/__mf/js/async/__federation_expose_GreptimeDBTimeSeriesQuery.59cda507.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_GreptimeDBTraceQuery.00464f43.js +21 -0
- package/__mf/js/async/__federation_expose_GreptimeDBTraceQuery.00464f43.js.LICENSE.txt +9 -0
- package/__mf/js/main.a4e4afce.js +7 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +19 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/bootstrap.js +26 -0
- package/lib/cjs/components/GreptimeDBQLEditor.js +72 -0
- package/lib/cjs/components/constants.js +42 -0
- package/lib/cjs/components/index.js +31 -0
- package/lib/cjs/datasources/greptimedb-datasource/GreptimeDBDatasource.js +53 -0
- package/lib/cjs/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js +51 -0
- package/lib/cjs/datasources/greptimedb-datasource/greptimedb-datasource-types.js +16 -0
- package/lib/cjs/datasources/greptimedb-datasource/index.js +32 -0
- package/lib/cjs/datasources/index.js +30 -0
- package/lib/cjs/env.d.js +14 -0
- package/lib/cjs/getPluginModule.js +39 -0
- package/lib/cjs/index-federation.js +55 -0
- package/lib/cjs/index.js +38 -0
- package/lib/cjs/model/greptimedb-client.js +76 -0
- package/lib/cjs/model/greptimedb-data-types.js +16 -0
- package/lib/cjs/queries/constants.js +34 -0
- package/lib/cjs/queries/greptimedb-log-query/GreptimeDBLogQuery.js +43 -0
- package/lib/cjs/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js +108 -0
- package/lib/cjs/queries/greptimedb-log-query/get-greptimedb-log-data.js +103 -0
- package/lib/cjs/queries/greptimedb-log-query/greptimedb-log-query-types.js +16 -0
- package/lib/cjs/queries/greptimedb-log-query/index.js +33 -0
- package/lib/cjs/queries/greptimedb-log-query/log-query-plugin-interface.js +16 -0
- package/lib/cjs/queries/greptimedb-query-data-model.js +152 -0
- package/lib/cjs/queries/greptimedb-time-series-query/GreptimeDBQuery.js +43 -0
- package/lib/cjs/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js +107 -0
- package/lib/cjs/queries/greptimedb-time-series-query/get-greptimedb-data.js +184 -0
- package/lib/cjs/queries/greptimedb-time-series-query/greptimedb-query-types.js +16 -0
- package/lib/cjs/queries/greptimedb-time-series-query/index.js +33 -0
- package/lib/cjs/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js +40 -0
- package/lib/cjs/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js +79 -0
- package/lib/cjs/queries/greptimedb-trace-query/get-greptimedb-trace-data.js +518 -0
- package/lib/cjs/queries/greptimedb-trace-query/greptimedb-trace-query-types.js +16 -0
- package/lib/cjs/queries/greptimedb-trace-query/index.js +33 -0
- package/lib/cjs/queries/greptimedb-trace-query/trace-query-sql.js +25 -0
- package/lib/cjs/queries/index.js +32 -0
- package/lib/cjs/queries/query-editor-model.js +47 -0
- package/lib/cjs/setup-tests.js +19 -0
- package/lib/components/GreptimeDBQLEditor.d.ts +4 -0
- package/lib/components/GreptimeDBQLEditor.d.ts.map +1 -0
- package/lib/components/GreptimeDBQLEditor.js +59 -0
- package/lib/components/GreptimeDBQLEditor.js.map +1 -0
- package/lib/components/constants.d.ts +2 -0
- package/lib/components/constants.d.ts.map +1 -0
- package/lib/components/constants.js +34 -0
- package/lib/components/constants.js.map +1 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +16 -0
- package/lib/components/index.js.map +1 -0
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.d.ts +4 -0
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.d.ts.map +1 -0
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.js +45 -0
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.js.map +1 -0
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.d.ts +9 -0
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.d.ts.map +1 -0
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js +43 -0
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js.map +1 -0
- package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.d.ts +29 -0
- package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.d.ts.map +1 -0
- package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.js +15 -0
- package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.js.map +1 -0
- package/lib/datasources/greptimedb-datasource/index.d.ts +4 -0
- package/lib/datasources/greptimedb-datasource/index.d.ts.map +1 -0
- package/lib/datasources/greptimedb-datasource/index.js +17 -0
- package/lib/datasources/greptimedb-datasource/index.js.map +1 -0
- package/lib/datasources/index.d.ts +2 -0
- package/lib/datasources/index.d.ts.map +1 -0
- package/lib/datasources/index.js +15 -0
- package/lib/datasources/index.js.map +1 -0
- package/lib/env.d.js +15 -0
- package/lib/env.d.js.map +1 -0
- package/lib/getPluginModule.d.ts +6 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +28 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +15 -0
- package/lib/index-federation.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/lib/model/greptimedb-client.d.ts +17 -0
- package/lib/model/greptimedb-client.d.ts.map +1 -0
- package/lib/model/greptimedb-client.js +68 -0
- package/lib/model/greptimedb-client.js.map +1 -0
- package/lib/model/greptimedb-data-types.d.ts +21 -0
- package/lib/model/greptimedb-data-types.d.ts.map +1 -0
- package/lib/model/greptimedb-data-types.js +15 -0
- package/lib/model/greptimedb-data-types.js.map +1 -0
- package/lib/queries/constants.d.ts +5 -0
- package/lib/queries/constants.d.ts.map +1 -0
- package/lib/queries/constants.js +18 -0
- package/lib/queries/constants.js.map +1 -0
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.d.ts +4 -0
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.d.ts.map +1 -0
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.js +35 -0
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.js.map +1 -0
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.d.ts +7 -0
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.d.ts.map +1 -0
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js +100 -0
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js.map +1 -0
- package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.d.ts +4 -0
- package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.d.ts.map +1 -0
- package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.js +95 -0
- package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.js.map +1 -0
- package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.d.ts +6 -0
- package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.d.ts.map +1 -0
- package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.js +15 -0
- package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.js.map +1 -0
- package/lib/queries/greptimedb-log-query/index.d.ts +5 -0
- package/lib/queries/greptimedb-log-query/index.d.ts.map +1 -0
- package/lib/queries/greptimedb-log-query/index.js +18 -0
- package/lib/queries/greptimedb-log-query/index.js.map +1 -0
- package/lib/queries/greptimedb-log-query/log-query-plugin-interface.d.ts +23 -0
- package/lib/queries/greptimedb-log-query/log-query-plugin-interface.d.ts.map +1 -0
- package/lib/queries/greptimedb-log-query/log-query-plugin-interface.js +15 -0
- package/lib/queries/greptimedb-log-query/log-query-plugin-interface.js.map +1 -0
- package/lib/queries/greptimedb-query-data-model.d.ts +18 -0
- package/lib/queries/greptimedb-query-data-model.d.ts.map +1 -0
- package/lib/queries/greptimedb-query-data-model.js +138 -0
- package/lib/queries/greptimedb-query-data-model.js.map +1 -0
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.d.ts +4 -0
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.d.ts.map +1 -0
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.js +35 -0
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.js.map +1 -0
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.d.ts +7 -0
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.d.ts.map +1 -0
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js +99 -0
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js.map +1 -0
- package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.d.ts +4 -0
- package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.d.ts.map +1 -0
- package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.js +176 -0
- package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.js.map +1 -0
- package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.d.ts +7 -0
- package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.d.ts.map +1 -0
- package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.js +15 -0
- package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.js.map +1 -0
- package/lib/queries/greptimedb-time-series-query/index.d.ts +5 -0
- package/lib/queries/greptimedb-time-series-query/index.d.ts.map +1 -0
- package/lib/queries/greptimedb-time-series-query/index.js +18 -0
- package/lib/queries/greptimedb-time-series-query/index.js.map +1 -0
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.d.ts +4 -0
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.d.ts.map +1 -0
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js +32 -0
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js.map +1 -0
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.d.ts +7 -0
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.d.ts.map +1 -0
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js +71 -0
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js.map +1 -0
- package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.d.ts +11 -0
- package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.d.ts.map +1 -0
- package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.js +466 -0
- package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.js.map +1 -0
- package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.d.ts +6 -0
- package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.d.ts.map +1 -0
- package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.js +15 -0
- package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.js.map +1 -0
- package/lib/queries/greptimedb-trace-query/index.d.ts +5 -0
- package/lib/queries/greptimedb-trace-query/index.d.ts.map +1 -0
- package/lib/queries/greptimedb-trace-query/index.js +18 -0
- package/lib/queries/greptimedb-trace-query/index.js.map +1 -0
- package/lib/queries/greptimedb-trace-query/trace-query-sql.d.ts +2 -0
- package/lib/queries/greptimedb-trace-query/trace-query-sql.d.ts.map +1 -0
- package/lib/queries/greptimedb-trace-query/trace-query-sql.js +17 -0
- package/lib/queries/greptimedb-trace-query/trace-query-sql.js.map +1 -0
- package/lib/queries/index.d.ts +4 -0
- package/lib/queries/index.d.ts.map +1 -0
- package/lib/queries/index.js +17 -0
- package/lib/queries/index.js.map +1 -0
- package/lib/queries/query-editor-model.d.ts +19 -0
- package/lib/queries/query-editor-model.d.ts.map +1 -0
- package/lib/queries/query-editor-model.js +44 -0
- package/lib/queries/query-editor-model.js.map +1 -0
- package/lib/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +17 -0
- package/lib/setup-tests.js.map +1 -0
- package/mf-manifest.json +462 -0
- package/mf-stats.json +530 -0
- package/package.json +86 -0
|
@@ -0,0 +1,184 @@
|
|
|
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, "getTimeSeriesData", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return getTimeSeriesData;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _constants = require("../constants");
|
|
24
|
+
const _greptimedbquerydatamodel = require("../greptimedb-query-data-model");
|
|
25
|
+
function isLikelyNumericType(dataType) {
|
|
26
|
+
if (!dataType) return false;
|
|
27
|
+
const t = dataType.toLowerCase();
|
|
28
|
+
return t.includes('int') || t.includes('float') || t.includes('double') || t.includes('decimal') || t.includes('number');
|
|
29
|
+
}
|
|
30
|
+
function buildSeriesName(valueColumnName, labels) {
|
|
31
|
+
const entries = Object.entries(labels);
|
|
32
|
+
if (entries.length === 0) {
|
|
33
|
+
return valueColumnName;
|
|
34
|
+
}
|
|
35
|
+
return entries.map(([k, v])=>`${k}=${v}`).join(',');
|
|
36
|
+
}
|
|
37
|
+
function buildTimeSeries(records, fallbackTimestampMs) {
|
|
38
|
+
const columnSchemas = records?.schema?.column_schemas ?? [];
|
|
39
|
+
const rows = records?.rows ?? [];
|
|
40
|
+
if (!columnSchemas.length || !rows.length) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
const timeIndex = (0, _greptimedbquerydatamodel.findTimeColumnIndex)(columnSchemas);
|
|
44
|
+
if (timeIndex === -1) {
|
|
45
|
+
// Stat-style queries (e.g. `select count(*)`) may return a single numeric column with no timestamp.
|
|
46
|
+
// In this case, emit a synthetic single-point series to keep numeric panels working.
|
|
47
|
+
const scalarValueIndex = columnSchemas.findIndex((c)=>isLikelyNumericType(c.data_type));
|
|
48
|
+
if (scalarValueIndex === -1) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
const scalarColumnName = columnSchemas[scalarValueIndex]?.name ?? 'value';
|
|
52
|
+
const scalarValues = [];
|
|
53
|
+
rows.forEach((row, rowIndex)=>{
|
|
54
|
+
const raw = row?.[scalarValueIndex];
|
|
55
|
+
const value = typeof raw === 'number' ? raw : Number(raw);
|
|
56
|
+
if (!Number.isFinite(value)) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
// Spread multiple rows by 1ms so ordering is stable.
|
|
60
|
+
scalarValues.push([
|
|
61
|
+
fallbackTimestampMs + rowIndex,
|
|
62
|
+
value
|
|
63
|
+
]);
|
|
64
|
+
});
|
|
65
|
+
if (scalarValues.length === 0) {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
name: scalarColumnName,
|
|
71
|
+
labels: {},
|
|
72
|
+
values: scalarValues
|
|
73
|
+
}
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
// Choose a "value" column. Prefer greptime conventions, then fall back to the first numeric column.
|
|
77
|
+
let valueIndex = columnSchemas.findIndex((c, idx)=>idx !== timeIndex && c.name.toLowerCase() === 'greptime_value');
|
|
78
|
+
if (valueIndex === -1) {
|
|
79
|
+
valueIndex = columnSchemas.findIndex((c, idx)=>idx !== timeIndex && c.name.toLowerCase() === 'value');
|
|
80
|
+
}
|
|
81
|
+
if (valueIndex === -1) {
|
|
82
|
+
valueIndex = columnSchemas.findIndex((c, idx)=>idx !== timeIndex && isLikelyNumericType(c.data_type));
|
|
83
|
+
}
|
|
84
|
+
if (valueIndex === -1) {
|
|
85
|
+
// Last resort: treat the first non-time column as value.
|
|
86
|
+
valueIndex = columnSchemas.findIndex((_, idx)=>idx !== timeIndex);
|
|
87
|
+
}
|
|
88
|
+
const valueColumnName = columnSchemas[valueIndex]?.name ?? 'value';
|
|
89
|
+
// Chart-safe default: group rows into standard timeseries (multiple points per series).
|
|
90
|
+
const seriesMap = new Map();
|
|
91
|
+
for (const row of rows){
|
|
92
|
+
const tsMs = (0, _greptimedbquerydatamodel.toTimestampMs)(row?.[timeIndex], columnSchemas[timeIndex]?.data_type);
|
|
93
|
+
if (tsMs === null) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const raw = row?.[valueIndex];
|
|
97
|
+
const value = typeof raw === 'number' ? raw : Number(raw);
|
|
98
|
+
if (!Number.isFinite(value)) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const labels = {};
|
|
102
|
+
columnSchemas.forEach((col, idx)=>{
|
|
103
|
+
if (idx === timeIndex || idx === valueIndex) return;
|
|
104
|
+
const v = row?.[idx];
|
|
105
|
+
labels[col.name] = v === null || v === undefined ? '' : String(v);
|
|
106
|
+
});
|
|
107
|
+
// Stable series key by label set.
|
|
108
|
+
const labelsKey = columnSchemas.filter((_, idx)=>idx !== timeIndex && idx !== valueIndex).map((c)=>`${c.name}=${labels[c.name] ?? ''}`).join('|');
|
|
109
|
+
const key = `${valueColumnName}|${labelsKey}`;
|
|
110
|
+
const existing = seriesMap.get(key);
|
|
111
|
+
if (existing) {
|
|
112
|
+
existing.values.push([
|
|
113
|
+
tsMs,
|
|
114
|
+
value
|
|
115
|
+
]);
|
|
116
|
+
} else {
|
|
117
|
+
seriesMap.set(key, {
|
|
118
|
+
name: buildSeriesName(valueColumnName, labels),
|
|
119
|
+
labels,
|
|
120
|
+
values: [
|
|
121
|
+
[
|
|
122
|
+
tsMs,
|
|
123
|
+
value
|
|
124
|
+
]
|
|
125
|
+
]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return Array.from(seriesMap.values()).filter((s)=>s.values.length > 0);
|
|
130
|
+
}
|
|
131
|
+
function inferStepMsFromSeries(series, fallbackStepMs) {
|
|
132
|
+
let minDeltaMs = Number.POSITIVE_INFINITY;
|
|
133
|
+
for (const s of series){
|
|
134
|
+
const sortedTimestamps = [
|
|
135
|
+
...s.values.map(([ts])=>ts)
|
|
136
|
+
].sort((a, b)=>a - b);
|
|
137
|
+
for(let i = 1; i < sortedTimestamps.length; i++){
|
|
138
|
+
const delta = sortedTimestamps[i] - sortedTimestamps[i - 1];
|
|
139
|
+
if (delta > 0 && delta < minDeltaMs) {
|
|
140
|
+
minDeltaMs = delta;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return Number.isFinite(minDeltaMs) ? minDeltaMs : fallbackStepMs;
|
|
145
|
+
}
|
|
146
|
+
const getTimeSeriesData = async (spec, context)=>{
|
|
147
|
+
if (!spec.query) {
|
|
148
|
+
return {
|
|
149
|
+
series: []
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
const { start, end } = context.timeRange;
|
|
153
|
+
const query = (0, _greptimedbquerydatamodel.replaceQueryVariables)(spec.query, context.variableState, context.timeRange);
|
|
154
|
+
const client = await context.datasourceStore.getDatasourceClient(spec.datasource ?? _constants.DEFAULT_DATASOURCE);
|
|
155
|
+
const response = await client.query({
|
|
156
|
+
start: start.getTime().toString(),
|
|
157
|
+
end: end.getTime().toString(),
|
|
158
|
+
query
|
|
159
|
+
});
|
|
160
|
+
if (response.status === 'error') {
|
|
161
|
+
throw new Error(response.error ?? 'GreptimeDB query failed');
|
|
162
|
+
}
|
|
163
|
+
const records = (0, _greptimedbquerydatamodel.normalizeRecords)(response.data);
|
|
164
|
+
const tableColumns = records?.schema?.column_schemas ?? [];
|
|
165
|
+
const tableRows = records?.rows ?? [];
|
|
166
|
+
const series = buildTimeSeries(records, end.getTime());
|
|
167
|
+
const stepMs = inferStepMsFromSeries(series, context.suggestedStepMs || 30 * 1000);
|
|
168
|
+
return {
|
|
169
|
+
series,
|
|
170
|
+
timeRange: {
|
|
171
|
+
start,
|
|
172
|
+
end
|
|
173
|
+
},
|
|
174
|
+
stepMs,
|
|
175
|
+
metadata: {
|
|
176
|
+
executedQueryString: query,
|
|
177
|
+
records,
|
|
178
|
+
table: {
|
|
179
|
+
columns: tableColumns,
|
|
180
|
+
rows: tableRows
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
_export_star(require("./get-greptimedb-data"), exports);
|
|
18
|
+
_export_star(require("./GreptimeDBQuery"), exports);
|
|
19
|
+
_export_star(require("./GreptimeDBQueryEditor"), exports);
|
|
20
|
+
_export_star(require("./greptimedb-query-types"), exports);
|
|
21
|
+
function _export_star(from, to) {
|
|
22
|
+
Object.keys(from).forEach(function(k) {
|
|
23
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
24
|
+
Object.defineProperty(to, k, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function() {
|
|
27
|
+
return from[k];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
return from;
|
|
33
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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, "GreptimeDBTraceQuery", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return GreptimeDBTraceQuery;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
24
|
+
const _getgreptimedbtracedata = require("./get-greptimedb-trace-data");
|
|
25
|
+
const _GreptimeDBTraceQueryEditor = require("./GreptimeDBTraceQueryEditor");
|
|
26
|
+
const GreptimeDBTraceQuery = {
|
|
27
|
+
getTraceData: _getgreptimedbtracedata.getGreptimeDBTraceData,
|
|
28
|
+
OptionsEditorComponent: _GreptimeDBTraceQueryEditor.GreptimeDBTraceQueryEditor,
|
|
29
|
+
createInitialOptions: ()=>({
|
|
30
|
+
query: ''
|
|
31
|
+
}),
|
|
32
|
+
dependsOn: (spec)=>{
|
|
33
|
+
const queryVariables = (0, _pluginsystem.parseVariables)(spec.query);
|
|
34
|
+
return {
|
|
35
|
+
variables: [
|
|
36
|
+
...new Set(queryVariables)
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
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, "GreptimeDBTraceQueryEditor", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return GreptimeDBTraceQueryEditor;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
const _immer = require("immer");
|
|
26
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
27
|
+
const _react = require("react");
|
|
28
|
+
const _components = require("../../components");
|
|
29
|
+
const _constants = require("../constants");
|
|
30
|
+
const _queryeditormodel = require("../query-editor-model");
|
|
31
|
+
function GreptimeDBTraceQueryEditor(props) {
|
|
32
|
+
const { onChange, value } = props;
|
|
33
|
+
const { datasource } = value;
|
|
34
|
+
const selectedDatasource = datasource ?? _constants.DEFAULT_DATASOURCE;
|
|
35
|
+
const { query, handleQueryChange, handleQueryBlur } = (0, _queryeditormodel.useQueryState)(props);
|
|
36
|
+
const handleDatasourceChange = (newDatasourceSelection)=>{
|
|
37
|
+
if (!(0, _pluginsystem.isVariableDatasource)(newDatasourceSelection) && newDatasourceSelection.kind === _constants.DATASOURCE_KIND) {
|
|
38
|
+
onChange((0, _immer.produce)(value, (draft)=>{
|
|
39
|
+
draft.datasource = newDatasourceSelection;
|
|
40
|
+
}));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
throw new Error('Got unexpected non GreptimeDB datasource selection');
|
|
44
|
+
};
|
|
45
|
+
const handleQueryExecute = (queryValue)=>{
|
|
46
|
+
onChange((0, _immer.produce)(value, (draft)=>{
|
|
47
|
+
draft.query = queryValue;
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
const handleGreptimeDBQueryChange = (0, _react.useCallback)((next)=>{
|
|
51
|
+
handleQueryChange(next);
|
|
52
|
+
}, [
|
|
53
|
+
handleQueryChange
|
|
54
|
+
]);
|
|
55
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
56
|
+
spacing: 1.5,
|
|
57
|
+
children: [
|
|
58
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
|
|
59
|
+
datasourcePluginKind: _constants.DATASOURCE_KIND,
|
|
60
|
+
value: selectedDatasource,
|
|
61
|
+
onChange: handleDatasourceChange,
|
|
62
|
+
label: "GreptimeDB Datasource",
|
|
63
|
+
notched: true
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.GreptimeDBQLEditor, {
|
|
66
|
+
value: query,
|
|
67
|
+
onChange: handleGreptimeDBQueryChange,
|
|
68
|
+
onBlur: handleQueryBlur,
|
|
69
|
+
onKeyDown: (event)=>{
|
|
70
|
+
if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
handleQueryExecute(query);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
placeholder: "Enter SQL for trace search or trace details"
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
});
|
|
79
|
+
}
|