adonisjs-server-stats 1.11.6 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +13 -0
  2. package/dist/core/explain-utils.d.ts +77 -0
  3. package/dist/core/index.d.ts +8 -2
  4. package/dist/core/index.js +1089 -877
  5. package/dist/core/queries-columns.d.ts +42 -0
  6. package/dist/core/queries-controller.d.ts +94 -0
  7. package/dist/core/query-utils.d.ts +49 -0
  8. package/dist/core/types-diagnostics.d.ts +2 -0
  9. package/dist/react/{CacheSection-BYN53kYO.js → CacheSection-DZFOiOYH.js} +1 -1
  10. package/dist/react/{CacheTab-DOhuK05d.js → CacheTab-D8js5o69.js} +1 -1
  11. package/dist/react/{ConfigSection-B9EHh4Rp.js → ConfigSection-DoJmvNkF.js} +1 -1
  12. package/dist/react/{ConfigTab-C8kriE2b.js → ConfigTab-CDvljuBF.js} +1 -1
  13. package/dist/react/{CustomPaneTab-CvzQS_Wh.js → CustomPaneTab-Db9eIQ-9.js} +1 -1
  14. package/dist/react/{EmailsSection-BJyFJf7A.js → EmailsSection-D7oxvAjA.js} +1 -1
  15. package/dist/react/{EmailsTab-Ch8jp10B.js → EmailsTab-BITuGTQm.js} +1 -1
  16. package/dist/react/{EventsSection-DJPwHeT8.js → EventsSection-7mDZv70I.js} +1 -1
  17. package/dist/react/{EventsTab-B-FoehXC.js → EventsTab-DF13BChE.js} +1 -1
  18. package/dist/react/InternalsContent-BNOnSoi9.js +393 -0
  19. package/dist/react/{InternalsSection-B6VlVx5f.js → InternalsSection-BwrTfpjA.js} +1 -1
  20. package/dist/react/{InternalsTab-CkEKpRMU.js → InternalsTab--RD-L1dX.js} +1 -1
  21. package/dist/react/{JobsSection-DWF4i1t_.js → JobsSection-B_VJFWy6.js} +1 -1
  22. package/dist/react/{JobsTab-DqnifQXV.js → JobsTab-DK8Fl9nz.js} +1 -1
  23. package/dist/react/{LogEntryRow-CMMkqA9M.js → LogEntryRow-Bdie9SFe.js} +1 -1
  24. package/dist/react/{LogsSection-C1xC5aP4.js → LogsSection-CrWqxWRr.js} +2 -2
  25. package/dist/react/{LogsTab-CS4sLfLw.js → LogsTab-DYSpL637.js} +2 -2
  26. package/dist/react/{OverviewSection-CxvfOR0v.js → OverviewSection-CuaccMZt.js} +1 -1
  27. package/dist/react/QueriesContent-BDIx8zFn.js +288 -0
  28. package/dist/react/QueriesSection-CvGGh5Ij.js +117 -0
  29. package/dist/react/QueriesTab-C7CCwhVc.js +87 -0
  30. package/dist/react/{RequestsSection-DETN9oZb.js → RequestsSection-mENyeNsk.js} +2 -2
  31. package/dist/react/{RoutesSection-CmorkJeC.js → RoutesSection-DjovlaNS.js} +1 -1
  32. package/dist/react/{RoutesTab-CbzBOzpc.js → RoutesTab-CbQECiUc.js} +1 -1
  33. package/dist/react/{SplitPaneWrapper-BiIgT4ND.js → SplitPaneWrapper-DyRyH5Re.js} +1 -1
  34. package/dist/react/{TimelineTab-Ue9tUD_n.js → TimelineTab-BKTFbsPe.js} +2 -2
  35. package/dist/react/components/Dashboard/shared/DataTable.d.ts +1 -1
  36. package/dist/react/components/shared/QueriesContent.d.ts +33 -0
  37. package/dist/react/{index-DwDK-4oX.js → index-CAUHa8QX.js} +2 -2
  38. package/dist/react/index.js +1 -1
  39. package/dist/react/style.css +1 -1
  40. package/dist/src/collectors/db_pool_collector.js +17 -23
  41. package/dist/src/dashboard/query_explain_handler.d.ts +11 -0
  42. package/dist/src/dashboard/query_explain_handler.js +64 -11
  43. package/dist/src/debug/query_collector.d.ts +1 -0
  44. package/dist/src/debug/query_collector.js +3 -0
  45. package/dist/src/edge/client/dashboard.js +2 -2
  46. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  47. package/dist/src/edge/client-vue/dashboard.js +4 -4
  48. package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
  49. package/dist/src/provider/diagnostics.d.ts +3 -0
  50. package/dist/src/provider/diagnostics.js +1 -0
  51. package/dist/src/provider/server_stats_provider.d.ts +7 -0
  52. package/dist/src/provider/server_stats_provider.js +38 -0
  53. package/dist/src/routes/debug_routes.d.ts +4 -0
  54. package/dist/src/routes/debug_routes.js +45 -0
  55. package/dist/src/routes/register_routes.d.ts +4 -0
  56. package/dist/src/routes/register_routes.js +2 -0
  57. package/dist/src/styles/components.css +254 -0
  58. package/dist/src/styles/dashboard.css +26 -185
  59. package/dist/src/styles/debug-panel.css +2 -24
  60. package/dist/vue/{CacheSection-DT2Mwf_s.js → CacheSection-Bx41lpfK.js} +1 -1
  61. package/dist/vue/{ConfigSection-BwKwS9lh.js → ConfigSection-fkfUdCmx.js} +1 -1
  62. package/dist/vue/{EmailsSection-B65g0FVS.js → EmailsSection-CbcDKF9Q.js} +1 -1
  63. package/dist/vue/{EventsSection-CxqtVF-o.js → EventsSection-CWbTYOBi.js} +1 -1
  64. package/dist/vue/{InternalsSection-BJUXE-5F.js → InternalsSection-jhTCuK3j.js} +149 -130
  65. package/dist/vue/{InternalsTab-DEMjqtlw.js → InternalsTab-521fxYYj.js} +152 -133
  66. package/dist/vue/{JobsSection-rMIyMb-g.js → JobsSection-CGGO6rtS.js} +1 -1
  67. package/dist/vue/{LogsSection-DmmZVJ7D.js → LogsSection-BPB-C-XA.js} +1 -1
  68. package/dist/vue/{OverviewSection-BMabyqw-.js → OverviewSection-BTcnPeoM.js} +1 -1
  69. package/dist/vue/QueriesSection-2SE3igQJ.js +411 -0
  70. package/dist/vue/QueriesTab-DO5XwJ--.js +112 -0
  71. package/dist/vue/{RequestsSection-CTu4jPZ_.js → RequestsSection-DXcG5Zok.js} +1 -1
  72. package/dist/vue/{RoutesSection-zQZDedL7.js → RoutesSection-BkNGWdoP.js} +1 -1
  73. package/dist/vue/components/Dashboard/sections/QueriesSection.vue.d.ts +1 -41
  74. package/dist/vue/{index-CM3yNVUR.js → index-CptF6Qbp.js} +2 -2
  75. package/dist/vue/index.js +1 -1
  76. package/dist/vue/style.css +1 -1
  77. package/package.json +1 -1
  78. package/dist/react/InternalsContent-O8ino9oM.js +0 -370
  79. package/dist/react/QueriesSection-CrMdU5Ax.js +0 -458
  80. package/dist/react/QueriesTab-x85PjkyS.js +0 -88
  81. package/dist/vue/QueriesSection-BfDFwGqH.js +0 -428
  82. package/dist/vue/QueriesTab-DuTG7cpC.js +0 -106
@@ -4,28 +4,36 @@
4
4
  */
5
5
 
6
6
  /* ── Reset & base ──────────────────────────────────────────────── */
7
- #ss-dash,
8
- #ss-dash *,
9
- #ss-dash *::before,
10
- #ss-dash *::after {
7
+ /* :where() keeps specificity at (0,0,0) so class selectors can override */
8
+ :where(#ss-dash),
9
+ :where(#ss-dash) *,
10
+ :where(#ss-dash) *::before,
11
+ :where(#ss-dash) *::after {
11
12
  box-sizing: border-box;
12
13
  }
13
14
 
14
- #ss-dash *,
15
- #ss-dash *::before,
16
- #ss-dash *::after {
15
+ :where(#ss-dash) *,
16
+ :where(#ss-dash) *::before,
17
+ :where(#ss-dash) *::after {
17
18
  margin: 0;
18
19
  padding: 0;
19
20
  }
20
21
 
21
- #ss-dash button,
22
- #ss-dash input,
23
- #ss-dash select,
24
- #ss-dash textarea,
25
- #ss-dash pre {
22
+ :where(#ss-dash) button,
23
+ :where(#ss-dash) input,
24
+ :where(#ss-dash) select,
25
+ :where(#ss-dash) textarea,
26
+ :where(#ss-dash) pre {
26
27
  font-family: inherit;
27
28
  }
28
29
 
30
+ /* ── Host page reset (only when dashboard is present) ──────────── */
31
+ html:has(#ss-dash),
32
+ html:has(#ss-dash) body {
33
+ margin: 0;
34
+ padding: 0;
35
+ }
36
+
29
37
  /* ── Page layout ───────────────────────────────────────────────── */
30
38
  #ss-dash {
31
39
  display: flex;
@@ -358,48 +366,12 @@
358
366
  }
359
367
 
360
368
  /* ── Tables ────────────────────────────────────────────────────── */
369
+ /* Table base / table-wrap / sortable / clickable → components.css */
370
+ /* Dashboard overrides: wider cell padding */
361
371
  .ss-dash-table-wrap {
362
372
  --ss-table-cell-px: 12px;
363
373
  --ss-table-cell-py: 7px;
364
374
  --ss-table-td-py: 6px;
365
- flex: 1;
366
- overflow-x: auto;
367
- overflow-y: visible;
368
- margin: 0 -2px;
369
- padding: 0 2px;
370
- scrollbar-width: thin;
371
- scrollbar-color: var(--ss-border) transparent;
372
- }
373
- /* Table base → components.css */
374
- /* Column resize → components.css */
375
- .ss-dash-table th {
376
- z-index: 2;
377
- }
378
- .ss-dash-table td {
379
- max-width: 0;
380
- }
381
- .ss-dash-table tr.ss-dash-explain-row:hover td {
382
- background: var(--ss-surface-alt);
383
- }
384
- .ss-dash-table tr.ss-dash-clickable {
385
- cursor: pointer;
386
- }
387
- .ss-dash-table tr.ss-dash-clickable:hover td {
388
- background: var(--ss-hover-accent);
389
- }
390
-
391
- .ss-dash-sortable {
392
- cursor: pointer;
393
- user-select: none;
394
- }
395
- .ss-dash-sortable:hover {
396
- color: var(--ss-accent);
397
- }
398
-
399
- .ss-dash-sort-arrow {
400
- font-size: 10px;
401
- color: var(--ss-accent);
402
- margin-left: 2px;
403
375
  }
404
376
 
405
377
  .ss-dash-data-cell {
@@ -407,27 +379,7 @@
407
379
  max-width: 300px;
408
380
  }
409
381
 
410
- /* ── Method badges ─────────────────────────────────────────────── */
411
- /* Base + GET/POST/PUT/PATCH/DELETE → components.css */
412
- /* Dashboard-only SQL method variants */
413
- .ss-dash-method-select {
414
- background: var(--ss-green-bg);
415
- color: var(--ss-green-fg);
416
- }
417
- .ss-dash-method-insert {
418
- background: var(--ss-blue-bg);
419
- color: var(--ss-blue-fg);
420
- }
421
- .ss-dash-method-update {
422
- background: var(--ss-amber-bg);
423
- color: var(--ss-amber-fg);
424
- }
425
- .ss-dash-method-head,
426
- .ss-dash-method-options,
427
- .ss-dash-method-raw {
428
- background: var(--ss-surface);
429
- color: var(--ss-dim);
430
- }
382
+ /* ── Method badges components.css ────────────────────────────── */
431
383
 
432
384
  /* Status badges → components.css */
433
385
  /* Badge generic → components.css */
@@ -439,26 +391,7 @@
439
391
 
440
392
  /* Duration → components.css */
441
393
 
442
- /* ── SQL ───────────────────────────────────────────────────────── */
443
- .ss-dash-sql {
444
- font-size: 11px;
445
- color: var(--ss-sql-color);
446
- word-break: break-all;
447
- cursor: pointer;
448
- max-width: 600px;
449
- /* truncation → utilities.css */
450
- display: inline-block;
451
- }
452
- .ss-dash-sql.ss-dash-expanded {
453
- white-space: pre-wrap;
454
- max-width: none;
455
- }
456
-
457
- .ss-dash-dup {
458
- color: var(--ss-purple-fg);
459
- font-size: 10px;
460
- font-weight: 600;
461
- }
394
+ /* ── SQL / Dup → components.css ────────────────────────────────── */
462
395
 
463
396
  /* ── Current route highlight ───────────────────────────────────── */
464
397
  .ss-dash-current-route td {
@@ -512,11 +445,7 @@
512
445
  font-size: 10px;
513
446
  position: relative;
514
447
  }
515
- .ss-dash-event-time {
516
- color: var(--ss-dim);
517
- font-size: 10px;
518
- /* tabular-nums → utilities.css */
519
- }
448
+ /* .ss-dash-event-time → components.css */
520
449
 
521
450
  /* ── Logs ──────────────────────────────────────────────────────── */
522
451
  /* Log entry / level / time / reqid / msg → components.css */
@@ -726,95 +655,7 @@
726
655
  flex-shrink: 0;
727
656
  }
728
657
 
729
- /* ── EXPLAIN panel ─────────────────────────────────────────────── */
730
- .ss-dash-explain-row td {
731
- white-space: normal;
732
- overflow: visible;
733
- max-width: none;
734
- }
735
- .ss-dash-explain {
736
- padding: 12px 16px;
737
- background: var(--ss-surface-alt);
738
- border-top: 1px solid var(--ss-border-dim);
739
- font-size: 11px;
740
- overflow: hidden;
741
- word-break: break-word;
742
- }
743
- .ss-dash-explain-btn {
744
- padding: 2px 8px;
745
- font-size: 9px;
746
- color: var(--ss-purple-fg);
747
- background: var(--ss-purple-bg);
748
- border: none;
749
- border-radius: 3px;
750
- cursor: pointer;
751
- text-transform: uppercase;
752
- letter-spacing: 0.04em;
753
- font-weight: 600;
754
- }
755
- .ss-dash-explain-btn:hover {
756
- opacity: 0.8;
757
- }
758
- .ss-dash-explain-btn-active {
759
- background: var(--ss-purple-fg);
760
- color: #fff;
761
- }
762
- .ss-dash-explain-result {
763
- margin-top: 6px;
764
- font-size: 11px;
765
- color: var(--ss-text-secondary);
766
- }
767
- .ss-dash-explain-error {
768
- color: var(--ss-red-fg);
769
- padding: 8px;
770
- background: var(--ss-red-bg);
771
- border-radius: 4px;
772
- }
773
- .ss-dash-explain-node {
774
- padding: 4px 0;
775
- border-left: 2px solid var(--ss-border-dim);
776
- padding-left: 10px;
777
- margin-top: 2px;
778
- }
779
- .ss-dash-explain-node:first-child {
780
- border-left: 2px solid var(--ss-purple-fg);
781
- }
782
- .ss-dash-explain-node-header {
783
- font-weight: 600;
784
- color: var(--ss-text-primary);
785
- font-size: 11px;
786
- }
787
- .ss-dash-explain-node-type {
788
- color: var(--ss-purple-fg);
789
- font-weight: 700;
790
- }
791
- .ss-dash-explain-metrics {
792
- font-size: 10px;
793
- color: var(--ss-dim);
794
- margin-top: 1px;
795
- font-family: var(--ss-font-mono);
796
- word-break: break-all;
797
- overflow-wrap: break-word;
798
- }
799
- .ss-dash-explain-result table {
800
- width: 100%;
801
- border-collapse: collapse;
802
- margin-top: 4px;
803
- }
804
- .ss-dash-explain-result th {
805
- padding: 3px 8px;
806
- text-align: left;
807
- font-weight: 600;
808
- color: var(--ss-muted);
809
- border-bottom: 1px solid var(--ss-border);
810
- font-size: 9px;
811
- text-transform: uppercase;
812
- }
813
- .ss-dash-explain-result td {
814
- padding: 3px 8px;
815
- border-bottom: 1px solid var(--ss-border-faint);
816
- color: var(--ss-text-secondary);
817
- }
658
+ /* ── EXPLAIN panel components.css ────────────────────────────── */
818
659
 
819
660
  /* ── Overview cards ────────────────────────────────────────────── */
820
661
  .ss-dash-overview {
@@ -272,24 +272,7 @@
272
272
 
273
273
  /* Table base / column resize → components.css */
274
274
 
275
- /* Query-specific styles */
276
- .ss-dbg-sql {
277
- font-size: 11px;
278
- color: var(--ss-sql-color);
279
- word-break: break-all;
280
- cursor: pointer;
281
- max-width: 500px;
282
- /* truncation → utilities.css */
283
- }
284
- .ss-dbg-sql.ss-dbg-expanded {
285
- white-space: pre-wrap;
286
- max-width: none;
287
- }
288
- /* Duration → components.css */
289
- .ss-dbg-dup {
290
- color: var(--ss-purple-fg);
291
- font-size: 10px;
292
- }
275
+ /* Query-specific styles → components.css (sql, dup, explain, etc.) */
293
276
 
294
277
  /* Method badges → components.css */
295
278
 
@@ -309,12 +292,7 @@
309
292
  position: relative;
310
293
  /* truncation → utilities.css */
311
294
  }
312
- .ss-dbg-event-time {
313
- color: var(--ss-dim);
314
- font-size: 10px;
315
- /* tabular-nums → utilities.css */
316
- white-space: nowrap;
317
- }
295
+ /* .ss-dbg-event-time → components.css */
318
296
  .ss-dbg-data-preview {
319
297
  cursor: pointer;
320
298
  color: var(--ss-text-secondary);
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as E, inject as v, ref as h, computed as C, openBlock as a, createElementBlock as l, createElementVNode as e, toDisplayString as c, createCommentVNode as g, createVNode as F, unref as y, Fragment as N, renderList as A, withModifiers as B, createBlock as U } from "vue";
2
- import { u as H } from "./index-CM3yNVUR.js";
2
+ import { u as H } from "./index-CptF6Qbp.js";
3
3
  import { u as M } from "./useResizableTable-BoivAevK.js";
4
4
  import { DashboardApi as j, formatCacheSize as q, formatTtl as I } from "adonisjs-server-stats/core";
5
5
  import { u as G } from "./useApiClient-BQQ9CF-q.js";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as re, inject as m, ref as w, computed as x, openBlock as i, createElementBlock as r, createElementVNode as n, normalizeClass as a, createCommentVNode as b, Fragment as _, toDisplayString as u, unref as c, renderList as A, withModifiers as I, normalizeStyle as R } from "vue";
2
- import { u as ue } from "./index-CM3yNVUR.js";
2
+ import { u as ue } from "./index-CptF6Qbp.js";
3
3
  import { isRedactedValue as d, flattenConfig as z, TAB_ICONS as g, countLeaves as ce, collectTopLevelObjectKeys as pe, copyWithFeedback as de, formatFlatValue as ve } from "adonisjs-server-stats/core";
4
4
  const fe = { style: { position: "relative", flex: 1 } }, he = ["value"], ge = ["title", "onClick"], ye = ["viewBox", "innerHTML"], be = ["viewBox", "innerHTML"], $e = ["onClick"], we = { key: 0 }, xe = ["title", "onClick"], ke = ["viewBox", "innerHTML"], Ce = ["viewBox", "innerHTML"], _e = ["onClick"], Se = { key: 0 }, Be = { style: { padding: "4px 16px", fontSize: "10px", color: "var(--ss-muted)" } }, Le = ["onClick"], He = ["title"], Te = ["title"], je = ["title", "onClick"], Me = ["viewBox", "innerHTML"], me = ["viewBox", "innerHTML"], Ae = ["onClick"], Ie = ["title", "onClick"], Ee = ["viewBox", "innerHTML"], Ve = ["viewBox", "innerHTML"], Oe = {
5
5
  key: 1,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as V, inject as h, ref as f, computed as A, openBlock as o, createElementBlock as i, createElementVNode as e, Fragment as c, createTextVNode as u, toDisplayString as n, createCommentVNode as y, normalizeClass as _, createVNode as F, unref as r, renderList as B, createBlock as D } from "vue";
2
2
  import { formatTime as R, timeAgo as z } from "adonisjs-server-stats/core";
3
- import { u as L } from "./index-CM3yNVUR.js";
3
+ import { u as L } from "./index-CptF6Qbp.js";
4
4
  import { u as M } from "./useResizableTable-BoivAevK.js";
5
5
  import { _ as U } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
6
6
  import { _ as q } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as E, inject as i, ref as p, computed as P, openBlock as s, createElementBlock as l, createVNode as v, unref as a, Fragment as h, createElementVNode as e, renderList as T, toDisplayString as c, createBlock as C, createCommentVNode as D } from "vue";
2
2
  import { formatTime as S, timeAgo as V } from "adonisjs-server-stats/core";
3
- import { u as $ } from "./index-CM3yNVUR.js";
3
+ import { u as $ } from "./index-CptF6Qbp.js";
4
4
  import { u as A } from "./useResizableTable-BoivAevK.js";
5
5
  import { _ as B } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
6
6
  import { _ as R } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";