@perses-dev/clickhouse-plugin 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/__mf/css/async/1580.6b2b0c71.css +1 -0
- package/__mf/css/async/2341.6b2b0c71.css +1 -0
- package/__mf/css/async/6759.6b2b0c71.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/ClickHouse.99e35ca2.js +5 -0
- package/__mf/js/async/1580.5bd6ed40.js +2 -0
- package/__mf/js/async/1580.5bd6ed40.js.LICENSE.txt +9 -0
- package/__mf/js/async/1964.dccce52b.js +2 -0
- package/__mf/js/async/1964.dccce52b.js.LICENSE.txt +9 -0
- package/__mf/js/async/2114.27f707a0.js +1 -0
- package/__mf/js/async/2292.248bd1ea.js +2 -0
- package/__mf/js/async/2292.248bd1ea.js.LICENSE.txt +24 -0
- package/__mf/js/async/2417.1f135170.js +2 -0
- package/__mf/js/async/2417.1f135170.js.LICENSE.txt +9 -0
- package/__mf/js/async/2448.e42be954.js +10 -0
- package/__mf/js/async/2448.e42be954.js.LICENSE.txt +17 -0
- package/__mf/js/async/2651.3bdd6b21.js +1 -0
- package/__mf/js/async/3224.5735a223.js +1 -0
- package/__mf/js/async/3431.54fb88df.js +1 -0
- package/__mf/js/async/3632.f88c5ced.js +101 -0
- package/__mf/js/async/3863.70d46fa8.js +2 -0
- package/__mf/js/async/3863.70d46fa8.js.LICENSE.txt +9 -0
- package/__mf/js/async/3960.e0eb27f3.js +2 -0
- package/__mf/js/async/3960.e0eb27f3.js.LICENSE.txt +8 -0
- package/__mf/js/async/3980.2a6bea70.js +2 -0
- package/__mf/js/async/3980.2a6bea70.js.LICENSE.txt +9 -0
- package/__mf/js/async/4075.598f1ee5.js +1 -0
- package/__mf/js/async/4168.af4fa8b3.js +2 -0
- package/__mf/js/async/4238.8c8282dc.js +1 -0
- package/__mf/js/async/4269.a389e8c6.js +2 -0
- package/__mf/js/async/4269.a389e8c6.js.LICENSE.txt +9 -0
- package/__mf/js/async/4368.8468ec0a.js +2 -0
- package/__mf/js/async/4368.8468ec0a.js.LICENSE.txt +15 -0
- package/__mf/js/async/4421.de18bb66.js +1 -0
- package/__mf/js/async/5035.8a983cd3.js +73 -0
- package/__mf/js/async/5035.8a983cd3.js.LICENSE.txt +19 -0
- package/__mf/js/async/5214.d1943ccc.js +1 -0
- package/__mf/js/async/5409.c4876520.js +1 -0
- package/__mf/js/async/56.9997e6f8.js +1 -0
- package/__mf/js/async/5713.92805154.js +1 -0
- package/__mf/js/async/5981.f3abf3c8.js +2 -0
- package/__mf/js/async/5981.f3abf3c8.js.LICENSE.txt +8 -0
- package/__mf/js/async/6292.4311054b.js +1 -0
- package/__mf/js/async/6333.dfeaf029.js +2 -0
- package/__mf/js/async/6333.dfeaf029.js.LICENSE.txt +9 -0
- package/__mf/js/async/6377.6c8c4e15.js +2 -0
- package/__mf/js/async/6377.6c8c4e15.js.LICENSE.txt +32 -0
- package/__mf/js/async/6411.3873365b.js +1 -0
- package/__mf/js/async/6467.f4e5b898.js +1 -0
- package/__mf/js/async/6569.f8ee50db.js +1 -0
- package/__mf/js/async/6714.e4b5281a.js +2 -0
- package/__mf/js/async/6714.e4b5281a.js.LICENSE.txt +21 -0
- package/__mf/js/async/6770.e50c0d08.js +1 -0
- package/__mf/js/async/694.c93f9cdf.js +1 -0
- package/__mf/js/async/7376.c01a7f82.js +1 -0
- package/__mf/js/async/738.0cdf47b4.js +1 -0
- package/__mf/js/async/7740.b3df297f.js +1 -0
- package/__mf/js/async/8216.44c6334e.js +1 -0
- package/__mf/js/async/8465.f4c53fef.js +7 -0
- package/__mf/js/async/8465.f4c53fef.js.LICENSE.txt +21 -0
- package/__mf/js/async/8488.16a69ea5.js +1 -0
- package/__mf/js/async/8709.6d909ac5.js +2 -0
- package/__mf/js/async/8709.6d909ac5.js.LICENSE.txt +9 -0
- package/__mf/js/async/9173.90ba4f20.js +2 -0
- package/__mf/js/async/9173.90ba4f20.js.LICENSE.txt +19 -0
- package/__mf/js/async/9654.ab803765.js +37 -0
- package/__mf/js/async/__federation_expose_ClickHouseDatasource.1ef730b1.js +2 -0
- package/__mf/js/async/__federation_expose_ClickHouseDatasource.1ef730b1.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_ClickHouseLogQuery.3f312752.js +19 -0
- package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a3f88e6b.js +19 -0
- package/__mf/js/async/__federation_expose_Logs.88d56eeb.js +2 -0
- package/__mf/js/async/__federation_expose_Logs.88d56eeb.js.LICENSE.txt +9 -0
- package/__mf/js/main.b7c9a660.js +5 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +19 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/bootstrap.js +26 -0
- package/lib/cjs/components/ClickQLEditor.js +72 -0
- package/lib/cjs/components/constants.js +41 -0
- package/lib/cjs/components/index.js +30 -0
- package/lib/cjs/datasources/click-house-datasource/ClickHouseDatasource.js +49 -0
- package/lib/cjs/datasources/click-house-datasource/ClickHouseDatasourceEditor.js +51 -0
- package/lib/cjs/datasources/click-house-datasource/click-house-datasource-types.js +16 -0
- package/lib/cjs/datasources/click-house-datasource/index.js +32 -0
- package/lib/cjs/datasources/index.js +30 -0
- package/lib/cjs/env.d.js +14 -0
- package/lib/cjs/getPluginModule.js +39 -0
- package/lib/cjs/index-federation.js +55 -0
- package/lib/cjs/index.js +39 -0
- package/lib/cjs/model/click-house-client.js +66 -0
- package/lib/cjs/model/click-house-data-types.js +16 -0
- package/lib/cjs/panels/index.js +30 -0
- package/lib/cjs/panels/logs/Logs.js +37 -0
- package/lib/cjs/panels/logs/LogsComponent.js +47 -0
- package/lib/cjs/panels/logs/LogsSettingsEditor.js +57 -0
- package/lib/cjs/panels/logs/components/EmptyLogsState.js +49 -0
- package/lib/cjs/panels/logs/components/LogRow/LogDetailsTable.js +71 -0
- package/lib/cjs/panels/logs/components/LogRow/LogRow.js +163 -0
- package/lib/cjs/panels/logs/components/LogRow/LogTimestamp.js +45 -0
- package/lib/cjs/panels/logs/components/LogRow/LogsStyles.js +77 -0
- package/lib/cjs/panels/logs/components/LogRow/index.js +37 -0
- package/lib/cjs/panels/logs/components/LogsList.js +44 -0
- package/lib/cjs/panels/logs/components/VirtualizedLogsList.js +60 -0
- package/lib/cjs/panels/logs/components/hooks/useExpandedRows.js +45 -0
- package/lib/cjs/panels/logs/index.js +33 -0
- package/lib/cjs/panels/logs/logs-types.js +16 -0
- package/lib/cjs/queries/click-house-log-query/ClickHouseLogQuery.js +43 -0
- package/lib/cjs/queries/click-house-log-query/ClickHouseLogQueryEditor.js +113 -0
- package/lib/cjs/queries/click-house-log-query/click-house-log-query-types.js +16 -0
- package/lib/cjs/queries/click-house-log-query/get-click-house-log-data.js +89 -0
- package/lib/cjs/queries/click-house-log-query/index.js +33 -0
- package/lib/cjs/queries/click-house-log-query/log-query-plugin-interface.js +4 -0
- package/lib/cjs/queries/click-house-time-series-query/ClickHouseQuery.js +43 -0
- package/lib/cjs/queries/click-house-time-series-query/ClickHouseQueryEditor.js +113 -0
- package/lib/cjs/queries/click-house-time-series-query/click-house-query-types.js +16 -0
- package/lib/cjs/queries/click-house-time-series-query/get-click-house-data.js +69 -0
- package/lib/cjs/queries/click-house-time-series-query/index.js +33 -0
- package/lib/cjs/queries/constants.js +34 -0
- package/lib/cjs/queries/index.js +31 -0
- package/lib/cjs/setup-tests.js +19 -0
- package/lib/components/ClickQLEditor.d.ts +5 -0
- package/lib/components/ClickQLEditor.d.ts.map +1 -0
- package/lib/components/ClickQLEditor.js +59 -0
- package/lib/components/ClickQLEditor.js.map +1 -0
- package/lib/components/constants.d.ts +2 -0
- package/lib/components/constants.d.ts.map +1 -0
- package/lib/components/constants.js +33 -0
- package/lib/components/constants.js.map +1 -0
- package/lib/components/index.d.ts +2 -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/datasources/click-house-datasource/ClickHouseDatasource.d.ts +4 -0
- package/lib/datasources/click-house-datasource/ClickHouseDatasource.d.ts.map +1 -0
- package/lib/datasources/click-house-datasource/ClickHouseDatasource.js +41 -0
- package/lib/datasources/click-house-datasource/ClickHouseDatasource.js.map +1 -0
- package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.d.ts +9 -0
- package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.d.ts.map +1 -0
- package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.js +43 -0
- package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.js.map +1 -0
- package/lib/datasources/click-house-datasource/click-house-datasource-types.d.ts +26 -0
- package/lib/datasources/click-house-datasource/click-house-datasource-types.d.ts.map +1 -0
- package/lib/datasources/click-house-datasource/click-house-datasource-types.js +15 -0
- package/lib/datasources/click-house-datasource/click-house-datasource-types.js.map +1 -0
- package/lib/datasources/click-house-datasource/index.d.ts +4 -0
- package/lib/datasources/click-house-datasource/index.d.ts.map +1 -0
- package/lib/datasources/click-house-datasource/index.js +17 -0
- package/lib/datasources/click-house-datasource/index.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/env.d.js +15 -0
- package/lib/env.d.js.map +1 -0
- package/lib/getPluginModule.d.ts +6 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +28 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +15 -0
- package/lib/index-federation.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/model/click-house-client.d.ts +22 -0
- package/lib/model/click-house-client.d.ts.map +1 -0
- package/lib/model/click-house-client.js +58 -0
- package/lib/model/click-house-client.js.map +1 -0
- package/lib/model/click-house-data-types.d.ts +22 -0
- package/lib/model/click-house-data-types.d.ts.map +1 -0
- package/lib/model/click-house-data-types.js +15 -0
- package/lib/model/click-house-data-types.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/logs/Logs.d.ts +4 -0
- package/lib/panels/logs/Logs.d.ts.map +1 -0
- package/lib/panels/logs/Logs.js +29 -0
- package/lib/panels/logs/Logs.js.map +1 -0
- package/lib/panels/logs/LogsComponent.d.ts +4 -0
- package/lib/panels/logs/LogsComponent.d.ts.map +1 -0
- package/lib/panels/logs/LogsComponent.js +34 -0
- package/lib/panels/logs/LogsComponent.js.map +1 -0
- package/lib/panels/logs/LogsSettingsEditor.d.ts +7 -0
- package/lib/panels/logs/LogsSettingsEditor.d.ts.map +1 -0
- package/lib/panels/logs/LogsSettingsEditor.js +49 -0
- package/lib/panels/logs/LogsSettingsEditor.js.map +1 -0
- package/lib/panels/logs/components/EmptyLogsState.d.ts +7 -0
- package/lib/panels/logs/components/EmptyLogsState.d.ts.map +1 -0
- package/lib/panels/logs/components/EmptyLogsState.js +36 -0
- package/lib/panels/logs/components/EmptyLogsState.js.map +1 -0
- package/lib/panels/logs/components/LogRow/LogDetailsTable.d.ts +8 -0
- package/lib/panels/logs/components/LogRow/LogDetailsTable.d.ts.map +1 -0
- package/lib/panels/logs/components/LogRow/LogDetailsTable.js +58 -0
- package/lib/panels/logs/components/LogRow/LogDetailsTable.js.map +1 -0
- package/lib/panels/logs/components/LogRow/LogRow.d.ts +14 -0
- package/lib/panels/logs/components/LogRow/LogRow.d.ts.map +1 -0
- package/lib/panels/logs/components/LogRow/LogRow.js +109 -0
- package/lib/panels/logs/components/LogRow/LogRow.js.map +1 -0
- package/lib/panels/logs/components/LogRow/LogTimestamp.d.ts +7 -0
- package/lib/panels/logs/components/LogRow/LogTimestamp.d.ts.map +1 -0
- package/lib/panels/logs/components/LogRow/LogTimestamp.js +32 -0
- package/lib/panels/logs/components/LogRow/LogTimestamp.js.map +1 -0
- package/lib/panels/logs/components/LogRow/LogsStyles.d.ts +22 -0
- package/lib/panels/logs/components/LogRow/LogsStyles.d.ts.map +1 -0
- package/lib/panels/logs/components/LogRow/LogsStyles.js +55 -0
- package/lib/panels/logs/components/LogRow/LogsStyles.js.map +1 -0
- package/lib/panels/logs/components/LogRow/index.d.ts +3 -0
- package/lib/panels/logs/components/LogRow/index.d.ts.map +1 -0
- package/lib/panels/logs/components/LogRow/index.js +16 -0
- package/lib/panels/logs/components/LogRow/index.js.map +1 -0
- package/lib/panels/logs/components/LogsList.d.ts +8 -0
- package/lib/panels/logs/components/LogsList.d.ts.map +1 -0
- package/lib/panels/logs/components/LogsList.js +31 -0
- package/lib/panels/logs/components/LogsList.js.map +1 -0
- package/lib/panels/logs/components/VirtualizedLogsList.d.ts +10 -0
- package/lib/panels/logs/components/VirtualizedLogsList.d.ts.map +1 -0
- package/lib/panels/logs/components/VirtualizedLogsList.js +47 -0
- package/lib/panels/logs/components/VirtualizedLogsList.js.map +1 -0
- package/lib/panels/logs/components/hooks/useExpandedRows.d.ts +6 -0
- package/lib/panels/logs/components/hooks/useExpandedRows.d.ts.map +1 -0
- package/lib/panels/logs/components/hooks/useExpandedRows.js +37 -0
- package/lib/panels/logs/components/hooks/useExpandedRows.js.map +1 -0
- package/lib/panels/logs/index.d.ts +5 -0
- package/lib/panels/logs/index.d.ts.map +1 -0
- package/lib/panels/logs/index.js +18 -0
- package/lib/panels/logs/index.js.map +1 -0
- package/lib/panels/logs/logs-types.d.ts +16 -0
- package/lib/panels/logs/logs-types.d.ts.map +1 -0
- package/lib/panels/logs/logs-types.js +15 -0
- package/lib/panels/logs/logs-types.js.map +1 -0
- package/lib/queries/click-house-log-query/ClickHouseLogQuery.d.ts +4 -0
- package/lib/queries/click-house-log-query/ClickHouseLogQuery.d.ts.map +1 -0
- package/lib/queries/click-house-log-query/ClickHouseLogQuery.js +35 -0
- package/lib/queries/click-house-log-query/ClickHouseLogQuery.js.map +1 -0
- package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.d.ts +7 -0
- package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.d.ts.map +1 -0
- package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.js +105 -0
- package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.js.map +1 -0
- package/lib/queries/click-house-log-query/click-house-log-query-types.d.ts +6 -0
- package/lib/queries/click-house-log-query/click-house-log-query-types.d.ts.map +1 -0
- package/lib/queries/click-house-log-query/click-house-log-query-types.js +15 -0
- package/lib/queries/click-house-log-query/click-house-log-query-types.js.map +1 -0
- package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts +4 -0
- package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts.map +1 -0
- package/lib/queries/click-house-log-query/get-click-house-log-data.js +81 -0
- package/lib/queries/click-house-log-query/get-click-house-log-data.js.map +1 -0
- package/lib/queries/click-house-log-query/index.d.ts +5 -0
- package/lib/queries/click-house-log-query/index.d.ts.map +1 -0
- package/lib/queries/click-house-log-query/index.js +18 -0
- package/lib/queries/click-house-log-query/index.js.map +1 -0
- package/lib/queries/click-house-log-query/log-query-plugin-interface.d.ts +25 -0
- package/lib/queries/click-house-log-query/log-query-plugin-interface.d.ts.map +1 -0
- package/lib/queries/click-house-log-query/log-query-plugin-interface.js +3 -0
- package/lib/queries/click-house-log-query/log-query-plugin-interface.js.map +1 -0
- package/lib/queries/click-house-time-series-query/ClickHouseQuery.d.ts +4 -0
- package/lib/queries/click-house-time-series-query/ClickHouseQuery.d.ts.map +1 -0
- package/lib/queries/click-house-time-series-query/ClickHouseQuery.js +35 -0
- package/lib/queries/click-house-time-series-query/ClickHouseQuery.js.map +1 -0
- package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.d.ts +7 -0
- package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.d.ts.map +1 -0
- package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.js +105 -0
- package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.js.map +1 -0
- package/lib/queries/click-house-time-series-query/click-house-query-types.d.ts +11 -0
- package/lib/queries/click-house-time-series-query/click-house-query-types.d.ts.map +1 -0
- package/lib/queries/click-house-time-series-query/click-house-query-types.js +16 -0
- package/lib/queries/click-house-time-series-query/click-house-query-types.js.map +1 -0
- package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts +4 -0
- package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts.map +1 -0
- package/lib/queries/click-house-time-series-query/get-click-house-data.js +61 -0
- package/lib/queries/click-house-time-series-query/get-click-house-data.js.map +1 -0
- package/lib/queries/click-house-time-series-query/index.d.ts +5 -0
- package/lib/queries/click-house-time-series-query/index.d.ts.map +1 -0
- package/lib/queries/click-house-time-series-query/index.js +18 -0
- package/lib/queries/click-house-time-series-query/index.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 +18 -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/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +17 -0
- package/lib/setup-tests.js.map +1 -0
- package/mf-manifest.json +505 -0
- package/mf-stats.json +561 -0
- package/package.json +85 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const LogRowContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
|
+
severityColor: string;
|
|
5
|
+
}, {}, {}>;
|
|
6
|
+
export declare const LogRowContent: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
9
|
+
isExpandable: boolean;
|
|
10
|
+
time: boolean;
|
|
11
|
+
}, {}, {}>;
|
|
12
|
+
export declare const ExpandButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
13
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
14
|
+
}, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "disabled" | "action" | "loading" | "size" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
15
|
+
isExpanded: boolean;
|
|
16
|
+
}, {}, {}>;
|
|
17
|
+
export declare const LogText: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
18
|
+
ref?: ((instance: HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
19
|
+
}, "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "style" | "className" | "align" | "classes" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
20
|
+
wrap: boolean;
|
|
21
|
+
}, {}, {}>;
|
|
22
|
+
//# sourceMappingURL=LogsStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogsStyles.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/logs/components/LogRow/LogsStyles.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,eAAe;;;mBAAgC,MAAM;UAK/D,CAAC;AAEJ,eAAO,MAAM,aAAa;;;kBAA+B,OAAO;UAAQ,OAAO;UAU5E,CAAC;AAEJ,eAAO,MAAM,YAAY;;;gBAAoC,OAAO;UAOjE,CAAC;AAEJ,eAAO,MAAM,OAAO;;;UAA8B,OAAO;UAgBtD,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { Box, styled, IconButton, Typography } from '@mui/material';
|
|
14
|
+
export const LogRowContainer = styled(Box)(({ severityColor })=>({
|
|
15
|
+
borderLeft: `4px solid ${severityColor}`,
|
|
16
|
+
transition: 'all 0.2s ease',
|
|
17
|
+
marginBottom: '4px',
|
|
18
|
+
fontFamily: '"DejaVu Sans Mono", monospace'
|
|
19
|
+
}));
|
|
20
|
+
export const LogRowContent = styled(Box)(({ theme, isExpandable })=>({
|
|
21
|
+
display: 'grid',
|
|
22
|
+
gridTemplateColumns: isExpandable ? '16px minmax(160px, max-content) 1fr' : 'minmax(160px, max-content) 1fr',
|
|
23
|
+
alignItems: 'flex-start',
|
|
24
|
+
padding: '4px 8px',
|
|
25
|
+
cursor: isExpandable ? 'pointer' : 'default',
|
|
26
|
+
gap: '12px',
|
|
27
|
+
'&:hover': {
|
|
28
|
+
backgroundColor: theme.palette.action.hover
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
export const ExpandButton = styled(IconButton)(({ theme, isExpanded })=>({
|
|
32
|
+
padding: 0,
|
|
33
|
+
width: '16px',
|
|
34
|
+
height: '16px',
|
|
35
|
+
color: theme.palette.text.secondary,
|
|
36
|
+
transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',
|
|
37
|
+
transition: 'transform 0.2s ease'
|
|
38
|
+
}));
|
|
39
|
+
export const LogText = styled(Typography)(({ wrap })=>({
|
|
40
|
+
fontSize: '12px',
|
|
41
|
+
flex: 1,
|
|
42
|
+
lineHeight: 1.4,
|
|
43
|
+
textAlign: 'left',
|
|
44
|
+
...wrap ? {
|
|
45
|
+
wordBreak: 'break-word',
|
|
46
|
+
whiteSpace: 'pre-wrap',
|
|
47
|
+
overflow: 'visible',
|
|
48
|
+
textOverflow: 'unset'
|
|
49
|
+
} : {
|
|
50
|
+
wordBreak: 'normal',
|
|
51
|
+
whiteSpace: 'nowrap'
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=LogsStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/panels/logs/components/LogRow/LogsStyles.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 { Box, styled, IconButton, Typography } from '@mui/material';\n\nexport const LogRowContainer = styled(Box)<{ severityColor: string }>(({ severityColor }) => ({\n borderLeft: `4px solid ${severityColor}`,\n transition: 'all 0.2s ease',\n marginBottom: '4px',\n fontFamily: '\"DejaVu Sans Mono\", monospace',\n}));\n\nexport const LogRowContent = styled(Box)<{ isExpandable: boolean; time: boolean }>(({ theme, isExpandable }) => ({\n display: 'grid',\n gridTemplateColumns: isExpandable ? '16px minmax(160px, max-content) 1fr' : 'minmax(160px, max-content) 1fr',\n alignItems: 'flex-start',\n padding: '4px 8px',\n cursor: isExpandable ? 'pointer' : 'default',\n gap: '12px',\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n}));\n\nexport const ExpandButton = styled(IconButton)<{ isExpanded: boolean }>(({ theme, isExpanded }) => ({\n padding: 0,\n width: '16px',\n height: '16px',\n color: theme.palette.text.secondary,\n transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',\n transition: 'transform 0.2s ease',\n}));\n\nexport const LogText = styled(Typography)<{ wrap: boolean }>(({ wrap }) => ({\n fontSize: '12px',\n flex: 1,\n lineHeight: 1.4,\n textAlign: 'left',\n ...(wrap\n ? {\n wordBreak: 'break-word',\n whiteSpace: 'pre-wrap',\n overflow: 'visible',\n textOverflow: 'unset',\n }\n : {\n wordBreak: 'normal',\n whiteSpace: 'nowrap',\n }),\n}));\n"],"names":["Box","styled","IconButton","Typography","LogRowContainer","severityColor","borderLeft","transition","marginBottom","fontFamily","LogRowContent","theme","isExpandable","display","gridTemplateColumns","alignItems","padding","cursor","gap","backgroundColor","palette","action","hover","ExpandButton","isExpanded","width","height","color","text","secondary","transform","LogText","wrap","fontSize","flex","lineHeight","textAlign","wordBreak","whiteSpace","overflow","textOverflow"],"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,SAASA,GAAG,EAAEC,MAAM,EAAEC,UAAU,EAAEC,UAAU,QAAQ,gBAAgB;AAEpE,OAAO,MAAMC,kBAAkBH,OAAOD,KAAgC,CAAC,EAAEK,aAAa,EAAE,GAAM,CAAA;QAC5FC,YAAY,CAAC,UAAU,EAAED,eAAe;QACxCE,YAAY;QACZC,cAAc;QACdC,YAAY;IACd,CAAA,GAAI;AAEJ,OAAO,MAAMC,gBAAgBT,OAAOD,KAA+C,CAAC,EAAEW,KAAK,EAAEC,YAAY,EAAE,GAAM,CAAA;QAC/GC,SAAS;QACTC,qBAAqBF,eAAe,wCAAwC;QAC5EG,YAAY;QACZC,SAAS;QACTC,QAAQL,eAAe,YAAY;QACnCM,KAAK;QACL,WAAW;YACTC,iBAAiBR,MAAMS,OAAO,CAACC,MAAM,CAACC,KAAK;QAC7C;IACF,CAAA,GAAI;AAEJ,OAAO,MAAMC,eAAetB,OAAOC,YAAqC,CAAC,EAAES,KAAK,EAAEa,UAAU,EAAE,GAAM,CAAA;QAClGR,SAAS;QACTS,OAAO;QACPC,QAAQ;QACRC,OAAOhB,MAAMS,OAAO,CAACQ,IAAI,CAACC,SAAS;QACnCC,WAAWN,aAAa,kBAAkB;QAC1CjB,YAAY;IACd,CAAA,GAAI;AAEJ,OAAO,MAAMwB,UAAU9B,OAAOE,YAA+B,CAAC,EAAE6B,IAAI,EAAE,GAAM,CAAA;QAC1EC,UAAU;QACVC,MAAM;QACNC,YAAY;QACZC,WAAW;QACX,GAAIJ,OACA;YACEK,WAAW;YACXC,YAAY;YACZC,UAAU;YACVC,cAAc;QAChB,IACA;YACEH,WAAW;YACXC,YAAY;QACd,CAAC;IACP,CAAA,GAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/logs/components/LogRow/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { LogRow } from './LogRow';
|
|
14
|
+
export * from './LogsStyles';
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/panels/logs/components/LogRow/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 { LogRow } from './LogRow';\nexport * from './LogsStyles';\n"],"names":["LogRow"],"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,SAASA,MAAM,QAAQ,WAAW;AAClC,cAAc,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogsList.d.ts","sourceRoot":"","sources":["../../../../../src/panels/logs/components/LogsList.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAKjE,UAAU,aAAa;IACrB,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAQrC,CAAC;AAEF,eAAe,QAAQ,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 { EmptyLogsState } from './EmptyLogsState';
|
|
16
|
+
import { useExpandedRows } from './hooks/useExpandedRows';
|
|
17
|
+
import { VirtualizedLogsList } from './VirtualizedLogsList';
|
|
18
|
+
const LogsList = ({ logs })=>{
|
|
19
|
+
const { expandedRows, toggleExpand } = useExpandedRows();
|
|
20
|
+
if (!logs.length) {
|
|
21
|
+
return /*#__PURE__*/ _jsx(EmptyLogsState, {});
|
|
22
|
+
}
|
|
23
|
+
return /*#__PURE__*/ _jsx(VirtualizedLogsList, {
|
|
24
|
+
logs: logs,
|
|
25
|
+
expandedRows: expandedRows,
|
|
26
|
+
onToggleExpand: toggleExpand
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
export default LogsList;
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=LogsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/panels/logs/components/LogsList.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 { LogEntry } from '../../../model/click-house-data-types';\nimport { EmptyLogsState } from './EmptyLogsState';\nimport { useExpandedRows } from './hooks/useExpandedRows';\nimport { VirtualizedLogsList } from './VirtualizedLogsList';\n\ninterface LogsListProps {\n logs: LogEntry[];\n}\n\nconst LogsList: React.FC<LogsListProps> = ({ logs }) => {\n const { expandedRows, toggleExpand } = useExpandedRows();\n\n if (!logs.length) {\n return <EmptyLogsState />;\n }\n\n return <VirtualizedLogsList logs={logs} expandedRows={expandedRows} onToggleExpand={toggleExpand} />;\n};\n\nexport default LogsList;\n"],"names":["React","EmptyLogsState","useExpandedRows","VirtualizedLogsList","LogsList","logs","expandedRows","toggleExpand","length","onToggleExpand"],"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;AAE1B,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,mBAAmB,QAAQ,wBAAwB;AAM5D,MAAMC,WAAoC,CAAC,EAAEC,IAAI,EAAE;IACjD,MAAM,EAAEC,YAAY,EAAEC,YAAY,EAAE,GAAGL;IAEvC,IAAI,CAACG,KAAKG,MAAM,EAAE;QAChB,qBAAO,KAACP;IACV;IAEA,qBAAO,KAACE;QAAoBE,MAAMA;QAAMC,cAAcA;QAAcG,gBAAgBF;;AACtF;AAEA,eAAeH,SAAS"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LogEntry } from '../../../model/click-house-data-types';
|
|
3
|
+
interface VirtualizedLogsListProps {
|
|
4
|
+
logs: LogEntry[];
|
|
5
|
+
expandedRows: Set<number>;
|
|
6
|
+
onToggleExpand: (index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const VirtualizedLogsList: React.FC<VirtualizedLogsListProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=VirtualizedLogsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VirtualizedLogsList.d.ts","sourceRoot":"","sources":["../../../../../src/panels/logs/components/VirtualizedLogsList.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAGjE,UAAU,wBAAwB;IAChC,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAsBlE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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, useTheme } from '@mui/material';
|
|
16
|
+
import { Virtuoso } from 'react-virtuoso';
|
|
17
|
+
import { LogRow } from './LogRow/LogRow';
|
|
18
|
+
export const VirtualizedLogsList = ({ logs, expandedRows, onToggleExpand })=>{
|
|
19
|
+
const theme = useTheme();
|
|
20
|
+
const renderLogRow = (index)=>{
|
|
21
|
+
const log = logs[index];
|
|
22
|
+
if (!log) return null;
|
|
23
|
+
return /*#__PURE__*/ _jsx(LogRow, {
|
|
24
|
+
log: log,
|
|
25
|
+
index: index,
|
|
26
|
+
isExpanded: expandedRows.has(index),
|
|
27
|
+
onToggle: onToggleExpand
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
31
|
+
sx: {
|
|
32
|
+
height: '100%',
|
|
33
|
+
backgroundColor: theme.palette.background.default,
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
boxShadow: theme.shadows[1]
|
|
36
|
+
},
|
|
37
|
+
children: /*#__PURE__*/ _jsx(Virtuoso, {
|
|
38
|
+
style: {
|
|
39
|
+
height: '100%'
|
|
40
|
+
},
|
|
41
|
+
totalCount: logs.length,
|
|
42
|
+
itemContent: renderLogRow
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=VirtualizedLogsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/panels/logs/components/VirtualizedLogsList.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, useTheme } from '@mui/material';\nimport { Virtuoso } from 'react-virtuoso';\nimport { LogEntry } from '../../../model/click-house-data-types';\nimport { LogRow } from './LogRow/LogRow';\n\ninterface VirtualizedLogsListProps {\n logs: LogEntry[];\n expandedRows: Set<number>;\n onToggleExpand: (index: number) => void;\n}\n\nexport const VirtualizedLogsList: React.FC<VirtualizedLogsListProps> = ({ logs, expandedRows, onToggleExpand }) => {\n const theme = useTheme();\n\n const renderLogRow = (index: number) => {\n const log = logs[index];\n if (!log) return null;\n\n return <LogRow log={log} index={index} isExpanded={expandedRows.has(index)} onToggle={onToggleExpand} />;\n };\n\n return (\n <Box\n sx={{\n height: '100%',\n backgroundColor: theme.palette.background.default,\n overflow: 'hidden',\n boxShadow: theme.shadows[1],\n }}\n >\n <Virtuoso style={{ height: '100%' }} totalCount={logs.length} itemContent={renderLogRow} />\n </Box>\n );\n};\n"],"names":["React","Box","useTheme","Virtuoso","LogRow","VirtualizedLogsList","logs","expandedRows","onToggleExpand","theme","renderLogRow","index","log","isExpanded","has","onToggle","sx","height","backgroundColor","palette","background","default","overflow","boxShadow","shadows","style","totalCount","length","itemContent"],"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,QAAQ,QAAQ,gBAAgB;AAC9C,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,MAAM,QAAQ,kBAAkB;AAQzC,OAAO,MAAMC,sBAA0D,CAAC,EAAEC,IAAI,EAAEC,YAAY,EAAEC,cAAc,EAAE;IAC5G,MAAMC,QAAQP;IAEd,MAAMQ,eAAe,CAACC;QACpB,MAAMC,MAAMN,IAAI,CAACK,MAAM;QACvB,IAAI,CAACC,KAAK,OAAO;QAEjB,qBAAO,KAACR;YAAOQ,KAAKA;YAAKD,OAAOA;YAAOE,YAAYN,aAAaO,GAAG,CAACH;YAAQI,UAAUP;;IACxF;IAEA,qBACE,KAACP;QACCe,IAAI;YACFC,QAAQ;YACRC,iBAAiBT,MAAMU,OAAO,CAACC,UAAU,CAACC,OAAO;YACjDC,UAAU;YACVC,WAAWd,MAAMe,OAAO,CAAC,EAAE;QAC7B;kBAEA,cAAA,KAACrB;YAASsB,OAAO;gBAAER,QAAQ;YAAO;YAAGS,YAAYpB,KAAKqB,MAAM;YAAEC,aAAalB;;;AAGjF,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpandedRows.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/logs/components/hooks/useExpandedRows.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,eAAe;;0BAGe,MAAM;;CAqBhD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { useState, useCallback } from 'react';
|
|
14
|
+
export const useExpandedRows = ()=>{
|
|
15
|
+
const [expandedRows, setExpandedRows] = useState(new Set());
|
|
16
|
+
const toggleExpand = useCallback((index)=>{
|
|
17
|
+
setExpandedRows((prev)=>{
|
|
18
|
+
const newSet = new Set(prev);
|
|
19
|
+
if (newSet.has(index)) {
|
|
20
|
+
newSet.delete(index);
|
|
21
|
+
} else {
|
|
22
|
+
newSet.add(index);
|
|
23
|
+
}
|
|
24
|
+
return newSet;
|
|
25
|
+
});
|
|
26
|
+
}, []);
|
|
27
|
+
const clearExpanded = useCallback(()=>{
|
|
28
|
+
setExpandedRows(new Set());
|
|
29
|
+
}, []);
|
|
30
|
+
return {
|
|
31
|
+
expandedRows,
|
|
32
|
+
toggleExpand,
|
|
33
|
+
clearExpanded
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=useExpandedRows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/panels/logs/components/hooks/useExpandedRows.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 { useState, useCallback } from 'react';\n\nexport const useExpandedRows = () => {\n const [expandedRows, setExpandedRows] = useState<Set<number>>(new Set());\n\n const toggleExpand = useCallback((index: number) => {\n setExpandedRows((prev) => {\n const newSet = new Set(prev);\n if (newSet.has(index)) {\n newSet.delete(index);\n } else {\n newSet.add(index);\n }\n return newSet;\n });\n }, []);\n\n const clearExpanded = useCallback(() => {\n setExpandedRows(new Set());\n }, []);\n\n return {\n expandedRows,\n toggleExpand,\n clearExpanded,\n };\n};\n"],"names":["useState","useCallback","useExpandedRows","expandedRows","setExpandedRows","Set","toggleExpand","index","prev","newSet","has","delete","add","clearExpanded"],"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,SAASA,QAAQ,EAAEC,WAAW,QAAQ,QAAQ;AAE9C,OAAO,MAAMC,kBAAkB;IAC7B,MAAM,CAACC,cAAcC,gBAAgB,GAAGJ,SAAsB,IAAIK;IAElE,MAAMC,eAAeL,YAAY,CAACM;QAChCH,gBAAgB,CAACI;YACf,MAAMC,SAAS,IAAIJ,IAAIG;YACvB,IAAIC,OAAOC,GAAG,CAACH,QAAQ;gBACrBE,OAAOE,MAAM,CAACJ;YAChB,OAAO;gBACLE,OAAOG,GAAG,CAACL;YACb;YACA,OAAOE;QACT;IACF,GAAG,EAAE;IAEL,MAAMI,gBAAgBZ,YAAY;QAChCG,gBAAgB,IAAIC;IACtB,GAAG,EAAE;IAEL,OAAO;QACLF;QACAG;QACAO;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/panels/logs/index.ts"],"names":[],"mappings":"AAaA,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 './Logs';
|
|
14
|
+
export * from './LogsComponent';
|
|
15
|
+
export * from './LogsSettingsEditor';
|
|
16
|
+
export * from './logs-types';
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/panels/logs/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 './Logs';\nexport * from './LogsComponent';\nexport * from './LogsSettingsEditor';\nexport * from './logs-types';\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,SAAS;AACvB,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,eAAe"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ThresholdOptions } from '@perses-dev/core';
|
|
2
|
+
import { PanelProps, LegendSpecOptions } from '@perses-dev/plugin-system';
|
|
3
|
+
import { ClickHouseTimeSeriesData } from '../../model/click-house-data-types';
|
|
4
|
+
export type QueryData = ClickHouseTimeSeriesData;
|
|
5
|
+
export type LogsProps = PanelProps<LogsOptions, QueryData>;
|
|
6
|
+
export interface QuerySettingsOptions {
|
|
7
|
+
queryIndex: number;
|
|
8
|
+
colorMode: 'fixed' | 'fixed-single';
|
|
9
|
+
colorValue: string;
|
|
10
|
+
}
|
|
11
|
+
export interface LogsOptions {
|
|
12
|
+
legend?: LegendSpecOptions;
|
|
13
|
+
thresholds?: ThresholdOptions;
|
|
14
|
+
querySettings?: QuerySettingsOptions;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=logs-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs-types.d.ts","sourceRoot":"","sources":["../../../../src/panels/logs/logs-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAE9E,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAE3D,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,GAAG,cAAc,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC"}
|
|
@@ -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=logs-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/panels/logs/logs-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 { TimeSeriesData, ThresholdOptions } from '@perses-dev/core';\nimport { PanelProps, LegendSpecOptions } from '@perses-dev/plugin-system';\nimport { ClickHouseTimeSeriesData } from '../../model/click-house-data-types';\n\nexport type QueryData = ClickHouseTimeSeriesData; // Type of data returned by a query plugin and supported by this plugin\n\nexport type LogsProps = PanelProps<LogsOptions, QueryData>;\n\nexport interface QuerySettingsOptions {\n queryIndex: number;\n colorMode: 'fixed' | 'fixed-single';\n colorValue: string;\n}\n\nexport interface LogsOptions {\n legend?: LegendSpecOptions;\n thresholds?: ThresholdOptions;\n querySettings?: QuerySettingsOptions;\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;AAgBjC,WAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClickHouseLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQuery.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,sBAAsB,CAWrE,CAAC"}
|
|
@@ -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 { parseVariables } from '@perses-dev/plugin-system';
|
|
14
|
+
import { getClickHouseLogData } from './get-click-house-log-data';
|
|
15
|
+
import { ClickHouseLogQueryEditor } from './ClickHouseLogQueryEditor';
|
|
16
|
+
export const ClickHouseLogQuery = {
|
|
17
|
+
getLogData: getClickHouseLogData,
|
|
18
|
+
OptionsEditorComponent: ClickHouseLogQueryEditor,
|
|
19
|
+
createInitialOptions: ()=>({
|
|
20
|
+
query: ''
|
|
21
|
+
}),
|
|
22
|
+
dependsOn: (spec)=>{
|
|
23
|
+
const queryVariables = parseVariables(spec.query);
|
|
24
|
+
const allVariables = [
|
|
25
|
+
...new Set([
|
|
26
|
+
...queryVariables
|
|
27
|
+
])
|
|
28
|
+
];
|
|
29
|
+
return {
|
|
30
|
+
variables: allVariables
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=ClickHouseLogQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQuery.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 { parseVariables } from '@perses-dev/plugin-system';\nimport { getClickHouseLogData } from './get-click-house-log-data';\nimport { ClickHouseLogQueryEditor } from './ClickHouseLogQueryEditor';\nimport { ClickHouseLogQuerySpec } from './click-house-log-query-types';\nimport { LogQueryPlugin } from './log-query-plugin-interface';\n\nexport const ClickHouseLogQuery: LogQueryPlugin<ClickHouseLogQuerySpec> = {\n getLogData: getClickHouseLogData,\n OptionsEditorComponent: ClickHouseLogQueryEditor,\n createInitialOptions: () => ({ query: '' }),\n dependsOn: (spec) => {\n const queryVariables = parseVariables(spec.query);\n const allVariables = [...new Set([...queryVariables])];\n return {\n variables: allVariables,\n };\n },\n};\n"],"names":["parseVariables","getClickHouseLogData","ClickHouseLogQueryEditor","ClickHouseLogQuery","getLogData","OptionsEditorComponent","createInitialOptions","query","dependsOn","spec","queryVariables","allVariables","Set","variables"],"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,SAASA,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,oBAAoB,QAAQ,6BAA6B;AAClE,SAASC,wBAAwB,QAAQ,6BAA6B;AAItE,OAAO,MAAMC,qBAA6D;IACxEC,YAAYH;IACZI,wBAAwBH;IACxBI,sBAAsB,IAAO,CAAA;YAAEC,OAAO;QAAG,CAAA;IACzCC,WAAW,CAACC;QACV,MAAMC,iBAAiBV,eAAeS,KAAKF,KAAK;QAChD,MAAMI,eAAe;eAAI,IAAIC,IAAI;mBAAIF;aAAe;SAAE;QACtD,OAAO;YACLG,WAAWF;QACb;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { ClickHouseLogQuerySpec } from './click-house-log-query-types';
|
|
4
|
+
type ClickHouseQueryEditorProps = OptionsEditorProps<ClickHouseLogQuerySpec>;
|
|
5
|
+
export declare function ClickHouseLogQueryEditor(props: ClickHouseQueryEditorProps): ReactElement;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=ClickHouseLogQueryEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClickHouseLogQueryEditor.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAIL,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAAoC,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,KAAK,0BAA0B,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAE7E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,0BAA0B,GAAG,YAAY,CAsExF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
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 { DatasourceSelect, isVariableDatasource } from '@perses-dev/plugin-system';
|
|
15
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
16
|
+
import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants';
|
|
17
|
+
import { ClickQLEditor } from '../../components';
|
|
18
|
+
import { Stack } from '@mui/material';
|
|
19
|
+
import { queryExample } from '../../components/constants';
|
|
20
|
+
export function ClickHouseLogQueryEditor(props) {
|
|
21
|
+
const { onChange, value } = props;
|
|
22
|
+
const { datasource } = value;
|
|
23
|
+
const selectedDatasource = datasource ?? DEFAULT_DATASOURCE;
|
|
24
|
+
const [localQuery, setLocalQuery] = useState(value.query || '');
|
|
25
|
+
const handleDatasourceChange = (newDatasourceSelection)=>{
|
|
26
|
+
if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) {
|
|
27
|
+
onChange({
|
|
28
|
+
...value,
|
|
29
|
+
datasource: newDatasourceSelection
|
|
30
|
+
});
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
throw new Error('Got unexpected non ClickHouse datasource selection');
|
|
34
|
+
};
|
|
35
|
+
const handleQueryChange = useCallback((newQuery)=>{
|
|
36
|
+
setLocalQuery(newQuery);
|
|
37
|
+
}, []);
|
|
38
|
+
const handleQueryExecute = useCallback((query)=>{
|
|
39
|
+
onChange({
|
|
40
|
+
...value,
|
|
41
|
+
query
|
|
42
|
+
});
|
|
43
|
+
}, [
|
|
44
|
+
onChange,
|
|
45
|
+
value
|
|
46
|
+
]);
|
|
47
|
+
useEffect(()=>{
|
|
48
|
+
setLocalQuery(value.query || '');
|
|
49
|
+
}, [
|
|
50
|
+
value.query
|
|
51
|
+
]);
|
|
52
|
+
const examplesStyle = {
|
|
53
|
+
fontSize: '11px',
|
|
54
|
+
color: '#777',
|
|
55
|
+
backgroundColor: '#f5f5f5',
|
|
56
|
+
padding: '8px',
|
|
57
|
+
borderRadius: '4px',
|
|
58
|
+
fontFamily: 'Monaco, Menlo, "Ubuntu Mono", monospace',
|
|
59
|
+
whiteSpace: 'pre-wrap',
|
|
60
|
+
lineHeight: '1.3'
|
|
61
|
+
};
|
|
62
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
63
|
+
spacing: 1.5,
|
|
64
|
+
children: [
|
|
65
|
+
/*#__PURE__*/ _jsx(DatasourceSelect, {
|
|
66
|
+
datasourcePluginKind: DATASOURCE_KIND,
|
|
67
|
+
value: selectedDatasource,
|
|
68
|
+
onChange: handleDatasourceChange,
|
|
69
|
+
label: "ClickHouse Datasource",
|
|
70
|
+
notched: true
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ _jsx(ClickQLEditor, {
|
|
73
|
+
value: localQuery,
|
|
74
|
+
onChange: handleQueryChange,
|
|
75
|
+
onBlur: ()=>handleQueryExecute(localQuery),
|
|
76
|
+
onKeyDown: (event)=>{
|
|
77
|
+
if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
handleQueryExecute(localQuery);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
placeholder: "Enter ClickHouse SQL query"
|
|
83
|
+
}),
|
|
84
|
+
/*#__PURE__*/ _jsxs("details", {
|
|
85
|
+
children: [
|
|
86
|
+
/*#__PURE__*/ _jsx("summary", {
|
|
87
|
+
style: {
|
|
88
|
+
cursor: 'pointer',
|
|
89
|
+
fontSize: '12px',
|
|
90
|
+
color: '#666',
|
|
91
|
+
marginBottom: '8px'
|
|
92
|
+
},
|
|
93
|
+
children: "Query Examples"
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ _jsx("div", {
|
|
96
|
+
style: examplesStyle,
|
|
97
|
+
children: queryExample
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//# sourceMappingURL=ClickHouseLogQueryEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQueryEditor.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 DatasourceSelect,\n DatasourceSelectProps,\n isVariableDatasource,\n OptionsEditorProps,\n} from '@perses-dev/plugin-system';\nimport { ReactElement, useCallback, useEffect, useState } from 'react';\nimport { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants';\nimport { ClickQLEditor } from '../../components';\nimport { Stack } from '@mui/material';\nimport { queryExample } from '../../components/constants';\nimport { ClickHouseLogQuerySpec } from './click-house-log-query-types';\n\ntype ClickHouseQueryEditorProps = OptionsEditorProps<ClickHouseLogQuerySpec>;\n\nexport function ClickHouseLogQueryEditor(props: ClickHouseQueryEditorProps): ReactElement {\n const { onChange, value } = props;\n const { datasource } = value;\n const selectedDatasource = datasource ?? DEFAULT_DATASOURCE;\n const [localQuery, setLocalQuery] = useState(value.query || '');\n\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = (newDatasourceSelection) => {\n if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) {\n onChange({ ...value, datasource: newDatasourceSelection });\n return;\n }\n throw new Error('Got unexpected non ClickHouse datasource selection');\n };\n\n const handleQueryChange = useCallback((newQuery: string) => {\n setLocalQuery(newQuery);\n }, []);\n\n const handleQueryExecute = useCallback(\n (query: string) => {\n onChange({ ...value, query });\n },\n [onChange, value]\n );\n\n useEffect(() => {\n setLocalQuery(value.query || '');\n }, [value.query]);\n\n const examplesStyle: React.CSSProperties = {\n fontSize: '11px',\n color: '#777',\n backgroundColor: '#f5f5f5',\n padding: '8px',\n borderRadius: '4px',\n fontFamily: 'Monaco, Menlo, \"Ubuntu Mono\", monospace',\n whiteSpace: 'pre-wrap',\n lineHeight: '1.3',\n };\n\n return (\n <Stack spacing={1.5}>\n <DatasourceSelect\n datasourcePluginKind={DATASOURCE_KIND}\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n label=\"ClickHouse Datasource\"\n notched\n />\n <ClickQLEditor\n value={localQuery}\n onChange={handleQueryChange}\n onBlur={() => handleQueryExecute(localQuery)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n handleQueryExecute(localQuery);\n }\n }}\n placeholder=\"Enter ClickHouse SQL query\"\n />\n\n <details>\n <summary style={{ cursor: 'pointer', fontSize: '12px', color: '#666', marginBottom: '8px' }}>\n Query Examples\n </summary>\n <div style={examplesStyle}>{queryExample}</div>\n </details>\n </Stack>\n );\n}\n"],"names":["DatasourceSelect","isVariableDatasource","useCallback","useEffect","useState","DATASOURCE_KIND","DEFAULT_DATASOURCE","ClickQLEditor","Stack","queryExample","ClickHouseLogQueryEditor","props","onChange","value","datasource","selectedDatasource","localQuery","setLocalQuery","query","handleDatasourceChange","newDatasourceSelection","kind","Error","handleQueryChange","newQuery","handleQueryExecute","examplesStyle","fontSize","color","backgroundColor","padding","borderRadius","fontFamily","whiteSpace","lineHeight","spacing","datasourcePluginKind","label","notched","onBlur","onKeyDown","event","key","ctrlKey","metaKey","preventDefault","placeholder","details","summary","style","cursor","marginBottom","div"],"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,gBAAgB,EAEhBC,oBAAoB,QAEf,4BAA4B;AACnC,SAAuBC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AACvE,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,eAAe;AACnE,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,YAAY,QAAQ,6BAA6B;AAK1D,OAAO,SAASC,yBAAyBC,KAAiC;IACxE,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAC5B,MAAM,EAAEG,UAAU,EAAE,GAAGD;IACvB,MAAME,qBAAqBD,cAAcR;IACzC,MAAM,CAACU,YAAYC,cAAc,GAAGb,SAASS,MAAMK,KAAK,IAAI;IAE5D,MAAMC,yBAA4D,CAACC;QACjE,IAAI,CAACnB,qBAAqBmB,2BAA2BA,uBAAuBC,IAAI,KAAKhB,iBAAiB;YACpGO,SAAS;gBAAE,GAAGC,KAAK;gBAAEC,YAAYM;YAAuB;YACxD;QACF;QACA,MAAM,IAAIE,MAAM;IAClB;IAEA,MAAMC,oBAAoBrB,YAAY,CAACsB;QACrCP,cAAcO;IAChB,GAAG,EAAE;IAEL,MAAMC,qBAAqBvB,YACzB,CAACgB;QACCN,SAAS;YAAE,GAAGC,KAAK;YAAEK;QAAM;IAC7B,GACA;QAACN;QAAUC;KAAM;IAGnBV,UAAU;QACRc,cAAcJ,MAAMK,KAAK,IAAI;IAC/B,GAAG;QAACL,MAAMK,KAAK;KAAC;IAEhB,MAAMQ,gBAAqC;QACzCC,UAAU;QACVC,OAAO;QACPC,iBAAiB;QACjBC,SAAS;QACTC,cAAc;QACdC,YAAY;QACZC,YAAY;QACZC,YAAY;IACd;IAEA,qBACE,MAAC1B;QAAM2B,SAAS;;0BACd,KAACnC;gBACCoC,sBAAsB/B;gBACtBQ,OAAOE;gBACPH,UAAUO;gBACVkB,OAAM;gBACNC,OAAO;;0BAET,KAAC/B;gBACCM,OAAOG;gBACPJ,UAAUW;gBACVgB,QAAQ,IAAMd,mBAAmBT;gBACjCwB,WAAW,CAACC;oBACV,IAAIA,MAAMC,GAAG,KAAK,WAAYD,CAAAA,MAAME,OAAO,IAAIF,MAAMG,OAAO,AAAD,GAAI;wBAC7DH,MAAMI,cAAc;wBACpBpB,mBAAmBT;oBACrB;gBACF;gBACA8B,aAAY;;0BAGd,MAACC;;kCACC,KAACC;wBAAQC,OAAO;4BAAEC,QAAQ;4BAAWvB,UAAU;4BAAQC,OAAO;4BAAQuB,cAAc;wBAAM;kCAAG;;kCAG7F,KAACC;wBAAIH,OAAOvB;kCAAgBjB;;;;;;AAIpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"click-house-log-query-types.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/click-house-log-query-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC"}
|