@perses-dev/splunk-plugin 0.1.0 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mf/js/{Splunk.6f71e9ce.js → Splunk.98b2d5ad.js} +4 -4
- package/__mf/js/async/121.cd990f2a.js +2 -0
- package/__mf/js/async/181.45639ce7.js +2 -0
- package/__mf/js/async/230.28ff3a01.js +1 -0
- package/__mf/js/async/392.54d1105e.js +2 -0
- package/__mf/js/async/392.54d1105e.js.LICENSE.txt +8 -0
- package/__mf/js/async/43.c13dea67.js +2 -0
- package/__mf/js/async/{116.9f39e2dc.js.LICENSE.txt → 43.c13dea67.js.LICENSE.txt} +1 -41
- package/__mf/js/async/470.39364cc9.js +2 -0
- package/__mf/js/async/496.5533cf13.js +1 -0
- package/__mf/js/async/562.faedd192.js +2 -0
- package/__mf/js/async/77.d9722d64.js +1 -0
- package/__mf/js/async/788.e519d52f.js +43 -0
- package/__mf/js/async/{332.fc51c4d5.js.LICENSE.txt → 788.e519d52f.js.LICENSE.txt} +39 -8
- package/__mf/js/async/873.84546c86.js +1 -0
- package/__mf/js/async/874.496bb61a.js +4 -0
- package/__mf/js/async/874.496bb61a.js.LICENSE.txt +9 -0
- package/__mf/js/async/879.ab41564d.js +102 -0
- package/__mf/js/async/882.0bb195b0.js +1 -0
- package/__mf/js/async/941.049134e9.js +2 -0
- package/__mf/js/async/963.4c102cc8.js +1 -0
- package/__mf/js/async/967.49cac6cc.js +1 -0
- package/__mf/js/async/978.1b184143.js +1 -0
- package/__mf/js/async/982.8181aade.js +10 -0
- package/__mf/js/async/__federation_expose_SplunkDatasource.5b9ca25b.js +2 -0
- package/__mf/js/async/__federation_expose_SplunkLogQuery.5e35f21f.js +2 -0
- package/__mf/js/async/__federation_expose_SplunkTimeSeriesQuery.62f3d6f2.js +2 -0
- package/__mf/js/async/lib-router.02ac6b0e.js +2 -0
- package/__mf/js/{main.ccd342d6.js → main.4223bafa.js} +3 -3
- package/lib/bootstrap.js +2 -2
- package/lib/datasources/index.js +1 -1
- package/lib/datasources/index.js.map +1 -1
- package/lib/datasources/splunk-datasource/SplunkDatasource.d.ts +3 -3
- package/lib/datasources/splunk-datasource/SplunkDatasource.d.ts.map +1 -1
- package/lib/datasources/splunk-datasource/SplunkDatasource.js +2 -2
- package/lib/datasources/splunk-datasource/SplunkDatasource.js.map +1 -1
- package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.d.ts +2 -2
- package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.d.ts.map +1 -1
- package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.js +1 -1
- package/lib/datasources/splunk-datasource/SplunkDatasourceEditor.js.map +1 -1
- package/lib/datasources/splunk-datasource/index.js +3 -3
- package/lib/datasources/splunk-datasource/index.js.map +1 -1
- package/lib/datasources/splunk-datasource/splunk-datasource-types.d.ts +1 -1
- package/lib/datasources/splunk-datasource/splunk-datasource-types.d.ts.map +1 -1
- package/lib/datasources/splunk-datasource/splunk-datasource-types.js.map +1 -1
- package/lib/getPluginModule.d.ts +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +3 -1
- package/lib/getPluginModule.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/model/index.js +2 -2
- package/lib/model/index.js.map +1 -1
- package/lib/model/splunk-client.d.ts +1 -1
- package/lib/model/splunk-client.d.ts.map +1 -1
- package/lib/model/splunk-client.js +1 -1
- package/lib/model/splunk-client.js.map +1 -1
- package/lib/queries/index.js +2 -2
- package/lib/queries/index.js.map +1 -1
- package/lib/queries/splunk-log-query/SplunkLogQuery.d.ts +2 -2
- package/lib/queries/splunk-log-query/SplunkLogQuery.d.ts.map +1 -1
- package/lib/queries/splunk-log-query/SplunkLogQuery.js +4 -6
- package/lib/queries/splunk-log-query/SplunkLogQuery.js.map +1 -1
- package/lib/queries/splunk-log-query/SplunkLogQueryEditor.d.ts +3 -3
- package/lib/queries/splunk-log-query/SplunkLogQueryEditor.d.ts.map +1 -1
- package/lib/queries/splunk-log-query/SplunkLogQueryEditor.js +3 -3
- package/lib/queries/splunk-log-query/SplunkLogQueryEditor.js.map +1 -1
- package/lib/queries/splunk-log-query/get-splunk-log-data.d.ts +2 -2
- package/lib/queries/splunk-log-query/get-splunk-log-data.d.ts.map +1 -1
- package/lib/queries/splunk-log-query/get-splunk-log-data.js +2 -2
- package/lib/queries/splunk-log-query/get-splunk-log-data.js.map +1 -1
- package/lib/queries/splunk-log-query/index.js +4 -4
- package/lib/queries/splunk-log-query/index.js.map +1 -1
- package/lib/queries/splunk-log-query/log-query-plugin-interface.d.ts +2 -2
- package/lib/queries/splunk-log-query/log-query-plugin-interface.d.ts.map +1 -1
- package/lib/queries/splunk-log-query/log-query-plugin-interface.js.map +1 -1
- package/lib/queries/splunk-log-query/splunk-log-query-types.d.ts +2 -2
- package/lib/queries/splunk-log-query/splunk-log-query-types.d.ts.map +1 -1
- package/lib/queries/splunk-log-query/splunk-log-query-types.js.map +1 -1
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.d.ts +2 -2
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.d.ts.map +1 -1
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js +4 -6
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js.map +1 -1
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.d.ts +3 -3
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.d.ts.map +1 -1
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js +3 -3
- package/lib/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js.map +1 -1
- package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.d.ts +2 -2
- package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.d.ts.map +1 -1
- package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.js +2 -2
- package/lib/queries/splunk-time-series-query/get-splunk-time-series-data.js.map +1 -1
- package/lib/queries/splunk-time-series-query/index.js +4 -4
- package/lib/queries/splunk-time-series-query/index.js.map +1 -1
- package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.d.ts +2 -2
- package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.d.ts.map +1 -1
- package/lib/queries/splunk-time-series-query/splunk-time-series-query-types.js.map +1 -1
- package/lib/setup-tests.d.ts +1 -1
- package/lib/setup-tests.d.ts.map +1 -1
- package/lib/setup-tests.js +2 -2
- package/lib/setup-tests.js.map +1 -1
- package/mf-manifest.json +60 -44
- package/mf-stats.json +60 -44
- package/package.json +10 -9
- package/__mf/js/async/116.9f39e2dc.js +0 -7
- package/__mf/js/async/121.0ceb8113.js +0 -2
- package/__mf/js/async/181.4d01713c.js +0 -2
- package/__mf/js/async/332.fc51c4d5.js +0 -139
- package/__mf/js/async/386.da241588.js +0 -2
- package/__mf/js/async/470.e7f915b7.js +0 -2
- package/__mf/js/async/537.880623e7.js +0 -1
- package/__mf/js/async/558.db2f2486.js +0 -1
- package/__mf/js/async/756.8162c322.js +0 -24
- package/__mf/js/async/756.8162c322.js.LICENSE.txt +0 -44
- package/__mf/js/async/842.601cf14f.js +0 -1
- package/__mf/js/async/941.693e183d.js +0 -2
- package/__mf/js/async/963.0f837958.js +0 -1
- package/__mf/js/async/982.e5647ac8.js +0 -10
- package/__mf/js/async/__federation_expose_SplunkDatasource.b9438a9e.js +0 -2
- package/__mf/js/async/__federation_expose_SplunkLogQuery.8d011abe.js +0 -2
- package/__mf/js/async/__federation_expose_SplunkTimeSeriesQuery.264a58b9.js +0 -2
- package/__mf/js/async/lib-router.31611676.js +0 -2
- package/lib/cjs/bootstrap.js +0 -27
- package/lib/cjs/datasources/index.js +0 -30
- package/lib/cjs/datasources/splunk-datasource/SplunkDatasource.js +0 -69
- package/lib/cjs/datasources/splunk-datasource/SplunkDatasourceEditor.js +0 -71
- package/lib/cjs/datasources/splunk-datasource/index.js +0 -32
- package/lib/cjs/datasources/splunk-datasource/splunk-datasource-types.js +0 -16
- package/lib/cjs/env.d.js +0 -14
- package/lib/cjs/getPluginModule.js +0 -39
- package/lib/cjs/index-federation.js +0 -55
- package/lib/cjs/index.js +0 -39
- package/lib/cjs/model/index.js +0 -31
- package/lib/cjs/model/splunk-client-types.js +0 -16
- package/lib/cjs/model/splunk-client.js +0 -151
- package/lib/cjs/queries/constants.js +0 -25
- package/lib/cjs/queries/index.js +0 -31
- package/lib/cjs/queries/splunk-log-query/SplunkLogQuery.js +0 -43
- package/lib/cjs/queries/splunk-log-query/SplunkLogQueryEditor.js +0 -95
- package/lib/cjs/queries/splunk-log-query/get-splunk-log-data.js +0 -127
- package/lib/cjs/queries/splunk-log-query/index.js +0 -33
- package/lib/cjs/queries/splunk-log-query/log-query-plugin-interface.js +0 -16
- package/lib/cjs/queries/splunk-log-query/splunk-log-query-types.js +0 -16
- package/lib/cjs/queries/splunk-time-series-query/SplunkTimeSeriesQuery.js +0 -43
- package/lib/cjs/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.js +0 -95
- package/lib/cjs/queries/splunk-time-series-query/get-splunk-time-series-data.js +0 -106
- package/lib/cjs/queries/splunk-time-series-query/index.js +0 -33
- package/lib/cjs/queries/splunk-time-series-query/splunk-time-series-query-types.js +0 -16
- package/lib/cjs/setup-tests.js +0 -19
- /package/__mf/css/async/{116.85c2cbf6.css → 788.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{121.0ceb8113.js.LICENSE.txt → 121.cd990f2a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{181.4d01713c.js.LICENSE.txt → 181.45639ce7.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{470.e7f915b7.js.LICENSE.txt → 470.39364cc9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{386.da241588.js.LICENSE.txt → 562.faedd192.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.693e183d.js.LICENSE.txt → 941.049134e9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{982.e5647ac8.js.LICENSE.txt → 982.8181aade.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_SplunkDatasource.b9438a9e.js.LICENSE.txt → __federation_expose_SplunkDatasource.5b9ca25b.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_SplunkLogQuery.8d011abe.js.LICENSE.txt → __federation_expose_SplunkLogQuery.5e35f21f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_SplunkTimeSeriesQuery.264a58b9.js.LICENSE.txt → __federation_expose_SplunkTimeSeriesQuery.62f3d6f2.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.31611676.js.LICENSE.txt → lib-router.02ac6b0e.js.LICENSE.txt} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatasourcePlugin } from '@perses-dev/plugin-system';
|
|
2
|
-
import { SplunkClient } from '../../model/splunk-client';
|
|
3
|
-
import { SplunkDatasourceSpec } from './splunk-datasource-types';
|
|
1
|
+
import type { DatasourcePlugin } from '@perses-dev/plugin-system';
|
|
2
|
+
import type { SplunkClient } from '../../model/splunk-client';
|
|
3
|
+
import type { SplunkDatasourceSpec } from './splunk-datasource-types';
|
|
4
4
|
export declare const SplunkDatasource: DatasourcePlugin<SplunkDatasourceSpec, SplunkClient>;
|
|
5
5
|
//# sourceMappingURL=SplunkDatasource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplunkDatasource.d.ts","sourceRoot":"","sources":["../../../../src/datasources/splunk-datasource/SplunkDatasource.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"SplunkDatasource.d.ts","sourceRoot":"","sources":["../../../../src/datasources/splunk-datasource/SplunkDatasource.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAS9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AA6BtE,eAAO,MAAM,gBAAgB,EAAE,gBAAgB,CAAC,oBAAoB,EAAE,YAAY,CAIjF,CAAC"}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { createJob, getJobStatus, getJobResults, getJobEvents, exportSearch, getIndexes } from
|
|
14
|
-
import { SplunkDatasourceEditor } from
|
|
13
|
+
import { createJob, getJobStatus, getJobResults, getJobEvents, exportSearch, getIndexes } from "../../model/splunk-client.js";
|
|
14
|
+
import { SplunkDatasourceEditor } from "./SplunkDatasourceEditor.js";
|
|
15
15
|
const createClient = (spec, options)=>{
|
|
16
16
|
const { directUrl, proxy } = spec;
|
|
17
17
|
const { proxyUrl } = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/splunk-datasource/SplunkDatasource.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { DatasourcePlugin } from '@perses-dev/plugin-system';\nimport {\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/splunk-datasource/SplunkDatasource.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { DatasourcePlugin } from '@perses-dev/plugin-system';\n\nimport type { SplunkClient } from '../../model/splunk-client';\nimport {\n createJob,\n getJobStatus,\n getJobResults,\n getJobEvents,\n exportSearch,\n getIndexes,\n} from '../../model/splunk-client';\nimport type { SplunkDatasourceSpec } from './splunk-datasource-types';\nimport { SplunkDatasourceEditor } from './SplunkDatasourceEditor';\n\nconst createClient: DatasourcePlugin<SplunkDatasourceSpec, SplunkClient>['createClient'] = (spec, options) => {\n const { directUrl, proxy } = spec;\n const { proxyUrl } = options;\n\n const datasourceUrl = directUrl ?? proxyUrl;\n if (datasourceUrl === undefined) {\n throw new Error('No URL specified for Splunk client. You can use directUrl in the spec to configure it.');\n }\n\n const specHeaders = proxy?.spec.headers;\n\n return {\n options: {\n datasourceUrl,\n },\n createJob: (params, headers) => createJob(params, { datasourceUrl, headers: headers ?? specHeaders }),\n getJobStatus: (jobId, headers) => getJobStatus(jobId, { datasourceUrl, headers: headers ?? specHeaders }),\n getJobResults: (jobId, params, headers) =>\n getJobResults(jobId, params, { datasourceUrl, headers: headers ?? specHeaders }),\n getJobEvents: (jobId, params, headers) =>\n getJobEvents(jobId, params, { datasourceUrl, headers: headers ?? specHeaders }),\n exportSearch: (params, headers) => exportSearch(params, { datasourceUrl, headers: headers ?? specHeaders }),\n getIndexes: (headers) => getIndexes({ datasourceUrl, headers: headers ?? specHeaders }),\n };\n};\n\nexport const SplunkDatasource: DatasourcePlugin<SplunkDatasourceSpec, SplunkClient> = {\n createClient,\n OptionsEditorComponent: SplunkDatasourceEditor,\n createInitialOptions: () => ({ directUrl: '' }),\n};\n"],"names":["createJob","getJobStatus","getJobResults","getJobEvents","exportSearch","getIndexes","SplunkDatasourceEditor","createClient","spec","options","directUrl","proxy","proxyUrl","datasourceUrl","undefined","Error","specHeaders","headers","params","jobId","SplunkDatasource","OptionsEditorComponent","createInitialOptions"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAKjC,SACEA,SAAS,EACTC,YAAY,EACZC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,UAAU,QACL,+BAA4B;AAEnC,SAASC,sBAAsB,QAAQ,8BAA2B;AAElE,MAAMC,eAAqF,CAACC,MAAMC;IAChG,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGH;IAC7B,MAAM,EAAEI,QAAQ,EAAE,GAAGH;IAErB,MAAMI,gBAAgBH,aAAaE;IACnC,IAAIC,kBAAkBC,WAAW;QAC/B,MAAM,IAAIC,MAAM;IAClB;IAEA,MAAMC,cAAcL,OAAOH,KAAKS;IAEhC,OAAO;QACLR,SAAS;YACPI;QACF;QACAb,WAAW,CAACkB,QAAQD,UAAYjB,UAAUkB,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;QACnGf,cAAc,CAACkB,OAAOF,UAAYhB,aAAakB,OAAO;gBAAEN;gBAAeI,SAASA,WAAWD;YAAY;QACvGd,eAAe,CAACiB,OAAOD,QAAQD,UAC7Bf,cAAciB,OAAOD,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;QAChFb,cAAc,CAACgB,OAAOD,QAAQD,UAC5Bd,aAAagB,OAAOD,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;QAC/EZ,cAAc,CAACc,QAAQD,UAAYb,aAAac,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;QACzGX,YAAY,CAACY,UAAYZ,WAAW;gBAAEQ;gBAAeI,SAASA,WAAWD;YAAY;IACvF;AACF;AAEA,OAAO,MAAMI,mBAAyE;IACpFb;IACAc,wBAAwBf;IACxBgB,sBAAsB,IAAO,CAAA;YAAEZ,WAAW;QAAG,CAAA;AAC/C,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { SplunkDatasourceSpec } from './splunk-datasource-types';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { SplunkDatasourceSpec } from './splunk-datasource-types';
|
|
3
3
|
export interface SplunkDatasourceEditorProps {
|
|
4
4
|
value: SplunkDatasourceSpec;
|
|
5
5
|
onChange: (next: SplunkDatasourceSpec) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplunkDatasourceEditor.d.ts","sourceRoot":"","sources":["../../../../src/datasources/splunk-datasource/SplunkDatasourceEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SplunkDatasourceEditor.d.ts","sourceRoot":"","sources":["../../../../src/datasources/splunk-datasource/SplunkDatasourceEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,YAAY,CAmDvF"}
|
|
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
import { HTTPSettingsEditor } from
|
|
14
|
+
import { HTTPSettingsEditor } from "@perses-dev/plugin-system";
|
|
15
15
|
export function SplunkDatasourceEditor(props) {
|
|
16
16
|
const { value, onChange, isReadonly } = props;
|
|
17
17
|
const initialSpecDirect = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/splunk-datasource/SplunkDatasourceEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { HTTPSettingsEditor } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { SplunkDatasourceSpec } from './splunk-datasource-types';\n\nexport interface SplunkDatasourceEditorProps {\n value: SplunkDatasourceSpec;\n onChange: (next: SplunkDatasourceSpec) => void;\n isReadonly?: boolean;\n}\n\nexport function SplunkDatasourceEditor(props: SplunkDatasourceEditorProps): ReactElement {\n const { value, onChange, isReadonly } = props;\n\n const initialSpecDirect: SplunkDatasourceSpec = {\n directUrl: '',\n };\n\n const initialSpecProxy: SplunkDatasourceSpec = {\n proxy: {\n kind: 'HTTPProxy',\n spec: {\n allowedEndpoints: [\n {\n endpointPattern: '/services/search/v2/jobs',\n method: 'POST',\n },\n {\n endpointPattern: '/services/search/v2/jobs/([a-zA-Z0-9_.-]+)',\n method: 'GET',\n },\n {\n endpointPattern: '/services/search/v2/jobs/([a-zA-Z0-9_.-]+)/results',\n method: 'GET',\n },\n {\n endpointPattern: '/services/search/v2/jobs/([a-zA-Z0-9_.-]+)/events',\n method: 'GET',\n },\n {\n endpointPattern: '/services/search/v2/jobs/export',\n method: 'POST',\n },\n {\n endpointPattern: '/services/data/indexes',\n method: 'GET',\n },\n ],\n url: '',\n },\n },\n };\n\n return (\n <HTTPSettingsEditor\n value={value}\n onChange={onChange}\n isReadonly={isReadonly}\n initialSpecDirect={initialSpecDirect}\n initialSpecProxy={initialSpecProxy}\n />\n );\n}\n"],"names":["HTTPSettingsEditor","SplunkDatasourceEditor","props","value","onChange","isReadonly","initialSpecDirect","directUrl","initialSpecProxy","proxy","kind","spec","allowedEndpoints","endpointPattern","method","url"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,kBAAkB,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/splunk-datasource/SplunkDatasourceEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { HTTPSettingsEditor } from '@perses-dev/plugin-system';\nimport type { ReactElement } from 'react';\n\nimport type { SplunkDatasourceSpec } from './splunk-datasource-types';\n\nexport interface SplunkDatasourceEditorProps {\n value: SplunkDatasourceSpec;\n onChange: (next: SplunkDatasourceSpec) => void;\n isReadonly?: boolean;\n}\n\nexport function SplunkDatasourceEditor(props: SplunkDatasourceEditorProps): ReactElement {\n const { value, onChange, isReadonly } = props;\n\n const initialSpecDirect: SplunkDatasourceSpec = {\n directUrl: '',\n };\n\n const initialSpecProxy: SplunkDatasourceSpec = {\n proxy: {\n kind: 'HTTPProxy',\n spec: {\n allowedEndpoints: [\n {\n endpointPattern: '/services/search/v2/jobs',\n method: 'POST',\n },\n {\n endpointPattern: '/services/search/v2/jobs/([a-zA-Z0-9_.-]+)',\n method: 'GET',\n },\n {\n endpointPattern: '/services/search/v2/jobs/([a-zA-Z0-9_.-]+)/results',\n method: 'GET',\n },\n {\n endpointPattern: '/services/search/v2/jobs/([a-zA-Z0-9_.-]+)/events',\n method: 'GET',\n },\n {\n endpointPattern: '/services/search/v2/jobs/export',\n method: 'POST',\n },\n {\n endpointPattern: '/services/data/indexes',\n method: 'GET',\n },\n ],\n url: '',\n },\n },\n };\n\n return (\n <HTTPSettingsEditor\n value={value}\n onChange={onChange}\n isReadonly={isReadonly}\n initialSpecDirect={initialSpecDirect}\n initialSpecProxy={initialSpecProxy}\n />\n );\n}\n"],"names":["HTTPSettingsEditor","SplunkDatasourceEditor","props","value","onChange","isReadonly","initialSpecDirect","directUrl","initialSpecProxy","proxy","kind","spec","allowedEndpoints","endpointPattern","method","url"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,kBAAkB,QAAQ,4BAA4B;AAW/D,OAAO,SAASC,uBAAuBC,KAAkC;IACvE,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGH;IAExC,MAAMI,oBAA0C;QAC9CC,WAAW;IACb;IAEA,MAAMC,mBAAyC;QAC7CC,OAAO;YACLC,MAAM;YACNC,MAAM;gBACJC,kBAAkB;oBAChB;wBACEC,iBAAiB;wBACjBC,QAAQ;oBACV;oBACA;wBACED,iBAAiB;wBACjBC,QAAQ;oBACV;oBACA;wBACED,iBAAiB;wBACjBC,QAAQ;oBACV;oBACA;wBACED,iBAAiB;wBACjBC,QAAQ;oBACV;oBACA;wBACED,iBAAiB;wBACjBC,QAAQ;oBACV;oBACA;wBACED,iBAAiB;wBACjBC,QAAQ;oBACV;iBACD;gBACDC,KAAK;YACP;QACF;IACF;IAEA,qBACE,KAACf;QACCG,OAAOA;QACPC,UAAUA;QACVC,YAAYA;QACZC,mBAAmBA;QACnBE,kBAAkBA;;AAGxB"}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
13
|
+
export * from "./SplunkDatasource.js";
|
|
14
|
+
export * from "./SplunkDatasourceEditor.js";
|
|
15
|
+
export * from "./splunk-datasource-types.js";
|
|
16
16
|
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/splunk-datasource/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './SplunkDatasource';\nexport * from './SplunkDatasourceEditor';\nexport * from './splunk-datasource-types';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/splunk-datasource/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './SplunkDatasource';\nexport * from './SplunkDatasourceEditor';\nexport * from './splunk-datasource-types';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,wBAAqB;AACnC,cAAc,8BAA2B;AACzC,cAAc,+BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splunk-datasource-types.d.ts","sourceRoot":"","sources":["../../../../src/datasources/splunk-datasource/splunk-datasource-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"splunk-datasource-types.d.ts","sourceRoot":"","sources":["../../../../src/datasources/splunk-datasource/splunk-datasource-types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/splunk-datasource/splunk-datasource-types.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { HTTPProxy } from '@perses-dev/spec';\n\nexport interface SplunkDatasourceSpec {\n directUrl?: string;\n proxy?: HTTPProxy;\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;AAIjC,WAGC"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/splunk-datasource/splunk-datasource-types.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { HTTPProxy } from '@perses-dev/spec';\n\nexport interface SplunkDatasourceSpec {\n directUrl?: string;\n proxy?: HTTPProxy;\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;AAIjC,WAGC"}
|
package/lib/getPluginModule.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAIxF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
|
package/lib/getPluginModule.js
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import packageJson from
|
|
13
|
+
import packageJson from "../package.json" with {
|
|
14
|
+
type: 'json'
|
|
15
|
+
};
|
|
14
16
|
/**
|
|
15
17
|
* Returns the plugin module information from package.json
|
|
16
18
|
*/ export function getPluginModule() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;
|
|
1
|
+
{"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\n\nimport packageJson from '../package.json' with { type: 'json' };\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","type","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAOA,iBAAiB,uBAAuB;IAAEC,MAAM;AAAO,EAAE;AAEhE;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGL;IAClC,OAAO;QACLM,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
|
package/lib/index-federation.js
CHANGED
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import(
|
|
13
|
+
import("./bootstrap.js");
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=index-federation.js.map
|
package/lib/index.js
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export { getPluginModule } from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
13
|
+
export { getPluginModule } from "./getPluginModule.js";
|
|
14
|
+
export * from "./model/index.js";
|
|
15
|
+
export * from "./queries/index.js";
|
|
16
|
+
export * from "./datasources/index.js";
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport { getPluginModule } from './getPluginModule';\nexport * from './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,
|
|
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,uBAAoB;AACpD,cAAc,mBAAU;AACxB,cAAc,qBAAY;AAC1B,cAAc,yBAAgB"}
|
package/lib/model/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
13
|
+
export * from "./splunk-client.js";
|
|
14
|
+
export * from "./splunk-client-types.js";
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
package/lib/model/index.js.map
CHANGED
|
@@ -1 +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,
|
|
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,qBAAkB;AAChC,cAAc,2BAAwB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SplunkJobCreateResponse, SplunkJobStatusResponse, SplunkResultsResponse, SplunkEventsResponse, SplunkIndexResponse, SplunkRequestHeaders } from './splunk-client-types';
|
|
1
|
+
import type { SplunkJobCreateResponse, SplunkJobStatusResponse, SplunkResultsResponse, SplunkEventsResponse, SplunkIndexResponse, SplunkRequestHeaders } from './splunk-client-types';
|
|
2
2
|
export interface SplunkJobCreateParams {
|
|
3
3
|
search: string;
|
|
4
4
|
earliest_time?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splunk-client.d.ts","sourceRoot":"","sources":["../../../src/model/splunk-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"splunk-client.d.ts","sourceRoot":"","sources":["../../../src/model/splunk-client.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,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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AgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAWxF"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { fetchJson } from
|
|
13
|
+
import { fetchJson } from "@perses-dev/client";
|
|
14
14
|
function buildUrl(path, datasourceUrl) {
|
|
15
15
|
if (datasourceUrl.startsWith('http://') || datasourceUrl.startsWith('https://')) {
|
|
16
16
|
return new URL(path, datasourceUrl);
|
|
@@ -1 +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":"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,SAAS,QAAQ,qBAAqB;AAuD/C,SAASC,SAASC,IAAY,EAAEC,aAAqB;IACnD,IAAIA,cAAcC,UAAU,CAAC,cAAcD,cAAcC,UAAU,CAAC,aAAa;QAC/E,OAAO,IAAIC,IAAIH,MAAMC;IACvB;IAEA,IAAIG,WAAWH;IACf,IAAIA,cAAcI,QAAQ,CAAC,QAAQL,KAAKE,UAAU,CAAC,MAAM;QACvDE,WAAWH,gBAAgBD,KAAKM,KAAK,CAAC;IACxC,OAAO,IAAI,CAACL,cAAcI,QAAQ,CAAC,QAAQ,CAACL,KAAKE,UAAU,C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Q,WAAW;IACzEL,SAASE,MAAM,CAAC,eAAeL,OAAOS,WAAW,IAAI;IAErD,MAAMc,WAAW,MAAMC,MAAMtB,IAAIQ,QAAQ,IAAI;QAC3CC,QAAQ;QACRC,SAAS;YACP,gBAAgB;YAChB,GAAGX,QAAQW,OAAO;QACpB;QACAC,MAAMV;IACR;IAEA,IAAI,CAACoB,SAASE,EAAE,EAAE;QAChB,MAAMC,YAAY,MAAMH,SAASI,IAAI;QACrC,MAAM,IAAIC,MAAM,CAAC,yBAAyB,EAAEL,SAASM,MAAM,CAAC,CAAC,EAAEN,SAASO,UAAU,CAAC,CAAC,EAAEJ,WAAW;IACnG;IAEA,MAAMC,OAAO,MAAMJ,SAASI,IAAI;IAChC,MAAMI,QAAQJ,KAAKK,IAAI,GAAGC,KAAK,CAAC;IAChC,MAAMC,UAAUH,MAAMI,MAAM,CAAC,CAACC,OAAiBA,KAAKJ,IAAI,IAAIK,GAAG,CAAC,CAACD,OAAiBE,KAAKC,KAAK,CAACH,MAAMI,MAAM;IAEzG,OAAO;QACLN,SAASA;QACTO,SAAS;QACTC,aAAa;IACf;AACF;AAEA,OAAO,eAAeC,WAAW1C,OAAyB;IACxD,MAAMC,MAAMd,SAAS,0BAA0Ba,QAAQX,aAAa;IACpEY,IAAIc,YAAY,CAACX,MAAM,CAAC,eAAe;IACvCH,IAAIc,YAAY,CAACX,MAAM,CAAC,SAAS;IACjC,OAAO,MAAMlB,UAA+Be,IAAIQ,QAAQ,IAAI;QAC1DC,QAAQ;QACRC,SAAS;YACP,gBAAgB;YAChB,GAAGX,QAAQW,OAAO;QACpB;IACF;AACF"}
|
|
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';\n\nimport type {\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":"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,SAAS,QAAQ,qBAAqB;AAwD/C,SAASC,SAASC,IAAY,EAAEC,aAAqB;IACnD,IAAIA,cAAcC,UAAU,CAAC,cAAcD,cAAcC,UAAU,CAAC,aAAa;QAC/E,OAAO,IAAIC,IAAIH,MAAMC;IACvB;IAEA,IAAIG,WAAWH;IACf,IAAIA,cAAcI,QAAQ,CAAC,QAAQL,KAAKE,UAAU,CAAC,MAAM;QACvDE,WAAWH,gBAAgBD,KAAKM,KAAK,CAAC;IACxC,OAAO,IAAI,CAACL,cAAcI,QAAQ,CAAC,QAAQ,CAACL,KAAKE,UAAU,CAAC,MAAM;QAChEE,WAAWH,gBAAgB,MAAMD;IACnC,OAAO;QACLI,WAAWH,gBAAgBD;IAC7B;IAEA,OAAO,IAAIG,IAAIC,UAAUG,OAAOC,QAAQ,CAACC,MAAM;AACjD;AAEA,OAAO,eAAeC,UACpBC,MAA6B,EAC7BC,OAAyB;IAEzB,MAAMC,MAAMd,SAAS,4BAA4Ba,QAAQX,aAAa;IAEtE,MAAMa,WAAW,IAAIC;IACrBD,SAASE,MAAM,CAAC,UAAUL,OAAOM,MAAM;IACvC,IAAIN,OAAOO,aAAa,EAAEJ,SAASE,MAAM,CAAC,iBAAiBL,OAAOO,aAAa;IAC/E,IAAIP,OAAOQ,WAAW,EAAEL,SAASE,MAAM,CAAC,eAAeL,OAAOQ,WAAW;IACzEL,SAASE,MAAM,CAAC,eAAeL,OAAOS,WAAW,IAAI;IACrD,OAAO,MAAMtB,UAAmCe,IAAIQ,QAAQ,IAAI;QAC9DC,QAAQ;QACRC,SAAS;YAC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KC,KAAK,CAACH,MAAMI,MAAM;IAEzG,OAAO;QACLN,SAASA;QACTO,SAAS;QACTC,aAAa;IACf;AACF;AAEA,OAAO,eAAeC,WAAW1C,OAAyB;IACxD,MAAMC,MAAMd,SAAS,0BAA0Ba,QAAQX,aAAa;IACpEY,IAAIc,YAAY,CAACX,MAAM,CAAC,eAAe;IACvCH,IAAIc,YAAY,CAACX,MAAM,CAAC,SAAS;IACjC,OAAO,MAAMlB,UAA+Be,IAAIQ,QAAQ,IAAI;QAC1DC,QAAQ;QACRC,SAAS;YACP,gBAAgB;YAChB,GAAGX,QAAQW,OAAO;QACpB;IACF;AACF"}
|
package/lib/queries/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
13
|
+
export * from "./splunk-time-series-query/index.js";
|
|
14
|
+
export * from "./splunk-log-query/index.js";
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
package/lib/queries/index.js.map
CHANGED
|
@@ -1 +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,
|
|
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,sCAA6B;AAC3C,cAAc,8BAAqB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { LogQueryPlugin } from './log-query-plugin-interface';
|
|
2
|
+
import type { SplunkLogQuerySpec } from './splunk-log-query-types';
|
|
3
3
|
export declare const SplunkLogQuery: LogQueryPlugin<SplunkLogQuerySpec>;
|
|
4
4
|
//# sourceMappingURL=SplunkLogQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplunkLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/SplunkLogQuery.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SplunkLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/SplunkLogQuery.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,kBAAkB,CAW7D,CAAC"}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { parseVariables } from
|
|
14
|
-
import { getSplunkLogData } from
|
|
15
|
-
import { SplunkLogQueryEditor } from
|
|
13
|
+
import { parseVariables } from "@perses-dev/plugin-system";
|
|
14
|
+
import { getSplunkLogData } from "./get-splunk-log-data.js";
|
|
15
|
+
import { SplunkLogQueryEditor } from "./SplunkLogQueryEditor.js";
|
|
16
16
|
export const SplunkLogQuery = {
|
|
17
17
|
getLogData: getSplunkLogData,
|
|
18
18
|
OptionsEditorComponent: SplunkLogQueryEditor,
|
|
@@ -22,9 +22,7 @@ export const SplunkLogQuery = {
|
|
|
22
22
|
dependsOn: (spec)=>{
|
|
23
23
|
const queryVariables = parseVariables(spec.query);
|
|
24
24
|
const allVariables = [
|
|
25
|
-
...new Set(
|
|
26
|
-
...queryVariables
|
|
27
|
-
])
|
|
25
|
+
...new Set(queryVariables)
|
|
28
26
|
];
|
|
29
27
|
return {
|
|
30
28
|
variables: allVariables
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/queries/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 {
|
|
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';\n\nimport { getSplunkLogData } from './get-splunk-log-data';\nimport type { LogQueryPlugin } from './log-query-plugin-interface';\nimport type { SplunkLogQuerySpec } from './splunk-log-query-types';\nimport { SplunkLogQueryEditor } from './SplunkLogQueryEditor';\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;AAE3D,SAASC,gBAAgB,QAAQ,2BAAwB;AAGzD,SAASC,oBAAoB,QAAQ,4BAAyB;AAE9D,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,IAAIF;SAAgB;QACjD,OAAO;YACLG,WAAWF;QACb;IACF;AACF,EAAE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
import { SplunkLogQuerySpec } from './splunk-log-query-types';
|
|
1
|
+
import type { OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { SplunkLogQuerySpec } from './splunk-log-query-types';
|
|
4
4
|
type SplunkLogQueryEditorProps = OptionsEditorProps<SplunkLogQuerySpec>;
|
|
5
5
|
export declare function SplunkLogQueryEditor(props: SplunkLogQueryEditorProps): ReactElement;
|
|
6
6
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplunkLogQueryEditor.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/SplunkLogQueryEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SplunkLogQueryEditor.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/SplunkLogQueryEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAyB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAKnE,KAAK,yBAAyB,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;AAExE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,YAAY,CAqEnF"}
|
|
@@ -11,9 +11,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { produce } from
|
|
14
|
+
import { Box, InputLabel, Stack, TextField } from "@mui/material";
|
|
15
|
+
import { DatasourceSelect, isVariableDatasource, useDatasourceSelectValueToSelector } from "@perses-dev/plugin-system";
|
|
16
|
+
import { produce } from "immer";
|
|
17
17
|
const DATASOURCE_KIND = 'SplunkDatasource';
|
|
18
18
|
const DEFAULT_DATASOURCE = {
|
|
19
19
|
kind: DATASOURCE_KIND
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/queries/splunk-log-query/SplunkLogQueryEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/queries/splunk-log-query/SplunkLogQueryEditor.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 { Box, InputLabel, Stack, TextField } from '@mui/material';\nimport type { DatasourceSelectProps, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { DatasourceSelect, isVariableDatasource, useDatasourceSelectValueToSelector } from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport type { ReactElement } from 'react';\n\nimport type { SplunkLogQuerySpec } from './splunk-log-query-types';\n\nconst DATASOURCE_KIND = 'SplunkDatasource';\nconst DEFAULT_DATASOURCE = { kind: DATASOURCE_KIND };\n\ntype SplunkLogQueryEditorProps = OptionsEditorProps<SplunkLogQuerySpec>;\n\nexport function SplunkLogQueryEditor(props: SplunkLogQueryEditorProps): ReactElement {\n const { onChange, value } = props;\n const { datasource, query } = value;\n const datasourceSelectValue = datasource ?? DEFAULT_DATASOURCE;\n const selectedDatasource = useDatasourceSelectValueToSelector(datasourceSelectValue, DATASOURCE_KIND);\n\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = (newDatasourceSelection) => {\n if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) {\n onChange(\n produce(value, (draft) => {\n draft.datasource = newDatasourceSelection;\n }),\n );\n return;\n }\n\n throw new Error('Got unexpected non SplunkQuery datasource selection');\n };\n\n const handleQueryChange = (newQuery: string): void => {\n onChange(\n produce(value, (draft) => {\n draft.query = newQuery;\n }),\n );\n };\n\n return (\n <Stack spacing={1.5} paddingBottom={1}>\n <Box>\n <InputLabel\n sx={{\n display: 'block',\n marginBottom: '4px',\n fontWeight: 500,\n }}\n >\n Datasource\n </InputLabel>\n <DatasourceSelect\n datasourcePluginKind={DATASOURCE_KIND}\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n label=\"Splunk Datasource\"\n notched\n />\n </Box>\n\n <Box>\n <InputLabel\n sx={{\n display: 'block',\n marginBottom: '4px',\n fontWeight: 500,\n }}\n >\n SPL Query\n </InputLabel>\n <TextField\n fullWidth\n multiline\n rows={4}\n value={query}\n onChange={(e) => handleQueryChange(e.target.value)}\n placeholder=\"search index=main error\"\n />\n </Box>\n </Stack>\n );\n}\n"],"names":["Box","InputLabel","Stack","TextField","DatasourceSelect","isVariableDatasource","useDatasourceSelectValueToSelector","produce","DATASOURCE_KIND","DEFAULT_DATASOURCE","kind","SplunkLogQueryEditor","props","onChange","value","datasource","query","datasourceSelectValue","selectedDatasource","handleDatasourceChange","newDatasourceSelection","draft","Error","handleQueryChange","newQuery","spacing","paddingBottom","sx","display","marginBottom","fontWeight","datasourcePluginKind","label","notched","fullWidth","multiline","rows","e","target","placeholder"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,SAAS,QAAQ,gBAAgB;AAElE,SAASC,gBAAgB,EAAEC,oBAAoB,EAAEC,kCAAkC,QAAQ,4BAA4B;AACvH,SAASC,OAAO,QAAQ,QAAQ;AAKhC,MAAMC,kBAAkB;AACxB,MAAMC,qBAAqB;IAAEC,MAAMF;AAAgB;AAInD,OAAO,SAASG,qBAAqBC,KAAgC;IACnE,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAC5B,MAAM,EAAEG,UAAU,EAAEC,KAAK,EAAE,GAAGF;IAC9B,MAAMG,wBAAwBF,cAAcN;IAC5C,MAAMS,qBAAqBZ,mCAAmCW,uBAAuBT;IAErF,MAAMW,yBAA4D,CAACC;QACjE,IAAI,CAACf,qBAAqBe,2BAA2BA,uBAAuBV,IAAI,KAAKF,iBAAiB;YACpGK,SACEN,QAAQO,OAAO,CAACO;gBACdA,MAAMN,UAAU,GAAGK;YACrB;YAEF;QACF;QAEA,MAAM,IAAIE,MAAM;IAClB;IAEA,MAAMC,oBAAoB,CAACC;QACzBX,SACEN,QAAQO,OAAO,CAACO;YACdA,MAAML,KAAK,GAAGQ;QAChB;IAEJ;IAEA,qBACE,MAACtB;QAAMuB,SAAS;QAAKC,eAAe;;0BAClC,MAAC1B;;kCACC,KAACC;wBACC0B,IAAI;4BACFC,SAAS;4BACTC,cAAc;4BACdC,YAAY;wBACd;kCACD;;kCAGD,KAAC1B;wBACC2B,sBAAsBvB;wBACtBM,OAAOI;wBACPL,UAAUM;wBACVa,OAAM;wBACNC,OAAO;;;;0BAIX,MAACjC;;kCACC,KAACC;wBACC0B,IAAI;4BACFC,SAAS;4BACTC,cAAc;4BACdC,YAAY;wBACd;kCACD;;kCAGD,KAAC3B;wBACC+B,SAAS;wBACTC,SAAS;wBACTC,MAAM;wBACNtB,OAAOE;wBACPH,UAAU,CAACwB,IAAMd,kBAAkBc,EAAEC,MAAM,CAACxB,KAAK;wBACjDyB,aAAY;;;;;;AAKtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { LogQueryPlugin } from './log-query-plugin-interface';
|
|
2
|
+
import type { SplunkLogQuerySpec } from './splunk-log-query-types';
|
|
3
3
|
export declare const getSplunkLogData: LogQueryPlugin<SplunkLogQuerySpec>['getLogData'];
|
|
4
4
|
//# sourceMappingURL=get-splunk-log-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-splunk-log-data.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/get-splunk-log-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-splunk-log-data.d.ts","sourceRoot":"","sources":["../../../../src/queries/splunk-log-query/get-splunk-log-data.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,8BAA8B,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAyBnE,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC,YAAY,CAqG7E,CAAC"}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { replaceVariables } from
|
|
14
|
-
import { DEFAULT_DATASOURCE } from
|
|
13
|
+
import { replaceVariables } from "@perses-dev/plugin-system";
|
|
14
|
+
import { DEFAULT_DATASOURCE } from "../constants.js";
|
|
15
15
|
function convertResultsToLogs(results) {
|
|
16
16
|
const resultsArray = Array.isArray(results) ? results : [
|
|
17
17
|
results
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/queries/splunk-log-query/get-splunk-log-data.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 { replaceVariables } from '@perses-dev/plugin-system';\nimport { HTTPAllowedEndpoint, LogData, LogEntry } from '@perses-dev/spec';\nimport
|
|
1
|
+
{"version":3,"sources":["../../../../src/queries/splunk-log-query/get-splunk-log-data.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 { replaceVariables } from '@perses-dev/plugin-system';\nimport type { HTTPAllowedEndpoint, LogData, LogEntry } from '@perses-dev/spec';\n\nimport type { SplunkDatasourceSpec } from '../../datasources/splunk-datasource/splunk-datasource-types';\nimport type { SplunkClient } from '../../model/splunk-client';\nimport type {\n SplunkIndexResponse,\n SplunkJobCreateResponse,\n SplunkJobStatusResponse,\n SplunkResultsResponse,\n} from '../../model/splunk-client-types';\nimport { DEFAULT_DATASOURCE } from '../constants';\nimport type { LogQueryPlugin, LogQueryContext } from './log-query-plugin-interface';\nimport type { SplunkLogQuerySpec } from './splunk-log-query-types';\n\nfunction convertResultsToLogs(\n results:\n | Array<{ _time: string; _raw: string; [key: string]: string | number }>\n | { _time: string; _raw: string; [key: string]: string | number },\n): LogData {\n const resultsArray = Array.isArray(results) ? results : [results];\n\n const entries: LogEntry[] = resultsArray.map((result) => ({\n timestamp: new Date(result._time).getTime() / 1000,\n line: result._raw || JSON.stringify(result),\n // Convert all other response properties to labels, excluding '_time' and '_raw' as they are used in panel row display\n labels: Object.fromEntries(Object.entries(result).filter(([key]) => key !== '_time' && key !== '_raw')) as Record<\n string,\n string\n >,\n }));\n\n return {\n entries,\n totalCount: entries.length,\n };\n}\n\nexport const getSplunkLogData: LogQueryPlugin<SplunkLogQuerySpec>['getLogData'] = async (\n spec: SplunkLogQuerySpec,\n context: LogQueryContext,\n) => {\n if (!spec.query) {\n return {\n logs: { entries: [], totalCount: 0 },\n timeRange: { start: context.timeRange.start, end: context.timeRange.end },\n };\n }\n\n const query = replaceVariables(spec.query, context.variableState);\n const client: SplunkClient = await context.datasourceStore.getDatasourceClient<SplunkClient>(\n spec.datasource ?? DEFAULT_DATASOURCE,\n );\n\n const datasourceSpec = await context.datasourceStore.getDatasource(spec.datasource ?? DEFAULT_DATASOURCE);\n const allowedEndpoints: HTTPAllowedEndpoint[] =\n (datasourceSpec.plugin.spec as SplunkDatasourceSpec)?.proxy?.spec?.allowedEndpoints || [];\n\n const hasExportEndpoint: boolean = allowedEndpoints.some((ep: HTTPAllowedEndpoint) =>\n ep.endpointPattern?.includes('/export'),\n );\n //TODO - Ideally this Indexes endpoint to be pushed inside the explorer view.\n const hasIndexesEndpoint: boolean = allowedEndpoints.some((ep: HTTPAllowedEndpoint) =>\n ep.endpointPattern?.includes('/indexes'),\n );\n\n const { start, end } = context.timeRange;\n\n const earliest_time: string = Math.floor(start.getTime() / 1000).toString();\n const latest_time: string = Math.floor(end.getTime() / 1000).toString();\n\n let eventsResponse: SplunkResultsResponse;\n\n if (hasExportEndpoint || datasourceSpec.plugin.spec.directUrl) {\n eventsResponse = await client.exportSearch({\n search: query,\n earliest_time: spec.earliest || earliest_time,\n latest_time: spec.latest || latest_time,\n });\n } else if (hasIndexesEndpoint || datasourceSpec.plugin.spec.directUrl) {\n //TODO - Ideally this Indexes endpoint to be pushed inside the explorer view.\n const indexesResponse: SplunkIndexResponse = await client.getIndexes();\n const entries = indexesResponse?.entry\n ? indexesResponse.entry.map((index) => ({\n // Use current time as timestamp since index response does not include a timestamp.\n timestamp: new Date().getTime() / 1000,\n line: index.name,\n // Convert all other index response properties to labels, excluding 'name' as it is used in panel row display\n labels: Object.fromEntries(\n Object.entries(index)\n .filter(([key]) => key !== 'name')\n .map(([key, value]) => [key, typeof value === 'object' ? JSON.stringify(value) : String(value)]),\n ) as Record<string, string>,\n }))\n : [];\n\n return {\n logs: {\n entries,\n totalCount: entries.length,\n },\n timeRange: { start, end },\n metadata: {\n executedQueryString: query,\n },\n };\n } else {\n const jobResponse: SplunkJobCreateResponse = await client.createJob({\n search: query,\n earliest_time: spec.earliest || earliest_time,\n latest_time: spec.latest || latest_time,\n });\n\n const jobId: string = jobResponse.sid;\n\n let jobStatus: SplunkJobStatusResponse;\n do {\n await new Promise((resolve) => setTimeout(resolve, 500));\n jobStatus = await client.getJobStatus(jobId);\n if (!jobStatus || !jobStatus.entry?.[0]?.content) {\n console.warn('Failed to get job status or job status response is malformed', { jobStatus });\n break;\n }\n } while (!jobStatus.entry?.[0]?.content?.isDone);\n\n eventsResponse = await client.getJobResults(jobId);\n }\n\n const logs: LogData = convertResultsToLogs(\n eventsResponse.results as Array<{ _time: string; _raw: string; [key: string]: string | number }>,\n );\n\n return {\n logs,\n timeRange: { start, end },\n metadata: {\n executedQueryString: query,\n },\n };\n};\n"],"names":["replaceVariables","DEFAULT_DATASOURCE","convertResultsToLogs","results","resultsArray","Array","isArray","entries","map","result","timestamp","Date","_time","getTime","line","_raw","JSON","stringify","labels","Object","fromEntries","filter","key","totalCount","length","getSplunkLogData","spec","context","query","logs","timeRange","start","end","variableState","client","datasourceStore","getDatasourceClient","datasource","datasourceSpec","getDatasource","allowedEndpoints","plugin","proxy","hasExportEndpoint","some","ep","endpointPattern","includes","hasIndexesEndpoint","earliest_time","Math","floor","toString","latest_time","eventsResponse","directUrl","exportSearch","search","earliest","latest","indexesResponse","getIndexes","entry","index","name","value","String","metadata","executedQueryString","jobResponse","createJob","jobId","sid","jobStatus","Promise","resolve","setTimeout","getJobStatus","content","console","warn","isDone","getJobResults"],"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,gBAAgB,QAAQ,4BAA4B;AAW7D,SAASC,kBAAkB,QAAQ,kBAAe;AAIlD,SAASC,qBACPC,OAEmE;IAEnE,MAAMC,eAAeC,MAAMC,OAAO,CAACH,WAAWA,UAAU;QAACA;KAAQ;IAEjE,MAAMI,UAAsBH,aAAaI,GAAG,CAAC,CAACC,SAAY,CAAA;YACxDC,WAAW,IAAIC,KAAKF,OAAOG,KAAK,EAAEC,OAAO,KAAK;YAC9CC,MAAML,OAAOM,IAAI,IAAIC,KAAKC,SAAS,CAACR;YACpC,sHAAsH;YACtHS,QAAQC,OAAOC,WAAW,CAACD,OAAOZ,OAAO,CAACE,QAAQY,MAAM,CAAC,CAAC,CAACC,IAAI,GAAKA,QAAQ,WAAWA,QAAQ;QA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,CAAC,gEAAgE;oBAAEP;gBAAU;gBACzF;YACF;QACF,QAAS,CAACA,UAAUX,KAAK,EAAE,CAAC,EAAE,EAAEgB,SAASG,OAAQ;QAEjD3B,iBAAiB,MAAMpB,OAAOgD,aAAa,CAACX;IAC9C;IAEA,MAAM1C,OAAgB3B,qBACpBoD,eAAenD,OAAO;IAGxB,OAAO;QACL0B;QACAC,WAAW;YAAEC;YAAOC;QAAI;QACxBmC,UAAU;YACRC,qBAAqBxC;QACvB;IACF;AACF,EAAE"}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
13
|
+
export * from "./get-splunk-log-data.js";
|
|
14
|
+
export * from "./SplunkLogQuery.js";
|
|
15
|
+
export * from "./SplunkLogQueryEditor.js";
|
|
16
|
+
export * from "./splunk-log-query-types.js";
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=index.js.map
|