adonisjs-server-stats 1.5.4 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +351 -171
- package/dist/configure.d.ts.map +1 -1
- package/dist/core/api-client.d.ts +73 -0
- package/dist/core/api-client.d.ts.map +1 -0
- package/dist/core/config-utils.d.ts +109 -0
- package/dist/core/config-utils.d.ts.map +1 -0
- package/dist/core/constants.d.ts +11 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/dashboard-api.d.ts +65 -0
- package/dist/core/dashboard-api.d.ts.map +1 -0
- package/dist/core/dashboard-data-controller.d.ts +157 -0
- package/dist/core/dashboard-data-controller.d.ts.map +1 -0
- package/dist/core/debug-data-controller.d.ts +89 -0
- package/dist/core/debug-data-controller.d.ts.map +1 -0
- package/dist/core/feature-detect.d.ts +67 -0
- package/dist/core/feature-detect.d.ts.map +1 -0
- package/dist/core/formatters.d.ts +189 -0
- package/dist/core/formatters.d.ts.map +1 -0
- package/dist/core/history-buffer.d.ts +23 -0
- package/dist/core/history-buffer.d.ts.map +1 -0
- package/dist/core/icons.d.ts +36 -0
- package/dist/core/icons.d.ts.map +1 -0
- package/dist/core/index.d.ts +39 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +1961 -0
- package/dist/core/internals-utils.d.ts +71 -0
- package/dist/core/internals-utils.d.ts.map +1 -0
- package/dist/core/job-utils.d.ts +45 -0
- package/dist/core/job-utils.d.ts.map +1 -0
- package/dist/core/log-utils.d.ts +34 -0
- package/dist/core/log-utils.d.ts.map +1 -0
- package/dist/core/metrics.d.ts +41 -0
- package/dist/core/metrics.d.ts.map +1 -0
- package/dist/core/pagination.d.ts +128 -0
- package/dist/core/pagination.d.ts.map +1 -0
- package/dist/core/query-utils.d.ts +35 -0
- package/dist/core/query-utils.d.ts.map +1 -0
- package/dist/core/resizable-columns.d.ts +18 -0
- package/dist/core/resizable-columns.d.ts.map +1 -0
- package/dist/core/routes.d.ts +12 -0
- package/dist/core/routes.d.ts.map +1 -0
- package/dist/core/server-stats-controller.d.ts +106 -0
- package/dist/core/server-stats-controller.d.ts.map +1 -0
- package/dist/core/sparkline.d.ts +80 -0
- package/dist/core/sparkline.d.ts.map +1 -0
- package/dist/core/theme.d.ts +42 -0
- package/dist/core/theme.d.ts.map +1 -0
- package/dist/core/trace-utils.d.ts +62 -0
- package/dist/core/trace-utils.d.ts.map +1 -0
- package/dist/core/transmit-adapter.d.ts +59 -0
- package/dist/core/transmit-adapter.d.ts.map +1 -0
- package/dist/core/types.d.ts +619 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/react/CacheSection-DGxMDlWK.js +146 -0
- package/dist/react/CacheTab-CnVW5PLs.js +123 -0
- package/dist/react/ConfigContent-CnsEI4j3.js +397 -0
- package/dist/react/ConfigSection-DPcrfqXY.js +11 -0
- package/dist/react/ConfigTab-BSWq_o2p.js +15 -0
- package/dist/react/CustomPaneTab-xjkYwTvH.js +104 -0
- package/dist/react/DataTable-YyShr5B-.js +55 -0
- package/dist/react/EmailsSection-CSyTg1aX.js +262 -0
- package/dist/react/EmailsTab-Dh2YSa_f.js +131 -0
- package/dist/react/EventsSection-C1pbJDfW.js +86 -0
- package/dist/react/EventsTab-eCh02cdd.js +63 -0
- package/dist/react/FilterBar-DQRXpWrb.js +50 -0
- package/dist/react/InternalsContent-DBzsI0CG.js +346 -0
- package/dist/react/InternalsSection-t7ihcWO-.js +32 -0
- package/dist/react/InternalsTab-Oij0A2fN.js +30 -0
- package/dist/react/JobsSection-CLAin5vU.js +187 -0
- package/dist/react/JobsTab-Dl5nrj2z.js +141 -0
- package/dist/react/LogsSection-C1p81fXO.js +212 -0
- package/dist/react/LogsTab-D-kR7PjX.js +88 -0
- package/dist/react/OverviewSection-nm3xdACz.js +539 -0
- package/dist/react/Pagination-BkmzUDY8.js +64 -0
- package/dist/react/QueriesSection-DB12HMfQ.js +461 -0
- package/dist/react/QueriesTab-fyBB1u_Y.js +90 -0
- package/dist/react/RequestsSection-DTqB81ac.js +209 -0
- package/dist/react/RoutesSection-DJWa4NPV.js +74 -0
- package/dist/react/RoutesTab-D3l8TOpu.js +74 -0
- package/dist/react/TimelineSection-C4d-jRX1.js +158 -0
- package/dist/react/TimelineTab-C5TFaSmQ.js +193 -0
- package/dist/react/WaterfallChart-Cj73WdfM.js +100 -0
- package/dist/react/core/api-client.d.ts +73 -0
- package/dist/react/core/api-client.d.ts.map +1 -0
- package/dist/react/core/config-utils.d.ts +109 -0
- package/dist/react/core/config-utils.d.ts.map +1 -0
- package/dist/react/core/constants.d.ts +11 -0
- package/dist/react/core/constants.d.ts.map +1 -0
- package/dist/react/core/dashboard-api.d.ts +65 -0
- package/dist/react/core/dashboard-api.d.ts.map +1 -0
- package/dist/react/core/dashboard-data-controller.d.ts +157 -0
- package/dist/react/core/dashboard-data-controller.d.ts.map +1 -0
- package/dist/react/core/debug-data-controller.d.ts +89 -0
- package/dist/react/core/debug-data-controller.d.ts.map +1 -0
- package/dist/react/core/feature-detect.d.ts +67 -0
- package/dist/react/core/feature-detect.d.ts.map +1 -0
- package/dist/react/core/formatters.d.ts +189 -0
- package/dist/react/core/formatters.d.ts.map +1 -0
- package/dist/react/core/history-buffer.d.ts +23 -0
- package/dist/react/core/history-buffer.d.ts.map +1 -0
- package/dist/react/core/icons.d.ts +36 -0
- package/dist/react/core/icons.d.ts.map +1 -0
- package/dist/react/core/index.d.ts +39 -0
- package/dist/react/core/index.d.ts.map +1 -0
- package/dist/react/core/internals-utils.d.ts +71 -0
- package/dist/react/core/internals-utils.d.ts.map +1 -0
- package/dist/react/core/job-utils.d.ts +45 -0
- package/dist/react/core/job-utils.d.ts.map +1 -0
- package/dist/react/core/log-utils.d.ts +34 -0
- package/dist/react/core/log-utils.d.ts.map +1 -0
- package/dist/react/core/metrics.d.ts +41 -0
- package/dist/react/core/metrics.d.ts.map +1 -0
- package/dist/react/core/pagination.d.ts +128 -0
- package/dist/react/core/pagination.d.ts.map +1 -0
- package/dist/react/core/query-utils.d.ts +35 -0
- package/dist/react/core/query-utils.d.ts.map +1 -0
- package/dist/react/core/resizable-columns.d.ts +18 -0
- package/dist/react/core/resizable-columns.d.ts.map +1 -0
- package/dist/react/core/routes.d.ts +12 -0
- package/dist/react/core/routes.d.ts.map +1 -0
- package/dist/react/core/server-stats-controller.d.ts +106 -0
- package/dist/react/core/server-stats-controller.d.ts.map +1 -0
- package/dist/react/core/sparkline.d.ts +80 -0
- package/dist/react/core/sparkline.d.ts.map +1 -0
- package/dist/react/core/theme.d.ts +42 -0
- package/dist/react/core/theme.d.ts.map +1 -0
- package/dist/react/core/trace-utils.d.ts +62 -0
- package/dist/react/core/trace-utils.d.ts.map +1 -0
- package/dist/react/core/transmit-adapter.d.ts +59 -0
- package/dist/react/core/transmit-adapter.d.ts.map +1 -0
- package/dist/react/core/types.d.ts +619 -0
- package/dist/react/core/types.d.ts.map +1 -0
- package/dist/react/index-UdTfSvtO.js +1074 -0
- package/dist/react/index.js +18 -0
- package/dist/react/react/components/Dashboard/DashboardPage.d.ts +17 -0
- package/dist/react/react/components/Dashboard/DashboardPage.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/CacheSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/CacheSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/ConfigSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/ConfigSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/EmailsSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/EmailsSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/EventsSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/EventsSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/InternalsSection.d.ts +14 -0
- package/dist/react/react/components/Dashboard/sections/InternalsSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/JobsSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/JobsSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/LogsSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/LogsSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/OverviewSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/OverviewSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/QueriesSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/QueriesSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/RequestsSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/RequestsSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/RoutesSection.d.ts +7 -0
- package/dist/react/react/components/Dashboard/sections/RoutesSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +9 -0
- package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/shared/DataTable.d.ts +27 -0
- package/dist/react/react/components/Dashboard/shared/DataTable.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/shared/FilterBar.d.ts +17 -0
- package/dist/react/react/components/Dashboard/shared/FilterBar.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/shared/Pagination.d.ts +13 -0
- package/dist/react/react/components/Dashboard/shared/Pagination.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/shared/TimeRangeSelector.d.ts +12 -0
- package/dist/react/react/components/Dashboard/shared/TimeRangeSelector.d.ts.map +1 -0
- package/dist/react/react/components/Dashboard/shared/WaterfallChart.d.ts +16 -0
- package/dist/react/react/components/Dashboard/shared/WaterfallChart.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/DebugPanel.d.ts +16 -0
- package/dist/react/react/components/DebugPanel/DebugPanel.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/CacheTab.d.ts +8 -0
- package/dist/react/react/components/DebugPanel/tabs/CacheTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/ConfigTab.d.ts +8 -0
- package/dist/react/react/components/DebugPanel/tabs/ConfigTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/CustomPaneTab.d.ts +14 -0
- package/dist/react/react/components/DebugPanel/tabs/CustomPaneTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/EmailsTab.d.ts +7 -0
- package/dist/react/react/components/DebugPanel/tabs/EmailsTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/EventsTab.d.ts +7 -0
- package/dist/react/react/components/DebugPanel/tabs/EventsTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/InternalsTab.d.ts +12 -0
- package/dist/react/react/components/DebugPanel/tabs/InternalsTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/JobsTab.d.ts +9 -0
- package/dist/react/react/components/DebugPanel/tabs/JobsTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/LogsTab.d.ts +7 -0
- package/dist/react/react/components/DebugPanel/tabs/LogsTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/QueriesTab.d.ts +7 -0
- package/dist/react/react/components/DebugPanel/tabs/QueriesTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/RoutesTab.d.ts +8 -0
- package/dist/react/react/components/DebugPanel/tabs/RoutesTab.d.ts.map +1 -0
- package/dist/react/react/components/DebugPanel/tabs/TimelineTab.d.ts +7 -0
- package/dist/react/react/components/DebugPanel/tabs/TimelineTab.d.ts.map +1 -0
- package/dist/react/react/components/StatsBar/MetricCard.d.ts +21 -0
- package/dist/react/react/components/StatsBar/MetricCard.d.ts.map +1 -0
- package/dist/react/react/components/StatsBar/Sparkline.d.ts +15 -0
- package/dist/react/react/components/StatsBar/Sparkline.d.ts.map +1 -0
- package/dist/react/react/components/StatsBar/StatsBar.d.ts +22 -0
- package/dist/react/react/components/StatsBar/StatsBar.d.ts.map +1 -0
- package/dist/react/react/components/shared/Badge.d.ts +32 -0
- package/dist/react/react/components/shared/Badge.d.ts.map +1 -0
- package/dist/react/react/components/shared/ConfigContent.d.ts +13 -0
- package/dist/react/react/components/shared/ConfigContent.d.ts.map +1 -0
- package/dist/react/react/components/shared/InternalsContent.d.ts +10 -0
- package/dist/react/react/components/shared/InternalsContent.d.ts.map +1 -0
- package/dist/react/react/components/shared/JsonViewer.d.ts +12 -0
- package/dist/react/react/components/shared/JsonViewer.d.ts.map +1 -0
- package/dist/react/react/components/shared/ThemeToggle.d.ts +13 -0
- package/dist/react/react/components/shared/ThemeToggle.d.ts.map +1 -0
- package/dist/react/react/components/shared/Tooltip.d.ts +16 -0
- package/dist/react/react/components/shared/Tooltip.d.ts.map +1 -0
- package/dist/react/react/hooks/useApiClient.d.ts +10 -0
- package/dist/react/react/hooks/useApiClient.d.ts.map +1 -0
- package/dist/react/react/hooks/useDashboardApiBase.d.ts +19 -0
- package/dist/react/react/hooks/useDashboardApiBase.d.ts.map +1 -0
- package/dist/react/react/hooks/useDashboardData.d.ts +27 -0
- package/dist/react/react/hooks/useDashboardData.d.ts.map +1 -0
- package/dist/react/react/hooks/useDebugData.d.ts +17 -0
- package/dist/react/react/hooks/useDebugData.d.ts.map +1 -0
- package/dist/react/react/hooks/useFeatures.d.ts +13 -0
- package/dist/react/react/hooks/useFeatures.d.ts.map +1 -0
- package/dist/react/react/hooks/useResizableTable.d.ts +13 -0
- package/dist/react/react/hooks/useResizableTable.d.ts.map +1 -0
- package/dist/react/react/hooks/useServerStats.d.ts +21 -0
- package/dist/react/react/hooks/useServerStats.d.ts.map +1 -0
- package/dist/react/react/hooks/useTheme.d.ts +12 -0
- package/dist/react/react/hooks/useTheme.d.ts.map +1 -0
- package/dist/react/react/index.d.ts +14 -0
- package/dist/react/react/index.d.ts.map +1 -0
- package/dist/react/style.css +1 -0
- package/dist/react/useApiClient-BVtNCmnL.js +9 -0
- package/dist/react/useDashboardApiBase-Bi36pJ2L.js +14 -0
- package/dist/react/useResizableTable-CNJmACdt.js +13 -0
- package/dist/src/collectors/app_collector.d.ts.map +1 -1
- package/dist/src/collectors/app_collector.js +30 -2
- package/dist/src/collectors/auto_detect.d.ts +31 -0
- package/dist/src/collectors/auto_detect.d.ts.map +1 -0
- package/dist/src/collectors/auto_detect.js +120 -0
- package/dist/src/collectors/collector.d.ts +17 -0
- package/dist/src/collectors/collector.d.ts.map +1 -1
- package/dist/src/collectors/db_pool_collector.d.ts.map +1 -1
- package/dist/src/collectors/db_pool_collector.js +35 -1
- package/dist/src/collectors/http_collector.d.ts +4 -3
- package/dist/src/collectors/http_collector.d.ts.map +1 -1
- package/dist/src/collectors/http_collector.js +28 -11
- package/dist/src/collectors/index.d.ts +2 -0
- package/dist/src/collectors/index.d.ts.map +1 -1
- package/dist/src/collectors/index.js +1 -0
- package/dist/src/collectors/log_collector.d.ts +11 -4
- package/dist/src/collectors/log_collector.d.ts.map +1 -1
- package/dist/src/collectors/log_collector.js +51 -5
- package/dist/src/collectors/process_collector.d.ts.map +1 -1
- package/dist/src/collectors/process_collector.js +4 -0
- package/dist/src/collectors/queue_collector.d.ts.map +1 -1
- package/dist/src/collectors/queue_collector.js +55 -1
- package/dist/src/collectors/redis_collector.d.ts.map +1 -1
- package/dist/src/collectors/redis_collector.js +42 -3
- package/dist/src/collectors/system_collector.d.ts.map +1 -1
- package/dist/src/collectors/system_collector.js +4 -0
- package/dist/src/controller/api_controller.d.ts +101 -0
- package/dist/src/controller/api_controller.d.ts.map +1 -0
- package/dist/src/controller/api_controller.js +131 -0
- package/dist/src/controller/debug_controller.d.ts +19 -10
- package/dist/src/controller/debug_controller.d.ts.map +1 -1
- package/dist/src/controller/debug_controller.js +118 -101
- package/dist/src/core/theme.d.ts +42 -0
- package/dist/src/core/theme.d.ts.map +1 -0
- package/dist/src/core/theme.js +115 -0
- package/dist/src/dashboard/chart_aggregator.d.ts.map +1 -1
- package/dist/src/dashboard/chart_aggregator.js +3 -2
- package/dist/src/dashboard/dashboard_controller.d.ts +10 -14
- package/dist/src/dashboard/dashboard_controller.d.ts.map +1 -1
- package/dist/src/dashboard/dashboard_controller.js +132 -250
- package/dist/src/dashboard/dashboard_store.d.ts +62 -19
- package/dist/src/dashboard/dashboard_store.d.ts.map +1 -1
- package/dist/src/dashboard/dashboard_store.js +242 -53
- package/dist/src/dashboard/integrations/cache_inspector.d.ts +19 -1
- package/dist/src/dashboard/integrations/cache_inspector.d.ts.map +1 -1
- package/dist/src/dashboard/integrations/config_inspector.d.ts +1 -1
- package/dist/src/dashboard/integrations/config_inspector.d.ts.map +1 -1
- package/dist/src/dashboard/integrations/config_inspector.js +3 -2
- package/dist/src/dashboard/integrations/queue_inspector.d.ts +55 -10
- package/dist/src/dashboard/integrations/queue_inspector.d.ts.map +1 -1
- package/dist/src/dashboard/integrations/queue_inspector.js +70 -24
- package/dist/src/dashboard/migrator.d.ts +5 -0
- package/dist/src/dashboard/migrator.d.ts.map +1 -1
- package/dist/src/dashboard/migrator.js +44 -9
- package/dist/src/dashboard/models/stats_event.d.ts +1 -1
- package/dist/src/dashboard/models/stats_event.d.ts.map +1 -1
- package/dist/src/dashboard/models/stats_log.d.ts +1 -1
- package/dist/src/dashboard/models/stats_log.d.ts.map +1 -1
- package/dist/src/dashboard/models/stats_query.d.ts +1 -1
- package/dist/src/dashboard/models/stats_query.d.ts.map +1 -1
- package/dist/src/dashboard/models/stats_saved_filter.d.ts +1 -1
- package/dist/src/dashboard/models/stats_saved_filter.d.ts.map +1 -1
- package/dist/src/dashboard/models/stats_trace.d.ts +2 -1
- package/dist/src/dashboard/models/stats_trace.d.ts.map +1 -1
- package/dist/src/data/data_access.d.ts +105 -0
- package/dist/src/data/data_access.d.ts.map +1 -0
- package/dist/src/data/data_access.js +310 -0
- package/dist/src/data/index.d.ts +3 -0
- package/dist/src/data/index.d.ts.map +1 -0
- package/dist/src/data/index.js +1 -0
- package/dist/src/debug/debug_store.d.ts +20 -1
- package/dist/src/debug/debug_store.d.ts.map +1 -1
- package/dist/src/debug/debug_store.js +43 -15
- package/dist/src/debug/email_collector.d.ts +6 -2
- package/dist/src/debug/email_collector.d.ts.map +1 -1
- package/dist/src/debug/email_collector.js +3 -0
- package/dist/src/debug/event_collector.d.ts +6 -2
- package/dist/src/debug/event_collector.d.ts.map +1 -1
- package/dist/src/debug/event_collector.js +12 -8
- package/dist/src/debug/query_collector.d.ts +6 -2
- package/dist/src/debug/query_collector.d.ts.map +1 -1
- package/dist/src/debug/query_collector.js +3 -0
- package/dist/src/debug/ring_buffer.d.ts +1 -0
- package/dist/src/debug/ring_buffer.d.ts.map +1 -1
- package/dist/src/debug/ring_buffer.js +5 -2
- package/dist/src/debug/route_inspector.d.ts +2 -2
- package/dist/src/debug/route_inspector.d.ts.map +1 -1
- package/dist/src/debug/route_inspector.js +4 -3
- package/dist/src/debug/trace_collector.d.ts +7 -3
- package/dist/src/debug/trace_collector.d.ts.map +1 -1
- package/dist/src/debug/trace_collector.js +7 -5
- package/dist/src/debug/types.d.ts +107 -2
- package/dist/src/debug/types.d.ts.map +1 -1
- package/dist/src/debug/types.js +1 -1
- package/dist/src/define_config.d.ts +49 -5
- package/dist/src/define_config.d.ts.map +1 -1
- package/dist/src/define_config.js +361 -4
- package/dist/src/edge/bootstrap.d.ts +17 -0
- package/dist/src/edge/bootstrap.d.ts.map +1 -0
- package/dist/src/edge/bootstrap.js +29 -0
- package/dist/src/edge/client/dashboard.js +2 -3619
- package/dist/src/edge/client/debug-panel-deferred.js +1 -0
- package/dist/src/edge/client/debug-panel.js +1 -2140
- package/dist/src/edge/client/stats-bar.js +1 -801
- package/dist/src/edge/client-vue/dashboard.js +5 -0
- package/dist/src/edge/client-vue/debug-panel-deferred.js +4 -0
- package/dist/src/edge/client-vue/debug-panel.js +4 -0
- package/dist/src/edge/client-vue/stats-bar.js +4 -0
- package/dist/src/edge/plugin.d.ts +35 -2
- package/dist/src/edge/plugin.d.ts.map +1 -1
- package/dist/src/edge/plugin.js +30 -66
- package/dist/src/edge/types.d.ts +46 -0
- package/dist/src/edge/types.d.ts.map +1 -0
- package/dist/src/edge/types.js +4 -0
- package/dist/src/edge/views/dashboard.edge +1 -358
- package/dist/src/edge/views/debug-panel.edge +2 -154
- package/dist/src/edge/views/stats-bar.edge +15 -48
- package/dist/src/engine/stats_engine.d.ts +18 -0
- package/dist/src/engine/stats_engine.d.ts.map +1 -1
- package/dist/src/engine/stats_engine.js +45 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/log_stream/log_stream_provider.d.ts.map +1 -1
- package/dist/src/log_stream/log_stream_provider.js +21 -4
- package/dist/src/log_stream/log_stream_service.d.ts +8 -1
- package/dist/src/log_stream/log_stream_service.d.ts.map +1 -1
- package/dist/src/log_stream/log_stream_service.js +27 -3
- package/dist/src/middleware/request_tracking_middleware.d.ts +1 -1
- package/dist/src/middleware/request_tracking_middleware.d.ts.map +1 -1
- package/dist/src/middleware/request_tracking_middleware.js +21 -6
- package/dist/src/prometheus/prometheus_collector.d.ts +2 -1
- package/dist/src/prometheus/prometheus_collector.d.ts.map +1 -1
- package/dist/src/provider/server_stats_provider.d.ts +100 -0
- package/dist/src/provider/server_stats_provider.d.ts.map +1 -1
- package/dist/src/provider/server_stats_provider.js +460 -104
- package/dist/src/routes/access_middleware.d.ts +2 -1
- package/dist/src/routes/access_middleware.d.ts.map +1 -1
- package/dist/src/routes/access_middleware.js +7 -1
- package/dist/src/routes/index.d.ts +4 -0
- package/dist/src/routes/index.d.ts.map +1 -0
- package/dist/src/routes/index.js +1 -0
- package/dist/src/routes/register_routes.d.ts +103 -0
- package/dist/src/routes/register_routes.d.ts.map +1 -0
- package/dist/src/routes/register_routes.js +356 -0
- package/dist/src/routes/router_types.d.ts +29 -0
- package/dist/src/routes/router_types.d.ts.map +1 -0
- package/dist/src/routes/router_types.js +1 -0
- package/dist/src/stubs/config.stub +12 -32
- package/dist/src/styles/components.css +1048 -0
- package/dist/src/{edge/client → styles}/dashboard.css +299 -736
- package/dist/src/{edge/client → styles}/debug-panel.css +117 -633
- package/dist/src/{edge/client → styles}/stats-bar.css +28 -10
- package/dist/src/styles/tokens.css +153 -0
- package/dist/src/styles/utilities.css +75 -0
- package/dist/src/types.d.ts +119 -16
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/app_import.d.ts +23 -0
- package/dist/src/utils/app_import.d.ts.map +1 -0
- package/dist/src/utils/app_import.js +44 -0
- package/dist/src/utils/json_helpers.d.ts +2 -2
- package/dist/src/utils/json_helpers.d.ts.map +1 -1
- package/dist/src/utils/logger.d.ts +17 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/logger.js +27 -0
- package/dist/src/utils/mail_helpers.d.ts +1 -1
- package/dist/src/utils/mail_helpers.d.ts.map +1 -1
- package/dist/src/utils/mail_helpers.js +1 -1
- package/dist/vue/CacheSection-C788Yfai.js +149 -0
- package/dist/vue/CacheTab-BPisYYiQ.js +104 -0
- package/dist/vue/ConfigSection-CRzYxqW2.js +576 -0
- package/dist/vue/ConfigTab-C8cafGUj.js +361 -0
- package/dist/vue/CustomPaneTab-BJxT5Dp7.js +172 -0
- package/dist/vue/EmailsSection-C8JFMtW7.js +206 -0
- package/dist/vue/EmailsTab-DhFhoNmU.js +157 -0
- package/dist/vue/EventsSection-C4wXUgxG.js +107 -0
- package/dist/vue/EventsTab-DQ4Nd6AK.js +97 -0
- package/dist/vue/FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js +62 -0
- package/dist/vue/InternalsSection-BJUXE-5F.js +468 -0
- package/dist/vue/InternalsTab-DEMjqtlw.js +471 -0
- package/dist/vue/JobsSection-CsKWTjgN.js +187 -0
- package/dist/vue/JobsTab-BCvhOARO.js +117 -0
- package/dist/vue/JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js +67 -0
- package/dist/vue/LogsSection-BFVjSZ24.js +227 -0
- package/dist/vue/LogsTab-DpEQ7euu.js +122 -0
- package/dist/vue/OverviewSection-CbMdAido.js +849 -0
- package/dist/vue/PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js +50 -0
- package/dist/vue/QueriesSection-BPiv7u3r.js +429 -0
- package/dist/vue/QueriesTab-C8_7oprC.js +107 -0
- package/dist/vue/RequestsSection-LtImH4rD.js +243 -0
- package/dist/vue/RoutesSection-CrxOxmzx.js +106 -0
- package/dist/vue/RoutesTab-Dz0MkZuF.js +80 -0
- package/dist/vue/TimelineSection-DLxMW2J_.js +186 -0
- package/dist/vue/TimelineTab-Db6lKKsD.js +250 -0
- package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +118 -0
- package/dist/vue/components/Dashboard/DashboardPage.vue.d.ts +18 -0
- package/dist/vue/components/Dashboard/DashboardPage.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/CacheSection.vue.d.ts +5 -0
- package/dist/vue/components/Dashboard/sections/CacheSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/ConfigSection.vue.d.ts +3 -0
- package/dist/vue/components/Dashboard/sections/ConfigSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/EmailsSection.vue.d.ts +5 -0
- package/dist/vue/components/Dashboard/sections/EmailsSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/EventsSection.vue.d.ts +5 -0
- package/dist/vue/components/Dashboard/sections/EventsSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/InternalsSection.vue.d.ts +3 -0
- package/dist/vue/components/Dashboard/sections/InternalsSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/JobsSection.vue.d.ts +5 -0
- package/dist/vue/components/Dashboard/sections/JobsSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/LogsSection.vue.d.ts +3 -0
- package/dist/vue/components/Dashboard/sections/LogsSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/OverviewSection.vue.d.ts +5 -0
- package/dist/vue/components/Dashboard/sections/OverviewSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/QueriesSection.vue.d.ts +45 -0
- package/dist/vue/components/Dashboard/sections/QueriesSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +5 -0
- package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/RoutesSection.vue.d.ts +5 -0
- package/dist/vue/components/Dashboard/sections/RoutesSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/sections/TimelineSection.vue.d.ts +11 -0
- package/dist/vue/components/Dashboard/sections/TimelineSection.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/shared/FilterBar.vue.d.ts +29 -0
- package/dist/vue/components/Dashboard/shared/FilterBar.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/shared/PaginationControls.vue.d.ts +12 -0
- package/dist/vue/components/Dashboard/shared/PaginationControls.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/shared/TimeRangeSelector.vue.d.ts +11 -0
- package/dist/vue/components/Dashboard/shared/TimeRangeSelector.vue.d.ts.map +1 -0
- package/dist/vue/components/Dashboard/shared/WaterfallChart.vue.d.ts +10 -0
- package/dist/vue/components/Dashboard/shared/WaterfallChart.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/DebugPanel.vue.d.ts +21 -0
- package/dist/vue/components/DebugPanel/DebugPanel.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/CacheTab.vue.d.ts +12 -0
- package/dist/vue/components/DebugPanel/tabs/CacheTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/ConfigTab.vue.d.ts +11 -0
- package/dist/vue/components/DebugPanel/tabs/ConfigTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/CustomPaneTab.vue.d.ts +11 -0
- package/dist/vue/components/DebugPanel/tabs/CustomPaneTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/EmailsTab.vue.d.ts +12 -0
- package/dist/vue/components/DebugPanel/tabs/EmailsTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/EventsTab.vue.d.ts +12 -0
- package/dist/vue/components/DebugPanel/tabs/EventsTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/InternalsTab.vue.d.ts +11 -0
- package/dist/vue/components/DebugPanel/tabs/InternalsTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/JobsTab.vue.d.ts +13 -0
- package/dist/vue/components/DebugPanel/tabs/JobsTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/LogsTab.vue.d.ts +15 -0
- package/dist/vue/components/DebugPanel/tabs/LogsTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/QueriesTab.vue.d.ts +12 -0
- package/dist/vue/components/DebugPanel/tabs/QueriesTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/RoutesTab.vue.d.ts +12 -0
- package/dist/vue/components/DebugPanel/tabs/RoutesTab.vue.d.ts.map +1 -0
- package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +15 -0
- package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts.map +1 -0
- package/dist/vue/components/StatsBar/MetricCard.vue.d.ts +19 -0
- package/dist/vue/components/StatsBar/MetricCard.vue.d.ts.map +1 -0
- package/dist/vue/components/StatsBar/Sparkline.vue.d.ts +17 -0
- package/dist/vue/components/StatsBar/Sparkline.vue.d.ts.map +1 -0
- package/dist/vue/components/StatsBar/StatsBar.vue.d.ts +22 -0
- package/dist/vue/components/StatsBar/StatsBar.vue.d.ts.map +1 -0
- package/dist/vue/components/shared/JsonViewer.vue.d.ts +13 -0
- package/dist/vue/components/shared/JsonViewer.vue.d.ts.map +1 -0
- package/dist/vue/components/shared/ThemeToggle.vue.d.ts +8 -0
- package/dist/vue/components/shared/ThemeToggle.vue.d.ts.map +1 -0
- package/dist/vue/composables/useApiClient.d.ts +9 -0
- package/dist/vue/composables/useApiClient.d.ts.map +1 -0
- package/dist/vue/composables/useDashboardData.d.ts +53 -0
- package/dist/vue/composables/useDashboardData.d.ts.map +1 -0
- package/dist/vue/composables/useDebugData.d.ts +25 -0
- package/dist/vue/composables/useDebugData.d.ts.map +1 -0
- package/dist/vue/composables/useFeatures.d.ts +80 -0
- package/dist/vue/composables/useFeatures.d.ts.map +1 -0
- package/dist/vue/composables/useResizableTable.d.ts +16 -0
- package/dist/vue/composables/useResizableTable.d.ts.map +1 -0
- package/dist/vue/composables/useServerStats.d.ts +104 -0
- package/dist/vue/composables/useServerStats.d.ts.map +1 -0
- package/dist/vue/composables/useTheme.d.ts +6 -0
- package/dist/vue/composables/useTheme.d.ts.map +1 -0
- package/dist/vue/index-qCQpBftQ.js +1233 -0
- package/dist/vue/index.d.ts +10 -0
- package/dist/vue/index.d.ts.map +1 -0
- package/dist/vue/index.js +11 -0
- package/dist/vue/style.css +1 -0
- package/dist/vue/useApiClient-BQQ9CF-q.js +10 -0
- package/dist/vue/useResizableTable-BoivAevK.js +17 -0
- package/package.json +72 -10
- package/dist/src/dashboard/dashboard_routes.d.ts +0 -16
- package/dist/src/dashboard/dashboard_routes.d.ts.map +0 -1
- package/dist/src/dashboard/dashboard_routes.js +0 -77
- package/dist/src/routes/debug_routes.d.ts +0 -14
- package/dist/src/routes/debug_routes.d.ts.map +0 -1
- package/dist/src/routes/debug_routes.js +0 -42
- package/dist/src/routes/stats_routes.d.ts +0 -14
- package/dist/src/routes/stats_routes.d.ts.map +0 -1
- package/dist/src/routes/stats_routes.js +0 -27
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as h, computed as u, openBlock as s, createElementBlock as a, createElementVNode as o, toDisplayString as i, Fragment as d, renderList as b, normalizeClass as p, createCommentVNode as C } from "vue";
|
|
2
|
+
import { getPageNumbers as k } from "adonisjs-server-stats/core";
|
|
3
|
+
const P = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "ss-dash-pagination"
|
|
6
|
+
}, v = { class: "ss-dash-page-info" }, y = { class: "ss-dash-pagination-controls" }, f = ["disabled"], $ = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "ss-dash-page-ellipsis"
|
|
9
|
+
}, N = ["onClick"], x = ["disabled"], D = /* @__PURE__ */ h({
|
|
10
|
+
__name: "PaginationControls",
|
|
11
|
+
props: {
|
|
12
|
+
page: {},
|
|
13
|
+
lastPage: {},
|
|
14
|
+
total: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["pageChange"],
|
|
17
|
+
setup(e, { emit: c }) {
|
|
18
|
+
const g = e, l = c, m = u(() => k(g.page, g.lastPage));
|
|
19
|
+
return (B, n) => e.lastPage > 1 ? (s(), a("div", P, [
|
|
20
|
+
o("span", v, " Page " + i(e.page) + " of " + i(e.lastPage) + " (" + i(e.total) + " total) ", 1),
|
|
21
|
+
o("div", y, [
|
|
22
|
+
o("button", {
|
|
23
|
+
type: "button",
|
|
24
|
+
class: "ss-dash-page-btn",
|
|
25
|
+
disabled: e.page <= 1,
|
|
26
|
+
onClick: n[0] || (n[0] = (t) => l("pageChange", e.page - 1))
|
|
27
|
+
}, " « Prev ", 8, f),
|
|
28
|
+
(s(!0), a(d, null, b(m.value, (t, r) => (s(), a(d, {
|
|
29
|
+
key: t === "..." ? `ellipsis-${r}` : t
|
|
30
|
+
}, [
|
|
31
|
+
t === "..." ? (s(), a("span", $, "...")) : (s(), a("button", {
|
|
32
|
+
key: 1,
|
|
33
|
+
type: "button",
|
|
34
|
+
class: p(`ss-dash-page-btn ${t === e.page ? "ss-dash-active" : ""}`),
|
|
35
|
+
onClick: (E) => l("pageChange", t)
|
|
36
|
+
}, i(t), 11, N))
|
|
37
|
+
], 64))), 128)),
|
|
38
|
+
o("button", {
|
|
39
|
+
type: "button",
|
|
40
|
+
class: "ss-dash-page-btn",
|
|
41
|
+
disabled: e.page >= e.lastPage,
|
|
42
|
+
onClick: n[1] || (n[1] = (t) => l("pageChange", e.page + 1))
|
|
43
|
+
}, " Next » ", 8, x)
|
|
44
|
+
])
|
|
45
|
+
])) : C("", !0);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
D as _
|
|
50
|
+
};
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { defineComponent as H, inject as A, ref as C, computed as g, openBlock as o, createElementBlock as i, createVNode as W, withCtx as it, createElementVNode as e, normalizeClass as f, unref as u, createTextVNode as b, toDisplayString as r, createCommentVNode as v, Fragment as k, renderList as T, withKeys as B, withModifiers as L, createBlock as rt, h as D } from "vue";
|
|
2
|
+
import { formatTime as ut, timeAgo as dt, SLOW_DURATION_MS as pt, durationSeverity as ct } from "adonisjs-server-stats/core";
|
|
3
|
+
import { u as vt } from "./index-qCQpBftQ.js";
|
|
4
|
+
import { u as ht } from "./useResizableTable-BoivAevK.js";
|
|
5
|
+
import { _ as mt } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
|
|
6
|
+
import { _ as ft } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
|
|
7
|
+
const yt = { class: "ss-dash-btn-group" }, xt = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "ss-dash-empty"
|
|
10
|
+
}, _t = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "ss-dash-table-wrap"
|
|
13
|
+
}, bt = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "ss-dash-sort-arrow"
|
|
16
|
+
}, kt = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "ss-dash-sort-arrow"
|
|
19
|
+
}, wt = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "ss-dash-sort-arrow"
|
|
22
|
+
}, $t = ["onClick", "onKeydown"], Ct = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "ss-dash-dup"
|
|
25
|
+
}, gt = { style: { color: "var(--ss-muted)", "text-align": "center", display: "block" } }, Dt = { class: "ss-dash-duration" }, Nt = { class: "ss-dash-duration" }, Pt = { style: { color: "var(--ss-muted)", "text-align": "center", display: "block" } }, St = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "ss-dash-empty"
|
|
28
|
+
}, Tt = { class: "ss-dash-table-wrap" }, zt = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "ss-dash-sort-arrow"
|
|
31
|
+
}, jt = {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: "ss-dash-sort-arrow"
|
|
34
|
+
}, At = { style: { color: "var(--ss-dim)" } }, Ft = ["onClick", "onKeydown"], Kt = {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: "ss-dash-dup"
|
|
37
|
+
}, Rt = ["title"], Et = { style: { color: "var(--ss-dim)", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" } }, Lt = ["title"], Mt = ["disabled", "onClick"], Ot = {
|
|
38
|
+
key: 0,
|
|
39
|
+
class: "ss-dash-explain-row"
|
|
40
|
+
}, Vt = {
|
|
41
|
+
colspan: "8",
|
|
42
|
+
class: "ss-dash-explain"
|
|
43
|
+
}, qt = { style: { display: "flex", "justify-content": "space-between", "align-items": "start" } }, Ut = { style: { flex: "1" } }, Qt = {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "ss-dash-explain-result ss-dash-explain-error"
|
|
46
|
+
}, Wt = { key: 0 }, Bt = {
|
|
47
|
+
key: 1,
|
|
48
|
+
class: "ss-dash-explain-result"
|
|
49
|
+
}, Ht = {
|
|
50
|
+
key: 2,
|
|
51
|
+
class: "ss-dash-explain-result"
|
|
52
|
+
}, It = {
|
|
53
|
+
key: 3,
|
|
54
|
+
class: "ss-dash-explain-result"
|
|
55
|
+
}, Jt = {
|
|
56
|
+
key: 1,
|
|
57
|
+
class: "ss-dash-empty"
|
|
58
|
+
};
|
|
59
|
+
function I(n, z) {
|
|
60
|
+
if (!n) return null;
|
|
61
|
+
const F = z * 20, K = n["Node Type"] || "Unknown", j = n["Relation Name"] || "", c = n.Alias && n.Alias !== n["Relation Name"] ? ` (${n.Alias})` : "", d = n["Index Name"] || "", a = [];
|
|
62
|
+
if (n["Startup Cost"] !== null && n["Startup Cost"] !== void 0 && a.push(`cost=${n["Startup Cost"]}..${n["Total Cost"]}`), n["Plan Rows"] !== null && n["Plan Rows"] !== void 0 && a.push(`rows=${n["Plan Rows"]}`), n["Plan Width"] !== null && n["Plan Width"] !== void 0 && a.push(`width=${n["Plan Width"]}`), n.Filter && a.push(`filter: ${n.Filter}`), n["Index Cond"] && a.push(`cond: ${n["Index Cond"]}`), n["Hash Cond"] && a.push(`hash: ${n["Hash Cond"]}`), n["Join Type"] && a.push(`join: ${n["Join Type"]}`), n["Sort Key"]) {
|
|
63
|
+
const N = Array.isArray(n["Sort Key"]) ? n["Sort Key"].join(", ") : n["Sort Key"];
|
|
64
|
+
a.push(`sort: ${N}`);
|
|
65
|
+
}
|
|
66
|
+
const y = n.Plans || [];
|
|
67
|
+
return D("div", { class: "ss-dash-explain-node", style: { marginLeft: `${F}px` } }, [
|
|
68
|
+
D("div", { class: "ss-dash-explain-node-header" }, [
|
|
69
|
+
D("span", { class: "ss-dash-explain-node-type" }, K),
|
|
70
|
+
j ? [" on ", D("strong", null, j)] : null,
|
|
71
|
+
c || null,
|
|
72
|
+
d ? [" using ", D("em", null, d)] : null
|
|
73
|
+
]),
|
|
74
|
+
a.length > 0 ? D("div", { class: "ss-dash-explain-metrics" }, a.join(" · ")) : null,
|
|
75
|
+
...y.map((N, w) => I(N, z + 1))
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
const J = H({
|
|
79
|
+
name: "ExplainPlanNode",
|
|
80
|
+
props: {
|
|
81
|
+
node: { type: Object, required: !0 },
|
|
82
|
+
depth: { type: Number, default: 0 }
|
|
83
|
+
},
|
|
84
|
+
setup(n) {
|
|
85
|
+
return () => I(n.node, n.depth);
|
|
86
|
+
}
|
|
87
|
+
}), Gt = { components: { ExplainPlanNode: J } }, ls = /* @__PURE__ */ H({
|
|
88
|
+
...Gt,
|
|
89
|
+
__name: "QueriesSection",
|
|
90
|
+
setup(n) {
|
|
91
|
+
const z = A("ss-refresh-key", C(0)), F = A("ss-dashboard-endpoint", "/__stats/api"), K = A("ss-auth-token", void 0), j = A("ss-base-url", ""), c = C("list"), d = C(null), a = C(null), y = C(null), N = g(() => c.value === "grouped" ? "queries/grouped" : "queries"), { data: w, loading: G, pagination: P, sort: h, goToPage: X, setSearch: Y, setSort: Z, explainQuery: tt } = vt(() => N.value, {
|
|
92
|
+
baseUrl: j,
|
|
93
|
+
dashboardEndpoint: F,
|
|
94
|
+
authToken: K,
|
|
95
|
+
refreshKey: z
|
|
96
|
+
}), M = C(""), O = g(() => w.value ? c.value === "grouped" ? w.value.groups || [] : w.value.data || w.value || [] : []), m = g(() => c.value !== "grouped" ? O.value : O.value.map((s) => {
|
|
97
|
+
const t = { ...s };
|
|
98
|
+
return (t.sqlNormalized === null || t.sqlNormalized === void 0 && (s.sql_normalized || s.pattern)) && (t.sqlNormalized = s.sql_normalized || s.pattern || ""), (t.count === null || t.count === void 0) && s.total_count !== null && s.total_count !== void 0 && (t.count = s.total_count), (t.avgDuration === null || t.avgDuration === void 0) && s.avg_duration !== null && s.avg_duration !== void 0 && (t.avgDuration = s.avg_duration), (t.maxDuration === null || t.maxDuration === void 0) && s.max_duration !== null && s.max_duration !== void 0 && (t.maxDuration = s.max_duration), (t.minDuration === null || t.minDuration === void 0) && s.min_duration !== null && s.min_duration !== void 0 && (t.minDuration = s.min_duration), (t.totalDuration === null || t.totalDuration === void 0) && s.total_duration !== null && s.total_duration !== void 0 && (t.totalDuration = s.total_duration), (t.percentOfTotal === null || t.percentOfTotal === void 0) && s.pct_time !== null && s.pct_time !== void 0 && (t.percentOfTotal = s.pct_time), t;
|
|
99
|
+
})), R = g(() => {
|
|
100
|
+
const s = /* @__PURE__ */ new Map();
|
|
101
|
+
for (const t of m.value) {
|
|
102
|
+
const l = t.sqlNormalized || t.sql || t.sql_text || "";
|
|
103
|
+
s.set(l, (s.get(l) || 0) + 1);
|
|
104
|
+
}
|
|
105
|
+
return s;
|
|
106
|
+
}), $ = g(() => {
|
|
107
|
+
const s = P.total ?? m.value.length;
|
|
108
|
+
let t = 0, l = 0, p = 0, x = 0;
|
|
109
|
+
for (const _ of m.value) {
|
|
110
|
+
const Q = _.duration || 0;
|
|
111
|
+
p += Q, x++, Q > pt && t++;
|
|
112
|
+
}
|
|
113
|
+
for (const _ of R.value.values())
|
|
114
|
+
_ > 1 && (l += _);
|
|
115
|
+
return { total: s, slow: t, duplicates: l, avgDuration: x > 0 ? p / x : 0 };
|
|
116
|
+
}), st = g(() => {
|
|
117
|
+
if (c.value === "grouped") return `${m.value.length} query patterns`;
|
|
118
|
+
const s = [`${$.value.total} queries`];
|
|
119
|
+
return $.value.slow > 0 && s.push(`${$.value.slow} slow`), $.value.duplicates > 0 && s.push(`${$.value.duplicates} dup`), s.push(`avg ${($.value.avgDuration || 0).toFixed(1)}ms`), s.join(", ");
|
|
120
|
+
});
|
|
121
|
+
function et(s) {
|
|
122
|
+
M.value = s, Y(s);
|
|
123
|
+
}
|
|
124
|
+
function V(s) {
|
|
125
|
+
s !== c.value && (c.value = s, d.value = null, a.value = null, y.value = null);
|
|
126
|
+
}
|
|
127
|
+
function S(s) {
|
|
128
|
+
Z(s);
|
|
129
|
+
}
|
|
130
|
+
async function lt(s) {
|
|
131
|
+
if (a.value && a.value.queryId === s) {
|
|
132
|
+
a.value = null;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
y.value = s;
|
|
136
|
+
try {
|
|
137
|
+
const t = await tt(s);
|
|
138
|
+
t && t.error ? a.value = { queryId: s, plan: [], error: t.error, message: t.message } : a.value = { queryId: s, plan: t?.plan || t?.rows || [] };
|
|
139
|
+
} catch (t) {
|
|
140
|
+
a.value = {
|
|
141
|
+
queryId: s,
|
|
142
|
+
plan: [],
|
|
143
|
+
error: t instanceof Error ? t.message : String(t)
|
|
144
|
+
};
|
|
145
|
+
} finally {
|
|
146
|
+
y.value = null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function E(s) {
|
|
150
|
+
const t = ct(s);
|
|
151
|
+
return t === "very-slow" ? "ss-dash-very-slow" : t === "slow" ? "ss-dash-slow" : "";
|
|
152
|
+
}
|
|
153
|
+
function q() {
|
|
154
|
+
const s = a.value?.plan;
|
|
155
|
+
return !s || s.length === 0 || typeof s[0] != "object" || !s[0] ? [] : Object.keys(s[0]);
|
|
156
|
+
}
|
|
157
|
+
function nt(s, t) {
|
|
158
|
+
if (!s || typeof s != "object") return "-";
|
|
159
|
+
const l = s[t];
|
|
160
|
+
return l != null ? String(l) : "-";
|
|
161
|
+
}
|
|
162
|
+
function at() {
|
|
163
|
+
const s = a.value?.plan;
|
|
164
|
+
return !s || s.length === 0 || typeof s[0] != "object" || !s[0] ? !1 : "Plan" in s[0];
|
|
165
|
+
}
|
|
166
|
+
function ot() {
|
|
167
|
+
const s = a.value?.plan;
|
|
168
|
+
return !s || s.length === 0 || typeof s[0] != "object" || !s[0] ? {} : s[0].Plan;
|
|
169
|
+
}
|
|
170
|
+
const { tableRef: U } = ht(() => m.value);
|
|
171
|
+
return (s, t) => (o(), i("div", null, [
|
|
172
|
+
W(mt, {
|
|
173
|
+
"model-value": M.value,
|
|
174
|
+
placeholder: "Filter queries...",
|
|
175
|
+
summary: st.value,
|
|
176
|
+
"onUpdate:modelValue": et
|
|
177
|
+
}, {
|
|
178
|
+
default: it(() => [
|
|
179
|
+
e("div", yt, [
|
|
180
|
+
e("button", {
|
|
181
|
+
type: "button",
|
|
182
|
+
class: f(`ss-dash-btn ${c.value === "list" ? "ss-dash-active" : ""}`),
|
|
183
|
+
onClick: t[0] || (t[0] = (l) => V("list"))
|
|
184
|
+
}, " List ", 2),
|
|
185
|
+
e("button", {
|
|
186
|
+
type: "button",
|
|
187
|
+
class: f(`ss-dash-btn ${c.value === "grouped" ? "ss-dash-active" : ""}`),
|
|
188
|
+
onClick: t[1] || (t[1] = (l) => V("grouped"))
|
|
189
|
+
}, " Grouped ", 2)
|
|
190
|
+
])
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["model-value", "summary"]),
|
|
194
|
+
u(G) && !u(w) ? (o(), i("div", xt, "Loading queries...")) : c.value === "grouped" ? (o(), i("div", _t, [
|
|
195
|
+
m.value.length > 0 ? (o(), i("table", {
|
|
196
|
+
key: 0,
|
|
197
|
+
ref_key: "tableRef",
|
|
198
|
+
ref: U,
|
|
199
|
+
class: "ss-dash-table"
|
|
200
|
+
}, [
|
|
201
|
+
e("thead", null, [
|
|
202
|
+
e("tr", null, [
|
|
203
|
+
t[11] || (t[11] = e("th", null, "Pattern", -1)),
|
|
204
|
+
e("th", {
|
|
205
|
+
class: "ss-dash-sortable",
|
|
206
|
+
onClick: t[2] || (t[2] = (l) => S("count"))
|
|
207
|
+
}, [
|
|
208
|
+
t[8] || (t[8] = b(" Count ", -1)),
|
|
209
|
+
u(h).column === "count" ? (o(), i("span", bt, r(u(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
210
|
+
]),
|
|
211
|
+
e("th", {
|
|
212
|
+
class: "ss-dash-sortable",
|
|
213
|
+
onClick: t[3] || (t[3] = (l) => S("avgDuration"))
|
|
214
|
+
}, [
|
|
215
|
+
t[9] || (t[9] = b(" Avg ", -1)),
|
|
216
|
+
u(h).column === "avgDuration" ? (o(), i("span", kt, r(u(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
217
|
+
]),
|
|
218
|
+
t[12] || (t[12] = e("th", null, "Min", -1)),
|
|
219
|
+
t[13] || (t[13] = e("th", null, "Max", -1)),
|
|
220
|
+
e("th", {
|
|
221
|
+
class: "ss-dash-sortable",
|
|
222
|
+
onClick: t[4] || (t[4] = (l) => S("totalDuration"))
|
|
223
|
+
}, [
|
|
224
|
+
t[10] || (t[10] = b(" Total ", -1)),
|
|
225
|
+
u(h).column === "totalDuration" ? (o(), i("span", wt, r(u(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
226
|
+
]),
|
|
227
|
+
t[14] || (t[14] = e("th", null, "% Time", -1))
|
|
228
|
+
])
|
|
229
|
+
]),
|
|
230
|
+
e("tbody", null, [
|
|
231
|
+
(o(!0), i(k, null, T(m.value, (l, p) => (o(), i("tr", { key: p }, [
|
|
232
|
+
e("td", null, [
|
|
233
|
+
e("span", {
|
|
234
|
+
class: f(`ss-dash-sql ${d.value === l.sqlNormalized ? "ss-dash-expanded" : ""}`),
|
|
235
|
+
title: "Click to expand",
|
|
236
|
+
role: "button",
|
|
237
|
+
tabindex: "0",
|
|
238
|
+
onClick: L((x) => d.value = d.value === l.sqlNormalized ? null : l.sqlNormalized, ["stop"]),
|
|
239
|
+
onKeydown: B((x) => d.value = d.value === l.sqlNormalized ? null : l.sqlNormalized, ["enter"])
|
|
240
|
+
}, r(l.sqlNormalized), 43, $t),
|
|
241
|
+
(l.count || 0) >= 3 ? (o(), i("span", Ct, "DUP")) : v("", !0)
|
|
242
|
+
]),
|
|
243
|
+
e("td", null, [
|
|
244
|
+
e("span", gt, r(l.count || 0), 1)
|
|
245
|
+
]),
|
|
246
|
+
e("td", null, [
|
|
247
|
+
e("span", {
|
|
248
|
+
class: f(`ss-dash-duration ${E(l.avgDuration || 0)}`)
|
|
249
|
+
}, r((l.avgDuration || 0).toFixed(2)) + "ms ", 3)
|
|
250
|
+
]),
|
|
251
|
+
e("td", null, [
|
|
252
|
+
e("span", Dt, r((l.minDuration || 0).toFixed(2)) + "ms", 1)
|
|
253
|
+
]),
|
|
254
|
+
e("td", null, [
|
|
255
|
+
e("span", {
|
|
256
|
+
class: f(`ss-dash-duration ${E(l.maxDuration || 0)}`)
|
|
257
|
+
}, r((l.maxDuration || 0).toFixed(2)) + "ms ", 3)
|
|
258
|
+
]),
|
|
259
|
+
e("td", null, [
|
|
260
|
+
e("span", Nt, r((l.totalDuration || 0).toFixed(1)) + "ms", 1)
|
|
261
|
+
]),
|
|
262
|
+
e("td", null, [
|
|
263
|
+
e("span", Pt, r((l.percentOfTotal || 0).toFixed(1)) + "%", 1)
|
|
264
|
+
])
|
|
265
|
+
]))), 128))
|
|
266
|
+
])
|
|
267
|
+
], 512)) : (o(), i("div", St, "No queries recorded"))
|
|
268
|
+
])) : (o(), i(k, { key: 2 }, [
|
|
269
|
+
e("div", Tt, [
|
|
270
|
+
m.value.length > 0 ? (o(), i("table", {
|
|
271
|
+
key: 0,
|
|
272
|
+
ref_key: "tableRef",
|
|
273
|
+
ref: U,
|
|
274
|
+
class: "ss-dash-table"
|
|
275
|
+
}, [
|
|
276
|
+
t[24] || (t[24] = e("colgroup", null, [
|
|
277
|
+
e("col", { style: { width: "40px" } }),
|
|
278
|
+
e("col"),
|
|
279
|
+
e("col", { style: { width: "70px" } }),
|
|
280
|
+
e("col", { style: { width: "60px" } }),
|
|
281
|
+
e("col", { style: { width: "90px" } }),
|
|
282
|
+
e("col", { style: { width: "80px" } }),
|
|
283
|
+
e("col", { style: { width: "90px" } }),
|
|
284
|
+
e("col", { style: { width: "70px" } })
|
|
285
|
+
], -1)),
|
|
286
|
+
e("thead", null, [
|
|
287
|
+
e("tr", null, [
|
|
288
|
+
t[17] || (t[17] = e("th", null, "#", -1)),
|
|
289
|
+
t[18] || (t[18] = e("th", null, "SQL", -1)),
|
|
290
|
+
e("th", {
|
|
291
|
+
class: "ss-dash-sortable",
|
|
292
|
+
onClick: t[5] || (t[5] = (l) => S("duration"))
|
|
293
|
+
}, [
|
|
294
|
+
t[15] || (t[15] = b(" Duration ", -1)),
|
|
295
|
+
u(h).column === "duration" ? (o(), i("span", zt, r(u(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
296
|
+
]),
|
|
297
|
+
t[19] || (t[19] = e("th", null, "Method", -1)),
|
|
298
|
+
t[20] || (t[20] = e("th", null, "Model", -1)),
|
|
299
|
+
t[21] || (t[21] = e("th", null, "Connection", -1)),
|
|
300
|
+
e("th", {
|
|
301
|
+
class: "ss-dash-sortable",
|
|
302
|
+
onClick: t[6] || (t[6] = (l) => S("createdAt"))
|
|
303
|
+
}, [
|
|
304
|
+
t[16] || (t[16] = b(" Time ", -1)),
|
|
305
|
+
u(h).column === "createdAt" ? (o(), i("span", jt, r(u(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
306
|
+
]),
|
|
307
|
+
t[22] || (t[22] = e("th", null, null, -1))
|
|
308
|
+
])
|
|
309
|
+
]),
|
|
310
|
+
e("tbody", null, [
|
|
311
|
+
(o(!0), i(k, null, T(m.value, (l) => (o(), i(k, {
|
|
312
|
+
key: l.id
|
|
313
|
+
}, [
|
|
314
|
+
e("tr", null, [
|
|
315
|
+
e("td", null, [
|
|
316
|
+
e("span", At, r(l.id), 1)
|
|
317
|
+
]),
|
|
318
|
+
e("td", null, [
|
|
319
|
+
e("div", null, [
|
|
320
|
+
e("span", {
|
|
321
|
+
class: f(`ss-dash-sql ${d.value === l.id ? "ss-dash-expanded" : ""}`),
|
|
322
|
+
title: "Click to expand",
|
|
323
|
+
role: "button",
|
|
324
|
+
tabindex: "0",
|
|
325
|
+
onClick: L((p) => d.value = d.value === l.id ? null : l.id, ["stop"]),
|
|
326
|
+
onKeydown: B((p) => d.value = d.value === l.id ? null : l.id, ["enter"])
|
|
327
|
+
}, r(l.sql || l.sql_text || ""), 43, Ft),
|
|
328
|
+
(R.value.get(
|
|
329
|
+
(l.sqlNormalized || l.sql || l.sql_text) ?? ""
|
|
330
|
+
) ?? 0) > 1 ? (o(), i("span", Kt, " ×" + r(R.value.get(
|
|
331
|
+
(l.sqlNormalized || l.sql || l.sql_text) ?? ""
|
|
332
|
+
)), 1)) : v("", !0)
|
|
333
|
+
])
|
|
334
|
+
]),
|
|
335
|
+
e("td", null, [
|
|
336
|
+
e("span", {
|
|
337
|
+
class: f(`ss-dash-duration ${E(l.duration || 0)}`)
|
|
338
|
+
}, r((l.duration || 0).toFixed(2)) + "ms ", 3)
|
|
339
|
+
]),
|
|
340
|
+
e("td", null, [
|
|
341
|
+
e("span", {
|
|
342
|
+
class: f(`ss-dash-method ss-dash-method-${(l.method || l.sql_method || "").toLowerCase()}`)
|
|
343
|
+
}, r(l.method || l.sql_method || ""), 3)
|
|
344
|
+
]),
|
|
345
|
+
e("td", null, [
|
|
346
|
+
e("span", {
|
|
347
|
+
style: { color: "var(--ss-muted)", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" },
|
|
348
|
+
title: l.model
|
|
349
|
+
}, r(l.model || "-"), 9, Rt)
|
|
350
|
+
]),
|
|
351
|
+
e("td", null, [
|
|
352
|
+
e("span", Et, r(l.connection || "-"), 1)
|
|
353
|
+
]),
|
|
354
|
+
e("td", null, [
|
|
355
|
+
e("span", {
|
|
356
|
+
class: "ss-dash-event-time",
|
|
357
|
+
title: u(ut)(
|
|
358
|
+
l.createdAt || l.created_at || l.timestamp || ""
|
|
359
|
+
)
|
|
360
|
+
}, r(u(dt)(
|
|
361
|
+
l.createdAt || l.created_at || l.timestamp || ""
|
|
362
|
+
)), 9, Lt)
|
|
363
|
+
]),
|
|
364
|
+
e("td", null, [
|
|
365
|
+
(l.method || l.sql_method || "") === "select" ? (o(), i("button", {
|
|
366
|
+
key: 0,
|
|
367
|
+
type: "button",
|
|
368
|
+
class: f(`ss-dash-explain-btn${a.value?.queryId === l.id && !a.value?.error ? " ss-dash-explain-btn-active" : ""}`),
|
|
369
|
+
disabled: y.value === l.id,
|
|
370
|
+
onClick: L((p) => lt(l.id), ["stop"])
|
|
371
|
+
}, r(y.value === l.id ? "..." : "EXPLAIN"), 11, Mt)) : v("", !0)
|
|
372
|
+
])
|
|
373
|
+
]),
|
|
374
|
+
a.value && a.value.queryId === l.id ? (o(), i("tr", Ot, [
|
|
375
|
+
e("td", Vt, [
|
|
376
|
+
e("div", qt, [
|
|
377
|
+
e("div", Ut, [
|
|
378
|
+
a.value.error ? (o(), i("div", Qt, [
|
|
379
|
+
t[23] || (t[23] = e("strong", null, "Error:", -1)),
|
|
380
|
+
b(" " + r(a.value.error) + " ", 1),
|
|
381
|
+
a.value.message ? (o(), i("br", Wt)) : v("", !0),
|
|
382
|
+
b(" " + r(a.value.message), 1)
|
|
383
|
+
])) : at() ? (o(), i("div", Bt, [
|
|
384
|
+
W(u(J), {
|
|
385
|
+
node: ot(),
|
|
386
|
+
depth: 0
|
|
387
|
+
}, null, 8, ["node"])
|
|
388
|
+
])) : a.value.plan && a.value.plan.length > 0 && typeof a.value.plan[0] == "object" ? (o(), i("div", Ht, [
|
|
389
|
+
e("table", null, [
|
|
390
|
+
e("thead", null, [
|
|
391
|
+
e("tr", null, [
|
|
392
|
+
(o(!0), i(k, null, T(q(), (p) => (o(), i("th", { key: p }, r(p), 1))), 128))
|
|
393
|
+
])
|
|
394
|
+
]),
|
|
395
|
+
e("tbody", null, [
|
|
396
|
+
(o(!0), i(k, null, T(a.value.plan, (p, x) => (o(), i("tr", { key: x }, [
|
|
397
|
+
(o(!0), i(k, null, T(q(), (_) => (o(), i("td", { key: _ }, r(nt(p, _)), 1))), 128))
|
|
398
|
+
]))), 128))
|
|
399
|
+
])
|
|
400
|
+
])
|
|
401
|
+
])) : (o(), i("div", It, "No plan data returned"))
|
|
402
|
+
]),
|
|
403
|
+
e("button", {
|
|
404
|
+
type: "button",
|
|
405
|
+
class: "ss-dash-explain-btn",
|
|
406
|
+
style: { "margin-left": "8px", "flex-shrink": "0" },
|
|
407
|
+
onClick: t[7] || (t[7] = (p) => a.value = null)
|
|
408
|
+
}, " Close ")
|
|
409
|
+
])
|
|
410
|
+
])
|
|
411
|
+
])) : v("", !0)
|
|
412
|
+
], 64))), 128))
|
|
413
|
+
])
|
|
414
|
+
], 512)) : (o(), i("div", Jt, "No queries recorded"))
|
|
415
|
+
]),
|
|
416
|
+
u(P).totalPages > 1 ? (o(), rt(ft, {
|
|
417
|
+
key: 0,
|
|
418
|
+
page: u(P).page,
|
|
419
|
+
"last-page": u(P).totalPages,
|
|
420
|
+
total: u(P).total,
|
|
421
|
+
onPageChange: u(X)
|
|
422
|
+
}, null, 8, ["page", "last-page", "total", "onPageChange"])) : v("", !0)
|
|
423
|
+
], 64))
|
|
424
|
+
]));
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
export {
|
|
428
|
+
ls as default
|
|
429
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as $, ref as D, computed as d, openBlock as a, createElementBlock as o, createElementVNode as e, withDirectives as Q, vModelText as S, toDisplayString as l, Fragment as E, renderList as N, withKeys as A, normalizeClass as v, createCommentVNode as f, unref as h } from "vue";
|
|
2
|
+
import { filterQueries as K, countDuplicateQueries as L, computeQuerySummary as M, formatDuration as y, formatTime as R, timeAgo as V, durationSeverity as z } from "adonisjs-server-stats/core";
|
|
3
|
+
import { u as B } from "./useResizableTable-BoivAevK.js";
|
|
4
|
+
const F = { class: "ss-dbg-search-bar" }, I = { class: "ss-dbg-summary" }, P = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "ss-dbg-empty"
|
|
7
|
+
}, U = {
|
|
8
|
+
class: "ss-dbg-c-dim",
|
|
9
|
+
style: { "white-space": "nowrap" }
|
|
10
|
+
}, X = ["onClick", "onKeydown"], j = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "ss-dbg-dup"
|
|
13
|
+
}, G = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "ss-dbg-dup"
|
|
16
|
+
}, H = { class: "ss-dbg-c-muted" }, J = ["title"], Z = /* @__PURE__ */ $({
|
|
17
|
+
__name: "QueriesTab",
|
|
18
|
+
props: {
|
|
19
|
+
data: {},
|
|
20
|
+
dashboardPath: {}
|
|
21
|
+
},
|
|
22
|
+
setup(_) {
|
|
23
|
+
const b = _, c = D(""), i = /* @__PURE__ */ new Set(), m = d(() => {
|
|
24
|
+
if (!b.data) return [];
|
|
25
|
+
const s = b.data;
|
|
26
|
+
return (Array.isArray(s) ? s : s.queries) || [];
|
|
27
|
+
}), u = d(() => K(m.value, c.value)), p = d(() => L(m.value)), r = d(() => M(m.value, p.value)), w = d(() => {
|
|
28
|
+
let s = `${u.value.length} queries`;
|
|
29
|
+
return r.value.slowCount > 0 && (s += ` | ${r.value.slowCount} slow`), r.value.dupCount > 0 && (s += ` | ${r.value.dupCount} dup`), u.value.length > 0 && (s += ` | avg ${y(r.value.avgDuration)}`), s;
|
|
30
|
+
});
|
|
31
|
+
function g(s) {
|
|
32
|
+
i.has(s) ? i.delete(s) : i.add(s);
|
|
33
|
+
}
|
|
34
|
+
function C(s) {
|
|
35
|
+
return i.has(s);
|
|
36
|
+
}
|
|
37
|
+
function k(s) {
|
|
38
|
+
const n = z(s);
|
|
39
|
+
return n === "very-slow" ? "ss-dbg-very-slow" : n === "slow" ? "ss-dbg-slow" : "";
|
|
40
|
+
}
|
|
41
|
+
const { tableRef: x } = B(() => u.value);
|
|
42
|
+
return (s, n) => (a(), o("div", null, [
|
|
43
|
+
e("div", F, [
|
|
44
|
+
Q(e("input", {
|
|
45
|
+
"onUpdate:modelValue": n[0] || (n[0] = (t) => c.value = t),
|
|
46
|
+
class: "ss-dbg-search",
|
|
47
|
+
placeholder: "Filter queries...",
|
|
48
|
+
type: "text"
|
|
49
|
+
}, null, 512), [
|
|
50
|
+
[S, c.value]
|
|
51
|
+
]),
|
|
52
|
+
e("span", I, l(w.value), 1)
|
|
53
|
+
]),
|
|
54
|
+
u.value.length === 0 ? (a(), o("div", P, "No queries captured")) : (a(), o("table", {
|
|
55
|
+
key: 1,
|
|
56
|
+
ref_key: "tableRef",
|
|
57
|
+
ref: x,
|
|
58
|
+
class: "ss-dbg-table"
|
|
59
|
+
}, [
|
|
60
|
+
n[1] || (n[1] = e("thead", null, [
|
|
61
|
+
e("tr", null, [
|
|
62
|
+
e("th", null, "#"),
|
|
63
|
+
e("th", null, "SQL"),
|
|
64
|
+
e("th", null, "Duration"),
|
|
65
|
+
e("th", null, "Method"),
|
|
66
|
+
e("th", null, "Model"),
|
|
67
|
+
e("th", null, "Time")
|
|
68
|
+
])
|
|
69
|
+
], -1)),
|
|
70
|
+
e("tbody", null, [
|
|
71
|
+
(a(!0), o(E, null, N(u.value, (t) => (a(), o("tr", {
|
|
72
|
+
key: t.id
|
|
73
|
+
}, [
|
|
74
|
+
e("td", U, l(t.id), 1),
|
|
75
|
+
e("td", null, [
|
|
76
|
+
e("span", {
|
|
77
|
+
class: v(["ss-dbg-sql", { "ss-dbg-expanded": C(t.id) }]),
|
|
78
|
+
role: "button",
|
|
79
|
+
tabindex: "0",
|
|
80
|
+
onClick: (T) => g(t.id),
|
|
81
|
+
onKeydown: A((T) => g(t.id), ["enter"])
|
|
82
|
+
}, l(t.sql), 43, X),
|
|
83
|
+
p.value[t.sql] > 1 ? (a(), o("span", j, " x" + l(p.value[t.sql]), 1)) : f("", !0),
|
|
84
|
+
t.inTransaction ? (a(), o("span", G, " TXN")) : f("", !0)
|
|
85
|
+
]),
|
|
86
|
+
e("td", {
|
|
87
|
+
class: v(["ss-dbg-duration", k(t.duration)])
|
|
88
|
+
}, l(h(y)(t.duration)), 3),
|
|
89
|
+
e("td", null, [
|
|
90
|
+
e("span", {
|
|
91
|
+
class: v(`ss-dbg-method ss-dbg-method-${t.method.toLowerCase()}`)
|
|
92
|
+
}, l(t.method), 3)
|
|
93
|
+
]),
|
|
94
|
+
e("td", H, l(t.model || "-"), 1),
|
|
95
|
+
e("td", {
|
|
96
|
+
class: "ss-dbg-event-time",
|
|
97
|
+
title: h(R)(t.timestamp)
|
|
98
|
+
}, l(h(V)(t.timestamp)), 9, J)
|
|
99
|
+
]))), 128))
|
|
100
|
+
])
|
|
101
|
+
], 512))
|
|
102
|
+
]));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
Z as default
|
|
107
|
+
};
|