@perses-dev/loki-plugin 0.1.0 → 0.1.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/LICENSE +201 -0
- package/__mf/css/async/1320.7ad02b85.css +1 -0
- package/__mf/css/async/2341.7ad02b85.css +1 -0
- package/__mf/css/async/9479.7ad02b85.css +1 -0
- package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
- package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
- package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
- package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
- package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
- package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
- package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
- package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
- package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
- package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
- package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
- package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
- package/__mf/js/Loki.e3bb11f6.js +6 -0
- package/__mf/js/async/1320.ca6d65b6.js +2 -0
- package/__mf/js/async/1320.ca6d65b6.js.LICENSE.txt +9 -0
- package/__mf/js/async/1540.6b797827.js +74 -0
- package/__mf/js/async/1964.7b2e7223.js +2 -0
- package/__mf/js/async/1964.7b2e7223.js.LICENSE.txt +9 -0
- package/__mf/js/async/2292.35c2eeec.js +2 -0
- package/__mf/js/async/2292.35c2eeec.js.LICENSE.txt +24 -0
- package/__mf/js/async/2448.6a132c1c.js +10 -0
- package/__mf/js/async/2448.6a132c1c.js.LICENSE.txt +17 -0
- package/__mf/js/async/2470.32c642b9.js +7 -0
- package/__mf/js/async/2470.32c642b9.js.LICENSE.txt +21 -0
- package/__mf/js/async/2651.ef335482.js +1 -0
- package/__mf/js/async/282.3d82e785.js +1 -0
- package/__mf/js/async/3224.b1170acc.js +1 -0
- package/__mf/js/async/3246.240e9404.js +1 -0
- package/__mf/js/async/3413.6dd92cfd.js +1 -0
- package/__mf/js/async/3431.2270637c.js +1 -0
- package/__mf/js/async/3849.c4035be2.js +1 -0
- package/__mf/js/async/3863.16343b76.js +2 -0
- package/__mf/js/async/3863.16343b76.js.LICENSE.txt +9 -0
- package/__mf/js/async/3869.4e06bfcb.js +2 -0
- package/__mf/js/async/3869.4e06bfcb.js.LICENSE.txt +9 -0
- package/__mf/js/async/3960.6091bb00.js +2 -0
- package/__mf/js/async/3960.6091bb00.js.LICENSE.txt +8 -0
- package/__mf/js/async/3980.08ab4aef.js +2 -0
- package/__mf/js/async/3980.08ab4aef.js.LICENSE.txt +9 -0
- package/__mf/js/async/4075.ea5435c6.js +1 -0
- package/__mf/js/async/4168.645bbaa1.js +2 -0
- package/__mf/js/async/4238.ac5f0a30.js +1 -0
- package/__mf/js/async/4269.b4d0f49d.js +2 -0
- package/__mf/js/async/4269.b4d0f49d.js.LICENSE.txt +9 -0
- package/__mf/js/async/4368.438b431f.js +2 -0
- package/__mf/js/async/4368.438b431f.js.LICENSE.txt +15 -0
- package/__mf/js/async/4421.fef63995.js +1 -0
- package/__mf/js/async/4687.1af57d71.js +2 -0
- package/__mf/js/async/4687.1af57d71.js.LICENSE.txt +9 -0
- package/__mf/js/async/4693.ba67a5aa.js +1 -0
- package/__mf/js/async/5214.fee648bb.js +1 -0
- package/__mf/js/async/5409.ff95cf63.js +1 -0
- package/__mf/js/async/5780.d837c3cd.js +1 -0
- package/__mf/js/async/5876.5618763d.js +2 -0
- package/__mf/js/async/5876.5618763d.js.LICENSE.txt +21 -0
- package/__mf/js/async/592.269748ce.js +1 -0
- package/__mf/js/async/5981.a46c5157.js +2 -0
- package/__mf/js/async/5981.a46c5157.js.LICENSE.txt +8 -0
- package/__mf/js/async/6292.9997ca36.js +1 -0
- package/__mf/js/async/6333.01fb6457.js +2 -0
- package/__mf/js/async/6333.01fb6457.js.LICENSE.txt +9 -0
- package/__mf/js/async/6377.9f308c7f.js +2 -0
- package/__mf/js/async/6377.9f308c7f.js.LICENSE.txt +32 -0
- package/__mf/js/async/6569.f33ecbef.js +1 -0
- package/__mf/js/async/6664.078084ff.js +28 -0
- package/__mf/js/async/6770.ba5a38f3.js +1 -0
- package/__mf/js/async/694.c25a1f84.js +1 -0
- package/__mf/js/async/7152.e8100fb6.js +73 -0
- package/__mf/js/async/7152.e8100fb6.js.LICENSE.txt +19 -0
- package/__mf/js/async/7376.0459aaf7.js +1 -0
- package/__mf/js/async/738.a16c93b6.js +1 -0
- package/__mf/js/async/7740.6f193fac.js +1 -0
- package/__mf/js/async/8216.d9cc6234.js +1 -0
- package/__mf/js/async/8488.5b4b7170.js +1 -0
- package/__mf/js/async/8537.dc791586.js +1 -0
- package/__mf/js/async/9173.75bbe78a.js +2 -0
- package/__mf/js/async/9173.75bbe78a.js.LICENSE.txt +19 -0
- package/__mf/js/async/9479.f74b4605.js +1 -0
- package/__mf/js/async/9654.575f5449.js +37 -0
- package/__mf/js/async/__federation_expose_LogsTable.3952e904.js +2 -0
- package/__mf/js/async/__federation_expose_LogsTable.3952e904.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_LokiDatasource.5fbd8f68.js +2 -0
- package/__mf/js/async/__federation_expose_LokiDatasource.5fbd8f68.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_LokiLogQuery.0720038a.js +1 -0
- package/__mf/js/async/__federation_expose_LokiTimeSeriesQuery.8c7f7602.js +1 -0
- package/__mf/js/main.a5b9ede8.js +6 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +7 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/bootstrap.js +14 -0
- package/lib/cjs/components/index.js +23 -0
- package/lib/cjs/components/logql-editor.js +110 -0
- package/lib/cjs/components/logql-extension.js +55 -0
- package/lib/cjs/components/logql-highlight.js +40 -0
- package/lib/cjs/datasources/index.js +30 -0
- package/lib/cjs/datasources/loki-datasource/LokiDatasource.js +77 -0
- package/lib/cjs/datasources/loki-datasource/LokiDatasourceEditor.js +83 -0
- package/lib/cjs/datasources/loki-datasource/index.js +32 -0
- package/lib/cjs/datasources/loki-datasource/loki-datasource-types.js +16 -0
- package/lib/cjs/env.d.js +2 -0
- package/lib/cjs/getPluginModule.js +27 -0
- package/lib/cjs/index-federation.js +43 -0
- package/lib/cjs/index.js +28 -0
- package/lib/cjs/model/index.js +31 -0
- package/lib/cjs/model/loki-client-types.js +16 -0
- package/lib/cjs/model/loki-client.js +198 -0
- package/lib/cjs/model/loki-data-types.js +16 -0
- package/lib/cjs/model/loki-selectors.js +47 -0
- package/lib/cjs/panels/index.js +30 -0
- package/lib/cjs/panels/logstable/LogsTable.js +41 -0
- package/lib/cjs/panels/logstable/LogsTableComponent.js +43 -0
- package/lib/cjs/panels/logstable/LogsTableSettingsEditor.js +70 -0
- package/lib/cjs/panels/logstable/components/EmptyLogsState.js +49 -0
- package/lib/cjs/panels/logstable/components/LogRow/LogRow.js +158 -0
- package/lib/cjs/panels/logstable/components/LogRow/LogTimestamp.js +44 -0
- package/lib/cjs/panels/logstable/components/LogRow/LogsLabelsTable.js +74 -0
- package/lib/cjs/panels/logstable/components/LogRow/LogsStyles.js +77 -0
- package/lib/cjs/panels/logstable/components/LogRow/index.js +37 -0
- package/lib/cjs/panels/logstable/components/LogsList.js +44 -0
- package/lib/cjs/panels/logstable/components/VirtualizedLogsList.js +63 -0
- package/lib/cjs/panels/logstable/components/index.js +23 -0
- package/lib/cjs/panels/logstable/components/utils.js +39 -0
- package/lib/cjs/panels/logstable/hooks/useExpandedRows.js +45 -0
- package/lib/cjs/panels/logstable/hooks/useSeverity.js +43 -0
- package/lib/cjs/panels/logstable/index.js +33 -0
- package/lib/cjs/panels/logstable/logs-types.js +16 -0
- package/lib/cjs/queries/constants.js +22 -0
- package/lib/cjs/queries/index.js +31 -0
- package/lib/cjs/queries/loki-log-query/LokiLogQuery.js +31 -0
- package/lib/cjs/queries/loki-log-query/LokiLogQueryEditor.js +157 -0
- package/lib/cjs/queries/loki-log-query/get-loki-log-data.js +74 -0
- package/lib/cjs/queries/loki-log-query/index.js +21 -0
- package/lib/cjs/queries/loki-log-query/log-query-plugin-interface.js +4 -0
- package/lib/cjs/queries/loki-log-query/loki-log-query-types.js +4 -0
- package/lib/cjs/queries/loki-time-series-query/LokiTimeSeriesQuery.js +43 -0
- package/lib/cjs/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js +118 -0
- package/lib/cjs/queries/loki-time-series-query/get-loki-time-series-data.js +120 -0
- package/lib/cjs/queries/loki-time-series-query/index.js +33 -0
- package/lib/cjs/queries/loki-time-series-query/loki-time-series-query-types.js +16 -0
- package/lib/cjs/setup-tests.js +7 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +15 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/logql-editor.d.ts +5 -0
- package/lib/components/logql-editor.d.ts.map +1 -0
- package/lib/components/logql-editor.js +61 -0
- package/lib/components/logql-editor.js.map +1 -0
- package/lib/components/logql-extension.d.ts +4 -0
- package/lib/components/logql-extension.d.ts.map +1 -0
- package/lib/components/logql-extension.js +47 -0
- package/lib/components/logql-extension.js.map +1 -0
- package/lib/components/logql-highlight.d.ts +2 -0
- package/lib/components/logql-highlight.d.ts.map +1 -0
- package/lib/components/logql-highlight.js +32 -0
- package/lib/components/logql-highlight.js.map +1 -0
- package/lib/datasources/index.d.ts +2 -0
- package/lib/datasources/index.d.ts.map +1 -0
- package/lib/datasources/index.js +15 -0
- package/lib/datasources/index.js.map +1 -0
- package/lib/datasources/loki-datasource/LokiDatasource.d.ts +5 -0
- package/lib/datasources/loki-datasource/LokiDatasource.d.ts.map +1 -0
- package/lib/datasources/loki-datasource/LokiDatasource.js +69 -0
- package/lib/datasources/loki-datasource/LokiDatasource.js.map +1 -0
- package/lib/datasources/loki-datasource/LokiDatasourceEditor.d.ts +9 -0
- package/lib/datasources/loki-datasource/LokiDatasourceEditor.d.ts.map +1 -0
- package/lib/datasources/loki-datasource/LokiDatasourceEditor.js +75 -0
- package/lib/datasources/loki-datasource/LokiDatasourceEditor.js.map +1 -0
- package/lib/datasources/loki-datasource/index.d.ts +4 -0
- package/lib/datasources/loki-datasource/index.d.ts.map +1 -0
- package/lib/datasources/loki-datasource/index.js +17 -0
- package/lib/datasources/loki-datasource/index.js.map +1 -0
- package/lib/datasources/loki-datasource/loki-datasource-types.d.ts +6 -0
- package/lib/datasources/loki-datasource/loki-datasource-types.d.ts.map +1 -0
- package/lib/datasources/loki-datasource/loki-datasource-types.js +15 -0
- package/lib/datasources/loki-datasource/loki-datasource-types.js.map +1 -0
- package/lib/env.d.js +3 -0
- package/lib/env.d.js.map +1 -0
- package/lib/getPluginModule.d.ts +6 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +16 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +3 -0
- package/lib/index-federation.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/lib/model/index.d.ts +3 -0
- package/lib/model/index.d.ts.map +1 -0
- package/lib/model/index.js +16 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/loki-client-types.d.ts +65 -0
- package/lib/model/loki-client-types.d.ts.map +1 -0
- package/lib/model/loki-client-types.js +15 -0
- package/lib/model/loki-client-types.js.map +1 -0
- package/lib/model/loki-client.d.ts +50 -0
- package/lib/model/loki-client.d.ts.map +1 -0
- package/lib/model/loki-client.js +161 -0
- package/lib/model/loki-client.js.map +1 -0
- package/lib/model/loki-data-types.d.ts +24 -0
- package/lib/model/loki-data-types.d.ts.map +1 -0
- package/lib/model/loki-data-types.js +15 -0
- package/lib/model/loki-data-types.js.map +1 -0
- package/lib/model/loki-selectors.d.ts +10 -0
- package/lib/model/loki-selectors.d.ts.map +1 -0
- package/lib/model/loki-selectors.js +25 -0
- package/lib/model/loki-selectors.js.map +1 -0
- package/lib/panels/index.d.ts +2 -0
- package/lib/panels/index.d.ts.map +1 -0
- package/lib/panels/index.js +15 -0
- package/lib/panels/index.js.map +1 -0
- package/lib/panels/logstable/LogsTable.d.ts +4 -0
- package/lib/panels/logstable/LogsTable.d.ts.map +1 -0
- package/lib/panels/logstable/LogsTable.js +33 -0
- package/lib/panels/logstable/LogsTable.js.map +1 -0
- package/lib/panels/logstable/LogsTableComponent.d.ts +4 -0
- package/lib/panels/logstable/LogsTableComponent.d.ts.map +1 -0
- package/lib/panels/logstable/LogsTableComponent.js +35 -0
- package/lib/panels/logstable/LogsTableComponent.js.map +1 -0
- package/lib/panels/logstable/LogsTableSettingsEditor.d.ts +7 -0
- package/lib/panels/logstable/LogsTableSettingsEditor.d.ts.map +1 -0
- package/lib/panels/logstable/LogsTableSettingsEditor.js +62 -0
- package/lib/panels/logstable/LogsTableSettingsEditor.js.map +1 -0
- package/lib/panels/logstable/components/EmptyLogsState.d.ts +7 -0
- package/lib/panels/logstable/components/EmptyLogsState.d.ts.map +1 -0
- package/lib/panels/logstable/components/EmptyLogsState.js +36 -0
- package/lib/panels/logstable/components/EmptyLogsState.js.map +1 -0
- package/lib/panels/logstable/components/LogRow/LogRow.d.ts +14 -0
- package/lib/panels/logstable/components/LogRow/LogRow.d.ts.map +1 -0
- package/lib/panels/logstable/components/LogRow/LogRow.js +104 -0
- package/lib/panels/logstable/components/LogRow/LogRow.js.map +1 -0
- package/lib/panels/logstable/components/LogRow/LogTimestamp.d.ts +7 -0
- package/lib/panels/logstable/components/LogRow/LogTimestamp.d.ts.map +1 -0
- package/lib/panels/logstable/components/LogRow/LogTimestamp.js +31 -0
- package/lib/panels/logstable/components/LogRow/LogTimestamp.js.map +1 -0
- package/lib/panels/logstable/components/LogRow/LogsLabelsTable.d.ts +7 -0
- package/lib/panels/logstable/components/LogRow/LogsLabelsTable.d.ts.map +1 -0
- package/lib/panels/logstable/components/LogRow/LogsLabelsTable.js +61 -0
- package/lib/panels/logstable/components/LogRow/LogsLabelsTable.js.map +1 -0
- package/lib/panels/logstable/components/LogRow/LogsStyles.d.ts +22 -0
- package/lib/panels/logstable/components/LogRow/LogsStyles.d.ts.map +1 -0
- package/lib/panels/logstable/components/LogRow/LogsStyles.js +55 -0
- package/lib/panels/logstable/components/LogRow/LogsStyles.js.map +1 -0
- package/lib/panels/logstable/components/LogRow/index.d.ts +3 -0
- package/lib/panels/logstable/components/LogRow/index.d.ts.map +1 -0
- package/lib/panels/logstable/components/LogRow/index.js +16 -0
- package/lib/panels/logstable/components/LogRow/index.js.map +1 -0
- package/lib/panels/logstable/components/LogsList.d.ts +10 -0
- package/lib/panels/logstable/components/LogsList.d.ts.map +1 -0
- package/lib/panels/logstable/components/LogsList.js +31 -0
- package/lib/panels/logstable/components/LogsList.js.map +1 -0
- package/lib/panels/logstable/components/VirtualizedLogsList.d.ts +12 -0
- package/lib/panels/logstable/components/VirtualizedLogsList.d.ts.map +1 -0
- package/lib/panels/logstable/components/VirtualizedLogsList.js +50 -0
- package/lib/panels/logstable/components/VirtualizedLogsList.js.map +1 -0
- package/lib/panels/logstable/components/index.d.ts +2 -0
- package/lib/panels/logstable/components/index.d.ts.map +1 -0
- package/lib/panels/logstable/components/index.js +15 -0
- package/lib/panels/logstable/components/index.js.map +1 -0
- package/lib/panels/logstable/components/utils.d.ts +3 -0
- package/lib/panels/logstable/components/utils.d.ts.map +1 -0
- package/lib/panels/logstable/components/utils.js +31 -0
- package/lib/panels/logstable/components/utils.js.map +1 -0
- package/lib/panels/logstable/hooks/useExpandedRows.d.ts +6 -0
- package/lib/panels/logstable/hooks/useExpandedRows.d.ts.map +1 -0
- package/lib/panels/logstable/hooks/useExpandedRows.js +37 -0
- package/lib/panels/logstable/hooks/useExpandedRows.js.map +1 -0
- package/lib/panels/logstable/hooks/useSeverity.d.ts +3 -0
- package/lib/panels/logstable/hooks/useSeverity.d.ts.map +1 -0
- package/lib/panels/logstable/hooks/useSeverity.js +35 -0
- package/lib/panels/logstable/hooks/useSeverity.js.map +1 -0
- package/lib/panels/logstable/index.d.ts +5 -0
- package/lib/panels/logstable/index.d.ts.map +1 -0
- package/lib/panels/logstable/index.js +18 -0
- package/lib/panels/logstable/index.js.map +1 -0
- package/lib/panels/logstable/logs-types.d.ts +11 -0
- package/lib/panels/logstable/logs-types.d.ts.map +1 -0
- package/lib/panels/logstable/logs-types.js +15 -0
- package/lib/panels/logstable/logs-types.js.map +1 -0
- package/lib/queries/constants.d.ts +5 -0
- package/lib/queries/constants.d.ts.map +1 -0
- package/lib/queries/constants.js +6 -0
- package/lib/queries/constants.js.map +1 -0
- package/lib/queries/index.d.ts +3 -0
- package/lib/queries/index.d.ts.map +1 -0
- package/lib/queries/index.js +16 -0
- package/lib/queries/index.js.map +1 -0
- package/lib/queries/loki-log-query/LokiLogQuery.d.ts +4 -0
- package/lib/queries/loki-log-query/LokiLogQuery.d.ts.map +1 -0
- package/lib/queries/loki-log-query/LokiLogQuery.js +23 -0
- package/lib/queries/loki-log-query/LokiLogQuery.js.map +1 -0
- package/lib/queries/loki-log-query/LokiLogQueryEditor.d.ts +7 -0
- package/lib/queries/loki-log-query/LokiLogQueryEditor.d.ts.map +1 -0
- package/lib/queries/loki-log-query/LokiLogQueryEditor.js +149 -0
- package/lib/queries/loki-log-query/LokiLogQueryEditor.js.map +1 -0
- package/lib/queries/loki-log-query/get-loki-log-data.d.ts +4 -0
- package/lib/queries/loki-log-query/get-loki-log-data.d.ts.map +1 -0
- package/lib/queries/loki-log-query/get-loki-log-data.js +66 -0
- package/lib/queries/loki-log-query/get-loki-log-data.js.map +1 -0
- package/lib/queries/loki-log-query/index.d.ts +5 -0
- package/lib/queries/loki-log-query/index.d.ts.map +1 -0
- package/lib/queries/loki-log-query/index.js +6 -0
- package/lib/queries/loki-log-query/index.js.map +1 -0
- package/lib/queries/loki-log-query/log-query-plugin-interface.d.ts +25 -0
- package/lib/queries/loki-log-query/log-query-plugin-interface.d.ts.map +1 -0
- package/lib/queries/loki-log-query/log-query-plugin-interface.js +3 -0
- package/lib/queries/loki-log-query/log-query-plugin-interface.js.map +1 -0
- package/lib/queries/loki-log-query/loki-log-query-types.d.ts +9 -0
- package/lib/queries/loki-log-query/loki-log-query-types.d.ts.map +1 -0
- package/lib/queries/loki-log-query/loki-log-query-types.js +3 -0
- package/lib/queries/loki-log-query/loki-log-query-types.js.map +1 -0
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQuery.d.ts +4 -0
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQuery.d.ts.map +1 -0
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQuery.js +35 -0
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQuery.js.map +1 -0
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.d.ts +7 -0
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.d.ts.map +1 -0
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js +110 -0
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js.map +1 -0
- package/lib/queries/loki-time-series-query/get-loki-time-series-data.d.ts +12 -0
- package/lib/queries/loki-time-series-query/get-loki-time-series-data.d.ts.map +1 -0
- package/lib/queries/loki-time-series-query/get-loki-time-series-data.js +112 -0
- package/lib/queries/loki-time-series-query/get-loki-time-series-data.js.map +1 -0
- package/lib/queries/loki-time-series-query/index.d.ts +5 -0
- package/lib/queries/loki-time-series-query/index.d.ts.map +1 -0
- package/lib/queries/loki-time-series-query/index.js +18 -0
- package/lib/queries/loki-time-series-query/index.js.map +1 -0
- package/lib/queries/loki-time-series-query/loki-time-series-query-types.d.ts +9 -0
- package/lib/queries/loki-time-series-query/loki-time-series-query-types.d.ts.map +1 -0
- package/lib/queries/loki-time-series-query/loki-time-series-query-types.js +15 -0
- package/lib/queries/loki-time-series-query/loki-time-series-query-types.js.map +1 -0
- package/lib/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +5 -0
- package/lib/setup-tests.js.map +1 -0
- package/mf-manifest.json +528 -0
- package/mf-stats.json +584 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/model/loki-client.ts"],"sourcesContent":["// Copyright 2025 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 LokiQueryResponse,\n LokiQueryRangeResponse,\n LokiLabelsResponse,\n LokiLabelValuesResponse,\n LokiSeriesResponse,\n LokiIndexStatsResponse,\n LokiVolumeResponse,\n LokiRequestHeaders,\n} from './loki-client-types';\n\nexport interface LokiQueryParams {\n query: string;\n time?: string;\n direction?: 'forward' | 'backward';\n limit?: number;\n}\n\nexport interface LokiQueryRangeParams {\n query: string;\n start: string;\n end: string;\n step?: string;\n interval?: string;\n direction?: 'forward' | 'backward';\n limit?: number;\n}\n\nexport interface LokiVolumeParams {\n query: string;\n start: string;\n end: string;\n step?: string;\n limit?: number;\n}\n\nexport interface LokiApiOptions {\n datasourceUrl: string;\n headers?: LokiRequestHeaders;\n}\n\nexport interface LokiClient {\n options: {\n datasourceUrl: string;\n };\n query: (params: LokiQueryParams, headers?: LokiRequestHeaders) => Promise<LokiQueryResponse>;\n queryRange: (params: LokiQueryRangeParams, headers?: LokiRequestHeaders) => Promise<LokiQueryRangeResponse>;\n labels: (start?: string, end?: string, headers?: LokiRequestHeaders) => Promise<LokiLabelsResponse>;\n labelValues: (\n label: string,\n start?: string,\n end?: string,\n headers?: LokiRequestHeaders\n ) => Promise<LokiLabelValuesResponse>;\n series: (match: string[], start?: string, end?: string, headers?: LokiRequestHeaders) => Promise<LokiSeriesResponse>;\n volume: (params: LokiVolumeParams, headers?: LokiRequestHeaders) => Promise<LokiVolumeResponse>;\n volumeRange: (params: LokiVolumeParams, headers?: LokiRequestHeaders) => Promise<LokiVolumeResponse>;\n indexStats: (\n query: string,\n start?: string,\n end?: string,\n headers?: LokiRequestHeaders\n ) => Promise<LokiIndexStatsResponse>;\n}\n\nexport async function query(params: LokiQueryParams, options: LokiApiOptions): Promise<LokiQueryResponse> {\n const url = buildUrl('/loki/api/v1/query', options.datasourceUrl);\n url.searchParams.append('query', params.query);\n if (params.time) url.searchParams.append('time', params.time);\n if (params.direction) url.searchParams.append('direction', params.direction);\n if (params.limit) url.searchParams.append('limit', params.limit.toString());\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n return response.json();\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 function toUnixSeconds(val: string | number | Date): string {\n if (val instanceof Date) return Math.floor(val.getTime() / 1000).toString();\n if (typeof val === 'number') {\n // If it's in ms (>= 10^12), convert to s\n return Math.floor(val > 1e11 ? val / 1000 : val).toString();\n }\n if (/^\\d+$/.test(val)) {\n const num = Number(val);\n return Math.floor(num > 1e11 ? num / 1000 : num).toString();\n }\n const d = new Date(val);\n return Math.floor(d.getTime() / 1000).toString();\n}\n\nexport async function queryRange(\n params: LokiQueryRangeParams,\n options: LokiApiOptions\n): Promise<LokiQueryRangeResponse> {\n const url = buildUrl('/loki/api/v1/query_range', options.datasourceUrl);\n url.searchParams.append('query', params.query);\n url.searchParams.append('start', toUnixSeconds(params.start));\n url.searchParams.append('end', toUnixSeconds(params.end));\n if (params.step) url.searchParams.append('step', params.step);\n if (params.interval) url.searchParams.append('interval', params.interval);\n if (params.direction) url.searchParams.append('direction', params.direction);\n if (params.limit) url.searchParams.append('limit', params.limit.toString());\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n return response.json();\n}\n\nexport async function labels(\n start: string | undefined,\n end: string | undefined,\n options: LokiApiOptions\n): Promise<LokiLabelsResponse> {\n const url = buildUrl('/loki/api/v1/labels', options.datasourceUrl);\n if (start) url.searchParams.append('start', start);\n if (end) url.searchParams.append('end', end);\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n return response.json();\n}\n\nexport async function labelValues(\n label: string,\n start: string | undefined,\n end: string | undefined,\n options: LokiApiOptions\n): Promise<LokiLabelValuesResponse> {\n const url = buildUrl(`/loki/api/v1/label/${label}/values`, options.datasourceUrl);\n if (start) url.searchParams.append('start', start);\n if (end) url.searchParams.append('end', end);\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n return response.json();\n}\n\nexport async function series(\n match: string[],\n start: string | undefined,\n end: string | undefined,\n options: LokiApiOptions\n): Promise<LokiSeriesResponse> {\n const url = buildUrl('/loki/api/v1/series', options.datasourceUrl);\n match.forEach((m) => url.searchParams.append('match[]', m));\n if (start) url.searchParams.append('start', start);\n if (end) url.searchParams.append('end', end);\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n return response.json();\n}\n\nexport async function volume(params: LokiVolumeParams, options: LokiApiOptions): Promise<LokiVolumeResponse> {\n const url = buildUrl('/loki/api/v1/index/volume', options.datasourceUrl);\n url.searchParams.append('query', params.query);\n url.searchParams.append('start', params.start);\n url.searchParams.append('end', params.end);\n if (params.step) url.searchParams.append('step', params.step);\n if (params.limit) url.searchParams.append('limit', params.limit.toString());\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n return response.json();\n}\n\nexport async function volumeRange(params: LokiVolumeParams, options: LokiApiOptions): Promise<LokiVolumeResponse> {\n const url = buildUrl('/loki/api/v1/index/volume_range', options.datasourceUrl);\n url.searchParams.append('query', params.query);\n url.searchParams.append('start', params.start);\n url.searchParams.append('end', params.end);\n if (params.step) url.searchParams.append('step', params.step);\n if (params.limit) url.searchParams.append('limit', params.limit.toString());\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n return response.json();\n}\n\nexport async function indexStats(\n query: string,\n start: string | undefined,\n end: string | undefined,\n options: LokiApiOptions\n): Promise<LokiIndexStatsResponse> {\n const url = buildUrl('/loki/api/v1/index/stats', options.datasourceUrl);\n url.searchParams.append('query', query);\n if (start) url.searchParams.append('start', start);\n if (end) url.searchParams.append('end', end);\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers,\n },\n });\n return response.json();\n}\n"],"names":["query","params","options","url","buildUrl","datasourceUrl","searchParams","append","time","direction","limit","toString","response","fetch","method","headers","json","path","startsWith","URL","fullPath","endsWith","slice","window","location","origin","toUnixSeconds","val","Date","Math","floor","getTime","test","num","Number","d","queryRange","start","end","step","interval","labels","labelValues","label","series","match","forEach","m","volume","volumeRange","indexStats"],"mappings":"AAAA,oCAAoC;AACpC,k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,MAAM,CAAC,QAAQN,OAAOsC,IAAI;IAC5D,IAAItC,OAAOS,KAAK,EAAEP,IAAIG,YAAY,CAACC,MAAM,CAAC,SAASN,OAAOS,KAAK,CAACC,QAAQ;IAExE,MAAMC,WAAW,MAAMC,MAAMV,IAAIQ,QAAQ,IAAI;QAC3CG,QAAQ;QACRC,SAAS;YACP,gBAAgB;YAChB,GAAGb,QAAQa,OAAO;QACpB;IACF;IACA,OAAOH,SAASI,IAAI;AACtB;AAEA,OAAO,eAAekC,WACpBlD,KAAa,EACbqC,KAAyB,EACzBC,GAAuB,EACvBpC,OAAuB;IAEvB,MAAMC,MAAMC,SAAS,4BAA4BF,QAAQG,aAAa;IACtEF,IAAIG,YAAY,CAACC,MAAM,CAAC,SAASP;IACjC,IAAIqC,OAAOlC,IAAIG,YAAY,CAACC,MAAM,CAAC,SAAS8B;IAC5C,IAAIC,KAAKnC,IAAIG,YAAY,CAACC,MAAM,CAAC,OAAO+B;IAExC,MAAM1B,WAAW,MAAMC,MAAMV,IAAIQ,QAAQ,IAAI;QAC3CG,QAAQ;QACRC,SAAS;YACP,gBAAgB;YAChB,GAAGb,QAAQa,OAAO;QACpB;IACF;IACA,OAAOH,SAASI,IAAI;AACtB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AbsoluteTimeRange, TimeSeries, TimeSeriesData, TimeSeriesMetadata } from '@perses-dev/core';
|
|
2
|
+
export interface LogEntry {
|
|
3
|
+
timestamp: number;
|
|
4
|
+
line: string;
|
|
5
|
+
labels: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export interface LogsData {
|
|
8
|
+
entries: LogEntry[];
|
|
9
|
+
totalCount: number;
|
|
10
|
+
hasMore?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface LokiTimeSeriesData extends TimeSeriesData {
|
|
13
|
+
logs?: LogsData;
|
|
14
|
+
resultType?: 'matrix' | 'streams';
|
|
15
|
+
}
|
|
16
|
+
export interface LokiQueryResult {
|
|
17
|
+
timeRange?: AbsoluteTimeRange;
|
|
18
|
+
stepMs?: number;
|
|
19
|
+
series: TimeSeries[];
|
|
20
|
+
logs?: LogsData;
|
|
21
|
+
resultType: 'matrix' | 'streams';
|
|
22
|
+
metadata?: TimeSeriesMetadata;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=loki-data-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loki-data-types.d.ts","sourceRoot":"","sources":["../../../src/model/loki-data-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAErG,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export { };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=loki-data-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/model/loki-data-types.ts"],"sourcesContent":["// Copyright 2025 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 { AbsoluteTimeRange, TimeSeries, TimeSeriesData, TimeSeriesMetadata } from '@perses-dev/core';\n\nexport interface LogEntry {\n timestamp: number;\n line: string;\n labels: Record<string, string>;\n}\n\nexport interface LogsData {\n entries: LogEntry[];\n totalCount: number;\n hasMore?: boolean;\n}\n\nexport interface LokiTimeSeriesData extends TimeSeriesData {\n logs?: LogsData;\n resultType?: 'matrix' | 'streams';\n}\n\nexport interface LokiQueryResult {\n timeRange?: AbsoluteTimeRange;\n stepMs?: number;\n series: TimeSeries[];\n logs?: LogsData;\n resultType: 'matrix' | 'streams';\n metadata?: TimeSeriesMetadata;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAqBjC,WAOC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DatasourceSelector } from '@perses-dev/core';
|
|
2
|
+
import { DatasourceSelectValue } from '@perses-dev/plugin-system';
|
|
3
|
+
export declare const LOKI_DATASOURCE_KIND: "LokiDatasource";
|
|
4
|
+
export interface LokiDatasourceSelector extends DatasourceSelector {
|
|
5
|
+
kind: typeof LOKI_DATASOURCE_KIND;
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_LOKI: LokiDatasourceSelector;
|
|
8
|
+
export declare function isDefaultLokiSelector(datasourceSelectValue: DatasourceSelectValue): boolean;
|
|
9
|
+
export declare function isLokiDatasourceSelector(datasourceSelectValue: DatasourceSelectValue): datasourceSelectValue is LokiDatasourceSelector;
|
|
10
|
+
//# sourceMappingURL=loki-selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loki-selectors.d.ts","sourceRoot":"","sources":["../../../src/model/loki-selectors.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAwB,MAAM,2BAA2B,CAAC;AAExF,eAAO,MAAM,oBAAoB,EAAG,gBAAyB,CAAC;AAE9D,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,IAAI,EAAE,OAAO,oBAAoB,CAAC;CACnC;AAED,eAAO,MAAM,YAAY,EAAE,sBAAuD,CAAC;AAEnF,wBAAgB,qBAAqB,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAE3F;AAED,wBAAgB,wBAAwB,CACtC,qBAAqB,EAAE,qBAAqB,GAC3C,qBAAqB,IAAI,sBAAsB,CAEjD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { isVariableDatasource } from '@perses-dev/plugin-system';
|
|
14
|
+
export const LOKI_DATASOURCE_KIND = 'LokiDatasource';
|
|
15
|
+
export const DEFAULT_LOKI = {
|
|
16
|
+
kind: LOKI_DATASOURCE_KIND
|
|
17
|
+
};
|
|
18
|
+
export function isDefaultLokiSelector(datasourceSelectValue) {
|
|
19
|
+
return !isVariableDatasource(datasourceSelectValue) && datasourceSelectValue.name === undefined;
|
|
20
|
+
}
|
|
21
|
+
export function isLokiDatasourceSelector(datasourceSelectValue) {
|
|
22
|
+
return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === LOKI_DATASOURCE_KIND;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=loki-selectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/model/loki-selectors.ts"],"sourcesContent":["// Copyright 2025 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 { DatasourceSelector } from '@perses-dev/core';\nimport { DatasourceSelectValue, isVariableDatasource } from '@perses-dev/plugin-system';\n\nexport const LOKI_DATASOURCE_KIND = 'LokiDatasource' as const;\n\nexport interface LokiDatasourceSelector extends DatasourceSelector {\n kind: typeof LOKI_DATASOURCE_KIND;\n}\n\nexport const DEFAULT_LOKI: LokiDatasourceSelector = { kind: LOKI_DATASOURCE_KIND };\n\nexport function isDefaultLokiSelector(datasourceSelectValue: DatasourceSelectValue): boolean {\n return !isVariableDatasource(datasourceSelectValue) && datasourceSelectValue.name === undefined;\n}\n\nexport function isLokiDatasourceSelector(\n datasourceSelectValue: DatasourceSelectValue\n): datasourceSelectValue is LokiDatasourceSelector {\n return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === LOKI_DATASOURCE_KIND;\n}\n"],"names":["isVariableDatasource","LOKI_DATASOURCE_KIND","DEFAULT_LOKI","kind","isDefaultLokiSelector","datasourceSelectValue","name","undefined","isLokiDatasourceSelector"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAAgCA,oBAAoB,QAAQ,4BAA4B;AAExF,OAAO,MAAMC,uBAAuB,iBAA0B;AAM9D,OAAO,MAAMC,eAAuC;IAAEC,MAAMF;AAAqB,EAAE;AAEnF,OAAO,SAASG,sBAAsBC,qBAA4C;IAChF,OAAO,CAACL,qBAAqBK,0BAA0BA,sBAAsBC,IAAI,KAAKC;AACxF;AAEA,OAAO,SAASC,yBACdH,qBAA4C;IAE5C,OAAOL,qBAAqBK,0BAA0BA,sBAAsBF,IAAI,KAAKF;AACvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/index.ts"],"names":[],"mappings":"AAaA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './logstable';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/panels/index.ts"],"sourcesContent":["// Copyright 2025 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 './logstable';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogsTable.d.ts","sourceRoot":"","sources":["../../../../src/panels/logstable/LogsTable.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGtD,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,WAAW,EAAE,SAAS,CASzD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { LogsTableComponent } from './LogsTableComponent';
|
|
14
|
+
import { LogsSettingsEditor } from './LogsTableSettingsEditor';
|
|
15
|
+
export const LogsTable = {
|
|
16
|
+
PanelComponent: LogsTableComponent,
|
|
17
|
+
panelOptionsEditorComponents: [
|
|
18
|
+
{
|
|
19
|
+
label: 'Settings',
|
|
20
|
+
content: LogsSettingsEditor
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
supportedQueryTypes: [
|
|
24
|
+
'LogQuery'
|
|
25
|
+
],
|
|
26
|
+
createInitialOptions: ()=>({
|
|
27
|
+
time: true,
|
|
28
|
+
wrap: true,
|
|
29
|
+
enableDetails: true
|
|
30
|
+
})
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=LogsTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/panels/logstable/LogsTable.tsx"],"sourcesContent":["// Copyright 2025 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 { PanelPlugin } from '@perses-dev/plugin-system';\nimport { LogsTableComponent } from './LogsTableComponent';\nimport { LogsOptions, LogsProps } from './logs-types';\nimport { LogsSettingsEditor } from './LogsTableSettingsEditor';\n\nexport const LogsTable: PanelPlugin<LogsOptions, LogsProps> = {\n PanelComponent: LogsTableComponent,\n panelOptionsEditorComponents: [{ label: 'Settings', content: LogsSettingsEditor }],\n supportedQueryTypes: ['LogQuery'],\n createInitialOptions: () => ({\n time: true,\n wrap: true,\n enableDetails: true,\n }),\n};\n"],"names":["LogsTableComponent","LogsSettingsEditor","LogsTable","PanelComponent","panelOptionsEditorComponents","label","content","supportedQueryTypes","createInitialOptions","time","wrap","enableDetails"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,kBAAkB,QAAQ,uBAAuB;AAE1D,SAASC,kBAAkB,QAAQ,4BAA4B;AAE/D,OAAO,MAAMC,YAAiD;IAC5DC,gBAAgBH;IAChBI,8BAA8B;QAAC;YAAEC,OAAO;YAAYC,SAASL;QAAmB;KAAE;IAClFM,qBAAqB;QAAC;KAAW;IACjCC,sBAAsB,IAAO,CAAA;YAC3BC,MAAM;YACNC,MAAM;YACNC,eAAe;QACjB,CAAA;AACF,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogsTableComponent.d.ts","sourceRoot":"","sources":["../../../../src/panels/logstable/LogsTableComponent.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,YAAY,GAAG,IAAI,CAmBxE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Typography } from '@mui/material';
|
|
15
|
+
import { LogsList } from './components/LogsList';
|
|
16
|
+
export function LogsTableComponent(props) {
|
|
17
|
+
const { queryResults, spec } = props;
|
|
18
|
+
if (queryResults[0]?.data.logs === undefined) {
|
|
19
|
+
return /*#__PURE__*/ _jsx(Typography, {
|
|
20
|
+
variant: "h3",
|
|
21
|
+
sx: {
|
|
22
|
+
textAlign: 'center',
|
|
23
|
+
marginTop: 4
|
|
24
|
+
},
|
|
25
|
+
children: "No logs to display"
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
const logs = queryResults[0]?.data.logs.entries;
|
|
29
|
+
return /*#__PURE__*/ _jsx(LogsList, {
|
|
30
|
+
logs: logs,
|
|
31
|
+
spec: spec
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=LogsTableComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/panels/logstable/LogsTableComponent.tsx"],"sourcesContent":["// Copyright 2025 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 { ReactElement } from 'react';\nimport { Typography } from '@mui/material';\nimport { LogsProps } from './logs-types';\nimport { LogsList } from './components/LogsList';\n\nexport function LogsTableComponent(props: LogsProps): ReactElement | null {\n const { queryResults, spec } = props;\n\n if (queryResults[0]?.data.logs === undefined) {\n return (\n <Typography\n variant=\"h3\"\n sx={{\n textAlign: 'center',\n marginTop: 4,\n }}\n >\n No logs to display\n </Typography>\n );\n }\n const logs = queryResults[0]?.data.logs.entries;\n\n return <LogsList logs={logs} spec={spec} />;\n}\n"],"names":["Typography","LogsList","LogsTableComponent","props","queryResults","spec","data","logs","undefined","variant","sx","textAlign","marginTop","entries"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,UAAU,QAAQ,gBAAgB;AAE3C,SAASC,QAAQ,QAAQ,wBAAwB;AAEjD,OAAO,SAASC,mBAAmBC,KAAgB;IACjD,MAAM,EAAEC,YAAY,EAAEC,IAAI,EAAE,GAAGF;IAE/B,IAAIC,YAAY,CAAC,EAAE,EAAEE,KAAKC,SAASC,WAAW;QAC5C,qBACE,KAACR;YACCS,SAAQ;YACRC,IAAI;gBACFC,WAAW;gBACXC,WAAW;YACb;sBACD;;IAIL;IACA,MAAML,OAAOH,YAAY,CAAC,EAAE,EAAEE,KAAKC,KAAKM;IAExC,qBAAO,KAACZ;QAASM,MAAMA;QAAMF,MAAMA;;AACrC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { LogsOptions } from './logs-types';
|
|
4
|
+
type LogsSettingsEditorProps = OptionsEditorProps<LogsOptions>;
|
|
5
|
+
export declare function LogsSettingsEditor(props: LogsSettingsEditorProps): ReactElement;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=LogsTableSettingsEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogsTableSettingsEditor.d.ts","sourceRoot":"","sources":["../../../../src/panels/logstable/LogsTableSettingsEditor.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,KAAK,uBAAuB,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;AAE/D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,YAAY,CA2B/E"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { OptionsEditorColumn, OptionsEditorControl, OptionsEditorGrid, OptionsEditorGroup } from '@perses-dev/components';
|
|
15
|
+
import { Switch } from '@mui/material';
|
|
16
|
+
export function LogsSettingsEditor(props) {
|
|
17
|
+
const { onChange, value } = props;
|
|
18
|
+
const handleEnableDetails = (e)=>onChange({
|
|
19
|
+
...value,
|
|
20
|
+
enableDetails: e.target.checked
|
|
21
|
+
});
|
|
22
|
+
const handleEnableTime = (e)=>onChange({
|
|
23
|
+
...value,
|
|
24
|
+
time: e.target.checked
|
|
25
|
+
});
|
|
26
|
+
const handleEnableWrap = (e)=>onChange({
|
|
27
|
+
...value,
|
|
28
|
+
wrap: e.target.checked
|
|
29
|
+
});
|
|
30
|
+
return /*#__PURE__*/ _jsx(OptionsEditorGrid, {
|
|
31
|
+
children: /*#__PURE__*/ _jsx(OptionsEditorColumn, {
|
|
32
|
+
children: /*#__PURE__*/ _jsxs(OptionsEditorGroup, {
|
|
33
|
+
title: "Display",
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ _jsx(OptionsEditorControl, {
|
|
36
|
+
label: "Log details",
|
|
37
|
+
control: /*#__PURE__*/ _jsx(Switch, {
|
|
38
|
+
checked: !!value.enableDetails,
|
|
39
|
+
onChange: handleEnableDetails
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ _jsx(OptionsEditorControl, {
|
|
43
|
+
label: "Time",
|
|
44
|
+
control: /*#__PURE__*/ _jsx(Switch, {
|
|
45
|
+
checked: !!value.time,
|
|
46
|
+
onChange: handleEnableTime
|
|
47
|
+
})
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(OptionsEditorControl, {
|
|
50
|
+
label: "Wrap lines",
|
|
51
|
+
control: /*#__PURE__*/ _jsx(Switch, {
|
|
52
|
+
checked: !!value.wrap,
|
|
53
|
+
onChange: handleEnableWrap
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=LogsTableSettingsEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/panels/logstable/LogsTableSettingsEditor.tsx"],"sourcesContent":["// Copyright 2025 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 OptionsEditorColumn,\n OptionsEditorControl,\n OptionsEditorGrid,\n OptionsEditorGroup,\n} from '@perses-dev/components';\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { Switch } from '@mui/material';\nimport { LogsOptions } from './logs-types';\n\ntype LogsSettingsEditorProps = OptionsEditorProps<LogsOptions>;\n\nexport function LogsSettingsEditor(props: LogsSettingsEditorProps): ReactElement {\n const { onChange, value } = props;\n\n const handleEnableDetails = (e: React.ChangeEvent<HTMLInputElement>) =>\n onChange({ ...value, enableDetails: e.target.checked });\n\n const handleEnableTime = (e: React.ChangeEvent<HTMLInputElement>) => onChange({ ...value, time: e.target.checked });\n\n const handleEnableWrap = (e: React.ChangeEvent<HTMLInputElement>) => onChange({ ...value, wrap: e.target.checked });\n\n return (\n <OptionsEditorGrid>\n <OptionsEditorColumn>\n <OptionsEditorGroup title=\"Display\">\n <OptionsEditorControl\n label=\"Log details\"\n control={<Switch checked={!!value.enableDetails} onChange={handleEnableDetails} />}\n />\n <OptionsEditorControl label=\"Time\" control={<Switch checked={!!value.time} onChange={handleEnableTime} />} />\n <OptionsEditorControl\n label=\"Wrap lines\"\n control={<Switch checked={!!value.wrap} onChange={handleEnableWrap} />}\n />\n </OptionsEditorGroup>\n </OptionsEditorColumn>\n </OptionsEditorGrid>\n );\n}\n"],"names":["OptionsEditorColumn","OptionsEditorControl","OptionsEditorGrid","OptionsEditorGroup","Switch","LogsSettingsEditor","props","onChange","value","handleEnableDetails","e","enableDetails","target","checked","handleEnableTime","time","handleEnableWrap","wrap","title","label","control"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SACEA,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,kBAAkB,QACb,yBAAyB;AAGhC,SAASC,MAAM,QAAQ,gBAAgB;AAKvC,OAAO,SAASC,mBAAmBC,KAA8B;IAC/D,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAE5B,MAAMG,sBAAsB,CAACC,IAC3BH,SAAS;YAAE,GAAGC,KAAK;YAAEG,eAAeD,EAAEE,MAAM,CAACC,OAAO;QAAC;IAEvD,MAAMC,mBAAmB,CAACJ,IAA2CH,SAAS;YAAE,GAAGC,KAAK;YAAEO,MAAML,EAAEE,MAAM,CAACC,OAAO;QAAC;IAEjH,MAAMG,mBAAmB,CAACN,IAA2CH,SAAS;YAAE,GAAGC,KAAK;YAAES,MAAMP,EAAEE,MAAM,CAACC,OAAO;QAAC;IAEjH,qBACE,KAACX;kBACC,cAAA,KAACF;sBACC,cAAA,MAACG;gBAAmBe,OAAM;;kCACxB,KAACjB;wBACCkB,OAAM;wBACNC,uBAAS,KAAChB;4BAAOS,SAAS,CAAC,CAACL,MAAMG,aAAa;4BAAEJ,UAAUE;;;kCAE7D,KAACR;wBAAqBkB,OAAM;wBAAOC,uBAAS,KAAChB;4BAAOS,SAAS,CAAC,CAACL,MAAMO,IAAI;4BAAER,UAAUO;;;kCACrF,KAACb;wBACCkB,OAAM;wBACNC,uBAAS,KAAChB;4BAAOS,SAAS,CAAC,CAACL,MAAMS,IAAI;4BAAEV,UAAUS;;;;;;;AAM9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyLogsState.d.ts","sourceRoot":"","sources":["../../../../../src/panels/logstable/components/EmptyLogsState.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,mBAAmB;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAuBxD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { Box, Typography, useTheme } from '@mui/material';
|
|
16
|
+
export const EmptyLogsState = ({ message = 'No logs to display' })=>{
|
|
17
|
+
const theme = useTheme();
|
|
18
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
19
|
+
sx: {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
height: '200px'
|
|
24
|
+
},
|
|
25
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
26
|
+
variant: "body2",
|
|
27
|
+
sx: {
|
|
28
|
+
color: theme.palette.text.secondary,
|
|
29
|
+
fontSize: '14px'
|
|
30
|
+
},
|
|
31
|
+
children: message
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=EmptyLogsState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/panels/logstable/components/EmptyLogsState.tsx"],"sourcesContent":["// Copyright 2025 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 React from 'react';\nimport { Box, Typography, useTheme } from '@mui/material';\n\ninterface EmptyLogsStateProps {\n message?: string;\n}\n\nexport const EmptyLogsState: React.FC<EmptyLogsStateProps> = ({ message = 'No logs to display' }) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '200px',\n }}\n >\n <Typography\n variant=\"body2\"\n sx={{\n color: theme.palette.text.secondary,\n fontSize: '14px',\n }}\n >\n {message}\n </Typography>\n </Box>\n );\n};\n"],"names":["React","Box","Typography","useTheme","EmptyLogsState","message","theme","sx","display","alignItems","justifyContent","height","variant","color","palette","text","secondary","fontSize"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,SAASC,GAAG,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AAM1D,OAAO,MAAMC,iBAAgD,CAAC,EAAEC,UAAU,oBAAoB,EAAE;IAC9F,MAAMC,QAAQH;IAEd,qBACE,KAACF;QACCM,IAAI;YACFC,SAAS;YACTC,YAAY;YACZC,gBAAgB;YAChBC,QAAQ;QACV;kBAEA,cAAA,KAACT;YACCU,SAAQ;YACRL,IAAI;gBACFM,OAAOP,MAAMQ,OAAO,CAACC,IAAI,CAACC,SAAS;gBACnCC,UAAU;YACZ;sBAECZ;;;AAIT,EAAE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LogEntry } from '../../../../model/loki-data-types';
|
|
3
|
+
interface LogRowProps {
|
|
4
|
+
log?: LogEntry;
|
|
5
|
+
index: number;
|
|
6
|
+
isExpanded: boolean;
|
|
7
|
+
onToggle: (index: number) => void;
|
|
8
|
+
isExpandable?: boolean;
|
|
9
|
+
time?: boolean;
|
|
10
|
+
wrap?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const LogRow: React.FC<LogRowProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=LogRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogRow.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/logstable/components/LogRow/LogRow.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAM7D,UAAU,WAAW;IACnB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAoExC,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import React, { memo, useCallback } from 'react';
|
|
15
|
+
import { Box, Collapse } from '@mui/material';
|
|
16
|
+
import ChevronRight from 'mdi-material-ui/ChevronRight';
|
|
17
|
+
import { useSeverityColor } from '../../hooks/useSeverity';
|
|
18
|
+
import { LogTimestamp } from './LogTimestamp';
|
|
19
|
+
import { LogRowContainer, LogRowContent, ExpandButton, LogText } from './LogsStyles';
|
|
20
|
+
import { LogLabelsTable } from './LogsLabelsTable';
|
|
21
|
+
export const LogRow = /*#__PURE__*/ memo(({ log, isExpanded, index, onToggle, isExpandable = false, time = false, wrap = false })=>{
|
|
22
|
+
const severityColor = useSeverityColor(log);
|
|
23
|
+
const handleToggle = useCallback(()=>{
|
|
24
|
+
if (isExpandable) {
|
|
25
|
+
onToggle(index);
|
|
26
|
+
}
|
|
27
|
+
}, [
|
|
28
|
+
isExpandable,
|
|
29
|
+
onToggle,
|
|
30
|
+
index
|
|
31
|
+
]);
|
|
32
|
+
if (!log) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
return /*#__PURE__*/ _jsxs(LogRowContainer, {
|
|
36
|
+
severityColor: severityColor,
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ _jsxs(LogRowContent, {
|
|
39
|
+
onClick: handleToggle,
|
|
40
|
+
isExpandable: isExpandable,
|
|
41
|
+
time: time,
|
|
42
|
+
children: [
|
|
43
|
+
isExpandable && /*#__PURE__*/ _jsx(Box, {
|
|
44
|
+
sx: {
|
|
45
|
+
display: 'flex',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
width: '16px',
|
|
48
|
+
justifyContent: 'center'
|
|
49
|
+
},
|
|
50
|
+
children: /*#__PURE__*/ _jsx(ExpandButton, {
|
|
51
|
+
size: "small",
|
|
52
|
+
isExpanded: isExpanded,
|
|
53
|
+
children: /*#__PURE__*/ _jsx(ChevronRight, {
|
|
54
|
+
sx: {
|
|
55
|
+
fontSize: '12px'
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
}),
|
|
60
|
+
time && /*#__PURE__*/ _jsx(LogTimestamp, {
|
|
61
|
+
timestamp: log.timestamp
|
|
62
|
+
}),
|
|
63
|
+
/*#__PURE__*/ _jsx(LogText, {
|
|
64
|
+
variant: "body2",
|
|
65
|
+
wrap: wrap,
|
|
66
|
+
children: log.line
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ _jsx(Collapse, {
|
|
71
|
+
in: isExpanded,
|
|
72
|
+
timeout: 200,
|
|
73
|
+
children: /*#__PURE__*/ _jsx(Box, {
|
|
74
|
+
sx: {
|
|
75
|
+
padding: '8px'
|
|
76
|
+
},
|
|
77
|
+
children: /*#__PURE__*/ _jsxs(Box, {
|
|
78
|
+
sx: {
|
|
79
|
+
display: 'grid',
|
|
80
|
+
gridTemplateColumns: !time ? '1fr' : '8px minmax(160px, max-content) 1fr',
|
|
81
|
+
gap: '12px'
|
|
82
|
+
},
|
|
83
|
+
children: [
|
|
84
|
+
time && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
85
|
+
children: [
|
|
86
|
+
/*#__PURE__*/ _jsx(Box, {}),
|
|
87
|
+
/*#__PURE__*/ _jsx(Box, {})
|
|
88
|
+
]
|
|
89
|
+
}),
|
|
90
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
91
|
+
children: /*#__PURE__*/ _jsx(LogLabelsTable, {
|
|
92
|
+
labels: log.labels
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
LogRow.displayName = 'LogRow';
|
|
103
|
+
|
|
104
|
+
//# sourceMappingURL=LogRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/panels/logstable/components/LogRow/LogRow.tsx"],"sourcesContent":["// Copyright 2025 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 React, { memo, useCallback } from 'react';\nimport { Box, Collapse } from '@mui/material';\nimport ChevronRight from 'mdi-material-ui/ChevronRight';\nimport { LogEntry } from '../../../../model/loki-data-types';\nimport { useSeverityColor } from '../../hooks/useSeverity';\nimport { LogTimestamp } from './LogTimestamp';\nimport { LogRowContainer, LogRowContent, ExpandButton, LogText } from './LogsStyles';\nimport { LogLabelsTable } from './LogsLabelsTable';\n\ninterface LogRowProps {\n log?: LogEntry;\n index: number;\n isExpanded: boolean;\n onToggle: (index: number) => void;\n isExpandable?: boolean;\n time?: boolean;\n wrap?: boolean;\n}\n\nexport const LogRow: React.FC<LogRowProps> = memo(\n ({ log, isExpanded, index, onToggle, isExpandable = false, time = false, wrap = false }) => {\n const severityColor = useSeverityColor(log);\n\n const handleToggle = useCallback(() => {\n if (isExpandable) {\n onToggle(index);\n }\n }, [isExpandable, onToggle, index]);\n\n if (!log) {\n return null;\n }\n\n return (\n <LogRowContainer severityColor={severityColor}>\n <LogRowContent onClick={handleToggle} isExpandable={isExpandable} time={time}>\n {isExpandable && (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n width: '16px',\n justifyContent: 'center',\n }}\n >\n <ExpandButton size=\"small\" isExpanded={isExpanded}>\n <ChevronRight sx={{ fontSize: '12px' }} />\n </ExpandButton>\n </Box>\n )}\n\n {time && <LogTimestamp timestamp={log.timestamp} />}\n\n <LogText variant=\"body2\" wrap={wrap}>\n {log.line}\n </LogText>\n </LogRowContent>\n\n <Collapse in={isExpanded} timeout={200}>\n <Box\n sx={{\n padding: '8px',\n }}\n >\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: !time ? '1fr' : '8px minmax(160px, max-content) 1fr',\n gap: '12px',\n }}\n >\n {/* spacers */}\n {time && (\n <>\n <Box />\n <Box />\n </>\n )}\n <Box>\n <LogLabelsTable labels={log.labels} />\n </Box>\n </Box>\n </Box>\n </Collapse>\n </LogRowContainer>\n );\n }\n);\n\nLogRow.displayName = 'LogRow';\n"],"names":["React","memo","useCallback","Box","Collapse","ChevronRight","useSeverityColor","LogTimestamp","LogRowContainer","LogRowContent","ExpandButton","LogText","LogLabelsTable","LogRow","log","isExpanded","index","onToggle","isExpandable","time","wrap","severityColor","handleToggle","onClick","sx","display","alignItems","width","justifyContent","size","fontSize","timestamp","variant","line","in","timeout","padding","gridTemplateColumns","gap","labels","displayName"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE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FY,SAAS;oBACX;8BAEA,cAAA,MAACjC;wBACCqB,IAAI;4BACFC,SAAS;4BACTY,qBAAqB,CAAClB,OAAO,QAAQ;4BACrCmB,KAAK;wBACP;;4BAGCnB,sBACC;;kDACE,KAAChB;kDACD,KAACA;;;0CAGL,KAACA;0CACC,cAAA,KAACS;oCAAe2B,QAAQzB,IAAIyB,MAAM;;;;;;;;;AAOhD,GACA;AAEF1B,OAAO2B,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogTimestamp.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/logstable/components/LogRow/LogTimestamp.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAgBpD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { Typography, useTheme } from '@mui/material';
|
|
16
|
+
import { fromUnixTime, format } from 'date-fns';
|
|
17
|
+
export const LogTimestamp = ({ timestamp })=>{
|
|
18
|
+
const theme = useTheme();
|
|
19
|
+
return /*#__PURE__*/ _jsx(Typography, {
|
|
20
|
+
variant: "caption",
|
|
21
|
+
sx: {
|
|
22
|
+
color: theme.palette.text.secondary,
|
|
23
|
+
fontSize: '12px',
|
|
24
|
+
whiteSpace: 'nowrap',
|
|
25
|
+
minWidth: '160px'
|
|
26
|
+
},
|
|
27
|
+
children: format(fromUnixTime(timestamp), 'yyyy-MM-dd HH:mm:ss')
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=LogTimestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/panels/logstable/components/LogRow/LogTimestamp.tsx"],"sourcesContent":["// Copyright 2025 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 React from 'react';\nimport { Typography, useTheme } from '@mui/material';\nimport { fromUnixTime, format } from 'date-fns';\n\ninterface LogTimestampProps {\n timestamp: number;\n}\n\nexport const LogTimestamp: React.FC<LogTimestampProps> = ({ timestamp }) => {\n const theme = useTheme();\n\n return (\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.text.secondary,\n fontSize: '12px',\n whiteSpace: 'nowrap',\n minWidth: '160px',\n }}\n >\n {format(fromUnixTime(timestamp), 'yyyy-MM-dd HH:mm:ss')}\n </Typography>\n );\n};\n"],"names":["React","Typography","useTheme","fromUnixTime","format","LogTimestamp","timestamp","theme","variant","sx","color","palette","text","secondary","fontSize","whiteSpace","minWidth"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,SAASC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AACrD,SAASC,YAAY,EAAEC,MAAM,QAAQ,WAAW;AAMhD,OAAO,MAAMC,eAA4C,CAAC,EAAEC,SAAS,EAAE;IACrE,MAAMC,QAAQL;IAEd,qBACE,KAACD;QACCO,SAAQ;QACRC,IAAI;YACFC,OAAOH,MAAMI,OAAO,CAACC,IAAI,CAACC,SAAS;YACnCC,UAAU;YACVC,YAAY;YACZC,UAAU;QACZ;kBAECZ,OAAOD,aAAaG,YAAY;;AAGvC,EAAE"}
|