@perses-dev/clickhouse-plugin 0.6.0-rc.1 → 0.7.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/__mf/js/ClickHouse.76a0fbf4.js +7 -0
  2. package/__mf/js/async/1.1e91dea7.js +102 -0
  3. package/__mf/js/async/121.1f2608b3.js +2 -0
  4. package/__mf/js/async/181.e0b3926b.js +2 -0
  5. package/__mf/js/async/192.406c1c63.js +1 -0
  6. package/__mf/js/async/2.05cb4775.js +1 -0
  7. package/__mf/js/async/235.83f7cd2f.js +1 -0
  8. package/__mf/js/async/274.b8ce8e1b.js +2 -0
  9. package/__mf/js/async/356.f08f6910.js +1 -0
  10. package/__mf/js/async/392.d89cad59.js +2 -0
  11. package/__mf/js/async/440.62bb6f89.js +2 -0
  12. package/__mf/js/async/45.37b51769.js +1 -0
  13. package/__mf/js/async/470.3fc1ceb1.js +2 -0
  14. package/__mf/js/async/482.e59722dd.js +7 -0
  15. package/__mf/js/async/482.e59722dd.js.LICENSE.txt +102 -0
  16. package/__mf/js/async/522.69c8ed0a.js +22 -0
  17. package/__mf/js/async/560.0b052d6c.js +37 -0
  18. package/__mf/js/async/562.bc9f9e5a.js +2 -0
  19. package/__mf/js/async/587.8361f462.js +1 -0
  20. package/__mf/js/async/616.2f7b03f4.js +1 -0
  21. package/__mf/js/async/663.40f2ec68.js +1 -0
  22. package/__mf/js/async/700.5b2b12f4.js +3 -0
  23. package/__mf/js/async/862.e7bf5c84.js +2 -0
  24. package/__mf/js/async/865.39675206.js +1 -0
  25. package/__mf/js/async/901.d4978bec.js +1 -0
  26. package/__mf/js/async/941.4bc59208.js +2 -0
  27. package/__mf/js/async/943.62d64363.js +2 -0
  28. package/__mf/js/async/944.f146f769.js +10 -0
  29. package/__mf/js/async/968.4ac56699.js +1 -0
  30. package/__mf/js/async/__federation_expose_ClickHouseDatasource.442c0903.js +2 -0
  31. package/__mf/js/async/__federation_expose_ClickHouseLogQuery.13604af9.js +20 -0
  32. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.c9cd60a0.js +20 -0
  33. package/__mf/js/main.1efc6679.js +7 -0
  34. package/lib/bootstrap.js +2 -2
  35. package/lib/components/ClickQLEditor.d.ts +2 -2
  36. package/lib/components/ClickQLEditor.d.ts.map +1 -1
  37. package/lib/components/ClickQLEditor.js +3 -3
  38. package/lib/components/ClickQLEditor.js.map +1 -1
  39. package/lib/components/index.js +1 -1
  40. package/lib/components/index.js.map +1 -1
  41. package/lib/datasources/click-house-datasource/ClickHouseDatasource.d.ts +2 -2
  42. package/lib/datasources/click-house-datasource/ClickHouseDatasource.d.ts.map +1 -1
  43. package/lib/datasources/click-house-datasource/ClickHouseDatasource.js +2 -2
  44. package/lib/datasources/click-house-datasource/ClickHouseDatasource.js.map +1 -1
  45. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.d.ts +2 -2
  46. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.d.ts.map +1 -1
  47. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.js +1 -1
  48. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.js.map +1 -1
  49. package/lib/datasources/click-house-datasource/click-house-datasource-types.d.ts +3 -3
  50. package/lib/datasources/click-house-datasource/click-house-datasource-types.d.ts.map +1 -1
  51. package/lib/datasources/click-house-datasource/click-house-datasource-types.js.map +1 -1
  52. package/lib/datasources/click-house-datasource/index.js +3 -3
  53. package/lib/datasources/click-house-datasource/index.js.map +1 -1
  54. package/lib/datasources/index.js +1 -1
  55. package/lib/datasources/index.js.map +1 -1
  56. package/lib/getPluginModule.d.ts +1 -1
  57. package/lib/getPluginModule.d.ts.map +1 -1
  58. package/lib/getPluginModule.js +3 -1
  59. package/lib/getPluginModule.js.map +1 -1
  60. package/lib/index-federation.js +1 -1
  61. package/lib/index.js +3 -3
  62. package/lib/index.js.map +1 -1
  63. package/lib/model/click-house-client.d.ts +5 -1
  64. package/lib/model/click-house-client.d.ts.map +1 -1
  65. package/lib/model/click-house-client.js +10 -2
  66. package/lib/model/click-house-client.js.map +1 -1
  67. package/lib/model/click-house-data-types.d.ts +2 -2
  68. package/lib/model/click-house-data-types.d.ts.map +1 -1
  69. package/lib/model/click-house-data-types.js.map +1 -1
  70. package/lib/queries/click-house-log-query/ClickHouseLogQuery.d.ts +2 -2
  71. package/lib/queries/click-house-log-query/ClickHouseLogQuery.d.ts.map +1 -1
  72. package/lib/queries/click-house-log-query/ClickHouseLogQuery.js +4 -6
  73. package/lib/queries/click-house-log-query/ClickHouseLogQuery.js.map +1 -1
  74. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.d.ts +3 -3
  75. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.d.ts.map +1 -1
  76. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.js +9 -9
  77. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.js.map +1 -1
  78. package/lib/queries/click-house-log-query/click-house-log-query-types.d.ts +1 -1
  79. package/lib/queries/click-house-log-query/click-house-log-query-types.d.ts.map +1 -1
  80. package/lib/queries/click-house-log-query/click-house-log-query-types.js.map +1 -1
  81. package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts +2 -2
  82. package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts.map +1 -1
  83. package/lib/queries/click-house-log-query/get-click-house-log-data.js +11 -7
  84. package/lib/queries/click-house-log-query/get-click-house-log-data.js.map +1 -1
  85. package/lib/queries/click-house-log-query/index.js +4 -4
  86. package/lib/queries/click-house-log-query/index.js.map +1 -1
  87. package/lib/queries/click-house-time-series-query/ClickHouseQuery.d.ts +2 -2
  88. package/lib/queries/click-house-time-series-query/ClickHouseQuery.d.ts.map +1 -1
  89. package/lib/queries/click-house-time-series-query/ClickHouseQuery.js +4 -6
  90. package/lib/queries/click-house-time-series-query/ClickHouseQuery.js.map +1 -1
  91. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.d.ts +3 -3
  92. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.d.ts.map +1 -1
  93. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.js +9 -9
  94. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.js.map +1 -1
  95. package/lib/queries/click-house-time-series-query/click-house-query-types.d.ts +1 -1
  96. package/lib/queries/click-house-time-series-query/click-house-query-types.d.ts.map +1 -1
  97. package/lib/queries/click-house-time-series-query/click-house-query-types.js.map +1 -1
  98. package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts +2 -2
  99. package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts.map +1 -1
  100. package/lib/queries/click-house-time-series-query/get-click-house-data.js +65 -19
  101. package/lib/queries/click-house-time-series-query/get-click-house-data.js.map +1 -1
  102. package/lib/queries/click-house-time-series-query/index.js +4 -4
  103. package/lib/queries/click-house-time-series-query/index.js.map +1 -1
  104. package/lib/queries/index.js +2 -2
  105. package/lib/queries/index.js.map +1 -1
  106. package/lib/queries/query-editor-model.d.ts +1 -1
  107. package/lib/queries/query-editor-model.d.ts.map +1 -1
  108. package/lib/queries/query-editor-model.js +2 -2
  109. package/lib/queries/query-editor-model.js.map +1 -1
  110. package/lib/setup-tests.d.ts +1 -1
  111. package/lib/setup-tests.d.ts.map +1 -1
  112. package/lib/setup-tests.js +2 -2
  113. package/lib/setup-tests.js.map +1 -1
  114. package/mf-manifest.json +55 -136
  115. package/mf-stats.json +55 -148
  116. package/package.json +21 -13
  117. package/__mf/js/ClickHouse.56ee1464.js +0 -7
  118. package/__mf/js/async/1616.c86fdd40.js +0 -1
  119. package/__mf/js/async/1728.645b0066.js +0 -1
  120. package/__mf/js/async/1811.29b51780.js +0 -101
  121. package/__mf/js/async/1825.299edaf9.js +0 -1
  122. package/__mf/js/async/1969.ea0bd5b9.js +0 -1
  123. package/__mf/js/async/2043.13379b9d.js +0 -2
  124. package/__mf/js/async/2043.13379b9d.js.LICENSE.txt +0 -24
  125. package/__mf/js/async/2386.56de292b.js +0 -2
  126. package/__mf/js/async/3059.3d9dad23.js +0 -1
  127. package/__mf/js/async/3181.f3124eab.js +0 -2
  128. package/__mf/js/async/392.c8af2244.js +0 -2
  129. package/__mf/js/async/3981.fe98c70e.js +0 -3
  130. package/__mf/js/async/4121.b6afa425.js +0 -2
  131. package/__mf/js/async/4233.abbba3f6.js +0 -7
  132. package/__mf/js/async/4233.abbba3f6.js.LICENSE.txt +0 -39
  133. package/__mf/js/async/5002.9167d87e.js +0 -1
  134. package/__mf/js/async/5071.a039a221.js +0 -1
  135. package/__mf/js/async/5440.898ddc2f.js +0 -2
  136. package/__mf/js/async/5481.223427f5.js +0 -2
  137. package/__mf/js/async/5562.d4359565.js +0 -2
  138. package/__mf/js/async/5587.72383e00.js +0 -1
  139. package/__mf/js/async/599.37f9fe2f.js +0 -1
  140. package/__mf/js/async/6045.9b807b97.js +0 -1
  141. package/__mf/js/async/6155.1398a410.js +0 -2
  142. package/__mf/js/async/6155.1398a410.js.LICENSE.txt +0 -37
  143. package/__mf/js/async/6274.22bd6f34.js +0 -2
  144. package/__mf/js/async/6688.abdc25f6.js +0 -2
  145. package/__mf/js/async/7177.96ff5c4d.js +0 -1
  146. package/__mf/js/async/7192.c1f998d2.js +0 -1
  147. package/__mf/js/async/7968.ae66f60b.js +0 -1
  148. package/__mf/js/async/7978.a58ed5ff.js +0 -1
  149. package/__mf/js/async/7984.824ae5e8.js +0 -22
  150. package/__mf/js/async/8356.eda63865.js +0 -1
  151. package/__mf/js/async/8470.3ae4fba1.js +0 -2
  152. package/__mf/js/async/873.e4ddcabf.js +0 -1
  153. package/__mf/js/async/9235.aeb9d818.js +0 -1
  154. package/__mf/js/async/941.11ea3ddf.js +0 -2
  155. package/__mf/js/async/9588.d09a1141.js +0 -1
  156. package/__mf/js/async/9754.9ea7778b.js +0 -10
  157. package/__mf/js/async/9836.75f99110.js +0 -1
  158. package/__mf/js/async/9877.8f08e12a.js +0 -38
  159. package/__mf/js/async/__federation_expose_ClickHouseDatasource.68393632.js +0 -2
  160. package/__mf/js/async/__federation_expose_ClickHouseLogQuery.b776db9c.js +0 -20
  161. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.12f07a4f.js +0 -20
  162. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.12f07a4f.js.LICENSE.txt +0 -9
  163. package/__mf/js/main.1360e83a.js +0 -7
  164. package/lib/cjs/bootstrap.js +0 -26
  165. package/lib/cjs/components/ClickQLEditor.js +0 -72
  166. package/lib/cjs/components/constants.js +0 -41
  167. package/lib/cjs/components/index.js +0 -30
  168. package/lib/cjs/datasources/click-house-datasource/ClickHouseDatasource.js +0 -49
  169. package/lib/cjs/datasources/click-house-datasource/ClickHouseDatasourceEditor.js +0 -51
  170. package/lib/cjs/datasources/click-house-datasource/click-house-datasource-types.js +0 -16
  171. package/lib/cjs/datasources/click-house-datasource/index.js +0 -32
  172. package/lib/cjs/datasources/index.js +0 -30
  173. package/lib/cjs/env.d.js +0 -14
  174. package/lib/cjs/getPluginModule.js +0 -39
  175. package/lib/cjs/index-federation.js +0 -55
  176. package/lib/cjs/index.js +0 -38
  177. package/lib/cjs/model/click-house-client.js +0 -66
  178. package/lib/cjs/model/click-house-data-types.js +0 -16
  179. package/lib/cjs/queries/click-house-log-query/ClickHouseLogQuery.js +0 -45
  180. package/lib/cjs/queries/click-house-log-query/ClickHouseLogQueryEditor.js +0 -104
  181. package/lib/cjs/queries/click-house-log-query/click-house-log-query-types.js +0 -16
  182. package/lib/cjs/queries/click-house-log-query/get-click-house-log-data.js +0 -89
  183. package/lib/cjs/queries/click-house-log-query/index.js +0 -33
  184. package/lib/cjs/queries/click-house-time-series-query/ClickHouseQuery.js +0 -43
  185. package/lib/cjs/queries/click-house-time-series-query/ClickHouseQueryEditor.js +0 -104
  186. package/lib/cjs/queries/click-house-time-series-query/click-house-query-types.js +0 -16
  187. package/lib/cjs/queries/click-house-time-series-query/get-click-house-data.js +0 -70
  188. package/lib/cjs/queries/click-house-time-series-query/index.js +0 -33
  189. package/lib/cjs/queries/constants.js +0 -34
  190. package/lib/cjs/queries/index.js +0 -31
  191. package/lib/cjs/queries/query-editor-model.js +0 -53
  192. package/lib/cjs/setup-tests.js +0 -19
  193. /package/__mf/css/async/{4233.85c2cbf6.css → 482.85c2cbf6.css} +0 -0
  194. /package/__mf/js/async/{4121.b6afa425.js.LICENSE.txt → 121.1f2608b3.js.LICENSE.txt} +0 -0
  195. /package/__mf/js/async/{2386.56de292b.js.LICENSE.txt → 181.e0b3926b.js.LICENSE.txt} +0 -0
  196. /package/__mf/js/async/{6274.22bd6f34.js.LICENSE.txt → 274.b8ce8e1b.js.LICENSE.txt} +0 -0
  197. /package/__mf/js/async/{392.c8af2244.js.LICENSE.txt → 392.d89cad59.js.LICENSE.txt} +0 -0
  198. /package/__mf/js/async/{5440.898ddc2f.js.LICENSE.txt → 440.62bb6f89.js.LICENSE.txt} +0 -0
  199. /package/__mf/js/async/{8470.3ae4fba1.js.LICENSE.txt → 470.3fc1ceb1.js.LICENSE.txt} +0 -0
  200. /package/__mf/js/async/{7984.824ae5e8.js.LICENSE.txt → 522.69c8ed0a.js.LICENSE.txt} +0 -0
  201. /package/__mf/js/async/{3181.f3124eab.js.LICENSE.txt → 562.bc9f9e5a.js.LICENSE.txt} +0 -0
  202. /package/__mf/js/async/{5481.223427f5.js.LICENSE.txt → 862.e7bf5c84.js.LICENSE.txt} +0 -0
  203. /package/__mf/js/async/{5562.d4359565.js.LICENSE.txt → 941.4bc59208.js.LICENSE.txt} +0 -0
  204. /package/__mf/js/async/{6688.abdc25f6.js.LICENSE.txt → 943.62d64363.js.LICENSE.txt} +0 -0
  205. /package/__mf/js/async/{9754.9ea7778b.js.LICENSE.txt → 944.f146f769.js.LICENSE.txt} +0 -0
  206. /package/__mf/js/async/{941.11ea3ddf.js.LICENSE.txt → __federation_expose_ClickHouseDatasource.442c0903.js.LICENSE.txt} +0 -0
  207. /package/__mf/js/async/{__federation_expose_ClickHouseDatasource.68393632.js.LICENSE.txt → __federation_expose_ClickHouseLogQuery.13604af9.js.LICENSE.txt} +0 -0
  208. /package/__mf/js/async/{__federation_expose_ClickHouseLogQuery.b776db9c.js.LICENSE.txt → __federation_expose_ClickHouseTimeSeriesQuery.c9cd60a0.js.LICENSE.txt} +0 -0
@@ -1,32 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- _export_star(require("./ClickHouseDatasource"), exports);
18
- _export_star(require("./ClickHouseDatasourceEditor"), exports);
19
- _export_star(require("./click-house-datasource-types"), exports);
20
- function _export_star(from, to) {
21
- Object.keys(from).forEach(function(k) {
22
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
23
- Object.defineProperty(to, k, {
24
- enumerable: true,
25
- get: function() {
26
- return from[k];
27
- }
28
- });
29
- }
30
- });
31
- return from;
32
- }
@@ -1,30 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- _export_star(require("./click-house-datasource"), exports);
18
- function _export_star(from, to) {
19
- Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
- Object.defineProperty(to, k, {
22
- enumerable: true,
23
- get: function() {
24
- return from[k];
25
- }
26
- });
27
- }
28
- });
29
- return from;
30
- }
package/lib/cjs/env.d.js DELETED
@@ -1,14 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- /// <reference types="@rsbuild/core/types" />
14
- "use strict";
@@ -1,39 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "getPluginModule", {
18
- enumerable: true,
19
- get: function() {
20
- return getPluginModule;
21
- }
22
- });
23
- const _packagejson = /*#__PURE__*/ _interop_require_default(require("../package.json"));
24
- function _interop_require_default(obj) {
25
- return obj && obj.__esModule ? obj : {
26
- default: obj
27
- };
28
- }
29
- function getPluginModule() {
30
- const { name, version, perses } = _packagejson.default;
31
- return {
32
- kind: 'PluginModule',
33
- metadata: {
34
- name,
35
- version
36
- },
37
- spec: perses
38
- };
39
- }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- function _getRequireWildcardCache(nodeInterop) {
3
- if (typeof WeakMap !== "function") return null;
4
- var cacheBabelInterop = new WeakMap();
5
- var cacheNodeInterop = new WeakMap();
6
- return (_getRequireWildcardCache = function(nodeInterop) {
7
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
8
- })(nodeInterop);
9
- }
10
- function _interop_require_wildcard(obj, nodeInterop) {
11
- if (!nodeInterop && obj && obj.__esModule) {
12
- return obj;
13
- }
14
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
15
- return {
16
- default: obj
17
- };
18
- }
19
- var cache = _getRequireWildcardCache(nodeInterop);
20
- if (cache && cache.has(obj)) {
21
- return cache.get(obj);
22
- }
23
- var newObj = {
24
- __proto__: null
25
- };
26
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
27
- for(var key in obj){
28
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
29
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
30
- if (desc && (desc.get || desc.set)) {
31
- Object.defineProperty(newObj, key, desc);
32
- } else {
33
- newObj[key] = obj[key];
34
- }
35
- }
36
- }
37
- newObj.default = obj;
38
- if (cache) {
39
- cache.set(obj, newObj);
40
- }
41
- return newObj;
42
- }
43
- // Copyright The Perses Authors
44
- // Licensed under the Apache License, Version 2.0 (the "License");
45
- // you may not use this file except in compliance with the License.
46
- // You may obtain a copy of the License at
47
- //
48
- // http://www.apache.org/licenses/LICENSE-2.0
49
- //
50
- // Unless required by applicable law or agreed to in writing, software
51
- // distributed under the License is distributed on an "AS IS" BASIS,
52
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53
- // See the License for the specific language governing permissions and
54
- // limitations under the License.
55
- Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./bootstrap")));
package/lib/cjs/index.js DELETED
@@ -1,38 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "getPluginModule", {
18
- enumerable: true,
19
- get: function() {
20
- return _getPluginModule.getPluginModule;
21
- }
22
- });
23
- const _getPluginModule = require("./getPluginModule");
24
- _export_star(require("./queries"), exports);
25
- _export_star(require("./datasources"), exports);
26
- function _export_star(from, to) {
27
- Object.keys(from).forEach(function(k) {
28
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
29
- Object.defineProperty(to, k, {
30
- enumerable: true,
31
- get: function() {
32
- return from[k];
33
- }
34
- });
35
- }
36
- });
37
- return from;
38
- }
@@ -1,66 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "query", {
18
- enumerable: true,
19
- get: function() {
20
- return query;
21
- }
22
- });
23
- async function query(params, queryOptions) {
24
- const { datasourceUrl, headers } = queryOptions;
25
- const url = urlBuilder(datasourceUrl);
26
- if (!params.query) {
27
- throw new Error('No query provided in params');
28
- }
29
- let finalQuery = params.query.trim();
30
- if (!finalQuery.toUpperCase().includes('FORMAT')) {
31
- finalQuery += ' FORMAT JSON';
32
- }
33
- url.searchParams.set('query', finalQuery);
34
- url.searchParams.set('database', params.database || 'default');
35
- const init = {
36
- method: 'GET',
37
- headers: {
38
- ...headers
39
- }
40
- };
41
- try {
42
- const response = await fetch(url.toString(), init);
43
- if (!response.ok) {
44
- const errorText = await response.text();
45
- console.error('ClickHouse error response:', errorText);
46
- return {
47
- status: 'error',
48
- data: []
49
- };
50
- }
51
- const body = await response.json();
52
- return {
53
- status: 'success',
54
- data: body.data || body
55
- };
56
- } catch (e) {
57
- throw new Error(`ClickHouse query failed: ${e}`);
58
- }
59
- }
60
- function urlBuilder(datasourceUrl) {
61
- if (datasourceUrl.startsWith('http://') || datasourceUrl.startsWith('https://')) {
62
- return new URL(datasourceUrl);
63
- }
64
- // if relative path (e.g. proxy url), resolve against window.location.origin
65
- return new URL(datasourceUrl, window.location.origin);
66
- }
@@ -1,16 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
@@ -1,45 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "ClickHouseLogQuery", {
18
- enumerable: true,
19
- get: function() {
20
- return ClickHouseLogQuery;
21
- }
22
- });
23
- const _pluginsystem = require("@perses-dev/plugin-system");
24
- const _getclickhouselogdata = require("./get-click-house-log-data");
25
- const _ClickHouseLogQueryEditor = require("./ClickHouseLogQueryEditor");
26
- const ClickHouseLogQuery = {
27
- getLogData: _getclickhouselogdata.getClickHouseLogData,
28
- OptionsEditorComponent: _ClickHouseLogQueryEditor.ClickHouseLogQueryEditor,
29
- createInitialOptions: ()=>({
30
- query: ''
31
- }),
32
- dependsOn: (spec)=>{
33
- const queryVariables = (0, _pluginsystem.parseVariables)(spec.query);
34
- const allVariables = [
35
- ...new Set([
36
- ...queryVariables
37
- ])
38
- ];
39
- return {
40
- variables: allVariables
41
- };
42
- },
43
- // TODO: Implement proper SQL parsing for volume queries
44
- createVolumeQuery: ()=>null
45
- };
@@ -1,104 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "ClickHouseLogQueryEditor", {
18
- enumerable: true,
19
- get: function() {
20
- return ClickHouseLogQueryEditor;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _pluginsystem = require("@perses-dev/plugin-system");
25
- const _react = require("react");
26
- const _immer = require("immer");
27
- const _material = require("@mui/material");
28
- const _dashboards = require("@perses-dev/dashboards");
29
- const _constants = require("../constants");
30
- const _components = require("../../components");
31
- const _constants1 = require("../../components/constants");
32
- const _queryeditormodel = require("../query-editor-model");
33
- function ClickHouseLogQueryEditor(props) {
34
- const { onChange, value } = props;
35
- const { datasource } = value;
36
- const selectedDatasource = datasource ?? _constants.DEFAULT_DATASOURCE;
37
- const { query, handleQueryChange, handleQueryBlur } = (0, _queryeditormodel.useQueryState)(props);
38
- const handleDatasourceChange = (newDatasourceSelection)=>{
39
- if (!(0, _pluginsystem.isVariableDatasource)(newDatasourceSelection) && newDatasourceSelection.kind === _constants.DATASOURCE_KIND) {
40
- onChange((0, _immer.produce)(value, (draft)=>{
41
- draft.datasource = newDatasourceSelection;
42
- }));
43
- return;
44
- }
45
- throw new Error('Got unexpected non ClickHouse datasource selection');
46
- };
47
- // Immediate query execution on Enter or blur
48
- const handleQueryExecute = (query)=>{
49
- onChange((0, _immer.produce)(value, (draft)=>{
50
- draft.query = query;
51
- }));
52
- };
53
- const handleClickHouseQueryChange = (0, _react.useCallback)((e)=>{
54
- handleQueryChange(e);
55
- }, [
56
- handleQueryChange
57
- ]);
58
- const examplesStyle = {
59
- fontSize: '11px',
60
- color: '#777',
61
- backgroundColor: '#f5f5f5',
62
- padding: '8px',
63
- borderRadius: '4px',
64
- fontFamily: 'Monaco, Menlo, "Ubuntu Mono", monospace',
65
- whiteSpace: 'pre-wrap',
66
- lineHeight: '1.3'
67
- };
68
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
69
- spacing: 1.5,
70
- children: [
71
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
72
- datasourcePluginKind: _constants.DATASOURCE_KIND,
73
- value: selectedDatasource,
74
- onChange: handleDatasourceChange,
75
- label: "ClickHouse Datasource",
76
- notched: true
77
- }),
78
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ClickQLEditor, {
79
- value: query,
80
- onChange: handleClickHouseQueryChange,
81
- onBlur: handleQueryBlur,
82
- onKeyDown: (0, _dashboards.createModEnterHandler)(()=>handleQueryExecute(query)),
83
- placeholder: "Enter ClickHouse SQL query"
84
- }),
85
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("details", {
86
- children: [
87
- /*#__PURE__*/ (0, _jsxruntime.jsx)("summary", {
88
- style: {
89
- cursor: 'pointer',
90
- fontSize: '12px',
91
- color: '#666',
92
- marginBottom: '8px'
93
- },
94
- children: "Query Examples"
95
- }),
96
- /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
97
- style: examplesStyle,
98
- children: _constants1.queryExample
99
- })
100
- ]
101
- })
102
- ]
103
- });
104
- }
@@ -1,16 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
@@ -1,89 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "getClickHouseLogData", {
18
- enumerable: true,
19
- get: function() {
20
- return getClickHouseLogData;
21
- }
22
- });
23
- const _pluginsystem = require("@perses-dev/plugin-system");
24
- const _constants = require("../constants");
25
- function flattenObject(obj, parentKey = '', result = {}) {
26
- for (const [key, value] of Object.entries(obj)){
27
- const newKey = parentKey ? `${parentKey}.${key}` : key;
28
- if (value && typeof value === 'object' && !Array.isArray(value)) {
29
- flattenObject(value, newKey, result);
30
- } else {
31
- result[newKey] = value;
32
- }
33
- }
34
- return result;
35
- }
36
- function convertStreamsToLogs(streams) {
37
- const entries = streams.map((entry)=>{
38
- const flattened = flattenObject(entry);
39
- if (!flattened['Timestamp'] && flattened['log_time']) {
40
- flattened['Timestamp'] = flattened['log_time'];
41
- }
42
- const sortedEntry = {};
43
- Object.keys(flattened).sort((a, b)=>a.localeCompare(b)).forEach((key)=>{
44
- sortedEntry[key] = flattened[key];
45
- });
46
- const line = Object.entries(sortedEntry).filter(([key])=>key !== 'Timestamp').map(([key, value])=>`<${key}> ${value === '' || value === null || value === undefined ? '--' : value}`).join(' ');
47
- return {
48
- timestamp: sortedEntry?.['Timestamp'],
49
- labels: sortedEntry,
50
- line
51
- };
52
- });
53
- return {
54
- entries,
55
- totalCount: entries.length
56
- };
57
- }
58
- const getClickHouseLogData = async (spec, context)=>{
59
- if (spec.query === undefined || spec.query === null || spec.query === '') {
60
- return {
61
- logs: {
62
- entries: [],
63
- totalCount: 0
64
- },
65
- timeRange: {
66
- start: context.timeRange.start,
67
- end: context.timeRange.end
68
- }
69
- };
70
- }
71
- const query = (0, _pluginsystem.replaceVariables)(spec.query, context.variableState);
72
- const client = await context.datasourceStore.getDatasourceClient(spec.datasource ?? _constants.DEFAULT_DATASOURCE);
73
- const { start, end } = context.timeRange;
74
- const response = await client.query({
75
- start: start.getTime().toString(),
76
- end: end.getTime().toString(),
77
- query
78
- });
79
- return {
80
- timeRange: {
81
- start,
82
- end
83
- },
84
- logs: convertStreamsToLogs(response.data),
85
- metadata: {
86
- executedQueryString: query
87
- }
88
- };
89
- };
@@ -1,33 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- _export_star(require("./ClickHouseLogQuery"), exports);
18
- _export_star(require("./ClickHouseLogQueryEditor"), exports);
19
- _export_star(require("./get-click-house-log-data"), exports);
20
- _export_star(require("./click-house-log-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
- }
@@ -1,43 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "ClickHouseTimeSeriesQuery", {
18
- enumerable: true,
19
- get: function() {
20
- return ClickHouseTimeSeriesQuery;
21
- }
22
- });
23
- const _pluginsystem = require("@perses-dev/plugin-system");
24
- const _getclickhousedata = require("./get-click-house-data");
25
- const _ClickHouseQueryEditor = require("./ClickHouseQueryEditor");
26
- const ClickHouseTimeSeriesQuery = {
27
- getTimeSeriesData: _getclickhousedata.getTimeSeriesData,
28
- OptionsEditorComponent: _ClickHouseQueryEditor.ClickHouseTimeSeriesQueryEditor,
29
- createInitialOptions: ()=>({
30
- query: ''
31
- }),
32
- dependsOn: (spec)=>{
33
- const queryVariables = (0, _pluginsystem.parseVariables)(spec.query);
34
- const allVariables = [
35
- ...new Set([
36
- ...queryVariables
37
- ])
38
- ];
39
- return {
40
- variables: allVariables
41
- };
42
- }
43
- };