@perses-dev/victorialogs-plugin 0.4.0 → 0.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mf/js/{VictoriaLogs.db5cc46b.js → VictoriaLogs.72a4d689.js} +3 -3
- package/__mf/js/async/1522.e41aa623.js +22 -0
- package/__mf/js/async/1616.f91f6c7b.js +1 -0
- package/__mf/js/async/198.4b388f96.js +2 -0
- package/__mf/js/async/2377.1627ef61.js +1 -0
- package/__mf/js/async/2786.4ba35a40.js +2 -0
- package/__mf/js/async/2901.21debf59.js +1 -0
- package/__mf/js/async/3865.3eba8e7a.js +1 -0
- package/__mf/js/async/392.8532b8b9.js +2 -0
- package/__mf/js/async/4121.43679b06.js +2 -0
- package/__mf/js/async/4248.f3720fee.js +1 -0
- package/__mf/js/async/4960.813e0b59.js +2 -0
- package/__mf/js/async/5019.a912bf58.js +1 -0
- package/__mf/js/async/5440.e2ea1262.js +2 -0
- package/__mf/js/async/5587.144f3899.js +1 -0
- package/__mf/js/async/560.ebacb2ba.js +37 -0
- package/__mf/js/async/5623.6fc3cf67.js +1 -0
- package/__mf/js/async/5706.38c46b8c.js +1 -0
- package/__mf/js/async/6274.efc9c64a.js +2 -0
- package/__mf/js/async/663.cccc183b.js +1 -0
- package/__mf/js/async/7155.68cbed18.js +7 -0
- package/__mf/js/async/7155.68cbed18.js.LICENSE.txt +102 -0
- package/__mf/js/async/7192.9670a853.js +1 -0
- package/__mf/js/async/7740.c8cb2613.js +101 -0
- package/__mf/js/async/7817.620f3116.js +2 -0
- package/__mf/js/async/7862.e6de7017.js +2 -0
- package/__mf/js/async/7873.4d25d71e.js +2 -0
- package/__mf/js/async/7968.69cffbaf.js +1 -0
- package/__mf/js/async/8356.d0bcc56a.js +1 -0
- package/__mf/js/async/8470.6cf8f7b1.js +2 -0
- package/__mf/js/async/9235.bfe14cc5.js +1 -0
- package/__mf/js/async/941.73cfe62f.js +2 -0
- package/__mf/js/async/9440.37da95ff.js +10 -0
- package/__mf/js/async/9700.72a5372d.js +3 -0
- package/__mf/js/async/__federation_expose_VictoriaLogsDatasource.db12b897.js +2 -0
- package/__mf/js/async/__federation_expose_VictoriaLogsFieldNamesVariable.59ed2274.js +2 -0
- package/__mf/js/async/__federation_expose_VictoriaLogsFieldValuesVariable.fcbe16ef.js +2 -0
- package/__mf/js/async/__federation_expose_VictoriaLogsLogQuery.803dba77.js +1 -0
- package/__mf/js/async/__federation_expose_VictoriaLogsTimeSeriesQuery.6d5fdbb1.js +1 -0
- package/__mf/js/{main.0d99a16b.js → main.00381beb.js} +2 -2
- package/lib/bootstrap.js +2 -2
- package/lib/components/index.js +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/logsql-editor.d.ts +2 -2
- package/lib/components/logsql-editor.d.ts.map +1 -1
- package/lib/components/logsql-editor.js +4 -4
- package/lib/components/logsql-editor.js.map +1 -1
- package/lib/components/logsql-extension.d.ts +1 -1
- package/lib/components/logsql-extension.d.ts.map +1 -1
- package/lib/components/logsql-extension.js +3 -3
- package/lib/components/logsql-extension.js.map +1 -1
- package/lib/components/logsql-highlight.js +1 -1
- package/lib/datasources/index.js +1 -1
- package/lib/datasources/index.js.map +1 -1
- package/lib/datasources/victorialogs-datasource/VictoriaLogsDatasource.d.ts +3 -3
- package/lib/datasources/victorialogs-datasource/VictoriaLogsDatasource.d.ts.map +1 -1
- package/lib/datasources/victorialogs-datasource/VictoriaLogsDatasource.js +2 -2
- package/lib/datasources/victorialogs-datasource/VictoriaLogsDatasource.js.map +1 -1
- package/lib/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.d.ts +2 -2
- package/lib/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.d.ts.map +1 -1
- package/lib/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.js +1 -1
- package/lib/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.js.map +1 -1
- package/lib/datasources/victorialogs-datasource/index.js +3 -3
- package/lib/datasources/victorialogs-datasource/index.js.map +1 -1
- package/lib/datasources/victorialogs-datasource/types.d.ts +1 -1
- package/lib/datasources/victorialogs-datasource/types.d.ts.map +1 -1
- package/lib/datasources/victorialogs-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/client.d.ts +1 -1
- package/lib/model/client.d.ts.map +1 -1
- package/lib/model/client.js.map +1 -1
- package/lib/model/index.js +3 -3
- package/lib/model/index.js.map +1 -1
- package/lib/model/selectors.d.ts +2 -2
- package/lib/model/selectors.d.ts.map +1 -1
- package/lib/model/selectors.js +1 -1
- package/lib/model/selectors.js.map +1 -1
- package/lib/queries/index.js +2 -2
- package/lib/queries/index.js.map +1 -1
- package/lib/queries/victorialogs-log-query/VictoriaLogsLogQuery.d.ts +2 -2
- package/lib/queries/victorialogs-log-query/VictoriaLogsLogQuery.d.ts.map +1 -1
- package/lib/queries/victorialogs-log-query/VictoriaLogsLogQuery.js +4 -6
- package/lib/queries/victorialogs-log-query/VictoriaLogsLogQuery.js.map +1 -1
- package/lib/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.d.ts +3 -3
- package/lib/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.d.ts.map +1 -1
- package/lib/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.js +7 -7
- package/lib/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.js.map +1 -1
- package/lib/queries/victorialogs-log-query/index.js +4 -4
- package/lib/queries/victorialogs-log-query/index.js.map +1 -1
- package/lib/queries/victorialogs-log-query/query.d.ts +2 -2
- package/lib/queries/victorialogs-log-query/query.d.ts.map +1 -1
- package/lib/queries/victorialogs-log-query/query.js +2 -2
- package/lib/queries/victorialogs-log-query/query.js.map +1 -1
- package/lib/queries/victorialogs-log-query/types.d.ts +1 -1
- package/lib/queries/victorialogs-log-query/types.d.ts.map +1 -1
- package/lib/queries/victorialogs-log-query/types.js.map +1 -1
- package/lib/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.d.ts +2 -2
- package/lib/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.d.ts.map +1 -1
- package/lib/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.js +4 -6
- package/lib/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.js.map +1 -1
- package/lib/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.d.ts +3 -3
- package/lib/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.d.ts.map +1 -1
- package/lib/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.js +7 -7
- package/lib/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.js.map +1 -1
- package/lib/queries/victorialogs-time-series-query/index.js +4 -4
- package/lib/queries/victorialogs-time-series-query/index.js.map +1 -1
- package/lib/queries/victorialogs-time-series-query/query.d.ts +2 -2
- package/lib/queries/victorialogs-time-series-query/query.d.ts.map +1 -1
- package/lib/queries/victorialogs-time-series-query/query.js +4 -4
- package/lib/queries/victorialogs-time-series-query/query.js.map +1 -1
- package/lib/queries/victorialogs-time-series-query/types.d.ts +1 -1
- package/lib/queries/victorialogs-time-series-query/types.d.ts.map +1 -1
- package/lib/queries/victorialogs-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/lib/variables/index.js +2 -2
- package/lib/variables/index.js.map +1 -1
- package/lib/variables/types.d.ts +2 -2
- package/lib/variables/types.d.ts.map +1 -1
- package/lib/variables/types.js.map +1 -1
- package/lib/variables/utils.d.ts +5 -5
- package/lib/variables/utils.d.ts.map +1 -1
- package/lib/variables/utils.js +2 -2
- package/lib/variables/utils.js.map +1 -1
- package/lib/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.d.ts +2 -2
- package/lib/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.d.ts.map +1 -1
- package/lib/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.js +4 -4
- package/lib/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.js.map +1 -1
- package/lib/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.d.ts +3 -3
- package/lib/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.d.ts.map +1 -1
- package/lib/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.js +5 -5
- package/lib/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.js.map +1 -1
- package/lib/variables/victorialogs-field-names/index.js +1 -1
- package/lib/variables/victorialogs-field-names/index.js.map +1 -1
- package/lib/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.d.ts +2 -2
- package/lib/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.d.ts.map +1 -1
- package/lib/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.js +4 -4
- package/lib/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.js.map +1 -1
- package/lib/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.d.ts +3 -3
- package/lib/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.d.ts.map +1 -1
- package/lib/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.js +6 -6
- package/lib/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.js.map +1 -1
- package/lib/variables/victorialogs-field-values/index.js +1 -1
- package/lib/variables/victorialogs-field-values/index.js.map +1 -1
- package/mf-manifest.json +117 -230
- package/mf-stats.json +117 -242
- package/package.json +20 -12
- package/__mf/js/async/1170.532d9fb3.js +0 -101
- package/__mf/js/async/1616.5a6b8ab3.js +0 -1
- package/__mf/js/async/1728.b01c38aa.js +0 -1
- package/__mf/js/async/1969.fc35e1b4.js +0 -1
- package/__mf/js/async/198.fbb67f8a.js +0 -2
- package/__mf/js/async/2043.b149adfd.js +0 -2
- package/__mf/js/async/2043.b149adfd.js.LICENSE.txt +0 -24
- package/__mf/js/async/2377.9265b0a7.js +0 -1
- package/__mf/js/async/2728.fd6779e6.js +0 -1
- package/__mf/js/async/2749.71c38fe0.js +0 -2
- package/__mf/js/async/2842.3740ca9b.js +0 -1
- package/__mf/js/async/3059.fe1cdfc3.js +0 -1
- package/__mf/js/async/392.c6e57bd8.js +0 -2
- package/__mf/js/async/3981.02c66856.js +0 -3
- package/__mf/js/async/3998.e9a3cf1a.js +0 -2
- package/__mf/js/async/4121.5468ac01.js +0 -2
- package/__mf/js/async/4225.744952e9.js +0 -10
- package/__mf/js/async/4248.9b99209c.js +0 -1
- package/__mf/js/async/5019.51d94aab.js +0 -1
- package/__mf/js/async/5071.6ac86637.js +0 -1
- package/__mf/js/async/5405.004a286a.js +0 -2
- package/__mf/js/async/5405.004a286a.js.LICENSE.txt +0 -37
- package/__mf/js/async/5440.7765ad14.js +0 -2
- package/__mf/js/async/5481.b7b48b8f.js +0 -2
- package/__mf/js/async/5587.12959dbf.js +0 -1
- package/__mf/js/async/5706.55b9ef2f.js +0 -1
- package/__mf/js/async/6274.0634d636.js +0 -2
- package/__mf/js/async/6408.2bc7e8f4.js +0 -7
- package/__mf/js/async/6408.2bc7e8f4.js.LICENSE.txt +0 -39
- package/__mf/js/async/6410.63a88be6.js +0 -1
- package/__mf/js/async/6592.24e266ac.js +0 -1
- package/__mf/js/async/6854.21ddded3.js +0 -1
- package/__mf/js/async/6864.66bc6315.js +0 -2
- package/__mf/js/async/7177.dfbac40a.js +0 -1
- package/__mf/js/async/7192.339adba2.js +0 -1
- package/__mf/js/async/7793.43841fdc.js +0 -1
- package/__mf/js/async/7817.5e96b0dd.js +0 -2
- package/__mf/js/async/7968.d586d9f8.js +0 -1
- package/__mf/js/async/7978.895bbb5f.js +0 -1
- package/__mf/js/async/7984.194982d6.js +0 -22
- package/__mf/js/async/8356.053c21d0.js +0 -1
- package/__mf/js/async/8470.cb89de3b.js +0 -2
- package/__mf/js/async/873.4df0ea19.js +0 -1
- package/__mf/js/async/8787.c3298397.js +0 -2
- package/__mf/js/async/9235.3e1de7b9.js +0 -1
- package/__mf/js/async/941.a44f722e.js +0 -2
- package/__mf/js/async/9588.c379dd44.js +0 -1
- package/__mf/js/async/9836.fd9de3af.js +0 -1
- package/__mf/js/async/9877.8b83de3c.js +0 -38
- package/__mf/js/async/9944.4d41cb7b.js +0 -1
- package/__mf/js/async/__federation_expose_VictoriaLogsDatasource.807ae747.js +0 -2
- package/__mf/js/async/__federation_expose_VictoriaLogsFieldNamesVariable.ccafeb36.js +0 -1
- package/__mf/js/async/__federation_expose_VictoriaLogsFieldValuesVariable.5e29c327.js +0 -1
- package/__mf/js/async/__federation_expose_VictoriaLogsLogQuery.6e607640.js +0 -1
- package/__mf/js/async/__federation_expose_VictoriaLogsTimeSeriesQuery.91a8ad9d.js +0 -1
- package/lib/cjs/bootstrap.js +0 -26
- package/lib/cjs/components/index.js +0 -23
- package/lib/cjs/components/logsql-editor.js +0 -110
- package/lib/cjs/components/logsql-extension.js +0 -55
- package/lib/cjs/components/logsql-highlight.js +0 -40
- package/lib/cjs/datasources/index.js +0 -30
- package/lib/cjs/datasources/victorialogs-datasource/VictoriaLogsDatasource.js +0 -61
- package/lib/cjs/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.js +0 -95
- package/lib/cjs/datasources/victorialogs-datasource/index.js +0 -32
- package/lib/cjs/datasources/victorialogs-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/client.js +0 -156
- package/lib/cjs/model/index.js +0 -32
- package/lib/cjs/model/selectors.js +0 -47
- package/lib/cjs/model/types.js +0 -16
- package/lib/cjs/queries/constants.js +0 -34
- package/lib/cjs/queries/index.js +0 -31
- package/lib/cjs/queries/victorialogs-log-query/VictoriaLogsLogQuery.js +0 -63
- package/lib/cjs/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.js +0 -114
- package/lib/cjs/queries/victorialogs-log-query/index.js +0 -33
- package/lib/cjs/queries/victorialogs-log-query/query.js +0 -73
- package/lib/cjs/queries/victorialogs-log-query/types.js +0 -16
- package/lib/cjs/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.js +0 -43
- package/lib/cjs/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.js +0 -112
- package/lib/cjs/queries/victorialogs-time-series-query/index.js +0 -33
- package/lib/cjs/queries/victorialogs-time-series-query/query.js +0 -126
- package/lib/cjs/queries/victorialogs-time-series-query/types.js +0 -16
- package/lib/cjs/setup-tests.js +0 -19
- package/lib/cjs/variables/index.js +0 -31
- package/lib/cjs/variables/types.js +0 -16
- package/lib/cjs/variables/utils.js +0 -97
- package/lib/cjs/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.js +0 -57
- package/lib/cjs/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.js +0 -80
- package/lib/cjs/variables/victorialogs-field-names/index.js +0 -30
- package/lib/cjs/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.js +0 -61
- package/lib/cjs/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.js +0 -113
- package/lib/cjs/variables/victorialogs-field-values/index.js +0 -30
- /package/__mf/css/async/{6408.85c2cbf6.css → 7155.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{7984.194982d6.js.LICENSE.txt → 1522.e41aa623.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{198.fbb67f8a.js.LICENSE.txt → 198.4b388f96.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2749.71c38fe0.js.LICENSE.txt → 2786.4ba35a40.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.c6e57bd8.js.LICENSE.txt → 392.8532b8b9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{4121.5468ac01.js.LICENSE.txt → 4121.43679b06.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{3998.e9a3cf1a.js.LICENSE.txt → 4960.813e0b59.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5440.7765ad14.js.LICENSE.txt → 5440.e2ea1262.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6274.0634d636.js.LICENSE.txt → 6274.efc9c64a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6864.66bc6315.js.LICENSE.txt → 7817.620f3116.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5481.b7b48b8f.js.LICENSE.txt → 7862.e6de7017.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8470.cb89de3b.js.LICENSE.txt → 8470.6cf8f7b1.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{7817.5e96b0dd.js.LICENSE.txt → 941.73cfe62f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{4225.744952e9.js.LICENSE.txt → 9440.37da95ff.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8787.c3298397.js.LICENSE.txt → __federation_expose_VictoriaLogsDatasource.db12b897.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.a44f722e.js.LICENSE.txt → __federation_expose_VictoriaLogsFieldNamesVariable.59ed2274.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_VictoriaLogsDatasource.807ae747.js.LICENSE.txt → __federation_expose_VictoriaLogsFieldValuesVariable.fcbe16ef.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport { LogsQLEditor } from './logsql-editor';\nexport type { LogsQLEditorProps } from './logsql-editor';\n"],"names":["LogsQLEditor"],"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,YAAY,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport { LogsQLEditor } from './logsql-editor';\nexport type { LogsQLEditorProps } from './logsql-editor';\n"],"names":["LogsQLEditor"],"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,YAAY,QAAQ,qBAAkB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactCodeMirrorProps } from '@uiw/react-codemirror';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
3
|
export type LogsQLEditorProps = Omit<ReactCodeMirrorProps, 'theme' | 'extensions'>;
|
|
4
4
|
export declare function LogsQLEditor(props: LogsQLEditorProps): ReactElement;
|
|
5
5
|
//# sourceMappingURL=logsql-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logsql-editor.d.ts","sourceRoot":"","sources":["../../../src/components/logsql-editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logsql-editor.d.ts","sourceRoot":"","sources":["../../../src/components/logsql-editor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,YAAY,CAAC,CAAC;AAEnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAyCnE"}
|
|
@@ -11,10 +11,10 @@ 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 {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import { LogsQLExtension } from
|
|
14
|
+
import { useTheme } from "@mui/material";
|
|
15
|
+
import CodeMirror, { EditorView } from "@uiw/react-codemirror";
|
|
16
|
+
import { useMemo } from "react";
|
|
17
|
+
import { LogsQLExtension } from "./logsql-extension.js";
|
|
18
18
|
export function LogsQLEditor(props) {
|
|
19
19
|
const theme = useTheme();
|
|
20
20
|
const isDarkMode = theme.palette.mode === 'dark';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/logsql-editor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/components/logsql-editor.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 { useTheme } from '@mui/material';\nimport type { ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport CodeMirror, { EditorView } from '@uiw/react-codemirror';\nimport type { ReactElement } from 'react';\nimport { useMemo } from 'react';\n\nimport { LogsQLExtension } from './logsql-extension';\n\nexport type LogsQLEditorProps = Omit<ReactCodeMirrorProps, 'theme' | 'extensions'>;\n\nexport function LogsQLEditor(props: LogsQLEditorProps): ReactElement {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n const logsqlExtension = useMemo(() => {\n return LogsQLExtension();\n }, []);\n\n const codemirrorTheme = useMemo(() => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n\n return EditorView.theme({\n '&': {\n backgroundColor: 'transparent !important', // required for dark mode\n border: `1px solid ${borderColor}`,\n borderRadius: `${theme.shape.borderRadius}px`,\n },\n '&.cm-focused.cm-editor': {\n outline: 'none',\n },\n '.cm-content': {\n padding: '8px',\n },\n });\n }, [theme]);\n\n return (\n <CodeMirror\n {...props}\n theme={isDarkMode ? 'dark' : 'light'}\n basicSetup={{\n lineNumbers: false,\n highlightActiveLine: false,\n highlightActiveLineGutter: false,\n foldGutter: false,\n syntaxHighlighting: true,\n }}\n extensions={[EditorView.lineWrapping, logsqlExtension, codemirrorTheme]}\n placeholder='Example: {job=\"my-service\"} |= \"error\"'\n />\n );\n}\n"],"names":["useTheme","CodeMirror","EditorView","useMemo","LogsQLExtension","LogsQLEditor","props","theme","isDarkMode","palette","mode","logsqlExtension","codemirrorTheme","borderColor","backgroundColor","border","borderRadius","shape","outline","padding","basicSetup","lineNumbers","highlightActiveLine","highlightActiveLineGutter","foldGutter","syntaxHighlighting","extensions","lineWrapping","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,QAAQ,QAAQ,gBAAgB;AAEzC,OAAOC,cAAcC,UAAU,QAAQ,wBAAwB;AAE/D,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,eAAe,QAAQ,wBAAqB;AAIrD,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAMC,QAAQP;IACd,MAAMQ,aAAaD,MAAME,OAAO,CAACC,IAAI,KAAK;IAE1C,MAAMC,kBAAkBR,QAAQ;QAC9B,OAAOC;IACT,GAAG,EAAE;IAEL,MAAMQ,kBAAkBT,QAAQ;QAC9B,MAAMU,cAAcN,MAAME,OAAO,CAACC,IAAI,KAAK,UAAU,wBAAwB;QAE7E,OAAOR,WAAWK,KAAK,CAAC;YACtB,KAAK;gBACHO,iBAAiB;gBACjBC,QAAQ,CAAC,UAAU,EAAEF,aAAa;gBAClCG,cAAc,GAAGT,MAAMU,KAAK,CAACD,YAAY,CAAC,EAAE,CAAC;YAC/C;YACA,0BAA0B;gBACxBE,SAAS;YACX;YACA,eAAe;gBACbC,SAAS;YACX;QACF;IACF,GAAG;QAACZ;KAAM;IAEV,qBACE,KAACN;QACE,GAAGK,KAAK;QACTC,OAAOC,aAAa,SAAS;QAC7BY,YAAY;YACVC,aAAa;YACbC,qBAAqB;YACrBC,2BAA2B;YAC3BC,YAAY;YACZC,oBAAoB;QACtB;QACAC,YAAY;YAACxB,WAAWyB,YAAY;YAAEhB;YAAiBC;SAAgB;QACvEgB,aAAY;;AAGlB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { LRLanguage } from '@codemirror/language';
|
|
2
|
-
import { Extension } from '@uiw/react-codemirror';
|
|
2
|
+
import type { Extension } from '@uiw/react-codemirror';
|
|
3
3
|
export declare function LogsQLExtension(): Array<LRLanguage | Extension>;
|
|
4
4
|
//# sourceMappingURL=logsql-extension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logsql-extension.d.ts","sourceRoot":"","sources":["../../../src/components/logsql-extension.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"logsql-extension.d.ts","sourceRoot":"","sources":["../../../src/components/logsql-extension.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAgBvD,wBAAgB,eAAe,IAAI,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC,CAG/D"}
|
|
@@ -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 { LRLanguage } from
|
|
14
|
-
import { parser } from
|
|
15
|
-
import { logsqlHighlight } from
|
|
13
|
+
import { LRLanguage } from "@codemirror/language";
|
|
14
|
+
import { parser } from "@grafana/lezer-logql";
|
|
15
|
+
import { logsqlHighlight } from "./logsql-highlight.js";
|
|
16
16
|
function logsqlLanguage() {
|
|
17
17
|
return LRLanguage.define({
|
|
18
18
|
parser: parser.configure({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/logsql-extension.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 { LRLanguage } from '@codemirror/language';\nimport { parser } from '@grafana/lezer-logql';\nimport { Extension } from '@uiw/react-codemirror';\nimport { logsqlHighlight } from './logsql-highlight';\n\nfunction logsqlLanguage(): LRLanguage {\n return LRLanguage.define({\n parser: parser.configure({\n props: [logsqlHighlight],\n }),\n languageData: {\n closeBrackets: { brackets: ['(', '[', '{', \"'\", '\"', '`'] },\n commentTokens: { line: '#' },\n },\n });\n}\n\nexport function LogsQLExtension(): Array<LRLanguage | Extension> {\n const language = logsqlLanguage();\n return [language];\n}\n"],"names":["LRLanguage","parser","logsqlHighlight","logsqlLanguage","define","configure","props","languageData","closeBrackets","brackets","commentTokens","line","LogsQLExtension","language"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,UAAU,QAAQ,uBAAuB;AAClD,SAASC,MAAM,QAAQ,uBAAuB;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/logsql-extension.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 { LRLanguage } from '@codemirror/language';\nimport { parser } from '@grafana/lezer-logql';\nimport type { Extension } from '@uiw/react-codemirror';\n\nimport { logsqlHighlight } from './logsql-highlight';\n\nfunction logsqlLanguage(): LRLanguage {\n return LRLanguage.define({\n parser: parser.configure({\n props: [logsqlHighlight],\n }),\n languageData: {\n closeBrackets: { brackets: ['(', '[', '{', \"'\", '\"', '`'] },\n commentTokens: { line: '#' },\n },\n });\n}\n\nexport function LogsQLExtension(): Array<LRLanguage | Extension> {\n const language = logsqlLanguage();\n return [language];\n}\n"],"names":["LRLanguage","parser","logsqlHighlight","logsqlLanguage","define","configure","props","languageData","closeBrackets","brackets","commentTokens","line","LogsQLExtension","language"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,UAAU,QAAQ,uBAAuB;AAClD,SAASC,MAAM,QAAQ,uBAAuB;AAG9C,SAASC,eAAe,QAAQ,wBAAqB;AAErD,SAASC;IACP,OAAOH,WAAWI,MAAM,CAAC;QACvBH,QAAQA,OAAOI,SAAS,CAAC;YACvBC,OAAO;gBAACJ;aAAgB;QAC1B;QACAK,cAAc;YACZC,eAAe;gBAAEC,UAAU;oBAAC;oBAAK;oBAAK;oBAAK;oBAAK;oBAAK;iBAAI;YAAC;YAC1DC,eAAe;gBAAEC,MAAM;YAAI;QAC7B;IACF;AACF;AAEA,OAAO,SAASC;IACd,MAAMC,WAAWV;IACjB,OAAO;QAACU;KAAS;AACnB"}
|
|
@@ -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 { styleTags, tags } from
|
|
13
|
+
import { styleTags, tags } from "@lezer/highlight";
|
|
14
14
|
export const logsqlHighlight = styleTags({
|
|
15
15
|
LineComment: tags.comment,
|
|
16
16
|
'Identifier StreamSelector': tags.labelName,
|
package/lib/datasources/index.js
CHANGED
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
13
|
+
export * from "./victorialogs-datasource/index.js";
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/datasources/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './victorialogs-datasource';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,
|
|
1
|
+
{"version":3,"sources":["../../../src/datasources/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './victorialogs-datasource';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,qCAA4B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatasourcePlugin } from '@perses-dev/plugin-system';
|
|
2
|
-
import { VictoriaLogsClient } from '../../model/client';
|
|
3
|
-
import { VictoriaLogsDatasourceSpec } from './types';
|
|
1
|
+
import type { DatasourcePlugin } from '@perses-dev/plugin-system';
|
|
2
|
+
import type { VictoriaLogsClient } from '../../model/client';
|
|
3
|
+
import type { VictoriaLogsDatasourceSpec } from './types';
|
|
4
4
|
export declare const VictoriaLogsDatasource: DatasourcePlugin<VictoriaLogsDatasourceSpec, VictoriaLogsClient>;
|
|
5
5
|
//# sourceMappingURL=VictoriaLogsDatasource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VictoriaLogsDatasource.d.ts","sourceRoot":"","sources":["../../../../src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"VictoriaLogsDatasource.d.ts","sourceRoot":"","sources":["../../../../src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AA4B1D,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,CAAC,0BAA0B,EAAE,kBAAkB,CAInG,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 { streamQueryRange, statsQueryRange, fieldNames, fieldValues } from
|
|
14
|
-
import { VictoriaLogsDatasourceEditor } from
|
|
13
|
+
import { streamQueryRange, statsQueryRange, fieldNames, fieldValues } from "../../model/client.js";
|
|
14
|
+
import { VictoriaLogsDatasourceEditor } from "./VictoriaLogsDatasourceEditor.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/victorialogs-datasource/VictoriaLogsDatasource.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 { VictoriaLogsClient
|
|
1
|
+
{"version":3,"sources":["../../../../src/datasources/victorialogs-datasource/VictoriaLogsDatasource.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 { VictoriaLogsClient } from '../../model/client';\nimport { streamQueryRange, statsQueryRange, fieldNames, fieldValues } from '../../model/client';\nimport type { VictoriaLogsDatasourceSpec } from './types';\nimport { VictoriaLogsDatasourceEditor } from './VictoriaLogsDatasourceEditor';\n\nconst createClient: DatasourcePlugin<VictoriaLogsDatasourceSpec, VictoriaLogsClient>['createClient'] = (\n spec,\n options,\n) => {\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 VictoriaLogs 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 streamQueryRange: (params, headers) => streamQueryRange(params, { datasourceUrl, headers: headers ?? specHeaders }),\n statsQueryRange: (params, headers) => statsQueryRange(params, { datasourceUrl, headers: headers ?? specHeaders }),\n fieldNames: (params, headers) => fieldNames(params, { datasourceUrl, headers: headers ?? specHeaders }),\n fieldValues: (params, headers) => fieldValues(params, { datasourceUrl, headers: headers ?? specHeaders }),\n };\n};\n\nexport const VictoriaLogsDatasource: DatasourcePlugin<VictoriaLogsDatasourceSpec, VictoriaLogsClient> = {\n createClient,\n OptionsEditorComponent: VictoriaLogsDatasourceEditor,\n createInitialOptions: () => ({ directUrl: '' }),\n};\n"],"names":["streamQueryRange","statsQueryRange","fieldNames","fieldValues","VictoriaLogsDatasourceEditor","createClient","spec","options","directUrl","proxy","proxyUrl","datasourceUrl","undefined","Error","specHeaders","headers","params","VictoriaLogsDatasource","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,SAASA,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,EAAEC,WAAW,QAAQ,wBAAqB;AAEhG,SAASC,4BAA4B,QAAQ,oCAAiC;AAE9E,MAAMC,eAAiG,CACrGC,MACAC;IAEA,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;QACAX,kBAAkB,CAACgB,QAAQD,UAAYf,iBAAiBgB,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;QACjHb,iBAAiB,CAACe,QAAQD,UAAYd,gBAAgBe,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;QAC/GZ,YAAY,CAACc,QAAQD,UAAYb,WAAWc,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;QACrGX,aAAa,CAACa,QAAQD,UAAYZ,YAAYa,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;IACzG;AACF;AAEA,OAAO,MAAMG,yBAA2F;IACtGZ;IACAa,wBAAwBd;IACxBe,sBAAsB,IAAO,CAAA;YAAEX,WAAW;QAAG,CAAA;AAC/C,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { VictoriaLogsDatasourceSpec } from './types';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { VictoriaLogsDatasourceSpec } from './types';
|
|
3
3
|
export interface VictoriaLogsDatasourceEditorProps {
|
|
4
4
|
value: VictoriaLogsDatasourceSpec;
|
|
5
5
|
onChange: (next: VictoriaLogsDatasourceSpec) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VictoriaLogsDatasourceEditor.d.ts","sourceRoot":"","sources":["../../../../src/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"VictoriaLogsDatasourceEditor.d.ts","sourceRoot":"","sources":["../../../../src/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,0BAA0B,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,iCAAiC,GAAG,YAAY,CA2EnG"}
|
|
@@ -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 VictoriaLogsDatasourceEditor(props) {
|
|
16
16
|
const { value, onChange, isReadonly } = props;
|
|
17
17
|
const initialSpecDirect = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.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 { VictoriaLogsDatasourceSpec } from './types';\n\nexport interface VictoriaLogsDatasourceEditorProps {\n value: VictoriaLogsDatasourceSpec;\n onChange: (next: VictoriaLogsDatasourceSpec) => void;\n isReadonly?: boolean;\n}\n\nexport function VictoriaLogsDatasourceEditor(props: VictoriaLogsDatasourceEditorProps): ReactElement {\n const { value, onChange, isReadonly } = props;\n\n const initialSpecDirect: VictoriaLogsDatasourceSpec = {\n directUrl: '',\n };\n\n const initialSpecProxy: VictoriaLogsDatasourceSpec = {\n proxy: {\n kind: 'HTTPProxy',\n spec: {\n allowedEndpoints: [\n {\n endpointPattern: '/select/logsql/stats_query',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/stats_query_range',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/field_names',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/field_values',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/tail',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/query',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/hits',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/facets',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/stream_ids',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/streams',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/stream_field_names',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/stream_field_values',\n method: 'POST',\n },\n ],\n url: '',\n },\n },\n };\n\n return (\n <HTTPSettingsEditor\n value={value}\n onChange={onChange}\n isReadonly={isReadonly}\n initialSpecDirect={initialSpecDirect}\n initialSpecProxy={initialSpecProxy}\n />\n );\n}\n"],"names":["HTTPSettingsEditor","VictoriaLogsDatasourceEditor","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/victorialogs-datasource/VictoriaLogsDatasourceEditor.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 { VictoriaLogsDatasourceSpec } from './types';\n\nexport interface VictoriaLogsDatasourceEditorProps {\n value: VictoriaLogsDatasourceSpec;\n onChange: (next: VictoriaLogsDatasourceSpec) => void;\n isReadonly?: boolean;\n}\n\nexport function VictoriaLogsDatasourceEditor(props: VictoriaLogsDatasourceEditorProps): ReactElement {\n const { value, onChange, isReadonly } = props;\n\n const initialSpecDirect: VictoriaLogsDatasourceSpec = {\n directUrl: '',\n };\n\n const initialSpecProxy: VictoriaLogsDatasourceSpec = {\n proxy: {\n kind: 'HTTPProxy',\n spec: {\n allowedEndpoints: [\n {\n endpointPattern: '/select/logsql/stats_query',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/stats_query_range',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/field_names',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/field_values',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/tail',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/query',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/hits',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/facets',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/stream_ids',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/streams',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/stream_field_names',\n method: 'POST',\n },\n {\n endpointPattern: '/select/logsql/stream_field_values',\n method: 'POST',\n },\n ],\n url: '',\n },\n },\n };\n\n return (\n <HTTPSettingsEditor\n value={value}\n onChange={onChange}\n isReadonly={isReadonly}\n initialSpecDirect={initialSpecDirect}\n initialSpecProxy={initialSpecProxy}\n />\n );\n}\n"],"names":["HTTPSettingsEditor","VictoriaLogsDatasourceEditor","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,6BAA6BC,KAAwC;IACnF,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGH;IAExC,MAAMI,oBAAgD;QACpDC,WAAW;IACb;IAEA,MAAMC,mBAA+C;QACnDC,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;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;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 "./VictoriaLogsDatasource.js";
|
|
14
|
+
export * from "./VictoriaLogsDatasourceEditor.js";
|
|
15
|
+
export * from "./types.js";
|
|
16
16
|
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/victorialogs-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 './VictoriaLogsDatasource';\nexport * from './VictoriaLogsDatasourceEditor';\nexport * from './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/victorialogs-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 './VictoriaLogsDatasource';\nexport * from './VictoriaLogsDatasourceEditor';\nexport * from './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,8BAA2B;AACzC,cAAc,oCAAiC;AAC/C,cAAc,aAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/datasources/victorialogs-datasource/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/datasources/victorialogs-datasource/types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/datasources/victorialogs-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 VictoriaLogsDatasourceSpec {\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/victorialogs-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 VictoriaLogsDatasourceSpec {\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,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,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,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,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,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,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,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,eAAe,QAAQ,uBAAoB;AACpD,cAAc,mBAAU;AACxB,cAAc,qBAAY;AAC1B,cAAc,yBAAgB"}
|
package/lib/model/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VictoriaLogsStreamQueryRangeResponse, VictoriaLogsStatsQueryRangeResponse, VictoriaLogsFieldNamesResponse, VictoriaLogsFieldValuesResponse, VictoriaLogsRequestHeaders } from './types';
|
|
1
|
+
import type { VictoriaLogsStreamQueryRangeResponse, VictoriaLogsStatsQueryRangeResponse, VictoriaLogsFieldNamesResponse, VictoriaLogsFieldValuesResponse, VictoriaLogsRequestHeaders } from './types';
|
|
2
2
|
export interface VictoriaLogsBaseParams {
|
|
3
3
|
start: string;
|
|
4
4
|
end: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/model/client.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/model/client.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,oCAAoC,EACpC,mCAAmC,EACnC,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kCAAmC,SAAQ,sBAAsB;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iCAAkC,SAAQ,sBAAsB;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,4BAA6B,SAAQ,sBAAsB;IAC1E,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,6BAA8B,SAAQ,sBAAsB;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE;QACP,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,gBAAgB,EAAE,CAChB,MAAM,EAAE,kCAAkC,EAC1C,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC,oCAAoC,CAAC,CAAC;IACnD,eAAe,EAAE,CACf,MAAM,EAAE,iCAAiC,EACzC,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAClD,UAAU,EAAE,CACV,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC7C,WAAW,EAAE,CACX,MAAM,EAAE,6BAA6B,EACrC,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC,+BAA+B,CAAC,CAAC;CAC/C;AAoBD,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,kCAAkC,EAC1C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,oCAAoC,CAAC,CA8C/C;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,iCAAiC,EACzC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,mCAAmC,CAAC,CAoB9C;AAED,wBAAsB,UAAU,CAC9B,MAAM,EAAE,4BAA4B,EACpC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,8BAA8B,CAAC,CAmBzC;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,6BAA6B,EACrC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,+BAA+B,CAAC,CAoB1C"}
|
package/lib/model/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/model/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 {\n VictoriaLogsStreamQueryRangeResponse,\n VictoriaLogsStatsQueryRangeResponse,\n VictoriaLogsFieldNamesResponse,\n VictoriaLogsFieldValuesResponse,\n VictoriaLogsRequestHeaders,\n} from './types';\n\nexport interface VictoriaLogsBaseParams {\n start: string;\n end: string;\n}\n\nexport interface VictoriaLogsStreamQueryRangeParams extends VictoriaLogsBaseParams {\n query: string;\n limit?: number;\n offset?: number;\n}\n\nexport interface VictoriaLogsStatsQueryRangeParams extends VictoriaLogsBaseParams {\n query: string;\n step?: string;\n}\n\nexport interface VictoriaLogsFieldNamesParams extends VictoriaLogsBaseParams {\n query: string;\n}\n\nexport interface VictoriaLogsFieldValuesParams extends VictoriaLogsBaseParams {\n query: string;\n field: string;\n}\n\nexport interface VictoriaLogsApiOptions {\n datasourceUrl: string;\n headers?: VictoriaLogsRequestHeaders;\n}\n\nexport interface VictoriaLogsClient {\n options: {\n datasourceUrl: string;\n };\n streamQueryRange: (\n params: VictoriaLogsStreamQueryRangeParams,\n headers?: VictoriaLogsRequestHeaders\n ) => Promise<VictoriaLogsStreamQueryRangeResponse>;\n statsQueryRange: (\n params: VictoriaLogsStatsQueryRangeParams,\n headers?: VictoriaLogsRequestHeaders\n ) => Promise<VictoriaLogsStatsQueryRangeResponse>;\n fieldNames: (\n params: VictoriaLogsFieldNamesParams,\n headers?: VictoriaLogsRequestHeaders\n ) => Promise<VictoriaLogsFieldNamesResponse>;\n fieldValues: (\n params: VictoriaLogsFieldValuesParams,\n headers?: VictoriaLogsRequestHeaders\n ) => Promise<VictoriaLogsFieldValuesResponse>;\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 // Assume relative path, ensure no double slashes\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 streamQueryRange(\n params: VictoriaLogsStreamQueryRangeParams,\n options: VictoriaLogsApiOptions\n): Promise<VictoriaLogsStreamQueryRangeResponse> {\n const url = buildUrl('/select/logsql/query', options.datasourceUrl);\n const postData: Record<string, string> = {\n query: params.query,\n start: params.start,\n end: params.end,\n };\n if (params?.limit) postData['limit'] = params.limit.toString();\n if (params?.offset) postData['offset'] = params.offset.toString();\n\n const data = new URLSearchParams(postData).toString();\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Accept: 'application/stream+json',\n ...options.headers,\n },\n body: data,\n });\n if (response.status !== 200) {\n throw new Error(await response.text());\n }\n const output: VictoriaLogsStreamQueryRangeResponse = [];\n\n if (!response?.body) return output;\n const reader = response.body.getReader();\n const decoder = new TextDecoder('utf-8');\n let buffer = '';\n\n let result = await reader.read();\n while (!result.done) {\n buffer += decoder.decode(result.value, { stream: true });\n let boundary = buffer.indexOf('\\n');\n while (boundary !== -1) {\n const line = buffer.slice(0, boundary);\n buffer = buffer.slice(boundary + 1);\n output.push(JSON.parse(line));\n boundary = buffer.indexOf('\\n');\n }\n result = await reader.read();\n }\n if (buffer.trim().length > 0) {\n output.push(JSON.parse(buffer));\n }\n return output;\n}\n\nexport async function statsQueryRange(\n params: VictoriaLogsStatsQueryRangeParams,\n options: VictoriaLogsApiOptions\n): Promise<VictoriaLogsStatsQueryRangeResponse> {\n const url = buildUrl('/select/logsql/stats_query_range', options.datasourceUrl);\n const postData: Record<string, string> = {\n query: params.query,\n start: params.start,\n end: params.end,\n };\n if (params?.step) postData['step'] = params.step.toString();\n\n const data = new URLSearchParams(postData).toString();\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Accept: 'application/json',\n ...options.headers,\n },\n body: data,\n });\n return await response.json();\n}\n\nexport async function fieldNames(\n params: VictoriaLogsFieldNamesParams,\n options: VictoriaLogsApiOptions\n): Promise<VictoriaLogsFieldNamesResponse> {\n const url = buildUrl('/select/logsql/field_names', options.datasourceUrl);\n const postData: Record<string, string> = {\n query: params.query,\n };\n if (params.start) postData['start'] = params.start;\n if (params.end) postData['end'] = params.end;\n\n const data = new URLSearchParams(postData).toString();\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Accept: 'application/json',\n ...options.headers,\n },\n body: data,\n });\n return await response.json();\n}\n\nexport async function fieldValues(\n params: VictoriaLogsFieldValuesParams,\n options: VictoriaLogsApiOptions\n): Promise<VictoriaLogsFieldValuesResponse> {\n const url = buildUrl(`/select/logsql/field_values`, options.datasourceUrl);\n const postData: Record<string, string> = {\n query: params.query,\n field: params.field,\n };\n if (params.start) postData['start'] = params.start;\n if (params.end) postData['end'] = params.end;\n\n const data = new URLSearchParams(postData).toString();\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Accept: 'application/json',\n ...options.headers,\n },\n body: data,\n });\n return await response.json();\n}\n"],"names":["buildUrl","path","datasourceUrl","startsWith","URL","fullPath","endsWith","slice","window","location","origin","streamQueryRange","params","options","url","postData","query","start","end","limit","toString","offset","data","URLSearchParams","response","fetch","method","headers","Accept","body","status","Error","text","output","reader","getReader","decoder","TextDecoder","buffer","result","read","done","decode","value","stream","boundary","indexOf","line","push","JSON","parse","trim","length","statsQueryRange","step","json","fieldNames","fieldValues","field"],"mappings":"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"}
|
|
1
|
+
{"version":3,"sources":["../../../src/model/client.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type {\n VictoriaLogsStreamQueryRangeResponse,\n VictoriaLogsStatsQueryRangeResponse,\n VictoriaLogsFieldNamesResponse,\n VictoriaLogsFieldValuesResponse,\n VictoriaLogsRequestHeaders,\n} from './types';\n\nexport interface VictoriaLogsBaseParams {\n start: string;\n end: string;\n}\n\nexport interface VictoriaLogsStreamQueryRangeParams extends VictoriaLogsBaseParams {\n query: string;\n limit?: number;\n offset?: number;\n}\n\nexport interface VictoriaLogsStatsQueryRangeParams extends VictoriaLogsBaseParams {\n query: string;\n step?: string;\n}\n\nexport interface VictoriaLogsFieldNamesParams extends VictoriaLogsBaseParams {\n query: string;\n}\n\nexport interface VictoriaLogsFieldValuesParams extends VictoriaLogsBaseParams {\n query: string;\n field: string;\n}\n\nexport interface VictoriaLogsApiOptions {\n datasourceUrl: string;\n headers?: VictoriaLogsRequestHeaders;\n}\n\nexport interface VictoriaLogsClient {\n options: {\n datasourceUrl: string;\n };\n streamQueryRange: (\n params: VictoriaLogsStreamQueryRangeParams,\n headers?: VictoriaLogsRequestHeaders,\n ) => Promise<VictoriaLogsStreamQueryRangeResponse>;\n statsQueryRange: (\n params: VictoriaLogsStatsQueryRangeParams,\n headers?: VictoriaLogsRequestHeaders,\n ) => Promise<VictoriaLogsStatsQueryRangeResponse>;\n fieldNames: (\n params: VictoriaLogsFieldNamesParams,\n headers?: VictoriaLogsRequestHeaders,\n ) => Promise<VictoriaLogsFieldNamesResponse>;\n fieldValues: (\n params: VictoriaLogsFieldValuesParams,\n headers?: VictoriaLogsRequestHeaders,\n ) => Promise<VictoriaLogsFieldValuesResponse>;\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 // Assume relative path, ensure no double slashes\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 streamQueryRange(\n params: VictoriaLogsStreamQueryRangeParams,\n options: VictoriaLogsApiOptions,\n): Promise<VictoriaLogsStreamQueryRangeResponse> {\n const url = buildUrl('/select/logsql/query', options.datasourceUrl);\n const postData: Record<string, string> = {\n query: params.query,\n start: params.start,\n end: params.end,\n };\n if (params?.limit) postData['limit'] = params.limit.toString();\n if (params?.offset) postData['offset'] = params.offset.toString();\n\n const data = new URLSearchParams(postData).toString();\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Accept: 'application/stream+json',\n ...options.headers,\n },\n body: data,\n });\n if (response.status !== 200) {\n throw new Error(await response.text());\n }\n const output: VictoriaLogsStreamQueryRangeResponse = [];\n\n if (!response?.body) return output;\n const reader = response.body.getReader();\n const decoder = new TextDecoder('utf-8');\n let buffer = '';\n\n let result = await reader.read();\n while (!result.done) {\n buffer += decoder.decode(result.value, { stream: true });\n let boundary = buffer.indexOf('\\n');\n while (boundary !== -1) {\n const line = buffer.slice(0, boundary);\n buffer = buffer.slice(boundary + 1);\n output.push(JSON.parse(line));\n boundary = buffer.indexOf('\\n');\n }\n result = await reader.read();\n }\n if (buffer.trim().length > 0) {\n output.push(JSON.parse(buffer));\n }\n return output;\n}\n\nexport async function statsQueryRange(\n params: VictoriaLogsStatsQueryRangeParams,\n options: VictoriaLogsApiOptions,\n): Promise<VictoriaLogsStatsQueryRangeResponse> {\n const url = buildUrl('/select/logsql/stats_query_range', options.datasourceUrl);\n const postData: Record<string, string> = {\n query: params.query,\n start: params.start,\n end: params.end,\n };\n if (params?.step) postData['step'] = params.step.toString();\n\n const data = new URLSearchParams(postData).toString();\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Accept: 'application/json',\n ...options.headers,\n },\n body: data,\n });\n return await response.json();\n}\n\nexport async function fieldNames(\n params: VictoriaLogsFieldNamesParams,\n options: VictoriaLogsApiOptions,\n): Promise<VictoriaLogsFieldNamesResponse> {\n const url = buildUrl('/select/logsql/field_names', options.datasourceUrl);\n const postData: Record<string, string> = {\n query: params.query,\n };\n if (params.start) postData['start'] = params.start;\n if (params.end) postData['end'] = params.end;\n\n const data = new URLSearchParams(postData).toString();\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Accept: 'application/json',\n ...options.headers,\n },\n body: data,\n });\n return await response.json();\n}\n\nexport async function fieldValues(\n params: VictoriaLogsFieldValuesParams,\n options: VictoriaLogsApiOptions,\n): Promise<VictoriaLogsFieldValuesResponse> {\n const url = buildUrl(`/select/logsql/field_values`, options.datasourceUrl);\n const postData: Record<string, string> = {\n query: params.query,\n field: params.field,\n };\n if (params.start) postData['start'] = params.start;\n if (params.end) postData['end'] = params.end;\n\n const data = new URLSearchParams(postData).toString();\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Accept: 'application/json',\n ...options.headers,\n },\n body: data,\n });\n return await response.json();\n}\n"],"names":["buildUrl","path","datasourceUrl","startsWith","URL","fullPath","endsWith","slice","window","location","origin","streamQueryRange","params","options","url","postData","query","start","end","limit","toString","offset","data","URLSearchParams","response","fetch","method","headers","Accept","body","status","Error","text","output","reader","getReader","decoder","TextDecoder","buffer","result","read","done","decode","value","stream","boundary","indexOf","line","push","JSON","parse","trim","length","statsQueryRange","step","json","fieldNames","fieldValues","field"],"mappings":"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"}
|
package/lib/model/index.js
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
13
|
+
export * from "./client.js";
|
|
14
|
+
export * from "./selectors.js";
|
|
15
|
+
export * from "./types.js";
|
|
16
16
|
|
|
17
17
|
//# 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 './client';\nexport * from './selectors';\nexport * from './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 './client';\nexport * from './selectors';\nexport * from './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,cAAW;AACzB,cAAc,iBAAc;AAC5B,cAAc,aAAU"}
|
package/lib/model/selectors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatasourceSelectValue } from '@perses-dev/plugin-system';
|
|
2
|
-
import { DatasourceSelector } from '@perses-dev/spec';
|
|
1
|
+
import type { DatasourceSelectValue } from '@perses-dev/plugin-system';
|
|
2
|
+
import type { DatasourceSelector } from '@perses-dev/spec';
|
|
3
3
|
export declare const VICTORIALOGS_DATASOURCE_KIND: "VictoriaLogsDatasource";
|
|
4
4
|
export interface VictoriaLogsDatasourceSelector extends DatasourceSelector {
|
|
5
5
|
kind: typeof VICTORIALOGS_DATASOURCE_KIND;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/model/selectors.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/model/selectors.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,eAAO,MAAM,4BAA4B,EAAG,wBAAiC,CAAC;AAE9E,MAAM,WAAW,8BAA+B,SAAQ,kBAAkB;IACxE,IAAI,EAAE,OAAO,4BAA4B,CAAC;CAC3C;AAED,eAAO,MAAM,oBAAoB,EAAE,8BAAuE,CAAC;AAE3G,wBAAgB,6BAA6B,CAC3C,qBAAqB,EAAE,qBAAqB,CAAC,8BAA8B,CAAC,GAC3E,OAAO,CAET;AAED,wBAAgB,gCAAgC,CAC9C,qBAAqB,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,GAC/D,qBAAqB,IAAI,8BAA8B,CAEzD"}
|
package/lib/model/selectors.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
|
-
import { isVariableDatasource } from
|
|
13
|
+
import { isVariableDatasource } from "@perses-dev/plugin-system";
|
|
14
14
|
export const VICTORIALOGS_DATASOURCE_KIND = 'VictoriaLogsDatasource';
|
|
15
15
|
export const DEFAULT_VICTORIALOGS = {
|
|
16
16
|
kind: VICTORIALOGS_DATASOURCE_KIND
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/model/selectors.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 { DatasourceSelectValue
|
|
1
|
+
{"version":3,"sources":["../../../src/model/selectors.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 { DatasourceSelectValue } from '@perses-dev/plugin-system';\nimport { isVariableDatasource } from '@perses-dev/plugin-system';\nimport type { DatasourceSelector } from '@perses-dev/spec';\n\nexport const VICTORIALOGS_DATASOURCE_KIND = 'VictoriaLogsDatasource' as const;\n\nexport interface VictoriaLogsDatasourceSelector extends DatasourceSelector {\n kind: typeof VICTORIALOGS_DATASOURCE_KIND;\n}\n\nexport const DEFAULT_VICTORIALOGS: VictoriaLogsDatasourceSelector = { kind: VICTORIALOGS_DATASOURCE_KIND };\n\nexport function isDefaultVictoriaLogsSelector(\n datasourceSelectValue: DatasourceSelectValue<VictoriaLogsDatasourceSelector>,\n): boolean {\n return !isVariableDatasource(datasourceSelectValue) && datasourceSelectValue.name === undefined;\n}\n\nexport function isVictoriaLogsDatasourceSelector(\n datasourceSelectValue: DatasourceSelectValue<DatasourceSelector>,\n): datasourceSelectValue is VictoriaLogsDatasourceSelector {\n return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === VICTORIALOGS_DATASOURCE_KIND;\n}\n"],"names":["isVariableDatasource","VICTORIALOGS_DATASOURCE_KIND","DEFAULT_VICTORIALOGS","kind","isDefaultVictoriaLogsSelector","datasourceSelectValue","name","undefined","isVictoriaLogsDatasourceSelector"],"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,SAASA,oBAAoB,QAAQ,4BAA4B;AAGjE,OAAO,MAAMC,+BAA+B,yBAAkC;AAM9E,OAAO,MAAMC,uBAAuD;IAAEC,MAAMF;AAA6B,EAAE;AAE3G,OAAO,SAASG,8BACdC,qBAA4E;IAE5E,OAAO,CAACL,qBAAqBK,0BAA0BA,sBAAsBC,IAAI,KAAKC;AACxF;AAEA,OAAO,SAASC,iCACdH,qBAAgE;IAEhE,OAAOL,qBAAqBK,0BAA0BA,sBAAsBF,IAAI,KAAKF;AACvF"}
|
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 "./victorialogs-time-series-query/index.js";
|
|
14
|
+
export * from "./victorialogs-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 './victorialogs-time-series-query';\nexport * from './victorialogs-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 './victorialogs-time-series-query';\nexport * from './victorialogs-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,4CAAmC;AACjD,cAAc,oCAA2B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LogQueryPlugin } from '@perses-dev/plugin-system';
|
|
2
|
-
import { VictoriaLogsLogQuerySpec } from './types';
|
|
1
|
+
import type { LogQueryPlugin } from '@perses-dev/plugin-system';
|
|
2
|
+
import type { VictoriaLogsLogQuerySpec } from './types';
|
|
3
3
|
export declare const VictoriaLogsLogQuery: LogQueryPlugin<VictoriaLogsLogQuerySpec>;
|
|
4
4
|
//# sourceMappingURL=VictoriaLogsLogQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VictoriaLogsLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/victorialogs-log-query/VictoriaLogsLogQuery.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VictoriaLogsLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/victorialogs-log-query/VictoriaLogsLogQuery.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,2BAA2B,CAAC;AAKjF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGxD,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,wBAAwB,CAiCzE,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 { calculateVolumeInterval, parseVariables } from
|
|
14
|
-
import { getVictoriaLogsLogData } from
|
|
15
|
-
import { VictoriaLogsLogQueryEditor } from
|
|
13
|
+
import { calculateVolumeInterval, parseVariables } from "@perses-dev/plugin-system";
|
|
14
|
+
import { getVictoriaLogsLogData } from "./query.js";
|
|
15
|
+
import { VictoriaLogsLogQueryEditor } from "./VictoriaLogsLogQueryEditor.js";
|
|
16
16
|
export const VictoriaLogsLogQuery = {
|
|
17
17
|
getLogData: getVictoriaLogsLogData,
|
|
18
18
|
OptionsEditorComponent: VictoriaLogsLogQueryEditor,
|
|
@@ -22,9 +22,7 @@ export const VictoriaLogsLogQuery = {
|
|
|
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
|