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.
Files changed (527) hide show
  1. package/README.md +351 -171
  2. package/dist/configure.d.ts.map +1 -1
  3. package/dist/core/api-client.d.ts +73 -0
  4. package/dist/core/api-client.d.ts.map +1 -0
  5. package/dist/core/config-utils.d.ts +109 -0
  6. package/dist/core/config-utils.d.ts.map +1 -0
  7. package/dist/core/constants.d.ts +11 -0
  8. package/dist/core/constants.d.ts.map +1 -0
  9. package/dist/core/dashboard-api.d.ts +65 -0
  10. package/dist/core/dashboard-api.d.ts.map +1 -0
  11. package/dist/core/dashboard-data-controller.d.ts +157 -0
  12. package/dist/core/dashboard-data-controller.d.ts.map +1 -0
  13. package/dist/core/debug-data-controller.d.ts +89 -0
  14. package/dist/core/debug-data-controller.d.ts.map +1 -0
  15. package/dist/core/feature-detect.d.ts +67 -0
  16. package/dist/core/feature-detect.d.ts.map +1 -0
  17. package/dist/core/formatters.d.ts +189 -0
  18. package/dist/core/formatters.d.ts.map +1 -0
  19. package/dist/core/history-buffer.d.ts +23 -0
  20. package/dist/core/history-buffer.d.ts.map +1 -0
  21. package/dist/core/icons.d.ts +36 -0
  22. package/dist/core/icons.d.ts.map +1 -0
  23. package/dist/core/index.d.ts +39 -0
  24. package/dist/core/index.d.ts.map +1 -0
  25. package/dist/core/index.js +1961 -0
  26. package/dist/core/internals-utils.d.ts +71 -0
  27. package/dist/core/internals-utils.d.ts.map +1 -0
  28. package/dist/core/job-utils.d.ts +45 -0
  29. package/dist/core/job-utils.d.ts.map +1 -0
  30. package/dist/core/log-utils.d.ts +34 -0
  31. package/dist/core/log-utils.d.ts.map +1 -0
  32. package/dist/core/metrics.d.ts +41 -0
  33. package/dist/core/metrics.d.ts.map +1 -0
  34. package/dist/core/pagination.d.ts +128 -0
  35. package/dist/core/pagination.d.ts.map +1 -0
  36. package/dist/core/query-utils.d.ts +35 -0
  37. package/dist/core/query-utils.d.ts.map +1 -0
  38. package/dist/core/resizable-columns.d.ts +18 -0
  39. package/dist/core/resizable-columns.d.ts.map +1 -0
  40. package/dist/core/routes.d.ts +12 -0
  41. package/dist/core/routes.d.ts.map +1 -0
  42. package/dist/core/server-stats-controller.d.ts +106 -0
  43. package/dist/core/server-stats-controller.d.ts.map +1 -0
  44. package/dist/core/sparkline.d.ts +80 -0
  45. package/dist/core/sparkline.d.ts.map +1 -0
  46. package/dist/core/theme.d.ts +42 -0
  47. package/dist/core/theme.d.ts.map +1 -0
  48. package/dist/core/trace-utils.d.ts +62 -0
  49. package/dist/core/trace-utils.d.ts.map +1 -0
  50. package/dist/core/transmit-adapter.d.ts +59 -0
  51. package/dist/core/transmit-adapter.d.ts.map +1 -0
  52. package/dist/core/types.d.ts +619 -0
  53. package/dist/core/types.d.ts.map +1 -0
  54. package/dist/react/CacheSection-DGxMDlWK.js +146 -0
  55. package/dist/react/CacheTab-CnVW5PLs.js +123 -0
  56. package/dist/react/ConfigContent-CnsEI4j3.js +397 -0
  57. package/dist/react/ConfigSection-DPcrfqXY.js +11 -0
  58. package/dist/react/ConfigTab-BSWq_o2p.js +15 -0
  59. package/dist/react/CustomPaneTab-xjkYwTvH.js +104 -0
  60. package/dist/react/DataTable-YyShr5B-.js +55 -0
  61. package/dist/react/EmailsSection-CSyTg1aX.js +262 -0
  62. package/dist/react/EmailsTab-Dh2YSa_f.js +131 -0
  63. package/dist/react/EventsSection-C1pbJDfW.js +86 -0
  64. package/dist/react/EventsTab-eCh02cdd.js +63 -0
  65. package/dist/react/FilterBar-DQRXpWrb.js +50 -0
  66. package/dist/react/InternalsContent-DBzsI0CG.js +346 -0
  67. package/dist/react/InternalsSection-t7ihcWO-.js +32 -0
  68. package/dist/react/InternalsTab-Oij0A2fN.js +30 -0
  69. package/dist/react/JobsSection-CLAin5vU.js +187 -0
  70. package/dist/react/JobsTab-Dl5nrj2z.js +141 -0
  71. package/dist/react/LogsSection-C1p81fXO.js +212 -0
  72. package/dist/react/LogsTab-D-kR7PjX.js +88 -0
  73. package/dist/react/OverviewSection-nm3xdACz.js +539 -0
  74. package/dist/react/Pagination-BkmzUDY8.js +64 -0
  75. package/dist/react/QueriesSection-DB12HMfQ.js +461 -0
  76. package/dist/react/QueriesTab-fyBB1u_Y.js +90 -0
  77. package/dist/react/RequestsSection-DTqB81ac.js +209 -0
  78. package/dist/react/RoutesSection-DJWa4NPV.js +74 -0
  79. package/dist/react/RoutesTab-D3l8TOpu.js +74 -0
  80. package/dist/react/TimelineSection-C4d-jRX1.js +158 -0
  81. package/dist/react/TimelineTab-C5TFaSmQ.js +193 -0
  82. package/dist/react/WaterfallChart-Cj73WdfM.js +100 -0
  83. package/dist/react/core/api-client.d.ts +73 -0
  84. package/dist/react/core/api-client.d.ts.map +1 -0
  85. package/dist/react/core/config-utils.d.ts +109 -0
  86. package/dist/react/core/config-utils.d.ts.map +1 -0
  87. package/dist/react/core/constants.d.ts +11 -0
  88. package/dist/react/core/constants.d.ts.map +1 -0
  89. package/dist/react/core/dashboard-api.d.ts +65 -0
  90. package/dist/react/core/dashboard-api.d.ts.map +1 -0
  91. package/dist/react/core/dashboard-data-controller.d.ts +157 -0
  92. package/dist/react/core/dashboard-data-controller.d.ts.map +1 -0
  93. package/dist/react/core/debug-data-controller.d.ts +89 -0
  94. package/dist/react/core/debug-data-controller.d.ts.map +1 -0
  95. package/dist/react/core/feature-detect.d.ts +67 -0
  96. package/dist/react/core/feature-detect.d.ts.map +1 -0
  97. package/dist/react/core/formatters.d.ts +189 -0
  98. package/dist/react/core/formatters.d.ts.map +1 -0
  99. package/dist/react/core/history-buffer.d.ts +23 -0
  100. package/dist/react/core/history-buffer.d.ts.map +1 -0
  101. package/dist/react/core/icons.d.ts +36 -0
  102. package/dist/react/core/icons.d.ts.map +1 -0
  103. package/dist/react/core/index.d.ts +39 -0
  104. package/dist/react/core/index.d.ts.map +1 -0
  105. package/dist/react/core/internals-utils.d.ts +71 -0
  106. package/dist/react/core/internals-utils.d.ts.map +1 -0
  107. package/dist/react/core/job-utils.d.ts +45 -0
  108. package/dist/react/core/job-utils.d.ts.map +1 -0
  109. package/dist/react/core/log-utils.d.ts +34 -0
  110. package/dist/react/core/log-utils.d.ts.map +1 -0
  111. package/dist/react/core/metrics.d.ts +41 -0
  112. package/dist/react/core/metrics.d.ts.map +1 -0
  113. package/dist/react/core/pagination.d.ts +128 -0
  114. package/dist/react/core/pagination.d.ts.map +1 -0
  115. package/dist/react/core/query-utils.d.ts +35 -0
  116. package/dist/react/core/query-utils.d.ts.map +1 -0
  117. package/dist/react/core/resizable-columns.d.ts +18 -0
  118. package/dist/react/core/resizable-columns.d.ts.map +1 -0
  119. package/dist/react/core/routes.d.ts +12 -0
  120. package/dist/react/core/routes.d.ts.map +1 -0
  121. package/dist/react/core/server-stats-controller.d.ts +106 -0
  122. package/dist/react/core/server-stats-controller.d.ts.map +1 -0
  123. package/dist/react/core/sparkline.d.ts +80 -0
  124. package/dist/react/core/sparkline.d.ts.map +1 -0
  125. package/dist/react/core/theme.d.ts +42 -0
  126. package/dist/react/core/theme.d.ts.map +1 -0
  127. package/dist/react/core/trace-utils.d.ts +62 -0
  128. package/dist/react/core/trace-utils.d.ts.map +1 -0
  129. package/dist/react/core/transmit-adapter.d.ts +59 -0
  130. package/dist/react/core/transmit-adapter.d.ts.map +1 -0
  131. package/dist/react/core/types.d.ts +619 -0
  132. package/dist/react/core/types.d.ts.map +1 -0
  133. package/dist/react/index-UdTfSvtO.js +1074 -0
  134. package/dist/react/index.js +18 -0
  135. package/dist/react/react/components/Dashboard/DashboardPage.d.ts +17 -0
  136. package/dist/react/react/components/Dashboard/DashboardPage.d.ts.map +1 -0
  137. package/dist/react/react/components/Dashboard/sections/CacheSection.d.ts +7 -0
  138. package/dist/react/react/components/Dashboard/sections/CacheSection.d.ts.map +1 -0
  139. package/dist/react/react/components/Dashboard/sections/ConfigSection.d.ts +7 -0
  140. package/dist/react/react/components/Dashboard/sections/ConfigSection.d.ts.map +1 -0
  141. package/dist/react/react/components/Dashboard/sections/EmailsSection.d.ts +7 -0
  142. package/dist/react/react/components/Dashboard/sections/EmailsSection.d.ts.map +1 -0
  143. package/dist/react/react/components/Dashboard/sections/EventsSection.d.ts +7 -0
  144. package/dist/react/react/components/Dashboard/sections/EventsSection.d.ts.map +1 -0
  145. package/dist/react/react/components/Dashboard/sections/InternalsSection.d.ts +14 -0
  146. package/dist/react/react/components/Dashboard/sections/InternalsSection.d.ts.map +1 -0
  147. package/dist/react/react/components/Dashboard/sections/JobsSection.d.ts +7 -0
  148. package/dist/react/react/components/Dashboard/sections/JobsSection.d.ts.map +1 -0
  149. package/dist/react/react/components/Dashboard/sections/LogsSection.d.ts +7 -0
  150. package/dist/react/react/components/Dashboard/sections/LogsSection.d.ts.map +1 -0
  151. package/dist/react/react/components/Dashboard/sections/OverviewSection.d.ts +7 -0
  152. package/dist/react/react/components/Dashboard/sections/OverviewSection.d.ts.map +1 -0
  153. package/dist/react/react/components/Dashboard/sections/QueriesSection.d.ts +7 -0
  154. package/dist/react/react/components/Dashboard/sections/QueriesSection.d.ts.map +1 -0
  155. package/dist/react/react/components/Dashboard/sections/RequestsSection.d.ts +7 -0
  156. package/dist/react/react/components/Dashboard/sections/RequestsSection.d.ts.map +1 -0
  157. package/dist/react/react/components/Dashboard/sections/RoutesSection.d.ts +7 -0
  158. package/dist/react/react/components/Dashboard/sections/RoutesSection.d.ts.map +1 -0
  159. package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +9 -0
  160. package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts.map +1 -0
  161. package/dist/react/react/components/Dashboard/shared/DataTable.d.ts +27 -0
  162. package/dist/react/react/components/Dashboard/shared/DataTable.d.ts.map +1 -0
  163. package/dist/react/react/components/Dashboard/shared/FilterBar.d.ts +17 -0
  164. package/dist/react/react/components/Dashboard/shared/FilterBar.d.ts.map +1 -0
  165. package/dist/react/react/components/Dashboard/shared/Pagination.d.ts +13 -0
  166. package/dist/react/react/components/Dashboard/shared/Pagination.d.ts.map +1 -0
  167. package/dist/react/react/components/Dashboard/shared/TimeRangeSelector.d.ts +12 -0
  168. package/dist/react/react/components/Dashboard/shared/TimeRangeSelector.d.ts.map +1 -0
  169. package/dist/react/react/components/Dashboard/shared/WaterfallChart.d.ts +16 -0
  170. package/dist/react/react/components/Dashboard/shared/WaterfallChart.d.ts.map +1 -0
  171. package/dist/react/react/components/DebugPanel/DebugPanel.d.ts +16 -0
  172. package/dist/react/react/components/DebugPanel/DebugPanel.d.ts.map +1 -0
  173. package/dist/react/react/components/DebugPanel/tabs/CacheTab.d.ts +8 -0
  174. package/dist/react/react/components/DebugPanel/tabs/CacheTab.d.ts.map +1 -0
  175. package/dist/react/react/components/DebugPanel/tabs/ConfigTab.d.ts +8 -0
  176. package/dist/react/react/components/DebugPanel/tabs/ConfigTab.d.ts.map +1 -0
  177. package/dist/react/react/components/DebugPanel/tabs/CustomPaneTab.d.ts +14 -0
  178. package/dist/react/react/components/DebugPanel/tabs/CustomPaneTab.d.ts.map +1 -0
  179. package/dist/react/react/components/DebugPanel/tabs/EmailsTab.d.ts +7 -0
  180. package/dist/react/react/components/DebugPanel/tabs/EmailsTab.d.ts.map +1 -0
  181. package/dist/react/react/components/DebugPanel/tabs/EventsTab.d.ts +7 -0
  182. package/dist/react/react/components/DebugPanel/tabs/EventsTab.d.ts.map +1 -0
  183. package/dist/react/react/components/DebugPanel/tabs/InternalsTab.d.ts +12 -0
  184. package/dist/react/react/components/DebugPanel/tabs/InternalsTab.d.ts.map +1 -0
  185. package/dist/react/react/components/DebugPanel/tabs/JobsTab.d.ts +9 -0
  186. package/dist/react/react/components/DebugPanel/tabs/JobsTab.d.ts.map +1 -0
  187. package/dist/react/react/components/DebugPanel/tabs/LogsTab.d.ts +7 -0
  188. package/dist/react/react/components/DebugPanel/tabs/LogsTab.d.ts.map +1 -0
  189. package/dist/react/react/components/DebugPanel/tabs/QueriesTab.d.ts +7 -0
  190. package/dist/react/react/components/DebugPanel/tabs/QueriesTab.d.ts.map +1 -0
  191. package/dist/react/react/components/DebugPanel/tabs/RoutesTab.d.ts +8 -0
  192. package/dist/react/react/components/DebugPanel/tabs/RoutesTab.d.ts.map +1 -0
  193. package/dist/react/react/components/DebugPanel/tabs/TimelineTab.d.ts +7 -0
  194. package/dist/react/react/components/DebugPanel/tabs/TimelineTab.d.ts.map +1 -0
  195. package/dist/react/react/components/StatsBar/MetricCard.d.ts +21 -0
  196. package/dist/react/react/components/StatsBar/MetricCard.d.ts.map +1 -0
  197. package/dist/react/react/components/StatsBar/Sparkline.d.ts +15 -0
  198. package/dist/react/react/components/StatsBar/Sparkline.d.ts.map +1 -0
  199. package/dist/react/react/components/StatsBar/StatsBar.d.ts +22 -0
  200. package/dist/react/react/components/StatsBar/StatsBar.d.ts.map +1 -0
  201. package/dist/react/react/components/shared/Badge.d.ts +32 -0
  202. package/dist/react/react/components/shared/Badge.d.ts.map +1 -0
  203. package/dist/react/react/components/shared/ConfigContent.d.ts +13 -0
  204. package/dist/react/react/components/shared/ConfigContent.d.ts.map +1 -0
  205. package/dist/react/react/components/shared/InternalsContent.d.ts +10 -0
  206. package/dist/react/react/components/shared/InternalsContent.d.ts.map +1 -0
  207. package/dist/react/react/components/shared/JsonViewer.d.ts +12 -0
  208. package/dist/react/react/components/shared/JsonViewer.d.ts.map +1 -0
  209. package/dist/react/react/components/shared/ThemeToggle.d.ts +13 -0
  210. package/dist/react/react/components/shared/ThemeToggle.d.ts.map +1 -0
  211. package/dist/react/react/components/shared/Tooltip.d.ts +16 -0
  212. package/dist/react/react/components/shared/Tooltip.d.ts.map +1 -0
  213. package/dist/react/react/hooks/useApiClient.d.ts +10 -0
  214. package/dist/react/react/hooks/useApiClient.d.ts.map +1 -0
  215. package/dist/react/react/hooks/useDashboardApiBase.d.ts +19 -0
  216. package/dist/react/react/hooks/useDashboardApiBase.d.ts.map +1 -0
  217. package/dist/react/react/hooks/useDashboardData.d.ts +27 -0
  218. package/dist/react/react/hooks/useDashboardData.d.ts.map +1 -0
  219. package/dist/react/react/hooks/useDebugData.d.ts +17 -0
  220. package/dist/react/react/hooks/useDebugData.d.ts.map +1 -0
  221. package/dist/react/react/hooks/useFeatures.d.ts +13 -0
  222. package/dist/react/react/hooks/useFeatures.d.ts.map +1 -0
  223. package/dist/react/react/hooks/useResizableTable.d.ts +13 -0
  224. package/dist/react/react/hooks/useResizableTable.d.ts.map +1 -0
  225. package/dist/react/react/hooks/useServerStats.d.ts +21 -0
  226. package/dist/react/react/hooks/useServerStats.d.ts.map +1 -0
  227. package/dist/react/react/hooks/useTheme.d.ts +12 -0
  228. package/dist/react/react/hooks/useTheme.d.ts.map +1 -0
  229. package/dist/react/react/index.d.ts +14 -0
  230. package/dist/react/react/index.d.ts.map +1 -0
  231. package/dist/react/style.css +1 -0
  232. package/dist/react/useApiClient-BVtNCmnL.js +9 -0
  233. package/dist/react/useDashboardApiBase-Bi36pJ2L.js +14 -0
  234. package/dist/react/useResizableTable-CNJmACdt.js +13 -0
  235. package/dist/src/collectors/app_collector.d.ts.map +1 -1
  236. package/dist/src/collectors/app_collector.js +30 -2
  237. package/dist/src/collectors/auto_detect.d.ts +31 -0
  238. package/dist/src/collectors/auto_detect.d.ts.map +1 -0
  239. package/dist/src/collectors/auto_detect.js +120 -0
  240. package/dist/src/collectors/collector.d.ts +17 -0
  241. package/dist/src/collectors/collector.d.ts.map +1 -1
  242. package/dist/src/collectors/db_pool_collector.d.ts.map +1 -1
  243. package/dist/src/collectors/db_pool_collector.js +35 -1
  244. package/dist/src/collectors/http_collector.d.ts +4 -3
  245. package/dist/src/collectors/http_collector.d.ts.map +1 -1
  246. package/dist/src/collectors/http_collector.js +28 -11
  247. package/dist/src/collectors/index.d.ts +2 -0
  248. package/dist/src/collectors/index.d.ts.map +1 -1
  249. package/dist/src/collectors/index.js +1 -0
  250. package/dist/src/collectors/log_collector.d.ts +11 -4
  251. package/dist/src/collectors/log_collector.d.ts.map +1 -1
  252. package/dist/src/collectors/log_collector.js +51 -5
  253. package/dist/src/collectors/process_collector.d.ts.map +1 -1
  254. package/dist/src/collectors/process_collector.js +4 -0
  255. package/dist/src/collectors/queue_collector.d.ts.map +1 -1
  256. package/dist/src/collectors/queue_collector.js +55 -1
  257. package/dist/src/collectors/redis_collector.d.ts.map +1 -1
  258. package/dist/src/collectors/redis_collector.js +42 -3
  259. package/dist/src/collectors/system_collector.d.ts.map +1 -1
  260. package/dist/src/collectors/system_collector.js +4 -0
  261. package/dist/src/controller/api_controller.d.ts +101 -0
  262. package/dist/src/controller/api_controller.d.ts.map +1 -0
  263. package/dist/src/controller/api_controller.js +131 -0
  264. package/dist/src/controller/debug_controller.d.ts +19 -10
  265. package/dist/src/controller/debug_controller.d.ts.map +1 -1
  266. package/dist/src/controller/debug_controller.js +118 -101
  267. package/dist/src/core/theme.d.ts +42 -0
  268. package/dist/src/core/theme.d.ts.map +1 -0
  269. package/dist/src/core/theme.js +115 -0
  270. package/dist/src/dashboard/chart_aggregator.d.ts.map +1 -1
  271. package/dist/src/dashboard/chart_aggregator.js +3 -2
  272. package/dist/src/dashboard/dashboard_controller.d.ts +10 -14
  273. package/dist/src/dashboard/dashboard_controller.d.ts.map +1 -1
  274. package/dist/src/dashboard/dashboard_controller.js +132 -250
  275. package/dist/src/dashboard/dashboard_store.d.ts +62 -19
  276. package/dist/src/dashboard/dashboard_store.d.ts.map +1 -1
  277. package/dist/src/dashboard/dashboard_store.js +242 -53
  278. package/dist/src/dashboard/integrations/cache_inspector.d.ts +19 -1
  279. package/dist/src/dashboard/integrations/cache_inspector.d.ts.map +1 -1
  280. package/dist/src/dashboard/integrations/config_inspector.d.ts +1 -1
  281. package/dist/src/dashboard/integrations/config_inspector.d.ts.map +1 -1
  282. package/dist/src/dashboard/integrations/config_inspector.js +3 -2
  283. package/dist/src/dashboard/integrations/queue_inspector.d.ts +55 -10
  284. package/dist/src/dashboard/integrations/queue_inspector.d.ts.map +1 -1
  285. package/dist/src/dashboard/integrations/queue_inspector.js +70 -24
  286. package/dist/src/dashboard/migrator.d.ts +5 -0
  287. package/dist/src/dashboard/migrator.d.ts.map +1 -1
  288. package/dist/src/dashboard/migrator.js +44 -9
  289. package/dist/src/dashboard/models/stats_event.d.ts +1 -1
  290. package/dist/src/dashboard/models/stats_event.d.ts.map +1 -1
  291. package/dist/src/dashboard/models/stats_log.d.ts +1 -1
  292. package/dist/src/dashboard/models/stats_log.d.ts.map +1 -1
  293. package/dist/src/dashboard/models/stats_query.d.ts +1 -1
  294. package/dist/src/dashboard/models/stats_query.d.ts.map +1 -1
  295. package/dist/src/dashboard/models/stats_saved_filter.d.ts +1 -1
  296. package/dist/src/dashboard/models/stats_saved_filter.d.ts.map +1 -1
  297. package/dist/src/dashboard/models/stats_trace.d.ts +2 -1
  298. package/dist/src/dashboard/models/stats_trace.d.ts.map +1 -1
  299. package/dist/src/data/data_access.d.ts +105 -0
  300. package/dist/src/data/data_access.d.ts.map +1 -0
  301. package/dist/src/data/data_access.js +310 -0
  302. package/dist/src/data/index.d.ts +3 -0
  303. package/dist/src/data/index.d.ts.map +1 -0
  304. package/dist/src/data/index.js +1 -0
  305. package/dist/src/debug/debug_store.d.ts +20 -1
  306. package/dist/src/debug/debug_store.d.ts.map +1 -1
  307. package/dist/src/debug/debug_store.js +43 -15
  308. package/dist/src/debug/email_collector.d.ts +6 -2
  309. package/dist/src/debug/email_collector.d.ts.map +1 -1
  310. package/dist/src/debug/email_collector.js +3 -0
  311. package/dist/src/debug/event_collector.d.ts +6 -2
  312. package/dist/src/debug/event_collector.d.ts.map +1 -1
  313. package/dist/src/debug/event_collector.js +12 -8
  314. package/dist/src/debug/query_collector.d.ts +6 -2
  315. package/dist/src/debug/query_collector.d.ts.map +1 -1
  316. package/dist/src/debug/query_collector.js +3 -0
  317. package/dist/src/debug/ring_buffer.d.ts +1 -0
  318. package/dist/src/debug/ring_buffer.d.ts.map +1 -1
  319. package/dist/src/debug/ring_buffer.js +5 -2
  320. package/dist/src/debug/route_inspector.d.ts +2 -2
  321. package/dist/src/debug/route_inspector.d.ts.map +1 -1
  322. package/dist/src/debug/route_inspector.js +4 -3
  323. package/dist/src/debug/trace_collector.d.ts +7 -3
  324. package/dist/src/debug/trace_collector.d.ts.map +1 -1
  325. package/dist/src/debug/trace_collector.js +7 -5
  326. package/dist/src/debug/types.d.ts +107 -2
  327. package/dist/src/debug/types.d.ts.map +1 -1
  328. package/dist/src/debug/types.js +1 -1
  329. package/dist/src/define_config.d.ts +49 -5
  330. package/dist/src/define_config.d.ts.map +1 -1
  331. package/dist/src/define_config.js +361 -4
  332. package/dist/src/edge/bootstrap.d.ts +17 -0
  333. package/dist/src/edge/bootstrap.d.ts.map +1 -0
  334. package/dist/src/edge/bootstrap.js +29 -0
  335. package/dist/src/edge/client/dashboard.js +2 -3619
  336. package/dist/src/edge/client/debug-panel-deferred.js +1 -0
  337. package/dist/src/edge/client/debug-panel.js +1 -2140
  338. package/dist/src/edge/client/stats-bar.js +1 -801
  339. package/dist/src/edge/client-vue/dashboard.js +5 -0
  340. package/dist/src/edge/client-vue/debug-panel-deferred.js +4 -0
  341. package/dist/src/edge/client-vue/debug-panel.js +4 -0
  342. package/dist/src/edge/client-vue/stats-bar.js +4 -0
  343. package/dist/src/edge/plugin.d.ts +35 -2
  344. package/dist/src/edge/plugin.d.ts.map +1 -1
  345. package/dist/src/edge/plugin.js +30 -66
  346. package/dist/src/edge/types.d.ts +46 -0
  347. package/dist/src/edge/types.d.ts.map +1 -0
  348. package/dist/src/edge/types.js +4 -0
  349. package/dist/src/edge/views/dashboard.edge +1 -358
  350. package/dist/src/edge/views/debug-panel.edge +2 -154
  351. package/dist/src/edge/views/stats-bar.edge +15 -48
  352. package/dist/src/engine/stats_engine.d.ts +18 -0
  353. package/dist/src/engine/stats_engine.d.ts.map +1 -1
  354. package/dist/src/engine/stats_engine.js +45 -2
  355. package/dist/src/index.d.ts +1 -1
  356. package/dist/src/index.d.ts.map +1 -1
  357. package/dist/src/log_stream/log_stream_provider.d.ts.map +1 -1
  358. package/dist/src/log_stream/log_stream_provider.js +21 -4
  359. package/dist/src/log_stream/log_stream_service.d.ts +8 -1
  360. package/dist/src/log_stream/log_stream_service.d.ts.map +1 -1
  361. package/dist/src/log_stream/log_stream_service.js +27 -3
  362. package/dist/src/middleware/request_tracking_middleware.d.ts +1 -1
  363. package/dist/src/middleware/request_tracking_middleware.d.ts.map +1 -1
  364. package/dist/src/middleware/request_tracking_middleware.js +21 -6
  365. package/dist/src/prometheus/prometheus_collector.d.ts +2 -1
  366. package/dist/src/prometheus/prometheus_collector.d.ts.map +1 -1
  367. package/dist/src/provider/server_stats_provider.d.ts +100 -0
  368. package/dist/src/provider/server_stats_provider.d.ts.map +1 -1
  369. package/dist/src/provider/server_stats_provider.js +460 -104
  370. package/dist/src/routes/access_middleware.d.ts +2 -1
  371. package/dist/src/routes/access_middleware.d.ts.map +1 -1
  372. package/dist/src/routes/access_middleware.js +7 -1
  373. package/dist/src/routes/index.d.ts +4 -0
  374. package/dist/src/routes/index.d.ts.map +1 -0
  375. package/dist/src/routes/index.js +1 -0
  376. package/dist/src/routes/register_routes.d.ts +103 -0
  377. package/dist/src/routes/register_routes.d.ts.map +1 -0
  378. package/dist/src/routes/register_routes.js +356 -0
  379. package/dist/src/routes/router_types.d.ts +29 -0
  380. package/dist/src/routes/router_types.d.ts.map +1 -0
  381. package/dist/src/routes/router_types.js +1 -0
  382. package/dist/src/stubs/config.stub +12 -32
  383. package/dist/src/styles/components.css +1048 -0
  384. package/dist/src/{edge/client → styles}/dashboard.css +299 -736
  385. package/dist/src/{edge/client → styles}/debug-panel.css +117 -633
  386. package/dist/src/{edge/client → styles}/stats-bar.css +28 -10
  387. package/dist/src/styles/tokens.css +153 -0
  388. package/dist/src/styles/utilities.css +75 -0
  389. package/dist/src/types.d.ts +119 -16
  390. package/dist/src/types.d.ts.map +1 -1
  391. package/dist/src/utils/app_import.d.ts +23 -0
  392. package/dist/src/utils/app_import.d.ts.map +1 -0
  393. package/dist/src/utils/app_import.js +44 -0
  394. package/dist/src/utils/json_helpers.d.ts +2 -2
  395. package/dist/src/utils/json_helpers.d.ts.map +1 -1
  396. package/dist/src/utils/logger.d.ts +17 -0
  397. package/dist/src/utils/logger.d.ts.map +1 -0
  398. package/dist/src/utils/logger.js +27 -0
  399. package/dist/src/utils/mail_helpers.d.ts +1 -1
  400. package/dist/src/utils/mail_helpers.d.ts.map +1 -1
  401. package/dist/src/utils/mail_helpers.js +1 -1
  402. package/dist/vue/CacheSection-C788Yfai.js +149 -0
  403. package/dist/vue/CacheTab-BPisYYiQ.js +104 -0
  404. package/dist/vue/ConfigSection-CRzYxqW2.js +576 -0
  405. package/dist/vue/ConfigTab-C8cafGUj.js +361 -0
  406. package/dist/vue/CustomPaneTab-BJxT5Dp7.js +172 -0
  407. package/dist/vue/EmailsSection-C8JFMtW7.js +206 -0
  408. package/dist/vue/EmailsTab-DhFhoNmU.js +157 -0
  409. package/dist/vue/EventsSection-C4wXUgxG.js +107 -0
  410. package/dist/vue/EventsTab-DQ4Nd6AK.js +97 -0
  411. package/dist/vue/FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js +62 -0
  412. package/dist/vue/InternalsSection-BJUXE-5F.js +468 -0
  413. package/dist/vue/InternalsTab-DEMjqtlw.js +471 -0
  414. package/dist/vue/JobsSection-CsKWTjgN.js +187 -0
  415. package/dist/vue/JobsTab-BCvhOARO.js +117 -0
  416. package/dist/vue/JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js +67 -0
  417. package/dist/vue/LogsSection-BFVjSZ24.js +227 -0
  418. package/dist/vue/LogsTab-DpEQ7euu.js +122 -0
  419. package/dist/vue/OverviewSection-CbMdAido.js +849 -0
  420. package/dist/vue/PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js +50 -0
  421. package/dist/vue/QueriesSection-BPiv7u3r.js +429 -0
  422. package/dist/vue/QueriesTab-C8_7oprC.js +107 -0
  423. package/dist/vue/RequestsSection-LtImH4rD.js +243 -0
  424. package/dist/vue/RoutesSection-CrxOxmzx.js +106 -0
  425. package/dist/vue/RoutesTab-Dz0MkZuF.js +80 -0
  426. package/dist/vue/TimelineSection-DLxMW2J_.js +186 -0
  427. package/dist/vue/TimelineTab-Db6lKKsD.js +250 -0
  428. package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +118 -0
  429. package/dist/vue/components/Dashboard/DashboardPage.vue.d.ts +18 -0
  430. package/dist/vue/components/Dashboard/DashboardPage.vue.d.ts.map +1 -0
  431. package/dist/vue/components/Dashboard/sections/CacheSection.vue.d.ts +5 -0
  432. package/dist/vue/components/Dashboard/sections/CacheSection.vue.d.ts.map +1 -0
  433. package/dist/vue/components/Dashboard/sections/ConfigSection.vue.d.ts +3 -0
  434. package/dist/vue/components/Dashboard/sections/ConfigSection.vue.d.ts.map +1 -0
  435. package/dist/vue/components/Dashboard/sections/EmailsSection.vue.d.ts +5 -0
  436. package/dist/vue/components/Dashboard/sections/EmailsSection.vue.d.ts.map +1 -0
  437. package/dist/vue/components/Dashboard/sections/EventsSection.vue.d.ts +5 -0
  438. package/dist/vue/components/Dashboard/sections/EventsSection.vue.d.ts.map +1 -0
  439. package/dist/vue/components/Dashboard/sections/InternalsSection.vue.d.ts +3 -0
  440. package/dist/vue/components/Dashboard/sections/InternalsSection.vue.d.ts.map +1 -0
  441. package/dist/vue/components/Dashboard/sections/JobsSection.vue.d.ts +5 -0
  442. package/dist/vue/components/Dashboard/sections/JobsSection.vue.d.ts.map +1 -0
  443. package/dist/vue/components/Dashboard/sections/LogsSection.vue.d.ts +3 -0
  444. package/dist/vue/components/Dashboard/sections/LogsSection.vue.d.ts.map +1 -0
  445. package/dist/vue/components/Dashboard/sections/OverviewSection.vue.d.ts +5 -0
  446. package/dist/vue/components/Dashboard/sections/OverviewSection.vue.d.ts.map +1 -0
  447. package/dist/vue/components/Dashboard/sections/QueriesSection.vue.d.ts +45 -0
  448. package/dist/vue/components/Dashboard/sections/QueriesSection.vue.d.ts.map +1 -0
  449. package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +5 -0
  450. package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts.map +1 -0
  451. package/dist/vue/components/Dashboard/sections/RoutesSection.vue.d.ts +5 -0
  452. package/dist/vue/components/Dashboard/sections/RoutesSection.vue.d.ts.map +1 -0
  453. package/dist/vue/components/Dashboard/sections/TimelineSection.vue.d.ts +11 -0
  454. package/dist/vue/components/Dashboard/sections/TimelineSection.vue.d.ts.map +1 -0
  455. package/dist/vue/components/Dashboard/shared/FilterBar.vue.d.ts +29 -0
  456. package/dist/vue/components/Dashboard/shared/FilterBar.vue.d.ts.map +1 -0
  457. package/dist/vue/components/Dashboard/shared/PaginationControls.vue.d.ts +12 -0
  458. package/dist/vue/components/Dashboard/shared/PaginationControls.vue.d.ts.map +1 -0
  459. package/dist/vue/components/Dashboard/shared/TimeRangeSelector.vue.d.ts +11 -0
  460. package/dist/vue/components/Dashboard/shared/TimeRangeSelector.vue.d.ts.map +1 -0
  461. package/dist/vue/components/Dashboard/shared/WaterfallChart.vue.d.ts +10 -0
  462. package/dist/vue/components/Dashboard/shared/WaterfallChart.vue.d.ts.map +1 -0
  463. package/dist/vue/components/DebugPanel/DebugPanel.vue.d.ts +21 -0
  464. package/dist/vue/components/DebugPanel/DebugPanel.vue.d.ts.map +1 -0
  465. package/dist/vue/components/DebugPanel/tabs/CacheTab.vue.d.ts +12 -0
  466. package/dist/vue/components/DebugPanel/tabs/CacheTab.vue.d.ts.map +1 -0
  467. package/dist/vue/components/DebugPanel/tabs/ConfigTab.vue.d.ts +11 -0
  468. package/dist/vue/components/DebugPanel/tabs/ConfigTab.vue.d.ts.map +1 -0
  469. package/dist/vue/components/DebugPanel/tabs/CustomPaneTab.vue.d.ts +11 -0
  470. package/dist/vue/components/DebugPanel/tabs/CustomPaneTab.vue.d.ts.map +1 -0
  471. package/dist/vue/components/DebugPanel/tabs/EmailsTab.vue.d.ts +12 -0
  472. package/dist/vue/components/DebugPanel/tabs/EmailsTab.vue.d.ts.map +1 -0
  473. package/dist/vue/components/DebugPanel/tabs/EventsTab.vue.d.ts +12 -0
  474. package/dist/vue/components/DebugPanel/tabs/EventsTab.vue.d.ts.map +1 -0
  475. package/dist/vue/components/DebugPanel/tabs/InternalsTab.vue.d.ts +11 -0
  476. package/dist/vue/components/DebugPanel/tabs/InternalsTab.vue.d.ts.map +1 -0
  477. package/dist/vue/components/DebugPanel/tabs/JobsTab.vue.d.ts +13 -0
  478. package/dist/vue/components/DebugPanel/tabs/JobsTab.vue.d.ts.map +1 -0
  479. package/dist/vue/components/DebugPanel/tabs/LogsTab.vue.d.ts +15 -0
  480. package/dist/vue/components/DebugPanel/tabs/LogsTab.vue.d.ts.map +1 -0
  481. package/dist/vue/components/DebugPanel/tabs/QueriesTab.vue.d.ts +12 -0
  482. package/dist/vue/components/DebugPanel/tabs/QueriesTab.vue.d.ts.map +1 -0
  483. package/dist/vue/components/DebugPanel/tabs/RoutesTab.vue.d.ts +12 -0
  484. package/dist/vue/components/DebugPanel/tabs/RoutesTab.vue.d.ts.map +1 -0
  485. package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +15 -0
  486. package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts.map +1 -0
  487. package/dist/vue/components/StatsBar/MetricCard.vue.d.ts +19 -0
  488. package/dist/vue/components/StatsBar/MetricCard.vue.d.ts.map +1 -0
  489. package/dist/vue/components/StatsBar/Sparkline.vue.d.ts +17 -0
  490. package/dist/vue/components/StatsBar/Sparkline.vue.d.ts.map +1 -0
  491. package/dist/vue/components/StatsBar/StatsBar.vue.d.ts +22 -0
  492. package/dist/vue/components/StatsBar/StatsBar.vue.d.ts.map +1 -0
  493. package/dist/vue/components/shared/JsonViewer.vue.d.ts +13 -0
  494. package/dist/vue/components/shared/JsonViewer.vue.d.ts.map +1 -0
  495. package/dist/vue/components/shared/ThemeToggle.vue.d.ts +8 -0
  496. package/dist/vue/components/shared/ThemeToggle.vue.d.ts.map +1 -0
  497. package/dist/vue/composables/useApiClient.d.ts +9 -0
  498. package/dist/vue/composables/useApiClient.d.ts.map +1 -0
  499. package/dist/vue/composables/useDashboardData.d.ts +53 -0
  500. package/dist/vue/composables/useDashboardData.d.ts.map +1 -0
  501. package/dist/vue/composables/useDebugData.d.ts +25 -0
  502. package/dist/vue/composables/useDebugData.d.ts.map +1 -0
  503. package/dist/vue/composables/useFeatures.d.ts +80 -0
  504. package/dist/vue/composables/useFeatures.d.ts.map +1 -0
  505. package/dist/vue/composables/useResizableTable.d.ts +16 -0
  506. package/dist/vue/composables/useResizableTable.d.ts.map +1 -0
  507. package/dist/vue/composables/useServerStats.d.ts +104 -0
  508. package/dist/vue/composables/useServerStats.d.ts.map +1 -0
  509. package/dist/vue/composables/useTheme.d.ts +6 -0
  510. package/dist/vue/composables/useTheme.d.ts.map +1 -0
  511. package/dist/vue/index-qCQpBftQ.js +1233 -0
  512. package/dist/vue/index.d.ts +10 -0
  513. package/dist/vue/index.d.ts.map +1 -0
  514. package/dist/vue/index.js +11 -0
  515. package/dist/vue/style.css +1 -0
  516. package/dist/vue/useApiClient-BQQ9CF-q.js +10 -0
  517. package/dist/vue/useResizableTable-BoivAevK.js +17 -0
  518. package/package.json +72 -10
  519. package/dist/src/dashboard/dashboard_routes.d.ts +0 -16
  520. package/dist/src/dashboard/dashboard_routes.d.ts.map +0 -1
  521. package/dist/src/dashboard/dashboard_routes.js +0 -77
  522. package/dist/src/routes/debug_routes.d.ts +0 -14
  523. package/dist/src/routes/debug_routes.d.ts.map +0 -1
  524. package/dist/src/routes/debug_routes.js +0 -42
  525. package/dist/src/routes/stats_routes.d.ts +0 -14
  526. package/dist/src/routes/stats_routes.d.ts.map +0 -1
  527. 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
+ };