@perses-dev/splunk-plugin 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +60 -0
- package/__mf/css/async/7.85c2cbf6.css +1 -0
- package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
- package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
- package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
- package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
- package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
- package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
- package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
- package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
- package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
- package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
- package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
- package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
- package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
- package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
- package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
- package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
- package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
- package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
- package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
- package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
- package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
- package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
- package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
- package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
- package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
- package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
- package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
- package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
- package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
- package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
- package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
- package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
- package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
- package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
- package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
- package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
- package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
- package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
- package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
- package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
- package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
- package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
- package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
- package/__mf/js/Splunk.d622dd09.js +7 -0
- package/__mf/js/async/121.444e1abe.js +2 -0
- package/__mf/js/async/121.444e1abe.js.LICENSE.txt +9 -0
- package/__mf/js/async/177.cfdf2ea5.js +1 -0
- package/__mf/js/async/181.fee3676d.js +2 -0
- package/__mf/js/async/181.fee3676d.js.LICENSE.txt +9 -0
- package/__mf/js/async/278.171d6548.js +24 -0
- package/__mf/js/async/278.171d6548.js.LICENSE.txt +44 -0
- package/__mf/js/async/386.9514a8a7.js +2 -0
- package/__mf/js/async/386.9514a8a7.js.LICENSE.txt +9 -0
- package/__mf/js/async/413.0cd939f5.js +1 -0
- package/__mf/js/async/470.3f481d24.js +2 -0
- package/__mf/js/async/470.3f481d24.js.LICENSE.txt +19 -0
- package/__mf/js/async/667.bb282078.js +1 -0
- package/__mf/js/async/7.ed3f1592.js +7 -0
- package/__mf/js/async/7.ed3f1592.js.LICENSE.txt +64 -0
- package/__mf/js/async/732.69245394.js +139 -0
- package/__mf/js/async/732.69245394.js.LICENSE.txt +46 -0
- package/__mf/js/async/941.8fe72889.js +2 -0
- package/__mf/js/async/941.8fe72889.js.LICENSE.txt +9 -0
- package/__mf/js/async/963.f1d8b579.js +1 -0
- package/__mf/js/async/982.8a88a864.js +10 -0
- package/__mf/js/async/982.8a88a864.js.LICENSE.txt +26 -0
- package/__mf/js/async/__federation_expose_SplunkDatasource.f30e66ce.js +2 -0
- package/__mf/js/async/__federation_expose_SplunkDatasource.f30e66ce.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_SplunkLogQuery.df0414d6.js +2 -0
- package/__mf/js/async/__federation_expose_SplunkLogQuery.df0414d6.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_SplunkTimeSeriesQuery.fa50234a.js +2 -0
- package/__mf/js/async/__federation_expose_SplunkTimeSeriesQuery.fa50234a.js.LICENSE.txt +9 -0
- package/__mf/js/async/lib-router.1acd2c34.js +2 -0
- package/__mf/js/async/lib-router.1acd2c34.js.LICENSE.txt +32 -0
- package/__mf/js/main.39e2a771.js +7 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +20 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/bootstrap.js +27 -0
- package/lib/cjs/datasources/index.js +30 -0
- package/lib/cjs/datasources/splunk-datasource/SplunkDatasource.js +69 -0
- package/lib/cjs/datasources/splunk-datasource/SplunkDatasourceEditor.js +71 -0
- package/lib/cjs/datasources/splunk-datasource/index.js +32 -0
- package/lib/cjs/datasources/splunk-datasource/splunk-datasource-types.js +16 -0
- package/lib/cjs/env.d.js +14 -0
- package/lib/cjs/getPluginModule.js +39 -0
- package/lib/cjs/index-federation.js +55 -0
- package/lib/cjs/index.js +39 -0
- package/lib/cjs/model/index.js +31 -0
- package/lib/cjs/model/splunk-client-types.js +16 -0
- package/lib/cjs/model/splunk-client.js +151 -0
- package/lib/cjs/queries/constants.js +25 -0
- package/lib/cjs/queries/index.js +31 -0
- package/lib/cjs/queries/splunk-log-query/SplunkLogQuery.js +43 -0
- package/lib/cjs/queries/splunk-log-query/SplunkLogQueryEditor.js +95 -0
- package/lib/cjs/queries/splunk-log-query/get-splunk-log-data.js +127 -0
- package/lib/cjs/queries/splunk-log-query/index.js +33 -0
- package/lib/cjs/queries/splunk-log-query/log-query-plugin-interface.js +16 -0
- package/lib/cjs/queries/splunk-log-query/splunk-log-query-types.js +16 -0
- package/lib/cjs/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js +43 -0
- package/lib/cjs/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js +95 -0
- package/lib/cjs/queries/splunk-time-series-query/get-splunk-time-series-data.js +106 -0
- package/lib/cjs/queries/splunk-time-series-query/index.js +33 -0
- package/lib/cjs/queries/splunk-time-series-query/splunk-time-series-query-types.js +16 -0
- package/lib/cjs/setup-tests.js +19 -0
- package/lib/datasources/index.d.ts +2 -0
- package/lib/datasources/index.d.ts.map +1 -0
- package/lib/datasources/index.js +15 -0
- package/lib/datasources/index.js.map +1 -0
- package/lib/datasources/splunk-datasource/SplunkDatasource.d.ts +5 -0
- package/lib/datasources/splunk-datasource/SplunkDatasource.d.ts.map +1 -0
- package/lib/datasources/splunk-datasource/SplunkDatasource.js +61 -0
- package/lib/datasources/splunk-datasource/SplunkDatasource.js.map +1 -0
- package/lib/datasources/splunk-datasource/SplunkDatasource.test.d.ts +2 -0
- package/lib/datasources/splunk-datasource/SplunkDatasource.test.d.ts.map +1 -0
- package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.d.ts +9 -0
- package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.d.ts.map +1 -0
- package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.js +63 -0
- package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.js.map +1 -0
- package/lib/datasources/splunk-datasource/index.d.ts +4 -0
- package/lib/datasources/splunk-datasource/index.d.ts.map +1 -0
- package/lib/datasources/splunk-datasource/index.js +17 -0
- package/lib/datasources/splunk-datasource/index.js.map +1 -0
- package/lib/datasources/splunk-datasource/splunk-datasource-types.d.ts +6 -0
- package/lib/datasources/splunk-datasource/splunk-datasource-types.d.ts.map +1 -0
- package/lib/datasources/splunk-datasource/splunk-datasource-types.js +15 -0
- package/lib/datasources/splunk-datasource/splunk-datasource-types.js.map +1 -0
- package/lib/env.d.js +15 -0
- package/lib/env.d.js.map +1 -0
- package/lib/getPluginModule.d.ts +6 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +28 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +15 -0
- package/lib/index-federation.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/model/index.d.ts +3 -0
- package/lib/model/index.d.ts.map +1 -0
- package/lib/model/index.js +16 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/splunk-client-types.d.ts +50 -0
- package/lib/model/splunk-client-types.d.ts.map +1 -0
- package/lib/model/splunk-client-types.js +15 -0
- package/lib/model/splunk-client-types.js.map +1 -0
- package/lib/model/splunk-client.d.ts +40 -0
- package/lib/model/splunk-client.d.ts.map +1 -0
- package/lib/model/splunk-client.js +126 -0
- package/lib/model/splunk-client.js.map +1 -0
- package/lib/queries/constants.d.ts +4 -0
- package/lib/queries/constants.d.ts.map +1 -0
- package/lib/queries/constants.js +17 -0
- package/lib/queries/constants.js.map +1 -0
- package/lib/queries/index.d.ts +3 -0
- package/lib/queries/index.d.ts.map +1 -0
- package/lib/queries/index.js +16 -0
- package/lib/queries/index.js.map +1 -0
- package/lib/queries/splunk-log-query/SplunkLogQuery.d.ts +4 -0
- package/lib/queries/splunk-log-query/SplunkLogQuery.d.ts.map +1 -0
- package/lib/queries/splunk-log-query/SplunkLogQuery.js +35 -0
- package/lib/queries/splunk-log-query/SplunkLogQuery.js.map +1 -0
- package/lib/queries/splunk-log-query/SplunkLogQuery.test.d.ts +2 -0
- package/lib/queries/splunk-log-query/SplunkLogQuery.test.d.ts.map +1 -0
- package/lib/queries/splunk-log-query/SplunkLogQueryEditor.d.ts +7 -0
- package/lib/queries/splunk-log-query/SplunkLogQueryEditor.d.ts.map +1 -0
- package/lib/queries/splunk-log-query/SplunkLogQueryEditor.js +87 -0
- package/lib/queries/splunk-log-query/SplunkLogQueryEditor.js.map +1 -0
- package/lib/queries/splunk-log-query/get-splunk-log-data.d.ts +4 -0
- package/lib/queries/splunk-log-query/get-splunk-log-data.d.ts.map +1 -0
- package/lib/queries/splunk-log-query/get-splunk-log-data.js +119 -0
- package/lib/queries/splunk-log-query/get-splunk-log-data.js.map +1 -0
- package/lib/queries/splunk-log-query/index.d.ts +5 -0
- package/lib/queries/splunk-log-query/index.d.ts.map +1 -0
- package/lib/queries/splunk-log-query/index.js +18 -0
- package/lib/queries/splunk-log-query/index.js.map +1 -0
- package/lib/queries/splunk-log-query/log-query-plugin-interface.d.ts +23 -0
- package/lib/queries/splunk-log-query/log-query-plugin-interface.d.ts.map +1 -0
- package/lib/queries/splunk-log-query/log-query-plugin-interface.js +15 -0
- package/lib/queries/splunk-log-query/log-query-plugin-interface.js.map +1 -0
- package/lib/queries/splunk-log-query/splunk-log-query-types.d.ts +11 -0
- package/lib/queries/splunk-log-query/splunk-log-query-types.d.ts.map +1 -0
- package/lib/queries/splunk-log-query/splunk-log-query-types.js +15 -0
- package/lib/queries/splunk-log-query/splunk-log-query-types.js.map +1 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.d.ts +4 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.d.ts.map +1 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js +35 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js.map +1 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.test.d.ts +2 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.test.d.ts.map +1 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.d.ts +7 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.d.ts.map +1 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js +87 -0
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js.map +1 -0
- package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.d.ts +4 -0
- package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.d.ts.map +1 -0
- package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.js +98 -0
- package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.js.map +1 -0
- package/lib/queries/splunk-time-series-query/index.d.ts +5 -0
- package/lib/queries/splunk-time-series-query/index.d.ts.map +1 -0
- package/lib/queries/splunk-time-series-query/index.js +18 -0
- package/lib/queries/splunk-time-series-query/index.js.map +1 -0
- package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.d.ts +10 -0
- package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.d.ts.map +1 -0
- package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.js +15 -0
- package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.js.map +1 -0
- package/lib/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +17 -0
- package/lib/setup-tests.js.map +1 -0
- package/mf-manifest.json +198 -0
- package/mf-stats.json +220 -0
- package/package.json +74 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAGnF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import packageJson from '../package.json';
|
|
14
|
+
/**
|
|
15
|
+
* Returns the plugin module information from package.json
|
|
16
|
+
*/ export function getPluginModule() {
|
|
17
|
+
const { name, version, perses } = packageJson;
|
|
18
|
+
return {
|
|
19
|
+
kind: 'PluginModule',
|
|
20
|
+
metadata: {
|
|
21
|
+
name,
|
|
22
|
+
version
|
|
23
|
+
},
|
|
24
|
+
spec: perses
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=getPluginModule.js.map
|
|
@@ -0,0 +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;AAGjC,OAAOA,iBAAiB,kBAAkB;AAE1C;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGJ;IAClC,OAAO;QACLK,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index-federation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-federation.d.ts","sourceRoot":"","sources":["../../src/index-federation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import('./bootstrap');
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index-federation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index-federation.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('./bootstrap');\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,MAAM,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export { getPluginModule } from './getPluginModule';
|
|
14
|
+
export * from './model';
|
|
15
|
+
export * from './queries';
|
|
16
|
+
export * from './datasources';
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +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 './model';\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,oBAAoB;AACpD,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,gBAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './splunk-client';
|
|
14
|
+
export * from './splunk-client-types';
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/model/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 './splunk-client';\nexport * from './splunk-client-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,kBAAkB;AAChC,cAAc,wBAAwB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type SplunkRequestHeaders = Record<string, string>;
|
|
2
|
+
export interface SplunkJobCreateResponse {
|
|
3
|
+
sid: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SplunkJobStatusResponse {
|
|
6
|
+
entry: Array<{
|
|
7
|
+
content: {
|
|
8
|
+
dispatchState: string;
|
|
9
|
+
isDone: boolean;
|
|
10
|
+
isFailed: boolean;
|
|
11
|
+
isFinalized: boolean;
|
|
12
|
+
resultCount: number;
|
|
13
|
+
eventCount: number;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
export interface SplunkResult {
|
|
18
|
+
[key: string]: string | number;
|
|
19
|
+
}
|
|
20
|
+
export interface SplunkResultsResponse {
|
|
21
|
+
results: SplunkResult[];
|
|
22
|
+
preview: boolean;
|
|
23
|
+
init_offset: number;
|
|
24
|
+
}
|
|
25
|
+
export interface SplunkEventsResponse {
|
|
26
|
+
results: SplunkResult[];
|
|
27
|
+
}
|
|
28
|
+
export interface SplunkTimeSeriesResults {
|
|
29
|
+
results: Array<{
|
|
30
|
+
_time: string;
|
|
31
|
+
[key: string]: string | number;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
export interface SplunkLogResults {
|
|
35
|
+
results: Array<{
|
|
36
|
+
_time: string;
|
|
37
|
+
_raw: string;
|
|
38
|
+
[key: string]: string | number;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
export interface SplunkIndexResponse {
|
|
42
|
+
entry: Array<{
|
|
43
|
+
name: string;
|
|
44
|
+
content: {
|
|
45
|
+
totalEventCount: number;
|
|
46
|
+
currentDBSizeMB: number;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=splunk-client-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splunk-client-types.d.ts","sourceRoot":"","sources":["../../../src/model/splunk-client-types.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,KAAK,CAAC;QACX,OAAO,EAAE;YACP,aAAa,EAAE,MAAM,CAAC;YACtB,MAAM,EAAE,OAAO,CAAC;YAChB,QAAQ,EAAE,OAAO,CAAC;YAClB,WAAW,EAAE,OAAO,CAAC;YACrB,WAAW,EAAE,MAAM,CAAC;YACpB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,KAAK,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;KAChC,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;KAChC,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE;YACP,eAAe,EAAE,MAAM,CAAC;YACxB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;KACH,CAAC,CAAC;CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export { };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=splunk-client-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/model/splunk-client-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\nexport type SplunkRequestHeaders = Record<string, string>;\n\nexport interface SplunkJobCreateResponse {\n sid: string;\n}\n\nexport interface SplunkJobStatusResponse {\n entry: Array<{\n content: {\n dispatchState: string;\n isDone: boolean;\n isFailed: boolean;\n isFinalized: boolean;\n resultCount: number;\n eventCount: number;\n };\n }>;\n}\n\nexport interface SplunkResult {\n [key: string]: string | number;\n}\n\nexport interface SplunkResultsResponse {\n results: SplunkResult[];\n preview: boolean;\n init_offset: number;\n}\n\nexport interface SplunkEventsResponse {\n results: SplunkResult[];\n}\n\nexport interface SplunkTimeSeriesResults {\n results: Array<{\n _time: string;\n [key: string]: string | number;\n }>;\n}\n\nexport interface SplunkLogResults {\n results: Array<{\n _time: string;\n _raw: string;\n [key: string]: string | number;\n }>;\n}\n\nexport interface SplunkIndexResponse {\n entry: Array<{\n name: string;\n content: {\n totalEventCount: number;\n currentDBSizeMB: number;\n };\n }>;\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;AAkDjC,WAQC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SplunkJobCreateResponse, SplunkJobStatusResponse, SplunkResultsResponse, SplunkEventsResponse, SplunkIndexResponse, SplunkRequestHeaders } from './splunk-client-types';
|
|
2
|
+
export interface SplunkJobCreateParams {
|
|
3
|
+
search: string;
|
|
4
|
+
earliest_time?: string;
|
|
5
|
+
latest_time?: string;
|
|
6
|
+
output_mode?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SplunkJobResultsParams {
|
|
9
|
+
output_mode?: string;
|
|
10
|
+
count?: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SplunkExportSearchParams {
|
|
14
|
+
search: string;
|
|
15
|
+
earliest_time?: string;
|
|
16
|
+
latest_time?: string;
|
|
17
|
+
output_mode?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SplunkApiOptions {
|
|
20
|
+
datasourceUrl: string;
|
|
21
|
+
headers?: SplunkRequestHeaders;
|
|
22
|
+
}
|
|
23
|
+
export interface SplunkClient {
|
|
24
|
+
options: {
|
|
25
|
+
datasourceUrl: string;
|
|
26
|
+
};
|
|
27
|
+
createJob: (params: SplunkJobCreateParams, headers?: SplunkRequestHeaders) => Promise<SplunkJobCreateResponse>;
|
|
28
|
+
getJobStatus: (jobId: string, headers?: SplunkRequestHeaders) => Promise<SplunkJobStatusResponse>;
|
|
29
|
+
getJobResults: (jobId: string, params?: SplunkJobResultsParams, headers?: SplunkRequestHeaders) => Promise<SplunkResultsResponse>;
|
|
30
|
+
getJobEvents: (jobId: string, params?: SplunkJobResultsParams, headers?: SplunkRequestHeaders) => Promise<SplunkEventsResponse>;
|
|
31
|
+
exportSearch: (params: SplunkExportSearchParams, headers?: SplunkRequestHeaders) => Promise<SplunkResultsResponse>;
|
|
32
|
+
getIndexes: (headers?: SplunkRequestHeaders) => Promise<SplunkIndexResponse>;
|
|
33
|
+
}
|
|
34
|
+
export declare function createJob(params: SplunkJobCreateParams, options: SplunkApiOptions): Promise<SplunkJobCreateResponse>;
|
|
35
|
+
export declare function getJobStatus(jobId: string, options: SplunkApiOptions): Promise<SplunkJobStatusResponse>;
|
|
36
|
+
export declare function getJobResults(jobId: string, params: SplunkJobResultsParams | undefined, options: SplunkApiOptions): Promise<SplunkResultsResponse>;
|
|
37
|
+
export declare function getJobEvents(jobId: string, params: SplunkJobResultsParams | undefined, options: SplunkApiOptions): Promise<SplunkEventsResponse>;
|
|
38
|
+
export declare function exportSearch(params: SplunkExportSearchParams, options: SplunkApiOptions): Promise<SplunkResultsResponse>;
|
|
39
|
+
export declare function getIndexes(options: SplunkApiOptions): Promise<SplunkIndexResponse>;
|
|
40
|
+
//# sourceMappingURL=splunk-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splunk-client.d.ts","sourceRoot":"","sources":["../../../src/model/splunk-client.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE;QACP,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,SAAS,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC/G,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAClG,aAAa,EAAE,CACb,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACpC,YAAY,EAAE,CACZ,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,YAAY,EAAE,CAAC,MAAM,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACnH,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC9E;AAmBD,wBAAsB,SAAS,CAC7B,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAgBlC;AAED,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAW7G;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,sBAAsB,YAAK,EACnC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,qBAAqB,CAAC,CAahC;AAED,wBAAsB,YAAY,CAChC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,sBAAsB,YAAK,EACnC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,oBAAoB,CAAC,CAY/B;AAMD,wBAAsB,YAAY,CAChC,MAAM,EAAE,wBAAwB,EAChC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,qBAAqB,CAAC,CAgChC;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAWxF"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { fetchJson } from '@perses-dev/client';
|
|
14
|
+
function buildUrl(path, datasourceUrl) {
|
|
15
|
+
if (datasourceUrl.startsWith('http://') || datasourceUrl.startsWith('https://')) {
|
|
16
|
+
return new URL(path, datasourceUrl);
|
|
17
|
+
}
|
|
18
|
+
let fullPath = datasourceUrl;
|
|
19
|
+
if (datasourceUrl.endsWith('/') && path.startsWith('/')) {
|
|
20
|
+
fullPath = datasourceUrl + path.slice(1);
|
|
21
|
+
} else if (!datasourceUrl.endsWith('/') && !path.startsWith('/')) {
|
|
22
|
+
fullPath = datasourceUrl + '/' + path;
|
|
23
|
+
} else {
|
|
24
|
+
fullPath = datasourceUrl + path;
|
|
25
|
+
}
|
|
26
|
+
return new URL(fullPath, window.location.origin);
|
|
27
|
+
}
|
|
28
|
+
export async function createJob(params, options) {
|
|
29
|
+
const url = buildUrl('/services/search/v2/jobs', options.datasourceUrl);
|
|
30
|
+
const formData = new URLSearchParams();
|
|
31
|
+
formData.append('search', params.search);
|
|
32
|
+
if (params.earliest_time) formData.append('earliest_time', params.earliest_time);
|
|
33
|
+
if (params.latest_time) formData.append('latest_time', params.latest_time);
|
|
34
|
+
formData.append('output_mode', params.output_mode || 'json');
|
|
35
|
+
return await fetchJson(url.toString(), {
|
|
36
|
+
method: 'POST',
|
|
37
|
+
headers: {
|
|
38
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
39
|
+
...options.headers
|
|
40
|
+
},
|
|
41
|
+
body: formData.toString()
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export async function getJobStatus(jobId, options) {
|
|
45
|
+
const url = buildUrl(`/services/search/v2/jobs/${jobId}`, options.datasourceUrl);
|
|
46
|
+
url.searchParams.append('output_mode', 'json');
|
|
47
|
+
return await fetchJson(url.toString(), {
|
|
48
|
+
method: 'GET',
|
|
49
|
+
headers: {
|
|
50
|
+
'Content-Type': 'application/json',
|
|
51
|
+
...options.headers
|
|
52
|
+
},
|
|
53
|
+
credentials: 'include'
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export async function getJobResults(jobId, params = {}, options) {
|
|
57
|
+
const url = buildUrl(`/services/search/v2/jobs/${jobId}/results`, options.datasourceUrl);
|
|
58
|
+
url.searchParams.append('output_mode', params.output_mode || 'json');
|
|
59
|
+
if (params.count) url.searchParams.append('count', params.count.toString());
|
|
60
|
+
if (params.offset) url.searchParams.append('offset', params.offset.toString());
|
|
61
|
+
return await fetchJson(url.toString(), {
|
|
62
|
+
method: 'GET',
|
|
63
|
+
headers: {
|
|
64
|
+
'Content-Type': 'application/json',
|
|
65
|
+
...options.headers
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export async function getJobEvents(jobId, params = {}, options) {
|
|
70
|
+
const url = buildUrl(`/services/search/v2/jobs/${jobId}/events`, options.datasourceUrl);
|
|
71
|
+
url.searchParams.append('output_mode', params.output_mode || 'json');
|
|
72
|
+
if (params.count) url.searchParams.append('count', params.count.toString());
|
|
73
|
+
if (params.offset) url.searchParams.append('offset', params.offset.toString());
|
|
74
|
+
return await fetchJson(url.toString(), {
|
|
75
|
+
method: 'GET',
|
|
76
|
+
headers: {
|
|
77
|
+
'Content-Type': 'application/json',
|
|
78
|
+
...options.headers
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/* TODO: Splunk export is a streaming endpoint and should be handled differently using a streaming parser.
|
|
83
|
+
The current implementation which waits for the entire response before processing.
|
|
84
|
+
This is a temporary implementation to unblock plugin development.
|
|
85
|
+
Refactor later to properly handle streaming responses. */ export async function exportSearch(params, options) {
|
|
86
|
+
const url = buildUrl('/services/search/v2/jobs/export', options.datasourceUrl);
|
|
87
|
+
const formData = new URLSearchParams();
|
|
88
|
+
formData.append('search', params.search);
|
|
89
|
+
if (params.earliest_time) formData.append('earliest_time', params.earliest_time);
|
|
90
|
+
if (params.latest_time) formData.append('latest_time', params.latest_time);
|
|
91
|
+
formData.append('output_mode', params.output_mode || 'json');
|
|
92
|
+
const response = await fetch(url.toString(), {
|
|
93
|
+
method: 'POST',
|
|
94
|
+
headers: {
|
|
95
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
96
|
+
...options.headers
|
|
97
|
+
},
|
|
98
|
+
body: formData
|
|
99
|
+
});
|
|
100
|
+
if (!response.ok) {
|
|
101
|
+
const errorText = await response.text();
|
|
102
|
+
throw new Error(`Splunk Export API error: ${response.status} ${response.statusText} ${errorText}`);
|
|
103
|
+
}
|
|
104
|
+
const text = await response.text();
|
|
105
|
+
const lines = text.trim().split('\n');
|
|
106
|
+
const results = lines.filter((line)=>line.trim()).map((line)=>JSON.parse(line).result);
|
|
107
|
+
return {
|
|
108
|
+
results: results,
|
|
109
|
+
preview: false,
|
|
110
|
+
init_offset: 0
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export async function getIndexes(options) {
|
|
114
|
+
const url = buildUrl('/services/data/indexes', options.datasourceUrl);
|
|
115
|
+
url.searchParams.append('output_mode', 'json');
|
|
116
|
+
url.searchParams.append('count', '0');
|
|
117
|
+
return await fetchJson(url.toString(), {
|
|
118
|
+
method: 'GET',
|
|
119
|
+
headers: {
|
|
120
|
+
'Content-Type': 'application/json',
|
|
121
|
+
...options.headers
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=splunk-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/model/splunk-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 { fetchJson } from '@perses-dev/client';\nimport {\n SplunkJobCreateResponse,\n SplunkJobStatusResponse,\n SplunkResultsResponse,\n SplunkEventsResponse,\n SplunkIndexResponse,\n SplunkRequestHeaders,\n} from './splunk-client-types';\n\nexport interface SplunkJobCreateParams {\n search: string;\n earliest_time?: string;\n latest_time?: string;\n output_mode?: string;\n}\n\nexport interface SplunkJobResultsParams {\n output_mode?: string;\n count?: number;\n offset?: number;\n}\n\nexport interface SplunkExportSearchParams {\n search: string;\n earliest_time?: string;\n latest_time?: string;\n output_mode?: string;\n}\n\nexport interface SplunkApiOptions {\n datasourceUrl: string;\n headers?: SplunkRequestHeaders;\n}\n\nexport interface SplunkClient {\n options: {\n datasourceUrl: string;\n };\n createJob: (params: SplunkJobCreateParams, headers?: SplunkRequestHeaders) => Promise<SplunkJobCreateResponse>;\n getJobStatus: (jobId: string, headers?: SplunkRequestHeaders) => Promise<SplunkJobStatusResponse>;\n getJobResults: (\n jobId: string,\n params?: SplunkJobResultsParams,\n headers?: SplunkRequestHeaders\n ) => Promise<SplunkResultsResponse>;\n getJobEvents: (\n jobId: string,\n params?: SplunkJobResultsParams,\n headers?: SplunkRequestHeaders\n ) => Promise<SplunkEventsResponse>;\n exportSearch: (params: SplunkExportSearchParams, headers?: SplunkRequestHeaders) => Promise<SplunkResultsResponse>;\n getIndexes: (headers?: SplunkRequestHeaders) => Promise<SplunkIndexResponse>;\n}\n\nfunction buildUrl(path: string, datasourceUrl: string): URL {\n if (datasourceUrl.startsWith('http://') || datasourceUrl.startsWith('https://')) {\n return new URL(path, datasourceUrl);\n }\n\n let fullPath = datasourceUrl;\n if (datasourceUrl.endsWith('/') && path.startsWith('/')) {\n fullPath = datasourceUrl + path.slice(1);\n } else if (!datasourceUrl.endsWith('/') && !path.startsWith('/')) {\n fullPath = datasourceUrl + '/' + path;\n } else {\n fullPath = datasourceUrl + path;\n }\n\n return new URL(fullPath, window.location.origin);\n}\n\nexport async function createJob(\n params: SplunkJobCreateParams,\n options: SplunkApiOptions\n): Promise<SplunkJobCreateResponse> {\n const url = buildUrl('/services/search/v2/jobs', options.datasourceUrl);\n\n const formData = new URLSearchParams();\n formData.append('search', params.search);\n if (params.earliest_time) formData.append('earliest_time', params.earliest_time);\n if (params.latest_time) formData.append('latest_time', params.latest_time);\n formData.append('output_mode', params.output_mode || 'json');\n return await fetchJson<SplunkJobCreateResponse>(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n ...options.headers,\n },\n body: formData.toString(),\n });\n}\n\nexport async function getJobStatus(jobId: string, options: SplunkApiOptions): Promise<SplunkJobStatusResponse> {\n const url = buildUrl(`/services/search/v2/jobs/${jobId}`, options.datasourceUrl);\n url.searchParams.append('output_mode', 'json');\n return await fetchJson<SplunkJobStatusResponse>(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n credentials: 'include',\n });\n}\n\nexport async function getJobResults(\n jobId: string,\n params: SplunkJobResultsParams = {},\n options: SplunkApiOptions\n): Promise<SplunkResultsResponse> {\n const url = buildUrl(`/services/search/v2/jobs/${jobId}/results`, options.datasourceUrl);\n url.searchParams.append('output_mode', params.output_mode || 'json');\n if (params.count) url.searchParams.append('count', params.count.toString());\n if (params.offset) url.searchParams.append('offset', params.offset.toString());\n\n return await fetchJson<SplunkResultsResponse>(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n}\n\nexport async function getJobEvents(\n jobId: string,\n params: SplunkJobResultsParams = {},\n options: SplunkApiOptions\n): Promise<SplunkEventsResponse> {\n const url = buildUrl(`/services/search/v2/jobs/${jobId}/events`, options.datasourceUrl);\n url.searchParams.append('output_mode', params.output_mode || 'json');\n if (params.count) url.searchParams.append('count', params.count.toString());\n if (params.offset) url.searchParams.append('offset', params.offset.toString());\n return await fetchJson<SplunkEventsResponse>(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n}\n\n/* TODO: Splunk export is a streaming endpoint and should be handled differently using a streaming parser.\nThe current implementation which waits for the entire response before processing.\nThis is a temporary implementation to unblock plugin development.\nRefactor later to properly handle streaming responses. */\nexport async function exportSearch(\n params: SplunkExportSearchParams,\n options: SplunkApiOptions\n): Promise<SplunkResultsResponse> {\n const url = buildUrl('/services/search/v2/jobs/export', options.datasourceUrl);\n\n const formData = new URLSearchParams();\n formData.append('search', params.search);\n if (params.earliest_time) formData.append('earliest_time', params.earliest_time);\n if (params.latest_time) formData.append('latest_time', params.latest_time);\n formData.append('output_mode', params.output_mode || 'json');\n\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n ...options.headers,\n },\n body: formData,\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n throw new Error(`Splunk Export API error: ${response.status} ${response.statusText} ${errorText}`);\n }\n\n const text = await response.text();\n const lines = text.trim().split('\\n');\n const results = lines.filter((line: string) => line.trim()).map((line: string) => JSON.parse(line).result);\n\n return {\n results: results,\n preview: false,\n init_offset: 0,\n } as SplunkResultsResponse;\n}\n\nexport async function getIndexes(options: SplunkApiOptions): Promise<SplunkIndexResponse> {\n const url = buildUrl('/services/data/indexes', options.datasourceUrl);\n url.searchParams.append('output_mode', 'json');\n url.searchParams.append('count', '0');\n return await fetchJson<SplunkIndexResponse>(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n}\n"],"names":["fetchJson","buildUrl","path","datasourceUrl","startsWith","URL","fullPath","endsWith","slice","window","location","origin","createJob","params","options","url","formData","URLSearchParams","append","search","earliest_time","latest_time","output_mode","toString","method","headers","body","getJobStatus","jobId","searchParams","credentials","getJobResults","count","offset","getJobEvents","exportSearch","response","fetch","ok","errorText","text","Error","status","statusText","lines","trim","split","results","filter","line","map","JSON","parse","result","preview","init_offset","getIndexes"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/queries/constants.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,kBAAkB;;CAA+B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export const DEFAULT_DATASOURCE = {
|
|
14
|
+
kind: 'SplunkDatasource'
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/constants.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 const DEFAULT_DATASOURCE = { kind: 'SplunkDatasource' };\n"],"names":["DEFAULT_DATASOURCE","kind"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,MAAMA,qBAAqB;IAAEC,MAAM;AAAmB,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":"AAaA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './splunk-time-series-query';
|
|
14
|
+
export * from './splunk-log-query';
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './splunk-time-series-query';\nexport * from './splunk-log-query';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,6BAA6B;AAC3C,cAAc,qBAAqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplunkLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/SplunkLogQuery.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,kBAAkB,CAW7D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { parseVariables } from '@perses-dev/plugin-system';
|
|
14
|
+
import { getSplunkLogData } from './get-splunk-log-data';
|
|
15
|
+
import { SplunkLogQueryEditor } from './SplunkLogQueryEditor';
|
|
16
|
+
export const SplunkLogQuery = {
|
|
17
|
+
getLogData: getSplunkLogData,
|
|
18
|
+
OptionsEditorComponent: SplunkLogQueryEditor,
|
|
19
|
+
createInitialOptions: ()=>({
|
|
20
|
+
query: ''
|
|
21
|
+
}),
|
|
22
|
+
dependsOn: (spec)=>{
|
|
23
|
+
const queryVariables = parseVariables(spec.query);
|
|
24
|
+
const allVariables = [
|
|
25
|
+
...new Set([
|
|
26
|
+
...queryVariables
|
|
27
|
+
])
|
|
28
|
+
];
|
|
29
|
+
return {
|
|
30
|
+
variables: allVariables
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=SplunkLogQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/queries/splunk-log-query/SplunkLogQuery.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 { getSplunkLogData } from './get-splunk-log-data';\nimport { SplunkLogQueryEditor } from './SplunkLogQueryEditor';\nimport { SplunkLogQuerySpec } from './splunk-log-query-types';\nimport { LogQueryPlugin } from './log-query-plugin-interface';\n\nexport const SplunkLogQuery: LogQueryPlugin<SplunkLogQuerySpec> = {\n getLogData: getSplunkLogData,\n OptionsEditorComponent: SplunkLogQueryEditor,\n createInitialOptions: () => ({ query: '' }),\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","getSplunkLogData","SplunkLogQueryEditor","SplunkLogQuery","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;AAC3D,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,oBAAoB,QAAQ,yBAAyB;AAI9D,OAAO,MAAMC,iBAAqD;IAChEC,YAAYH;IACZI,wBAAwBH;IACxBI,sBAAsB,IAAO,CAAA;YAAEC,OAAO;QAAG,CAAA;IACzCC,WAAW,CAACC;QACV,MAAMC,iBAAiBV,eAAeS,KAAKF,KAAK;QAChD,MAAMI,eAAe;eAAI,IAAIC,IAAI;mBAAIF;aAAe;SAAE;QACtD,OAAO;YACLG,WAAWF;QACb;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplunkLogQuery.test.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/SplunkLogQuery.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { SplunkLogQuerySpec } from './splunk-log-query-types';
|
|
4
|
+
type SplunkLogQueryEditorProps = OptionsEditorProps<SplunkLogQuerySpec>;
|
|
5
|
+
export declare function SplunkLogQueryEditor(props: SplunkLogQueryEditorProps): ReactElement;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=SplunkLogQueryEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplunkLogQueryEditor.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/SplunkLogQueryEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAIL,kBAAkB,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK9D,KAAK,yBAAyB,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;AAExE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,YAAY,CAqEnF"}
|