@perses-dev/clickhouse-plugin 0.6.0-rc.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mf/js/{ClickHouse.56ee1464.js → ClickHouse.4e6199f7.js} +7 -7
- package/__mf/js/async/{1728.645b0066.js → 1728.a4ac7d54.js} +1 -1
- package/__mf/js/async/{3981.fe98c70e.js → 3981.9bd5679b.js} +2 -2
- package/__mf/js/async/{599.37f9fe2f.js → 599.e213c21c.js} +1 -1
- package/__mf/js/async/{7984.824ae5e8.js → 7984.549ad1a9.js} +3 -3
- package/__mf/js/async/__federation_expose_ClickHouseDatasource.0e124aef.js +2 -0
- package/__mf/js/async/__federation_expose_ClickHouseLogQuery.605ad0d2.js +20 -0
- package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js +20 -0
- package/__mf/js/{main.1360e83a.js → main.39993ad6.js} +7 -7
- package/lib/cjs/model/click-house-client.js +21 -4
- package/lib/cjs/queries/click-house-log-query/get-click-house-log-data.js +8 -4
- package/lib/cjs/queries/click-house-time-series-query/get-click-house-data.js +63 -17
- package/lib/model/click-house-client.d.ts +4 -0
- package/lib/model/click-house-client.d.ts.map +1 -1
- package/lib/model/click-house-client.js +7 -1
- package/lib/model/click-house-client.js.map +1 -1
- package/lib/model/click-house-data-types.d.ts +1 -1
- package/lib/model/click-house-data-types.d.ts.map +1 -1
- package/lib/model/click-house-data-types.js.map +1 -1
- package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts.map +1 -1
- package/lib/queries/click-house-log-query/get-click-house-log-data.js +8 -4
- package/lib/queries/click-house-log-query/get-click-house-log-data.js.map +1 -1
- package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts.map +1 -1
- package/lib/queries/click-house-time-series-query/get-click-house-data.js +63 -17
- package/lib/queries/click-house-time-series-query/get-click-house-data.js.map +1 -1
- package/mf-manifest.json +21 -21
- package/mf-stats.json +21 -21
- package/package.json +7 -7
- package/__mf/js/async/__federation_expose_ClickHouseDatasource.68393632.js +0 -2
- package/__mf/js/async/__federation_expose_ClickHouseLogQuery.b776db9c.js +0 -20
- package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.12f07a4f.js +0 -20
- /package/__mf/js/async/{7984.824ae5e8.js.LICENSE.txt → 7984.549ad1a9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_ClickHouseDatasource.68393632.js.LICENSE.txt → __federation_expose_ClickHouseDatasource.0e124aef.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_ClickHouseLogQuery.b776db9c.js.LICENSE.txt → __federation_expose_ClickHouseLogQuery.605ad0d2.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_ClickHouseTimeSeriesQuery.12f07a4f.js.LICENSE.txt → __federation_expose_ClickHouseTimeSeriesQuery.a7927056.js.LICENSE.txt} +0 -0
package/mf-manifest.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "ClickHouse",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.6.0
|
|
8
|
+
"buildVersion": "0.6.0",
|
|
9
9
|
"buildName": "@perses-dev/clickhouse-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/ClickHouse.
|
|
12
|
+
"name": "__mf/js/ClickHouse.4e6199f7.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
{
|
|
90
90
|
"id": "ClickHouse:@perses-dev/components",
|
|
91
91
|
"name": "@perses-dev/components",
|
|
92
|
-
"version": "0.54.0
|
|
92
|
+
"version": "0.54.0",
|
|
93
93
|
"singleton": true,
|
|
94
|
-
"requiredVersion": "^0.54.0
|
|
94
|
+
"requiredVersion": "^0.54.0",
|
|
95
95
|
"assets": {
|
|
96
96
|
"js": {
|
|
97
97
|
"async": [],
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
{
|
|
112
112
|
"id": "ClickHouse:@perses-dev/dashboards",
|
|
113
113
|
"name": "@perses-dev/dashboards",
|
|
114
|
-
"version": "0.54.0
|
|
114
|
+
"version": "0.54.0",
|
|
115
115
|
"singleton": true,
|
|
116
|
-
"requiredVersion": "^0.54.0
|
|
116
|
+
"requiredVersion": "^0.54.0",
|
|
117
117
|
"assets": {
|
|
118
118
|
"js": {
|
|
119
119
|
"async": [],
|
|
120
120
|
"sync": [
|
|
121
|
-
"__mf/js/async/7984.
|
|
121
|
+
"__mf/js/async/7984.549ad1a9.js"
|
|
122
122
|
]
|
|
123
123
|
},
|
|
124
124
|
"css": {
|
|
@@ -131,14 +131,14 @@
|
|
|
131
131
|
{
|
|
132
132
|
"id": "ClickHouse:@perses-dev/explore",
|
|
133
133
|
"name": "@perses-dev/explore",
|
|
134
|
-
"version": "0.54.0
|
|
134
|
+
"version": "0.54.0",
|
|
135
135
|
"singleton": true,
|
|
136
|
-
"requiredVersion": "^0.54.0
|
|
136
|
+
"requiredVersion": "^0.54.0",
|
|
137
137
|
"assets": {
|
|
138
138
|
"js": {
|
|
139
139
|
"async": [],
|
|
140
140
|
"sync": [
|
|
141
|
-
"__mf/js/async/1728.
|
|
141
|
+
"__mf/js/async/1728.a4ac7d54.js"
|
|
142
142
|
]
|
|
143
143
|
},
|
|
144
144
|
"css": {
|
|
@@ -151,14 +151,14 @@
|
|
|
151
151
|
{
|
|
152
152
|
"id": "ClickHouse:@perses-dev/plugin-system",
|
|
153
153
|
"name": "@perses-dev/plugin-system",
|
|
154
|
-
"version": "0.54.0
|
|
154
|
+
"version": "0.54.0",
|
|
155
155
|
"singleton": true,
|
|
156
|
-
"requiredVersion": "^0.54.0
|
|
156
|
+
"requiredVersion": "^0.54.0",
|
|
157
157
|
"assets": {
|
|
158
158
|
"js": {
|
|
159
159
|
"async": [],
|
|
160
160
|
"sync": [
|
|
161
|
-
"__mf/js/async/3981.
|
|
161
|
+
"__mf/js/async/3981.9bd5679b.js"
|
|
162
162
|
]
|
|
163
163
|
},
|
|
164
164
|
"css": {
|
|
@@ -357,15 +357,15 @@
|
|
|
357
357
|
"assets": {
|
|
358
358
|
"js": {
|
|
359
359
|
"sync": [
|
|
360
|
-
"__mf/js/async/__federation_expose_ClickHouseDatasource.
|
|
360
|
+
"__mf/js/async/__federation_expose_ClickHouseDatasource.0e124aef.js"
|
|
361
361
|
],
|
|
362
362
|
"async": [
|
|
363
363
|
"__mf/js/async/1825.299edaf9.js",
|
|
364
364
|
"__mf/js/async/9754.9ea7778b.js",
|
|
365
365
|
"__mf/js/async/6045.9b807b97.js",
|
|
366
|
-
"__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.
|
|
367
|
-
"__mf/js/async/__federation_expose_ClickHouseLogQuery.
|
|
368
|
-
"__mf/js/async/599.
|
|
366
|
+
"__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js",
|
|
367
|
+
"__mf/js/async/__federation_expose_ClickHouseLogQuery.605ad0d2.js",
|
|
368
|
+
"__mf/js/async/599.e213c21c.js",
|
|
369
369
|
"__mf/js/async/1811.29b51780.js",
|
|
370
370
|
"__mf/js/async/9836.75f99110.js",
|
|
371
371
|
"__mf/js/async/6155.1398a410.js",
|
|
@@ -396,10 +396,10 @@
|
|
|
396
396
|
"__mf/js/async/1825.299edaf9.js",
|
|
397
397
|
"__mf/js/async/9754.9ea7778b.js",
|
|
398
398
|
"__mf/js/async/6045.9b807b97.js",
|
|
399
|
-
"__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.
|
|
399
|
+
"__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js"
|
|
400
400
|
],
|
|
401
401
|
"async": [
|
|
402
|
-
"__mf/js/async/599.
|
|
402
|
+
"__mf/js/async/599.e213c21c.js",
|
|
403
403
|
"__mf/js/async/1811.29b51780.js",
|
|
404
404
|
"__mf/js/async/9877.8f08e12a.js",
|
|
405
405
|
"__mf/js/async/3059.3d9dad23.js",
|
|
@@ -430,10 +430,10 @@
|
|
|
430
430
|
"__mf/js/async/1825.299edaf9.js",
|
|
431
431
|
"__mf/js/async/9754.9ea7778b.js",
|
|
432
432
|
"__mf/js/async/6045.9b807b97.js",
|
|
433
|
-
"__mf/js/async/__federation_expose_ClickHouseLogQuery.
|
|
433
|
+
"__mf/js/async/__federation_expose_ClickHouseLogQuery.605ad0d2.js"
|
|
434
434
|
],
|
|
435
435
|
"async": [
|
|
436
|
-
"__mf/js/async/599.
|
|
436
|
+
"__mf/js/async/599.e213c21c.js",
|
|
437
437
|
"__mf/js/async/1811.29b51780.js",
|
|
438
438
|
"__mf/js/async/9877.8f08e12a.js",
|
|
439
439
|
"__mf/js/async/3059.3d9dad23.js",
|
package/mf-stats.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "ClickHouse",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.6.0
|
|
8
|
+
"buildVersion": "0.6.0",
|
|
9
9
|
"buildName": "@perses-dev/clickhouse-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/ClickHouse.
|
|
12
|
+
"name": "__mf/js/ClickHouse.4e6199f7.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"singleton": true,
|
|
103
|
-
"requiredVersion": "^0.54.0
|
|
103
|
+
"requiredVersion": "^0.54.0",
|
|
104
104
|
"shareScope": "default",
|
|
105
105
|
"name": "@perses-dev/components",
|
|
106
|
-
"version": "0.54.0
|
|
106
|
+
"version": "0.54.0",
|
|
107
107
|
"eager": false,
|
|
108
108
|
"id": "ClickHouse:@perses-dev/components",
|
|
109
109
|
"assets": {
|
|
@@ -126,17 +126,17 @@
|
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
"singleton": true,
|
|
129
|
-
"requiredVersion": "^0.54.0
|
|
129
|
+
"requiredVersion": "^0.54.0",
|
|
130
130
|
"shareScope": "default",
|
|
131
131
|
"name": "@perses-dev/dashboards",
|
|
132
|
-
"version": "0.54.0
|
|
132
|
+
"version": "0.54.0",
|
|
133
133
|
"eager": false,
|
|
134
134
|
"id": "ClickHouse:@perses-dev/dashboards",
|
|
135
135
|
"assets": {
|
|
136
136
|
"js": {
|
|
137
137
|
"async": [],
|
|
138
138
|
"sync": [
|
|
139
|
-
"__mf/js/async/7984.
|
|
139
|
+
"__mf/js/async/7984.549ad1a9.js"
|
|
140
140
|
]
|
|
141
141
|
},
|
|
142
142
|
"css": {
|
|
@@ -150,17 +150,17 @@
|
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
"singleton": true,
|
|
153
|
-
"requiredVersion": "^0.54.0
|
|
153
|
+
"requiredVersion": "^0.54.0",
|
|
154
154
|
"shareScope": "default",
|
|
155
155
|
"name": "@perses-dev/explore",
|
|
156
|
-
"version": "0.54.0
|
|
156
|
+
"version": "0.54.0",
|
|
157
157
|
"eager": false,
|
|
158
158
|
"id": "ClickHouse:@perses-dev/explore",
|
|
159
159
|
"assets": {
|
|
160
160
|
"js": {
|
|
161
161
|
"async": [],
|
|
162
162
|
"sync": [
|
|
163
|
-
"__mf/js/async/1728.
|
|
163
|
+
"__mf/js/async/1728.a4ac7d54.js"
|
|
164
164
|
]
|
|
165
165
|
},
|
|
166
166
|
"css": {
|
|
@@ -174,17 +174,17 @@
|
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
"singleton": true,
|
|
177
|
-
"requiredVersion": "^0.54.0
|
|
177
|
+
"requiredVersion": "^0.54.0",
|
|
178
178
|
"shareScope": "default",
|
|
179
179
|
"name": "@perses-dev/plugin-system",
|
|
180
|
-
"version": "0.54.0
|
|
180
|
+
"version": "0.54.0",
|
|
181
181
|
"eager": false,
|
|
182
182
|
"id": "ClickHouse:@perses-dev/plugin-system",
|
|
183
183
|
"assets": {
|
|
184
184
|
"js": {
|
|
185
185
|
"async": [],
|
|
186
186
|
"sync": [
|
|
187
|
-
"__mf/js/async/3981.
|
|
187
|
+
"__mf/js/async/3981.9bd5679b.js"
|
|
188
188
|
]
|
|
189
189
|
},
|
|
190
190
|
"css": {
|
|
@@ -424,15 +424,15 @@
|
|
|
424
424
|
"assets": {
|
|
425
425
|
"js": {
|
|
426
426
|
"sync": [
|
|
427
|
-
"__mf/js/async/__federation_expose_ClickHouseDatasource.
|
|
427
|
+
"__mf/js/async/__federation_expose_ClickHouseDatasource.0e124aef.js"
|
|
428
428
|
],
|
|
429
429
|
"async": [
|
|
430
430
|
"__mf/js/async/1825.299edaf9.js",
|
|
431
431
|
"__mf/js/async/9754.9ea7778b.js",
|
|
432
432
|
"__mf/js/async/6045.9b807b97.js",
|
|
433
|
-
"__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.
|
|
434
|
-
"__mf/js/async/__federation_expose_ClickHouseLogQuery.
|
|
435
|
-
"__mf/js/async/599.
|
|
433
|
+
"__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js",
|
|
434
|
+
"__mf/js/async/__federation_expose_ClickHouseLogQuery.605ad0d2.js",
|
|
435
|
+
"__mf/js/async/599.e213c21c.js",
|
|
436
436
|
"__mf/js/async/1811.29b51780.js",
|
|
437
437
|
"__mf/js/async/9836.75f99110.js",
|
|
438
438
|
"__mf/js/async/6155.1398a410.js",
|
|
@@ -465,10 +465,10 @@
|
|
|
465
465
|
"__mf/js/async/1825.299edaf9.js",
|
|
466
466
|
"__mf/js/async/9754.9ea7778b.js",
|
|
467
467
|
"__mf/js/async/6045.9b807b97.js",
|
|
468
|
-
"__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.
|
|
468
|
+
"__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js"
|
|
469
469
|
],
|
|
470
470
|
"async": [
|
|
471
|
-
"__mf/js/async/599.
|
|
471
|
+
"__mf/js/async/599.e213c21c.js",
|
|
472
472
|
"__mf/js/async/1811.29b51780.js",
|
|
473
473
|
"__mf/js/async/9877.8f08e12a.js",
|
|
474
474
|
"__mf/js/async/3059.3d9dad23.js",
|
|
@@ -501,10 +501,10 @@
|
|
|
501
501
|
"__mf/js/async/1825.299edaf9.js",
|
|
502
502
|
"__mf/js/async/9754.9ea7778b.js",
|
|
503
503
|
"__mf/js/async/6045.9b807b97.js",
|
|
504
|
-
"__mf/js/async/__federation_expose_ClickHouseLogQuery.
|
|
504
|
+
"__mf/js/async/__federation_expose_ClickHouseLogQuery.605ad0d2.js"
|
|
505
505
|
],
|
|
506
506
|
"async": [
|
|
507
|
-
"__mf/js/async/599.
|
|
507
|
+
"__mf/js/async/599.e213c21c.js",
|
|
508
508
|
"__mf/js/async/1811.29b51780.js",
|
|
509
509
|
"__mf/js/async/9877.8f08e12a.js",
|
|
510
510
|
"__mf/js/async/3059.3d9dad23.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/clickhouse-plugin",
|
|
3
|
-
"version": "0.6.0
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "rsbuild dev",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@emotion/react": "^11.7.1",
|
|
21
21
|
"@emotion/styled": "^11.6.0",
|
|
22
22
|
"@hookform/resolvers": "^3.2.0",
|
|
23
|
-
"@perses-dev/components": "^0.54.0
|
|
24
|
-
"@perses-dev/dashboards": "^0.54.0
|
|
25
|
-
"@perses-dev/spec": "^0.2.0
|
|
26
|
-
"@perses-dev/explore": "^0.54.0
|
|
27
|
-
"@perses-dev/plugin-system": "^0.54.0
|
|
28
|
-
"@perses-dev/client": "^0.54.0
|
|
23
|
+
"@perses-dev/components": "^0.54.0",
|
|
24
|
+
"@perses-dev/dashboards": "^0.54.0",
|
|
25
|
+
"@perses-dev/spec": "^0.2.0",
|
|
26
|
+
"@perses-dev/explore": "^0.54.0",
|
|
27
|
+
"@perses-dev/plugin-system": "^0.54.0",
|
|
28
|
+
"@perses-dev/client": "^0.54.0",
|
|
29
29
|
"@tanstack/react-query": "^4.39.1",
|
|
30
30
|
"date-fns": "^4.1.0",
|
|
31
31
|
"date-fns-tz": "^3.2.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see __federation_expose_ClickHouseDatasource.68393632.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.chunk_ClickHouse=self.chunk_ClickHouse||[]).push([["3568"],{2192(e,r,t){var o=t(70451),a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var o,s={},c=null,u=null;for(o in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(u=r.ref),r)i.call(r,o)&&!l.hasOwnProperty(o)&&(s[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===s[o]&&(s[o]=r[o]);return{$$typeof:a,type:e,key:c,ref:u,props:s,_owner:n.current}}r.Fragment=s,r.jsx=c,r.jsxs=c},62540(e,r,t){e.exports=t(2192)},85013(e,r,t){async function o(e,r){var t;let{datasourceUrl:o,headers:a}=r,s=(t=o).startsWith("http://")||t.startsWith("https://")?new URL(t):new URL(t,window.location.origin);if(!e.query)throw Error("No query provided in params");let i=e.query.trim();i.toUpperCase().includes("FORMAT")||(i+=" FORMAT JSON"),s.searchParams.set("query",i),s.searchParams.set("database",e.database||"default");let n={method:"GET",headers:{...a}};try{let e=await fetch(s.toString(),n);if(!e.ok){let r=await e.text();return console.error("ClickHouse error response:",r),{status:"error",data:[]}}let r=await e.json();return{status:"success",data:r.data||r}}catch(e){throw Error(`ClickHouse query failed: ${e}`)}}t.r(r),t.d(r,{ClickHouseDatasourceEditor:()=>i,ClickHouseDatasource:()=>n});var a=t(62540),s=t(90617);function i(e){let{value:r,onChange:t,isReadonly:o}=e;return(0,a.jsx)(s.HTTPSettingsEditor,{value:r,onChange:t,isReadonly:o,initialSpecDirect:{directUrl:""},initialSpecProxy:{proxy:{kind:"HTTPProxy",spec:{allowedEndpoints:[{endpointPattern:"/",method:"GET"}],url:""}}}})}let n={createClient:(e,r)=>{let{directUrl:t,proxy:a}=e,{proxyUrl:s}=r,i=t??s;if(void 0===i)throw Error("No URL specified for ClickHouseDatasource client. You can use directUrl in the spec to configure it.");let n=(null==a?void 0:a.spec.headers)||{};return{options:{datasourceUrl:i},query:(e,r)=>o(e,{datasourceUrl:i,headers:r??n})}},OptionsEditorComponent:i,createInitialOptions:()=>({directUrl:""})}}}]);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*! For license information please see __federation_expose_ClickHouseLogQuery.b776db9c.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.chunk_ClickHouse=self.chunk_ClickHouse||[]).push([["5547"],{2192(e,t,r){var a=r(70451),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var a,i={},u=null,c=null;for(a in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)n.call(t,a)&&!s.hasOwnProperty(a)&&(i[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===i[a]&&(i[a]=t[a]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:l.current}}t.Fragment=i,t.jsx=u,t.jsxs=u},62540(e,t,r){e.exports=r(2192)},15062(e,t,r){r.d(t,{t:()=>a});let a=`-- Time Series Query
|
|
3
|
-
SELECT
|
|
4
|
-
toStartOfMinute(timestamp) as time,
|
|
5
|
-
avg(cpu_usage) as avg_cpu,
|
|
6
|
-
max(memory_usage) as max_memory
|
|
7
|
-
FROM system_metrics
|
|
8
|
-
WHERE timestamp BETWEEN '{start}' AND '{end}'
|
|
9
|
-
GROUP BY time ORDER BY time
|
|
10
|
-
-- Logs Query
|
|
11
|
-
SELECT
|
|
12
|
-
Timestamp as log_time,
|
|
13
|
-
Body,
|
|
14
|
-
ServiceName,
|
|
15
|
-
ResourceAttributes,
|
|
16
|
-
SeverityNumber,
|
|
17
|
-
SeverityText
|
|
18
|
-
FROM application_logs
|
|
19
|
-
WHERE timestamp >= '{start}'
|
|
20
|
-
ORDER BY time DESC LIMIT 1000`},21261(e,t,r){r.d(t,{N:()=>u});var a=r(62540),o=r(29068),i=r(41865),n=r(56599),l=r(315),s=r(54227);function u(e){let t=(0,n.A)(),r="dark"===t.palette.mode;return(0,a.jsxs)(l.A,{position:"relative",children:[(0,a.jsx)(s.A,{sx:{fontWeight:500,marginBottom:"4px",color:t.palette.text.primary},children:"ClickHouse Query"}),(0,a.jsx)(o.Ay,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:r?"dark":"light",basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1,foldGutter:!1,syntaxHighlighting:!0},extensions:[i.Lz.lineWrapping,i.Lz.theme({".cm-content":{paddingTop:"8px",paddingBottom:"8px",paddingRight:"40px"}})],placeholder:"Write ClickHouse Query Here..."})]})}},90916(e,t,r){r.r(t),r.d(t,{ClickHouseLogQuery:()=>y,getClickHouseLogData:()=>i,ClickHouseLogQueryEditor:()=>g});var a=r(90617),o=r(7140);let i=async(e,t)=>{let r;if(void 0===e.query||null===e.query||""===e.query)return{logs:{entries:[],totalCount:0},timeRange:{start:t.timeRange.start,end:t.timeRange.end}};let i=(0,a.replaceVariables)(e.query,t.variableState),n=await t.datasourceStore.getDatasourceClient(e.datasource??o.S),{start:l,end:s}=t.timeRange,u=await n.query({start:l.getTime().toString(),end:s.getTime().toString(),query:i});return{timeRange:{start:l,end:s},logs:{entries:r=u.data.map(e=>{let t=function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(let[o,i]of Object.entries(t)){let t=r?`${r}.${o}`:o;i&&"object"==typeof i&&!Array.isArray(i)?e(i,t,a):a[t]=i}return a}(e);!t.Timestamp&&t.log_time&&(t.Timestamp=t.log_time);let r={};Object.keys(t).sort((e,t)=>e.localeCompare(t)).forEach(e=>{r[e]=t[e]});let a=Object.entries(r).filter(e=>{let[t]=e;return"Timestamp"!==t}).map(e=>{let[t,r]=e;return`<${t}> ${""===r||null==r?"--":r}`}).join(" ");return{timestamp:null==r?void 0:r.Timestamp,labels:r,line:a}}),totalCount:r.length},metadata:{executedQueryString:i}}};var n=r(62540),l=r(70451),s=r(38662),u=r(315),c=r(71827),d=r(21261),m=r(15062),p=r(64383);function g(e){let{onChange:t,value:r}=e,{datasource:i}=r,g=i??o.S,{query:y,handleQueryChange:h,handleQueryBlur:f}=(0,p.Z)(e),x=(0,l.useCallback)(e=>{h(e)},[h]);return(0,n.jsxs)(u.A,{spacing:1.5,children:[(0,n.jsx)(a.DatasourceSelect,{datasourcePluginKind:o.N,value:g,onChange:e=>{if(!(0,a.isVariableDatasource)(e)&&e.kind===o.N)return void t((0,s.jM)(r,t=>{t.datasource=e}));throw Error("Got unexpected non ClickHouse datasource selection")},label:"ClickHouse Datasource",notched:!0}),(0,n.jsx)(d.N,{value:y,onChange:x,onBlur:f,onKeyDown:(0,c.createModEnterHandler)(()=>{t((0,s.jM)(r,e=>{e.query=y}))}),placeholder:"Enter ClickHouse SQL query"}),(0,n.jsxs)("details",{children:[(0,n.jsx)("summary",{style:{cursor:"pointer",fontSize:"12px",color:"#666",marginBottom:"8px"},children:"Query Examples"}),(0,n.jsx)("div",{style:{fontSize:"11px",color:"#777",backgroundColor:"#f5f5f5",padding:"8px",borderRadius:"4px",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',whiteSpace:"pre-wrap",lineHeight:"1.3"},children:m.t})]})]})}let y={getLogData:i,OptionsEditorComponent:g,createInitialOptions:()=>({query:""}),dependsOn:e=>({variables:[...new Set([...(0,a.parseVariables)(e.query)])]}),createVolumeQuery:()=>null}},7140(e,t,r){r.d(t,{N:()=>a,S:()=>o});let a="ClickHouseDatasource",o={kind:a}},64383(e,t,r){r.d(t,{Z:()=>i});var a=r(70451),o=r(38662);function i(e){let{onChange:t,value:r}=e,[i,n]=(0,a.useState)(r.query||""),[l,s]=(0,a.useState)(r.query);return r.query!==l&&(n(r.query||""),s(r.query)),{query:i,handleQueryChange:e=>{n(e)},handleQueryBlur:()=>{s(i),t((0,o.jM)(r,e=>{e.query=i}))}}}}}]);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*! For license information please see __federation_expose_ClickHouseTimeSeriesQuery.12f07a4f.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.chunk_ClickHouse=self.chunk_ClickHouse||[]).push([["293"],{2192(e,t,r){var a=r(70451),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var a,o={},l=null,c=null;for(a in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)n.call(t,a)&&!u.hasOwnProperty(a)&&(o[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===o[a]&&(o[a]=t[a]);return{$$typeof:i,type:e,key:l,ref:c,props:o,_owner:s.current}}t.Fragment=o,t.jsx=l,t.jsxs=l},62540(e,t,r){e.exports=r(2192)},15062(e,t,r){r.d(t,{t:()=>a});let a=`-- Time Series Query
|
|
3
|
-
SELECT
|
|
4
|
-
toStartOfMinute(timestamp) as time,
|
|
5
|
-
avg(cpu_usage) as avg_cpu,
|
|
6
|
-
max(memory_usage) as max_memory
|
|
7
|
-
FROM system_metrics
|
|
8
|
-
WHERE timestamp BETWEEN '{start}' AND '{end}'
|
|
9
|
-
GROUP BY time ORDER BY time
|
|
10
|
-
-- Logs Query
|
|
11
|
-
SELECT
|
|
12
|
-
Timestamp as log_time,
|
|
13
|
-
Body,
|
|
14
|
-
ServiceName,
|
|
15
|
-
ResourceAttributes,
|
|
16
|
-
SeverityNumber,
|
|
17
|
-
SeverityText
|
|
18
|
-
FROM application_logs
|
|
19
|
-
WHERE timestamp >= '{start}'
|
|
20
|
-
ORDER BY time DESC LIMIT 1000`},21261(e,t,r){r.d(t,{N:()=>l});var a=r(62540),i=r(29068),o=r(41865),n=r(56599),s=r(315),u=r(54227);function l(e){let t=(0,n.A)(),r="dark"===t.palette.mode;return(0,a.jsxs)(s.A,{position:"relative",children:[(0,a.jsx)(u.A,{sx:{fontWeight:500,marginBottom:"4px",color:t.palette.text.primary},children:"ClickHouse Query"}),(0,a.jsx)(i.Ay,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:r?"dark":"light",basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1,foldGutter:!1,syntaxHighlighting:!0},extensions:[o.Lz.lineWrapping,o.Lz.theme({".cm-content":{paddingTop:"8px",paddingBottom:"8px",paddingRight:"40px"}})],placeholder:"Write ClickHouse Query Here..."})]})}},20398(e,t,r){r.r(t),r.d(t,{ClickHouseTimeSeriesQuery:()=>g,ClickHouseTimeSeriesQueryEditor:()=>y,getTimeSeriesData:()=>o});var a=r(90617),i=r(7140);let o=async(e,t)=>{var r;let o;if(void 0===e.query||null===e.query||""===e.query)return{series:[]};let n=(0,a.replaceVariables)(e.query,t.variableState),s=await t.datasourceStore.getDatasourceClient(e.datasource??i.S),{start:u,end:l}=t.timeRange;return{series:(o=null==(r=await s.query({start:u.getTime().toString(),end:l.getTime().toString(),query:n}))?void 0:r.data,r&&o&&0!==o.length?[{name:"log_count",values:o.map(e=>[new Date(e.time).getTime(),Number(e.log_count)])}]:[]),timeRange:{start:u,end:l},stepMs:3e4,metadata:{executedQueryString:n}}};var n=r(62540),s=r(70451),u=r(38662),l=r(315),c=r(71827),d=r(21261),p=r(15062),m=r(64383);function y(e){let{onChange:t,value:r}=e,{datasource:o}=r,y=o??i.S,{query:g,handleQueryChange:h,handleQueryBlur:S}=(0,m.Z)(e),x=(0,s.useCallback)(e=>{h(e)},[h]);return(0,n.jsxs)(l.A,{spacing:1.5,children:[(0,n.jsx)(a.DatasourceSelect,{datasourcePluginKind:i.N,value:y,onChange:e=>{if(!(0,a.isVariableDatasource)(e)&&e.kind===i.N)return void t((0,u.jM)(r,t=>{t.datasource=e}));throw Error("Got unexpected non ClickHouse datasource selection")},label:"ClickHouse Datasource",notched:!0}),(0,n.jsx)(d.N,{value:g,onChange:x,onBlur:S,onKeyDown:(0,c.createModEnterHandler)(()=>{t((0,u.jM)(r,e=>{e.query=g}))}),placeholder:"Enter ClickHouse SQL query"}),(0,n.jsxs)("details",{children:[(0,n.jsx)("summary",{style:{cursor:"pointer",fontSize:"12px",color:"#666",marginBottom:"8px"},children:"Query Examples"}),(0,n.jsx)("div",{style:{fontSize:"11px",color:"#777",backgroundColor:"#f5f5f5",padding:"8px",borderRadius:"4px",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',whiteSpace:"pre-wrap",lineHeight:"1.3"},children:p.t})]})]})}let g={getTimeSeriesData:o,OptionsEditorComponent:y,createInitialOptions:()=>({query:""}),dependsOn:e=>({variables:[...new Set([...(0,a.parseVariables)(e.query)])]})}},7140(e,t,r){r.d(t,{N:()=>a,S:()=>i});let a="ClickHouseDatasource",i={kind:a}},64383(e,t,r){r.d(t,{Z:()=>o});var a=r(70451),i=r(38662);function o(e){let{onChange:t,value:r}=e,[o,n]=(0,a.useState)(r.query||""),[s,u]=(0,a.useState)(r.query);return r.query!==s&&(n(r.query||""),u(r.query)),{query:o,handleQueryChange:e=>{n(e)},handleQueryBlur:()=>{u(o),t((0,i.jM)(r,e=>{e.query=o}))}}}}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|