@perses-dev/greptimedb-plugin 0.1.0 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mf/js/{GreptimeDB.d666b53a.js → GreptimeDB.f1e3a072.js} +4 -4
- package/__mf/js/async/121.caec175a.js +2 -0
- package/__mf/js/async/181.d4d87a1f.js +2 -0
- package/__mf/js/async/186.c1dea752.js +102 -0
- package/__mf/js/async/192.b9279059.js +1 -0
- package/__mf/js/async/2.dbc0a9c4.js +1 -0
- package/__mf/js/async/235.7a774edc.js +1 -0
- package/__mf/js/async/274.d5a294d9.js +2 -0
- package/__mf/js/async/356.21b667a3.js +1 -0
- package/__mf/js/async/392.201e515e.js +2 -0
- package/__mf/js/async/43.ebbb8652.js +2 -0
- package/__mf/js/async/440.f6c55d74.js +2 -0
- package/__mf/js/async/45.04388bc3.js +1 -0
- package/__mf/js/async/470.f896cf06.js +2 -0
- package/__mf/js/async/496.91780bef.js +1 -0
- package/__mf/js/async/529.6c76a9cd.js +43 -0
- package/__mf/js/async/{1589.a4d4fad9.js.LICENSE.txt → 529.6c76a9cd.js.LICENSE.txt} +41 -1
- package/__mf/js/async/562.15460f81.js +2 -0
- package/__mf/js/async/587.445bbdb5.js +1 -0
- package/__mf/js/async/588.2c301420.js +1 -0
- package/__mf/js/async/616.ef1089bf.js +1 -0
- package/__mf/js/async/628.6ea4a812.js +3 -0
- package/__mf/js/async/71.9f52cdd7.js +1 -0
- package/__mf/js/async/77.51ac6fa8.js +1 -0
- package/__mf/js/async/862.d29af04f.js +2 -0
- package/__mf/js/async/873.d5028ea7.js +1 -0
- package/__mf/js/async/941.6221d54d.js +2 -0
- package/__mf/js/async/944.89173f4a.js +10 -0
- package/__mf/js/async/968.6f0ebddf.js +1 -0
- package/__mf/js/async/978.4589faec.js +1 -0
- package/__mf/js/async/__federation_expose_GreptimeDBDatasource.ec9b176f.js +2 -0
- package/__mf/js/async/__federation_expose_GreptimeDBLogQuery.96bef921.js +21 -0
- package/__mf/js/async/__federation_expose_GreptimeDBTimeSeriesQuery.f4171877.js +21 -0
- package/__mf/js/async/__federation_expose_GreptimeDBTraceQuery.e0ffd686.js +21 -0
- package/__mf/js/{main.7dfdd439.js → main.993845fa.js} +3 -3
- package/lib/bootstrap.js +2 -2
- package/lib/components/GreptimeDBQLEditor.d.ts +2 -2
- package/lib/components/GreptimeDBQLEditor.d.ts.map +1 -1
- package/lib/components/GreptimeDBQLEditor.js +3 -3
- package/lib/components/GreptimeDBQLEditor.js.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/index.js.map +1 -1
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.d.ts +2 -2
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.d.ts.map +1 -1
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.js +4 -4
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasource.js.map +1 -1
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.d.ts +2 -2
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.d.ts.map +1 -1
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js +1 -1
- package/lib/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js.map +1 -1
- package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.d.ts +4 -4
- package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.d.ts.map +1 -1
- package/lib/datasources/greptimedb-datasource/greptimedb-datasource-types.js.map +1 -1
- package/lib/datasources/greptimedb-datasource/index.js +3 -3
- package/lib/datasources/greptimedb-datasource/index.js.map +1 -1
- package/lib/datasources/index.js +1 -1
- package/lib/datasources/index.js.map +1 -1
- package/lib/getPluginModule.d.ts +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +3 -1
- package/lib/getPluginModule.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/model/greptimedb-client.d.ts +3 -3
- package/lib/model/greptimedb-client.d.ts.map +1 -1
- package/lib/model/greptimedb-client.js +4 -2
- package/lib/model/greptimedb-client.js.map +1 -1
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.d.ts +2 -2
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.d.ts.map +1 -1
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.js +4 -6
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQuery.js.map +1 -1
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.d.ts +3 -3
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.d.ts.map +1 -1
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js +8 -8
- package/lib/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js.map +1 -1
- package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.d.ts +2 -2
- package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.d.ts.map +1 -1
- package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.js +2 -2
- package/lib/queries/greptimedb-log-query/get-greptimedb-log-data.js.map +1 -1
- package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.d.ts +1 -1
- package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.d.ts.map +1 -1
- package/lib/queries/greptimedb-log-query/greptimedb-log-query-types.js.map +1 -1
- package/lib/queries/greptimedb-log-query/index.js +4 -4
- package/lib/queries/greptimedb-log-query/index.js.map +1 -1
- package/lib/queries/greptimedb-log-query/log-query-plugin-interface.d.ts +2 -2
- package/lib/queries/greptimedb-log-query/log-query-plugin-interface.d.ts.map +1 -1
- package/lib/queries/greptimedb-log-query/log-query-plugin-interface.js.map +1 -1
- package/lib/queries/greptimedb-query-data-model.d.ts +3 -3
- package/lib/queries/greptimedb-query-data-model.d.ts.map +1 -1
- package/lib/queries/greptimedb-query-data-model.js +4 -4
- package/lib/queries/greptimedb-query-data-model.js.map +1 -1
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.d.ts +2 -2
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.d.ts.map +1 -1
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.js +4 -6
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQuery.js.map +1 -1
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.d.ts +3 -3
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.d.ts.map +1 -1
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js +8 -8
- package/lib/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js.map +1 -1
- package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.d.ts +2 -2
- package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.d.ts.map +1 -1
- package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.js +3 -5
- package/lib/queries/greptimedb-time-series-query/get-greptimedb-data.js.map +1 -1
- package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.d.ts +1 -1
- package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.d.ts.map +1 -1
- package/lib/queries/greptimedb-time-series-query/greptimedb-query-types.js.map +1 -1
- package/lib/queries/greptimedb-time-series-query/index.js +4 -4
- package/lib/queries/greptimedb-time-series-query/index.js.map +1 -1
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.d.ts +2 -2
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.d.ts.map +1 -1
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js +3 -3
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js.map +1 -1
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.d.ts +3 -3
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.d.ts.map +1 -1
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js +7 -7
- package/lib/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js.map +1 -1
- package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.d.ts +2 -2
- package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.d.ts.map +1 -1
- package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.js +6 -6
- package/lib/queries/greptimedb-trace-query/get-greptimedb-trace-data.js.map +1 -1
- package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.d.ts +1 -1
- package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.d.ts.map +1 -1
- package/lib/queries/greptimedb-trace-query/greptimedb-trace-query-types.js.map +1 -1
- package/lib/queries/greptimedb-trace-query/index.js +4 -4
- package/lib/queries/greptimedb-trace-query/index.js.map +1 -1
- package/lib/queries/index.js +3 -3
- package/lib/queries/index.js.map +1 -1
- package/lib/queries/query-editor-model.js +2 -2
- package/lib/queries/query-editor-model.js.map +1 -1
- package/lib/setup-tests.d.ts +1 -1
- package/lib/setup-tests.d.ts.map +1 -1
- package/lib/setup-tests.js +2 -2
- package/lib/setup-tests.js.map +1 -1
- package/mf-manifest.json +68 -100
- package/mf-stats.json +68 -104
- package/package.json +20 -12
- package/__mf/js/async/1589.a4d4fad9.js +0 -2
- package/__mf/js/async/1616.d071703e.js +0 -1
- package/__mf/js/async/2043.e37a8242.js +0 -2
- package/__mf/js/async/2386.84002e8c.js +0 -2
- package/__mf/js/async/3181.9e8e9ef5.js +0 -2
- package/__mf/js/async/392.614cab68.js +0 -2
- package/__mf/js/async/3944.f35af5a7.js +0 -10
- package/__mf/js/async/3981.66746f5c.js +0 -3
- package/__mf/js/async/4121.f8820bd7.js +0 -2
- package/__mf/js/async/4233.a3ff3ed2.js +0 -7
- package/__mf/js/async/4233.a3ff3ed2.js.LICENSE.txt +0 -39
- package/__mf/js/async/4475.52c68e1f.js +0 -101
- package/__mf/js/async/5002.ff5efed5.js +0 -1
- package/__mf/js/async/5071.72c3afda.js +0 -1
- package/__mf/js/async/5440.f8cb71c0.js +0 -2
- package/__mf/js/async/5481.0c2e941f.js +0 -2
- package/__mf/js/async/5562.fc9fccc9.js +0 -2
- package/__mf/js/async/5587.82a12128.js +0 -1
- package/__mf/js/async/6045.2b2dd0f6.js +0 -1
- package/__mf/js/async/6274.b682460a.js +0 -2
- package/__mf/js/async/629.e085c447.js +0 -1
- package/__mf/js/async/7177.746de250.js +0 -1
- package/__mf/js/async/7192.8effb0f3.js +0 -1
- package/__mf/js/async/7968.d3024d8d.js +0 -1
- package/__mf/js/async/7978.f72fcb59.js +0 -1
- package/__mf/js/async/7984.802dfa3c.js +0 -22
- package/__mf/js/async/7984.802dfa3c.js.LICENSE.txt +0 -19
- package/__mf/js/async/8356.42f66891.js +0 -1
- package/__mf/js/async/8470.8d2d3f35.js +0 -2
- package/__mf/js/async/873.9041549c.js +0 -1
- package/__mf/js/async/9235.8d75321e.js +0 -1
- package/__mf/js/async/941.6703c1a7.js +0 -2
- package/__mf/js/async/9558.97ad4633.js +0 -1
- package/__mf/js/async/9588.925f1ab4.js +0 -1
- package/__mf/js/async/9877.a7b7fb44.js +0 -38
- package/__mf/js/async/__federation_expose_GreptimeDBDatasource.7d12e7b8.js +0 -2
- package/__mf/js/async/__federation_expose_GreptimeDBLogQuery.f7fa9b26.js +0 -21
- package/__mf/js/async/__federation_expose_GreptimeDBTimeSeriesQuery.867c743e.js +0 -21
- package/__mf/js/async/__federation_expose_GreptimeDBTraceQuery.a1f7328d.js +0 -21
- package/__mf/js/async/__federation_expose_GreptimeDBTraceQuery.a1f7328d.js.LICENSE.txt +0 -9
- package/lib/cjs/bootstrap.js +0 -26
- package/lib/cjs/components/GreptimeDBQLEditor.js +0 -72
- package/lib/cjs/components/constants.js +0 -42
- package/lib/cjs/components/index.js +0 -31
- package/lib/cjs/datasources/greptimedb-datasource/GreptimeDBDatasource.js +0 -53
- package/lib/cjs/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.js +0 -51
- package/lib/cjs/datasources/greptimedb-datasource/greptimedb-datasource-types.js +0 -16
- package/lib/cjs/datasources/greptimedb-datasource/index.js +0 -32
- package/lib/cjs/datasources/index.js +0 -30
- package/lib/cjs/env.d.js +0 -14
- package/lib/cjs/getPluginModule.js +0 -39
- package/lib/cjs/index-federation.js +0 -55
- package/lib/cjs/index.js +0 -38
- package/lib/cjs/model/greptimedb-client.js +0 -76
- package/lib/cjs/model/greptimedb-data-types.js +0 -16
- package/lib/cjs/queries/constants.js +0 -34
- package/lib/cjs/queries/greptimedb-log-query/GreptimeDBLogQuery.js +0 -43
- package/lib/cjs/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.js +0 -108
- package/lib/cjs/queries/greptimedb-log-query/get-greptimedb-log-data.js +0 -103
- package/lib/cjs/queries/greptimedb-log-query/greptimedb-log-query-types.js +0 -16
- package/lib/cjs/queries/greptimedb-log-query/index.js +0 -33
- package/lib/cjs/queries/greptimedb-log-query/log-query-plugin-interface.js +0 -16
- package/lib/cjs/queries/greptimedb-query-data-model.js +0 -152
- package/lib/cjs/queries/greptimedb-time-series-query/GreptimeDBQuery.js +0 -43
- package/lib/cjs/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.js +0 -107
- package/lib/cjs/queries/greptimedb-time-series-query/get-greptimedb-data.js +0 -184
- package/lib/cjs/queries/greptimedb-time-series-query/greptimedb-query-types.js +0 -16
- package/lib/cjs/queries/greptimedb-time-series-query/index.js +0 -33
- package/lib/cjs/queries/greptimedb-trace-query/GreptimeDBTraceQuery.js +0 -40
- package/lib/cjs/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.js +0 -79
- package/lib/cjs/queries/greptimedb-trace-query/get-greptimedb-trace-data.js +0 -518
- package/lib/cjs/queries/greptimedb-trace-query/greptimedb-trace-query-types.js +0 -16
- package/lib/cjs/queries/greptimedb-trace-query/index.js +0 -33
- package/lib/cjs/queries/greptimedb-trace-query/trace-query-sql.js +0 -25
- package/lib/cjs/queries/index.js +0 -32
- package/lib/cjs/queries/query-editor-model.js +0 -47
- package/lib/cjs/setup-tests.js +0 -19
- /package/__mf/css/async/{4233.85c2cbf6.css → 529.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{4121.f8820bd7.js.LICENSE.txt → 121.caec175a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2386.84002e8c.js.LICENSE.txt → 181.d4d87a1f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6274.b682460a.js.LICENSE.txt → 274.d5a294d9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.614cab68.js.LICENSE.txt → 392.201e515e.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2043.e37a8242.js.LICENSE.txt → 43.ebbb8652.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5440.f8cb71c0.js.LICENSE.txt → 440.f6c55d74.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8470.8d2d3f35.js.LICENSE.txt → 470.f896cf06.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{3181.9e8e9ef5.js.LICENSE.txt → 562.15460f81.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5481.0c2e941f.js.LICENSE.txt → 862.d29af04f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5562.fc9fccc9.js.LICENSE.txt → 941.6221d54d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{3944.f35af5a7.js.LICENSE.txt → 944.89173f4a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.6703c1a7.js.LICENSE.txt → __federation_expose_GreptimeDBDatasource.ec9b176f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_GreptimeDBDatasource.7d12e7b8.js.LICENSE.txt → __federation_expose_GreptimeDBLogQuery.96bef921.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_GreptimeDBLogQuery.f7fa9b26.js.LICENSE.txt → __federation_expose_GreptimeDBTimeSeriesQuery.f4171877.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_GreptimeDBTimeSeriesQuery.867c743e.js.LICENSE.txt → __federation_expose_GreptimeDBTraceQuery.e0ffd686.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GreptimeDBQLEditor.d.ts","sourceRoot":"","sources":["../../../src/components/GreptimeDBQLEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GreptimeDBQLEditor.d.ts","sourceRoot":"","sources":["../../../src/components/GreptimeDBQLEditor.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAyC5E"}
|
|
@@ -11,9 +11,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
14
|
+
import { EditorView } from "@codemirror/view";
|
|
15
|
+
import { InputLabel, Stack, useTheme } from "@mui/material";
|
|
16
|
+
import CodeMirror from "@uiw/react-codemirror";
|
|
17
17
|
export function GreptimeDBQLEditor(props) {
|
|
18
18
|
const theme = useTheme();
|
|
19
19
|
const isDarkMode = theme.palette.mode === 'dark';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/GreptimeDBQLEditor.tsx"],"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
|
|
1
|
+
{"version":3,"sources":["../../../src/components/GreptimeDBQLEditor.tsx"],"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 { EditorView } from '@codemirror/view';\nimport { InputLabel, Stack, useTheme } from '@mui/material';\nimport type { ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport CodeMirror from '@uiw/react-codemirror';\nimport type { ReactElement } from 'react';\n\nexport function GreptimeDBQLEditor(props: ReactCodeMirrorProps): ReactElement {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n return (\n <Stack position=\"relative\">\n <InputLabel\n sx={{\n fontWeight: 500,\n marginBottom: '4px',\n color: theme.palette.text.primary,\n }}\n >\n GreptimeDB SQL Query\n </InputLabel>\n <CodeMirror\n {...props}\n style={{\n border: `1px solid ${theme.palette.divider}`,\n }}\n theme={isDarkMode ? 'dark' : 'light'}\n basicSetup={{\n highlightActiveLine: false,\n highlightActiveLineGutter: false,\n foldGutter: false,\n syntaxHighlighting: true,\n }}\n extensions={[\n EditorView.lineWrapping,\n EditorView.theme({\n '.cm-content': {\n paddingTop: '8px',\n paddingBottom: '8px',\n paddingRight: '40px',\n },\n }),\n ]}\n placeholder=\"Write GreptimeDB SQL Query Here...\"\n />\n </Stack>\n );\n}\n"],"names":["EditorView","InputLabel","Stack","useTheme","CodeMirror","GreptimeDBQLEditor","props","theme","isDarkMode","palette","mode","position","sx","fontWeight","marginBottom","color","text","primary","style","border","divider","basicSetup","highlightActiveLine","highlightActiveLineGutter","foldGutter","syntaxHighlighting","extensions","lineWrapping","paddingTop","paddingBottom","paddingRight","placeholder"],"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,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,UAAU,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,gBAAgB;AAE5D,OAAOC,gBAAgB,wBAAwB;AAG/C,OAAO,SAASC,mBAAmBC,KAA2B;IAC5D,MAAMC,QAAQJ;IACd,MAAMK,aAAaD,MAAME,OAAO,CAACC,IAAI,KAAK;IAE1C,qBACE,MAACR;QAAMS,UAAS;;0BACd,KAACV;gBACCW,IAAI;oBACFC,YAAY;oBACZC,cAAc;oBACdC,OAAOR,MAAME,OAAO,CAACO,IAAI,CAACC,OAAO;gBACnC;0BACD;;0BAGD,KAACb;gBACE,GAAGE,KAAK;gBACTY,OAAO;oBACLC,QAAQ,CAAC,UAAU,EAAEZ,MAAME,OAAO,CAACW,OAAO,EAAE;gBAC9C;gBACAb,OAAOC,aAAa,SAAS;gBAC7Ba,YAAY;oBACVC,qBAAqB;oBACrBC,2BAA2B;oBAC3BC,YAAY;oBACZC,oBAAoB;gBACtB;gBACAC,YAAY;oBACV1B,WAAW2B,YAAY;oBACvB3B,WAAWO,KAAK,CAAC;wBACf,eAAe;4BACbqB,YAAY;4BACZC,eAAe;4BACfC,cAAc;wBAChB;oBACF;iBACD;gBACDC,aAAY;;;;AAIpB"}
|
package/lib/components/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
13
|
+
export * from "./GreptimeDBQLEditor.js";
|
|
14
|
+
export * from "./constants.js";
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/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 './GreptimeDBQLEditor';\nexport * from './constants';\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,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/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 './GreptimeDBQLEditor';\nexport * from './constants';\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,0BAAuB;AACrC,cAAc,iBAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatasourcePlugin } from '@perses-dev/plugin-system';
|
|
2
|
-
import { GreptimeDBDatasourceClient, GreptimeDBDatasourceSpec } from './greptimedb-datasource-types';
|
|
1
|
+
import type { DatasourcePlugin } from '@perses-dev/plugin-system';
|
|
2
|
+
import type { GreptimeDBDatasourceClient, GreptimeDBDatasourceSpec } from './greptimedb-datasource-types';
|
|
3
3
|
export declare const GreptimeDBDatasource: DatasourcePlugin<GreptimeDBDatasourceSpec, GreptimeDBDatasourceClient>;
|
|
4
4
|
//# sourceMappingURL=GreptimeDBDatasource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GreptimeDBDatasource.d.ts","sourceRoot":"","sources":["../../../../src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"GreptimeDBDatasource.d.ts","sourceRoot":"","sources":["../../../../src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,KAAK,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAmC1G,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,wBAAwB,EAAE,0BAA0B,CAIvG,CAAC"}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { greptimedbQuery } from
|
|
14
|
-
import { GreptimeDBDatasourceEditor } from
|
|
13
|
+
import { greptimedbQuery } from "../../model/greptimedb-client.js";
|
|
14
|
+
import { GreptimeDBDatasourceEditor } from "./GreptimeDBDatasourceEditor.js";
|
|
15
15
|
const createClient = (spec, options)=>{
|
|
16
16
|
const { directUrl, headers, proxy } = spec;
|
|
17
17
|
const { proxyUrl } = options;
|
|
@@ -21,8 +21,8 @@ const createClient = (spec, options)=>{
|
|
|
21
21
|
}
|
|
22
22
|
// Support directUrl auth headers while keeping backward compatibility with proxy headers.
|
|
23
23
|
const specHeaders = {
|
|
24
|
-
...proxy?.spec.headers
|
|
25
|
-
...headers
|
|
24
|
+
...proxy?.spec.headers,
|
|
25
|
+
...headers
|
|
26
26
|
};
|
|
27
27
|
return {
|
|
28
28
|
options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx"],"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 { DatasourcePlugin } from '@perses-dev/plugin-system';\nimport { greptimedbQuery } from '../../model/greptimedb-client';\nimport { GreptimeDBDatasourceClient, GreptimeDBDatasourceSpec } from './greptimedb-datasource-types';\nimport { GreptimeDBDatasourceEditor } from './GreptimeDBDatasourceEditor';\n\nconst createClient: DatasourcePlugin<GreptimeDBDatasourceSpec, GreptimeDBDatasourceClient>['createClient'] = (\n spec,\n options
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx"],"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 type { DatasourcePlugin } from '@perses-dev/plugin-system';\n\nimport { greptimedbQuery } from '../../model/greptimedb-client';\nimport type { GreptimeDBDatasourceClient, GreptimeDBDatasourceSpec } from './greptimedb-datasource-types';\nimport { GreptimeDBDatasourceEditor } from './GreptimeDBDatasourceEditor';\n\nconst createClient: DatasourcePlugin<GreptimeDBDatasourceSpec, GreptimeDBDatasourceClient>['createClient'] = (\n spec,\n options,\n) => {\n const { directUrl, headers, proxy } = spec;\n const { proxyUrl } = options;\n\n const datasourceUrl = directUrl ?? proxyUrl;\n if (datasourceUrl === undefined) {\n throw new Error(\n 'No URL specified for GreptimeDBDatasource client. You can use directUrl in the spec to configure it.',\n );\n }\n\n // Support directUrl auth headers while keeping backward compatibility with proxy headers.\n const specHeaders = {\n ...proxy?.spec.headers,\n ...headers,\n };\n\n return {\n options: {\n datasourceUrl,\n },\n query: (params, headers) =>\n greptimedbQuery(params, {\n datasourceUrl,\n headers: headers ?? specHeaders,\n }),\n };\n};\n\nexport const GreptimeDBDatasource: DatasourcePlugin<GreptimeDBDatasourceSpec, GreptimeDBDatasourceClient> = {\n createClient,\n OptionsEditorComponent: GreptimeDBDatasourceEditor,\n createInitialOptions: () => ({ directUrl: '' }),\n};\n"],"names":["greptimedbQuery","GreptimeDBDatasourceEditor","createClient","spec","options","directUrl","headers","proxy","proxyUrl","datasourceUrl","undefined","Error","specHeaders","query","params","GreptimeDBDatasource","OptionsEditorComponent","createInitialOptions"],"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,SAASA,eAAe,QAAQ,mCAAgC;AAEhE,SAASC,0BAA0B,QAAQ,kCAA+B;AAE1E,MAAMC,eAAuG,CAC3GC,MACAC;IAEA,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAGJ;IACtC,MAAM,EAAEK,QAAQ,EAAE,GAAGJ;IAErB,MAAMK,gBAAgBJ,aAAaG;IACnC,IAAIC,kBAAkBC,WAAW;QAC/B,MAAM,IAAIC,MACR;IAEJ;IAEA,0FAA0F;IAC1F,MAAMC,cAAc;QAClB,GAAGL,OAAOJ,KAAKG,OAAO;QACtB,GAAGA,OAAO;IACZ;IAEA,OAAO;QACLF,SAAS;YACPK;QACF;QACAI,OAAO,CAACC,QAAQR,UACdN,gBAAgBc,QAAQ;gBACtBL;gBACAH,SAASA,WAAWM;YACtB;IACJ;AACF;AAEA,OAAO,MAAMG,uBAA+F;IAC1Gb;IACAc,wBAAwBf;IACxBgB,sBAAsB,IAAO,CAAA;YAAEZ,WAAW;QAAG,CAAA;AAC/C,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { GreptimeDBDatasourceSpec } from './greptimedb-datasource-types';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { GreptimeDBDatasourceSpec } from './greptimedb-datasource-types';
|
|
3
3
|
export interface GreptimeDBDatasourceEditorProps {
|
|
4
4
|
value: GreptimeDBDatasourceSpec;
|
|
5
5
|
onChange: (next: GreptimeDBDatasourceSpec) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GreptimeDBDatasourceEditor.d.ts","sourceRoot":"","sources":["../../../../src/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GreptimeDBDatasourceEditor.d.ts","sourceRoot":"","sources":["../../../../src/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,wBAAwB,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,YAAY,CA+B/F"}
|
|
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
import { HTTPSettingsEditor } from
|
|
14
|
+
import { HTTPSettingsEditor } from "@perses-dev/plugin-system";
|
|
15
15
|
export function GreptimeDBDatasourceEditor(props) {
|
|
16
16
|
const { value, onChange, isReadonly } = props;
|
|
17
17
|
const initialSpecDirect = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.tsx"],"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 { HTTPSettingsEditor } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { GreptimeDBDatasourceSpec } from './greptimedb-datasource-types';\n\nexport interface GreptimeDBDatasourceEditorProps {\n value: GreptimeDBDatasourceSpec;\n onChange: (next: GreptimeDBDatasourceSpec) => void;\n isReadonly?: boolean;\n}\n\nexport function GreptimeDBDatasourceEditor(props: GreptimeDBDatasourceEditorProps): ReactElement {\n const { value, onChange, isReadonly } = props;\n\n const initialSpecDirect: GreptimeDBDatasourceSpec = {\n directUrl: '',\n };\n\n const initialSpecProxy: GreptimeDBDatasourceSpec = {\n proxy: {\n kind: 'HTTPProxy',\n spec: {\n allowedEndpoints: [\n {\n endpointPattern: '/v1/sql',\n method: 'POST',\n },\n ],\n url: '',\n },\n },\n };\n\n return (\n <HTTPSettingsEditor\n value={value}\n onChange={onChange}\n isReadonly={isReadonly}\n initialSpecDirect={initialSpecDirect}\n initialSpecProxy={initialSpecProxy}\n />\n );\n}\n"],"names":["HTTPSettingsEditor","GreptimeDBDatasourceEditor","props","value","onChange","isReadonly","initialSpecDirect","directUrl","initialSpecProxy","proxy","kind","spec","allowedEndpoints","endpointPattern","method","url"],"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,kBAAkB,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.tsx"],"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 { HTTPSettingsEditor } from '@perses-dev/plugin-system';\nimport type { ReactElement } from 'react';\n\nimport type { GreptimeDBDatasourceSpec } from './greptimedb-datasource-types';\n\nexport interface GreptimeDBDatasourceEditorProps {\n value: GreptimeDBDatasourceSpec;\n onChange: (next: GreptimeDBDatasourceSpec) => void;\n isReadonly?: boolean;\n}\n\nexport function GreptimeDBDatasourceEditor(props: GreptimeDBDatasourceEditorProps): ReactElement {\n const { value, onChange, isReadonly } = props;\n\n const initialSpecDirect: GreptimeDBDatasourceSpec = {\n directUrl: '',\n };\n\n const initialSpecProxy: GreptimeDBDatasourceSpec = {\n proxy: {\n kind: 'HTTPProxy',\n spec: {\n allowedEndpoints: [\n {\n endpointPattern: '/v1/sql',\n method: 'POST',\n },\n ],\n url: '',\n },\n },\n };\n\n return (\n <HTTPSettingsEditor\n value={value}\n onChange={onChange}\n isReadonly={isReadonly}\n initialSpecDirect={initialSpecDirect}\n initialSpecProxy={initialSpecProxy}\n />\n );\n}\n"],"names":["HTTPSettingsEditor","GreptimeDBDatasourceEditor","props","value","onChange","isReadonly","initialSpecDirect","directUrl","initialSpecProxy","proxy","kind","spec","allowedEndpoints","endpointPattern","method","url"],"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,kBAAkB,QAAQ,4BAA4B;AAW/D,OAAO,SAASC,2BAA2BC,KAAsC;IAC/E,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGH;IAExC,MAAMI,oBAA8C;QAClDC,WAAW;IACb;IAEA,MAAMC,mBAA6C;QACjDC,OAAO;YACLC,MAAM;YACNC,MAAM;gBACJC,kBAAkB;oBAChB;wBACEC,iBAAiB;wBACjBC,QAAQ;oBACV;iBACD;gBACDC,KAAK;YACP;QACF;IACF;IAEA,qBACE,KAACf;QACCG,OAAOA;QACPC,UAAUA;QACVC,YAAYA;QACZC,mBAAmBA;QACnBE,kBAAkBA;;AAGxB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { HTTPProxy } from '@perses-dev/spec';
|
|
4
|
-
import { GreptimeDBResponseData } from '../../model/greptimedb-data-types';
|
|
1
|
+
import type { RequestHeaders } from '@perses-dev/client';
|
|
2
|
+
import type { DatasourceClient } from '@perses-dev/plugin-system';
|
|
3
|
+
import type { HTTPProxy } from '@perses-dev/spec';
|
|
4
|
+
import type { GreptimeDBResponseData } from '../../model/greptimedb-data-types';
|
|
5
5
|
export interface GreptimeDBDatasourceSpec {
|
|
6
6
|
directUrl?: string;
|
|
7
7
|
headers?: RequestHeaders;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"greptimedb-datasource-types.d.ts","sourceRoot":"","sources":["../../../../src/datasources/greptimedb-datasource/greptimedb-datasource-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"greptimedb-datasource-types.d.ts","sourceRoot":"","sources":["../../../../src/datasources/greptimedb-datasource/greptimedb-datasource-types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iCAAiC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,OAAO,EAAE,iCAAiC,CAAC;IAC3C,KAAK,CAAC,MAAM,EAAE,gCAAgC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAClH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/greptimedb-datasource/greptimedb-datasource-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 {
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/greptimedb-datasource/greptimedb-datasource-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 type { RequestHeaders } from '@perses-dev/client';\nimport type { DatasourceClient } from '@perses-dev/plugin-system';\nimport type { HTTPProxy } from '@perses-dev/spec';\n\nimport type { GreptimeDBResponseData } from '../../model/greptimedb-data-types';\n\nexport interface GreptimeDBDatasourceSpec {\n directUrl?: string;\n headers?: RequestHeaders;\n proxy?: HTTPProxy;\n}\n\nexport interface GreptimeDBQueryRequestParameters {\n query: string;\n start?: string;\n end?: string;\n}\n\ninterface GreptimeDBDatasourceClientOptions {\n datasourceUrl: string;\n headers?: RequestHeaders;\n}\n\nexport interface GreptimeDBDatasourceResponse {\n status: 'success' | 'error';\n data: GreptimeDBResponseData;\n error?: string;\n}\n\nexport interface GreptimeDBDatasourceClient extends DatasourceClient {\n options: GreptimeDBDatasourceClientOptions;\n query(params: GreptimeDBQueryRequestParameters, headers?: RequestHeaders): Promise<GreptimeDBDatasourceResponse>;\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;AA+BjC,WAGC"}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
13
|
+
export * from "./GreptimeDBDatasource.js";
|
|
14
|
+
export * from "./GreptimeDBDatasourceEditor.js";
|
|
15
|
+
export * from "./greptimedb-datasource-types.js";
|
|
16
16
|
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/greptimedb-datasource/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 './GreptimeDBDatasource';\nexport * from './GreptimeDBDatasourceEditor';\nexport * from './greptimedb-datasource-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,
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/greptimedb-datasource/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 './GreptimeDBDatasource';\nexport * from './GreptimeDBDatasourceEditor';\nexport * from './greptimedb-datasource-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,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,mCAAgC"}
|
package/lib/datasources/index.js
CHANGED
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
13
|
+
export * from "./greptimedb-datasource/index.js";
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/datasources/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-datasource';\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,
|
|
1
|
+
{"version":3,"sources":["../../../src/datasources/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-datasource';\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,mCAA0B"}
|
package/lib/getPluginModule.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAIxF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
|
package/lib/getPluginModule.js
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import packageJson from
|
|
13
|
+
import packageJson from "../package.json" with {
|
|
14
|
+
type: 'json'
|
|
15
|
+
};
|
|
14
16
|
/**
|
|
15
17
|
* Returns the plugin module information from package.json
|
|
16
18
|
*/ export function getPluginModule() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/getPluginModule.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 { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"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;
|
|
1
|
+
{"version":3,"sources":["../../src/getPluginModule.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 type { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\n\nimport packageJson from '../package.json' with { type: 'json' };\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","type","getPluginModule","name","version","perses","kind","metadata","spec"],"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,OAAOA,iBAAiB,uBAAuB;IAAEC,MAAM;AAAO,EAAE;AAEhE;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGL;IAClC,OAAO;QACLM,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
|
package/lib/index-federation.js
CHANGED
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import(
|
|
13
|
+
import("./bootstrap.js");
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=index-federation.js.map
|
package/lib/index.js
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export { getPluginModule } from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
13
|
+
export { getPluginModule } from "./getPluginModule.js";
|
|
14
|
+
export * from "./queries/index.js";
|
|
15
|
+
export * from "./datasources/index.js";
|
|
16
16
|
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/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 { getPluginModule } from './getPluginModule';\nexport * from './queries';\nexport * from './datasources';\n"],"names":["getPluginModule"],"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,eAAe,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../../src/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 { getPluginModule } from './getPluginModule';\nexport * from './queries';\nexport * from './datasources';\n"],"names":["getPluginModule"],"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,eAAe,QAAQ,uBAAoB;AACpD,cAAc,qBAAY;AAC1B,cAAc,yBAAgB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RequestHeaders } from '@perses-dev/client';
|
|
2
|
-
import { GreptimeDBDatasourceResponse, GreptimeDBQueryRequestParameters } from '../datasources/greptimedb-datasource';
|
|
3
|
-
import { GreptimeDBResponseData } from './greptimedb-data-types';
|
|
1
|
+
import type { RequestHeaders } from '@perses-dev/client';
|
|
2
|
+
import type { GreptimeDBDatasourceResponse, GreptimeDBQueryRequestParameters } from '../datasources/greptimedb-datasource';
|
|
3
|
+
import type { GreptimeDBResponseData } from './greptimedb-data-types';
|
|
4
4
|
export interface GreptimeDBQueryOptions {
|
|
5
5
|
datasourceUrl: string;
|
|
6
6
|
headers?: RequestHeaders;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"greptimedb-client.d.ts","sourceRoot":"","sources":["../../../src/model/greptimedb-client.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"greptimedb-client.d.ts","sourceRoot":"","sources":["../../../src/model/greptimedb-client.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EACV,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,CAAC,MAAM,EAAE,gCAAgC,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACvF;AAYD,wBAAsB,eAAe,CACnC,MAAM,EAAE,gCAAgC,EACxC,YAAY,EAAE,sBAAsB,GACnC,OAAO,CAAC,4BAA4B,CAAC,CAwCvC"}
|
|
@@ -29,7 +29,7 @@ export async function greptimedbQuery(params, queryOptions) {
|
|
|
29
29
|
method: 'POST',
|
|
30
30
|
headers: {
|
|
31
31
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
32
|
-
...headers
|
|
32
|
+
...headers
|
|
33
33
|
},
|
|
34
34
|
body: new URLSearchParams({
|
|
35
35
|
sql: params.query
|
|
@@ -54,7 +54,9 @@ export async function greptimedbQuery(params, queryOptions) {
|
|
|
54
54
|
data: body
|
|
55
55
|
};
|
|
56
56
|
} catch (e) {
|
|
57
|
-
throw new Error(`GreptimeDB query failed: ${e}
|
|
57
|
+
throw new Error(`GreptimeDB query failed: ${e}`, {
|
|
58
|
+
cause: e
|
|
59
|
+
});
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
function buildSqlUrl(datasourceUrl) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/model/greptimedb-client.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 { RequestHeaders } from '@perses-dev/client';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/model/greptimedb-client.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 type { RequestHeaders } from '@perses-dev/client';\n\nimport type {\n GreptimeDBDatasourceResponse,\n GreptimeDBQueryRequestParameters,\n} from '../datasources/greptimedb-datasource';\nimport type { GreptimeDBResponseData } from './greptimedb-data-types';\n\nexport interface GreptimeDBQueryOptions {\n datasourceUrl: string;\n headers?: RequestHeaders;\n}\n\nexport interface GreptimeDBQueryResponse {\n status: 'success' | 'error';\n data: GreptimeDBResponseData;\n error?: string;\n}\n\nexport interface GreptimeDBClient {\n query: (params: GreptimeDBQueryRequestParameters) => Promise<GreptimeDBQueryResponse>;\n}\n\nasync function readErrorResponse(response: Response): Promise<string> {\n const contentType = response.headers?.get('content-type');\n if (contentType && contentType.includes('application/json')) {\n const errorJson = await response.json();\n return `GreptimeDB error: ${response.status} ${response.statusText} - ${JSON.stringify(errorJson)}`;\n }\n const errorText = await response.text();\n return `GreptimeDB error: ${response.status} ${response.statusText} - ${errorText}`;\n}\n\nexport async function greptimedbQuery(\n params: GreptimeDBQueryRequestParameters,\n queryOptions: GreptimeDBQueryOptions,\n): Promise<GreptimeDBDatasourceResponse> {\n const { datasourceUrl, headers } = queryOptions;\n const url = buildSqlUrl(datasourceUrl);\n\n if (!params.query) {\n throw new Error('No query provided in params');\n }\n\n const init: RequestInit = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n ...headers,\n },\n body: new URLSearchParams({\n sql: params.query,\n }).toString(),\n };\n\n try {\n const response = await fetch(url.toString(), init);\n if (!response.ok) {\n const errorMessage = await readErrorResponse(response);\n console.error('GreptimeDB error response:', errorMessage);\n return {\n status: 'error',\n data: { output: [] },\n error: errorMessage,\n };\n }\n\n const body = await response.json();\n\n return {\n status: body?.status ?? 'success',\n data: body,\n };\n } catch (e) {\n throw new Error(`GreptimeDB query failed: ${e}`, { cause: e });\n }\n}\n\nfunction buildSqlUrl(datasourceUrl: string): URL {\n const base = datasourceUrl.endsWith('/') ? `${datasourceUrl}v1/sql` : `${datasourceUrl}/v1/sql`;\n\n if (base.startsWith('http://') || base.startsWith('https://')) {\n return new URL(base);\n }\n\n return new URL(base, window.location.origin);\n}\n"],"names":["readErrorResponse","response","contentType","headers","get","includes","errorJson","json","status","statusText","JSON","stringify","errorText","text","greptimedbQuery","params","queryOptions","datasourceUrl","url","buildSqlUrl","query","Error","init","method","body","URLSearchParams","sql","toString","fetch","ok","errorMessage","console","error","data","output","e","cause","base","endsWith","startsWith","URL","window","location","origin"],"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;AAyBjC,eAAeA,kBAAkBC,QAAkB;IACjD,MAAMC,cAAcD,SAASE,OAAO,EAAEC,IAAI;IAC1C,IAAIF,eAAeA,YAAYG,QAAQ,CAAC,qBAAqB;QAC3D,MAAMC,YAAY,MAAML,SAASM,IAAI;QACrC,OAAO,CAAC,kBAAkB,EAAEN,SAASO,MAAM,CAAC,CAAC,EAAEP,SAASQ,UAAU,CAAC,GAAG,EAAEC,KAAKC,SAAS,CAACL,YAAY;IACrG;IACA,MAAMM,YAAY,MAAMX,SAASY,IAAI;IACrC,OAAO,CAAC,kBAAkB,EAAEZ,SAASO,MAAM,CAAC,CAAC,EAAEP,SAASQ,UAAU,CAAC,GAAG,EAAEG,WAAW;AACrF;AAEA,OAAO,eAAeE,gBACpBC,MAAwC,EACxCC,YAAoC;IAEpC,MAAM,EAAEC,aAAa,EAAEd,OAAO,EAAE,GAAGa;IACnC,MAAME,MAAMC,YAAYF;IAExB,IAAI,CAACF,OAAOK,KAAK,EAAE;QACjB,MAAM,IAAIC,MAAM;IAClB;IAEA,MAAMC,OAAoB;QACxBC,QAAQ;QACRpB,SAAS;YACP,gBAAgB;YAChB,GAAGA,OAAO;QACZ;QACAqB,MAAM,IAAIC,gBAAgB;YACxBC,KAAKX,OAAOK,KAAK;QACnB,GAAGO,QAAQ;IACb;IAEA,IAAI;QACF,MAAM1B,WAAW,MAAM2B,MAAMV,IAAIS,QAAQ,IAAIL;QAC7C,IAAI,CAACrB,SAAS4B,EAAE,EAAE;YAChB,MAAMC,eAAe,MAAM9B,kBAAkBC;YAC7C8B,QAAQC,KAAK,CAAC,8BAA8BF;YAC5C,OAAO;gBACLtB,QAAQ;gBACRyB,MAAM;oBAAEC,QAAQ,EAAE;gBAAC;gBACnBF,OAAOF;YACT;QACF;QAEA,MAAMN,OAAO,MAAMvB,SAASM,IAAI;QAEhC,OAAO;YACLC,QAAQgB,MAAMhB,UAAU;YACxByB,MAAMT;QACR;IACF,EAAE,OAAOW,GAAG;QACV,MAAM,IAAId,MAAM,CAAC,yBAAyB,EAAEc,GAAG,EAAE;YAAEC,OAAOD;QAAE;IAC9D;AACF;AAEA,SAAShB,YAAYF,aAAqB;IACxC,MAAMoB,OAAOpB,cAAcqB,QAAQ,CAAC,OAAO,GAAGrB,cAAc,MAAM,CAAC,GAAG,GAAGA,cAAc,OAAO,CAAC;IAE/F,IAAIoB,KAAKE,UAAU,CAAC,cAAcF,KAAKE,UAAU,CAAC,aAAa;QAC7D,OAAO,IAAIC,IAAIH;IACjB;IAEA,OAAO,IAAIG,IAAIH,MAAMI,OAAOC,QAAQ,CAACC,MAAM;AAC7C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types';
|
|
2
|
-
import { LogQueryPlugin } from './log-query-plugin-interface';
|
|
1
|
+
import type { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types';
|
|
2
|
+
import type { LogQueryPlugin } from './log-query-plugin-interface';
|
|
3
3
|
export declare const GreptimeDBLogQuery: LogQueryPlugin<GreptimeDBLogQuerySpec>;
|
|
4
4
|
//# sourceMappingURL=GreptimeDBLogQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GreptimeDBLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-log-query/GreptimeDBLogQuery.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GreptimeDBLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-log-query/GreptimeDBLogQuery.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,sBAAsB,CAarE,CAAC"}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { parseVariables } from
|
|
14
|
-
import { getGreptimeDBLogData } from
|
|
15
|
-
import { GreptimeDBLogQueryEditor } from
|
|
13
|
+
import { parseVariables } from "@perses-dev/plugin-system";
|
|
14
|
+
import { getGreptimeDBLogData } from "./get-greptimedb-log-data.js";
|
|
15
|
+
import { GreptimeDBLogQueryEditor } from "./GreptimeDBLogQueryEditor.js";
|
|
16
16
|
export const GreptimeDBLogQuery = {
|
|
17
17
|
getLogData: getGreptimeDBLogData,
|
|
18
18
|
OptionsEditorComponent: GreptimeDBLogQueryEditor,
|
|
@@ -22,9 +22,7 @@ export const GreptimeDBLogQuery = {
|
|
|
22
22
|
dependsOn: (spec)=>{
|
|
23
23
|
const queryVariables = parseVariables(spec.query);
|
|
24
24
|
const allVariables = [
|
|
25
|
-
...new Set(
|
|
26
|
-
...queryVariables
|
|
27
|
-
])
|
|
25
|
+
...new Set(queryVariables)
|
|
28
26
|
];
|
|
29
27
|
return {
|
|
30
28
|
variables: allVariables
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/queries/greptimedb-log-query/GreptimeDBLogQuery.tsx"],"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 { parseVariables } from '@perses-dev/plugin-system';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/queries/greptimedb-log-query/GreptimeDBLogQuery.tsx"],"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 { parseVariables } from '@perses-dev/plugin-system';\n\nimport { getGreptimeDBLogData } from './get-greptimedb-log-data';\nimport type { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types';\nimport { GreptimeDBLogQueryEditor } from './GreptimeDBLogQueryEditor';\nimport type { LogQueryPlugin } from './log-query-plugin-interface';\n\nexport const GreptimeDBLogQuery: LogQueryPlugin<GreptimeDBLogQuerySpec> = {\n getLogData: getGreptimeDBLogData,\n OptionsEditorComponent: GreptimeDBLogQueryEditor,\n createInitialOptions: () => ({\n query: '',\n }),\n dependsOn: (spec) => {\n const queryVariables = parseVariables(spec.query);\n const allVariables = [...new Set(queryVariables)];\n return {\n variables: allVariables,\n };\n },\n};\n"],"names":["parseVariables","getGreptimeDBLogData","GreptimeDBLogQueryEditor","GreptimeDBLogQuery","getLogData","OptionsEditorComponent","createInitialOptions","query","dependsOn","spec","queryVariables","allVariables","Set","variables"],"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,cAAc,QAAQ,4BAA4B;AAE3D,SAASC,oBAAoB,QAAQ,+BAA4B;AAEjE,SAASC,wBAAwB,QAAQ,gCAA6B;AAGtE,OAAO,MAAMC,qBAA6D;IACxEC,YAAYH;IACZI,wBAAwBH;IACxBI,sBAAsB,IAAO,CAAA;YAC3BC,OAAO;QACT,CAAA;IACAC,WAAW,CAACC;QACV,MAAMC,iBAAiBV,eAAeS,KAAKF,KAAK;QAChD,MAAMI,eAAe;eAAI,IAAIC,IAAIF;SAAgB;QACjD,OAAO;YACLG,WAAWF;QACb;IACF;AACF,EAAE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
import { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types';
|
|
1
|
+
import type { OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types';
|
|
4
4
|
type GreptimeDBLogQueryEditorProps = OptionsEditorProps<GreptimeDBLogQuerySpec>;
|
|
5
5
|
export declare function GreptimeDBLogQueryEditor(props: GreptimeDBLogQueryEditorProps): ReactElement;
|
|
6
6
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GreptimeDBLogQueryEditor.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GreptimeDBLogQueryEditor.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAyB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,KAAK,6BAA6B,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAEhF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,GAAG,YAAY,CAkF3F"}
|
|
@@ -11,14 +11,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { produce } from
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { useQueryState } from
|
|
14
|
+
import { Stack, useTheme } from "@mui/material";
|
|
15
|
+
import { DatasourceSelect, isVariableDatasource } from "@perses-dev/plugin-system";
|
|
16
|
+
import { produce } from "immer";
|
|
17
|
+
import { useCallback } from "react";
|
|
18
|
+
import { GreptimeDBQLEditor } from "../../components/index.js";
|
|
19
|
+
import { queryExample } from "../../components/constants.js";
|
|
20
|
+
import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from "../constants.js";
|
|
21
|
+
import { useQueryState } from "../query-editor-model.js";
|
|
22
22
|
export function GreptimeDBLogQueryEditor(props) {
|
|
23
23
|
const theme = useTheme();
|
|
24
24
|
const { onChange, value } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx"],"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 {
|
|
1
|
+
{"version":3,"sources":["../../../../src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx"],"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 { Stack, useTheme } from '@mui/material';\nimport type { DatasourceSelectProps, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { DatasourceSelect, isVariableDatasource } from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport type { ReactElement } from 'react';\nimport { useCallback } from 'react';\n\nimport { GreptimeDBQLEditor } from '../../components';\nimport { queryExample } from '../../components/constants';\nimport { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants';\nimport { useQueryState } from '../query-editor-model';\nimport type { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types';\n\ntype GreptimeDBLogQueryEditorProps = OptionsEditorProps<GreptimeDBLogQuerySpec>;\n\nexport function GreptimeDBLogQueryEditor(props: GreptimeDBLogQueryEditorProps): ReactElement {\n const theme = useTheme();\n const { onChange, value } = props;\n const { datasource } = value;\n\n const selectedDatasource = datasource ?? DEFAULT_DATASOURCE;\n const { query, handleQueryChange, handleQueryBlur } = useQueryState(props);\n\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = (newDatasourceSelection) => {\n if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) {\n onChange(\n produce(value, (draft) => {\n draft.datasource = newDatasourceSelection;\n }),\n );\n return;\n }\n throw new Error('Got unexpected non GreptimeDB datasource selection');\n };\n\n const handleQueryExecute = (queryValue: string): void => {\n onChange(\n produce(value, (draft) => {\n draft.query = queryValue;\n }),\n );\n };\n\n const handleGreptimeDBQueryChange = useCallback(\n (e: string) => {\n handleQueryChange(e);\n },\n [handleQueryChange],\n );\n\n const examplesStyle = {\n fontSize: '11px',\n color: theme.palette.text.secondary,\n backgroundColor: theme.palette.background.code,\n padding: '8px',\n borderRadius: '4px',\n fontFamily: 'Monaco, Menlo, \"Ubuntu Mono\", monospace',\n whiteSpace: 'pre-wrap' as const,\n lineHeight: '1.3',\n };\n\n return (\n <Stack spacing={1.5}>\n <DatasourceSelect\n datasourcePluginKind={DATASOURCE_KIND}\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n label=\"GreptimeDB Datasource\"\n notched\n />\n <GreptimeDBQLEditor\n value={query}\n onChange={handleGreptimeDBQueryChange}\n onBlur={handleQueryBlur}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n handleQueryExecute(query);\n }\n }}\n placeholder=\"Enter GreptimeDB SQL query\"\n />\n <details>\n <summary\n style={{\n cursor: 'pointer',\n fontSize: '12px',\n color: theme.palette.text.secondary,\n marginBottom: '8px',\n }}\n >\n Query Examples\n </summary>\n <div style={examplesStyle}>{queryExample}</div>\n </details>\n </Stack>\n );\n}\n"],"names":["Stack","useTheme","DatasourceSelect","isVariableDatasource","produce","useCallback","GreptimeDBQLEditor","queryExample","DATASOURCE_KIND","DEFAULT_DATASOURCE","useQueryState","GreptimeDBLogQueryEditor","props","theme","onChange","value","datasource","selectedDatasource","query","handleQueryChange","handleQueryBlur","handleDatasourceChange","newDatasourceSelection","kind","draft","Error","handleQueryExecute","queryValue","handleGreptimeDBQueryChange","e","examplesStyle","fontSize","color","palette","text","secondary","backgroundColor","background","code","padding","borderRadius","fontFamily","whiteSpace","lineHeight","spacing","datasourcePluginKind","label","notched","onBlur","onKeyDown","event","key","ctrlKey","metaKey","preventDefault","placeholder","details","summary","style","cursor","marginBottom","div"],"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,KAAK,EAAEC,QAAQ,QAAQ,gBAAgB;AAEhD,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,4BAA4B;AACnF,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,WAAW,QAAQ,QAAQ;AAEpC,SAASC,kBAAkB,QAAQ,4BAAmB;AACtD,SAASC,YAAY,QAAQ,gCAA6B;AAC1D,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,kBAAe;AACnE,SAASC,aAAa,QAAQ,2BAAwB;AAKtD,OAAO,SAASC,yBAAyBC,KAAoC;IAC3E,MAAMC,QAAQZ;IACd,MAAM,EAAEa,QAAQ,EAAEC,KAAK,EAAE,GAAGH;IAC5B,MAAM,EAAEI,UAAU,EAAE,GAAGD;IAEvB,MAAME,qBAAqBD,cAAcP;IACzC,MAAM,EAAES,KAAK,EAAEC,iBAAiB,EAAEC,eAAe,EAAE,GAAGV,cAAcE;IAEpE,MAAMS,yBAA4D,CAACC;QACjE,IAAI,CAACnB,qBAAqBmB,2BAA2BA,uBAAuBC,IAAI,KAAKf,iBAAiB;YACpGM,SACEV,QAAQW,OAAO,CAACS;gBACdA,MAAMR,UAAU,GAAGM;YACrB;YAEF;QACF;QACA,MAAM,IAAIG,MAAM;IAClB;IAEA,MAAMC,qBAAqB,CAACC;QAC1Bb,SACEV,QAAQW,OAAO,CAACS;YACdA,MAAMN,KAAK,GAAGS;QAChB;IAEJ;IAEA,MAAMC,8BAA8BvB,YAClC,CAACwB;QACCV,kBAAkBU;IACpB,GACA;QAACV;KAAkB;IAGrB,MAAMW,gBAAgB;QACpBC,UAAU;QACVC,OAAOnB,MAAMoB,OAAO,CAACC,IAAI,CAACC,SAAS;QACnCC,iBAAiBvB,MAAMoB,OAAO,CAACI,UAAU,CAACC,IAAI;QAC9CC,SAAS;QACTC,cAAc;QACdC,YAAY;QACZC,YAAY;QACZC,YAAY;IACd;IAEA,qBACE,MAAC3C;QAAM4C,SAAS;;0BACd,KAAC1C;gBACC2C,sBAAsBrC;gBACtBO,OAAOE;gBACPH,UAAUO;gBACVyB,OAAM;gBACNC,OAAO;;0BAET,KAACzC;gBACCS,OAAOG;gBACPJ,UAAUc;gBACVoB,QAAQ5B;gBACR6B,WAAW,CAACC;oBACV,IAAIA,MAAMC,GAAG,KAAK,WAAYD,CAAAA,MAAME,OAAO,IAAIF,MAAMG,OAAO,AAAD,GAAI;wBAC7DH,MAAMI,cAAc;wBACpB5B,mBAAmBR;oBACrB;gBACF;gBACAqC,aAAY;;0BAEd,MAACC;;kCACC,KAACC;wBACCC,OAAO;4BACLC,QAAQ;4BACR5B,UAAU;4BACVC,OAAOnB,MAAMoB,OAAO,CAACC,IAAI,CAACC,SAAS;4BACnCyB,cAAc;wBAChB;kCACD;;kCAGD,KAACC;wBAAIH,OAAO5B;kCAAgBvB;;;;;;AAIpC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types';
|
|
2
|
-
import { LogQueryPlugin } from './log-query-plugin-interface';
|
|
1
|
+
import type { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types';
|
|
2
|
+
import type { LogQueryPlugin } from './log-query-plugin-interface';
|
|
3
3
|
export declare const getGreptimeDBLogData: LogQueryPlugin<GreptimeDBLogQuerySpec>['getLogData'];
|
|
4
4
|
//# sourceMappingURL=get-greptimedb-log-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-greptimedb-log-data.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-log-query/get-greptimedb-log-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-greptimedb-log-data.d.ts","sourceRoot":"","sources":["../../../../src/queries/greptimedb-log-query/get-greptimedb-log-data.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAwDnE,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC,YAAY,CAkCrF,CAAC"}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { DEFAULT_DATASOURCE } from
|
|
14
|
-
import { findTimeColumnIndex, normalizeRecords, replaceQueryVariables, toTimestampMs } from
|
|
13
|
+
import { DEFAULT_DATASOURCE } from "../constants.js";
|
|
14
|
+
import { findTimeColumnIndex, normalizeRecords, replaceQueryVariables, toTimestampMs } from "../greptimedb-query-data-model.js";
|
|
15
15
|
function buildLogs(records) {
|
|
16
16
|
const columnSchemas = records?.schema?.column_schemas ?? [];
|
|
17
17
|
const rows = records?.rows ?? [];
|