adonisjs-server-stats 1.8.0 → 1.9.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 (55) hide show
  1. package/dist/core/log-utils.d.ts +14 -0
  2. package/dist/react/{CacheSection-D5J5moz7.js → CacheSection-xH75hwXu.js} +1 -1
  3. package/dist/react/{CacheTab-F1MkWSZl.js → CacheTab-DYmsZJJ1.js} +1 -1
  4. package/dist/react/{ConfigSection-DerLBu4o.js → ConfigSection-D8BO1Ry9.js} +1 -1
  5. package/dist/react/{ConfigTab-Bsj7v9JW.js → ConfigTab-CcN-tfjv.js} +1 -1
  6. package/dist/react/{CustomPaneTab-gzdtDEvz.js → CustomPaneTab-D7_o3Ec6.js} +1 -1
  7. package/dist/react/{EmailsSection-ndH3cvJk.js → EmailsSection-BzlsTdPs.js} +1 -1
  8. package/dist/react/{EmailsTab-DVPHRx0L.js → EmailsTab-Uh2CQY3o.js} +1 -1
  9. package/dist/react/{EventsSection-ClIByDSk.js → EventsSection-CGQWiIdV.js} +1 -1
  10. package/dist/react/{EventsTab-CCzWEKrk.js → EventsTab-CC6DQzEm.js} +1 -1
  11. package/dist/react/{JobsSection-CVMyAs7O.js → JobsSection-D7AHQmZi.js} +1 -1
  12. package/dist/react/{JobsTab-CATUyb9V.js → JobsTab-B3Lfdqed.js} +1 -1
  13. package/dist/react/LogsSection-Cly1dpvS.js +227 -0
  14. package/dist/react/LogsTab-BbYK-iyh.js +103 -0
  15. package/dist/react/{OverviewSection-ae5AO2RG.js → OverviewSection-CkBGFEWq.js} +1 -1
  16. package/dist/react/{QueriesSection-DFFr9Tbb.js → QueriesSection-CfCpnNUD.js} +1 -1
  17. package/dist/react/{QueriesTab-GrHRAREt.js → QueriesTab-DbBmAqzO.js} +1 -1
  18. package/dist/react/{RequestsSection-DtwnJOnM.js → RequestsSection-Cb5a6MlT.js} +1 -1
  19. package/dist/react/{RoutesSection-F7nANhF0.js → RoutesSection-CRqF-cNM.js} +1 -1
  20. package/dist/react/{RoutesTab-rugjhCPH.js → RoutesTab-Bwreij3e.js} +1 -1
  21. package/dist/react/{TimelineSection-F5ThmTdy.js → TimelineSection-B2y06kRE.js} +1 -1
  22. package/dist/react/{TimelineTab-Dvpf-I5C.js → TimelineTab-6hthfdBB.js} +1 -1
  23. package/dist/react/{index-DDzo1bZk.js → index-CecA4IdQ.js} +394 -393
  24. package/dist/react/index.js +1 -1
  25. package/dist/react/react/components/shared/JsonViewer.d.ts +2 -1
  26. package/dist/react/style.css +1 -1
  27. package/dist/src/edge/client/dashboard.js +2 -2
  28. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  29. package/dist/src/edge/client-vue/dashboard.js +4 -4
  30. package/dist/src/edge/client-vue/debug-panel-deferred.js +3 -3
  31. package/dist/src/styles/components.css +81 -0
  32. package/dist/vue/{CacheSection-DDvJ7bs2.js → CacheSection-Cx-hj09X.js} +2 -2
  33. package/dist/vue/{ConfigSection-GTCrvsPr.js → ConfigSection-CMXyryf6.js} +1 -1
  34. package/dist/vue/{EmailsSection-Ct5vsLCc.js → EmailsSection-DgKl9xGT.js} +1 -1
  35. package/dist/vue/{EventsSection-CRVhtagq.js → EventsSection-BNMCAim1.js} +2 -2
  36. package/dist/vue/{EventsTab-DQ4Nd6AK.js → EventsTab-BBM7olXF.js} +1 -1
  37. package/dist/vue/{JobsSection-B_wH2Co7.js → JobsSection-CCMgMlxd.js} +2 -2
  38. package/dist/vue/{JobsTab-BCvhOARO.js → JobsTab-WFnxPdN7.js} +1 -1
  39. package/dist/vue/{JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js → JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js} +25 -23
  40. package/dist/vue/LogsSection-CvOnTxUu.js +252 -0
  41. package/dist/vue/LogsTab-Bg3o0Mm6.js +147 -0
  42. package/dist/vue/{OverviewSection-BqSwuMKH.js → OverviewSection-CHgaKtUR.js} +1 -1
  43. package/dist/vue/{QueriesSection-D4Fs0YH6.js → QueriesSection-BnHRD98z.js} +1 -1
  44. package/dist/vue/{RequestsSection-B0A5SKcM.js → RequestsSection-B-uSlM0f.js} +1 -1
  45. package/dist/vue/{RoutesSection-Ys5dTzvF.js → RoutesSection-BrceOcKQ.js} +1 -1
  46. package/dist/vue/{TimelineSection-D38iHB08.js → TimelineSection-CfvnA2Oo.js} +1 -1
  47. package/dist/vue/components/shared/JsonViewer.vue.d.ts +3 -0
  48. package/dist/vue/{index-Bj6pm5g3.js → index-oLxS08vN.js} +2 -2
  49. package/dist/vue/index.js +1 -1
  50. package/dist/vue/style.css +1 -1
  51. package/package.json +1 -1
  52. package/dist/react/LogsSection-hAsLaKOC.js +0 -212
  53. package/dist/react/LogsTab-QouH4NPQ.js +0 -88
  54. package/dist/vue/LogsSection-C4NRFOpA.js +0 -227
  55. package/dist/vue/LogsTab-DpEQ7euu.js +0 -122
@@ -522,6 +522,87 @@
522
522
  word-break: break-word;
523
523
  }
524
524
 
525
+ /* Expandable log row */
526
+ .ss-log-entry-expandable,
527
+ .ss-dash-log-entry-expandable,
528
+ .ss-dbg-log-entry-expandable {
529
+ cursor: pointer;
530
+ }
531
+ .ss-log-entry-expandable:hover,
532
+ .ss-dash-log-entry-expandable:hover,
533
+ .ss-dbg-log-entry-expandable:hover {
534
+ background: var(--ss-surface-alt);
535
+ }
536
+ .ss-log-expand-icon,
537
+ .ss-dash-log-expand-icon,
538
+ .ss-dbg-log-expand-icon {
539
+ flex-shrink: 0;
540
+ font-size: 10px;
541
+ color: var(--ss-dim);
542
+ width: 14px;
543
+ text-align: center;
544
+ transition: transform 0.15s ease;
545
+ user-select: none;
546
+ }
547
+ .ss-log-expand-icon-open,
548
+ .ss-dash-log-expand-icon-open,
549
+ .ss-dbg-log-expand-icon-open {
550
+ transform: rotate(90deg);
551
+ }
552
+ .ss-log-detail,
553
+ .ss-dash-log-detail,
554
+ .ss-dbg-log-detail {
555
+ padding: 6px var(--ss-log-px, 12px) 10px var(--ss-log-px, 12px);
556
+ border-bottom: 1px solid var(--ss-log-border, var(--ss-input-bg));
557
+ background: var(--ss-surface-alt);
558
+ font-size: 11px;
559
+ }
560
+ .ss-log-detail .ss-dash-data-cell,
561
+ .ss-log-detail .ss-dbg-data-cell,
562
+ .ss-dash-log-detail .ss-dash-data-cell,
563
+ .ss-dbg-log-detail .ss-dbg-data-cell {
564
+ width: 100%;
565
+ max-width: none;
566
+ }
567
+ .ss-log-detail .ss-dash-data-full,
568
+ .ss-log-detail .ss-dbg-data-full,
569
+ .ss-dash-log-detail .ss-dash-data-full,
570
+ .ss-dbg-log-detail .ss-dbg-data-full {
571
+ position: relative;
572
+ margin: 0;
573
+ padding: 8px 12px;
574
+ border-radius: 4px;
575
+ background: var(--ss-bg);
576
+ border: 1px solid var(--ss-border-dim);
577
+ width: 100%;
578
+ box-sizing: border-box;
579
+ cursor: pointer;
580
+ }
581
+ .ss-log-detail .ss-dash-data-full pre,
582
+ .ss-log-detail .ss-dbg-data-full pre,
583
+ .ss-dash-log-detail .ss-dash-data-full pre,
584
+ .ss-dbg-log-detail .ss-dbg-data-full pre {
585
+ margin: 0;
586
+ white-space: pre-wrap;
587
+ word-break: break-all;
588
+ font-size: 11px;
589
+ line-height: 1.5;
590
+ color: var(--ss-text-secondary);
591
+ }
592
+ .ss-log-detail .ss-dash-copy-btn,
593
+ .ss-log-detail .ss-dbg-copy-btn,
594
+ .ss-dash-log-detail .ss-dash-copy-btn,
595
+ .ss-dbg-log-detail .ss-dbg-copy-btn {
596
+ position: absolute;
597
+ top: 4px;
598
+ right: 4px;
599
+ padding: 2px 8px;
600
+ font-size: 10px;
601
+ border: 1px solid var(--ss-border-dim);
602
+ border-radius: 3px;
603
+ background: var(--ss-surface-alt);
604
+ }
605
+
525
606
  /* ── 4. Email preview ────────────────────────────────────────── */
526
607
  /* Dashboard uses 16px padding, debug uses 12px — override via
527
608
  * --ss-email-px on a wrapper. */
@@ -1,9 +1,9 @@
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-Bj6pm5g3.js";
2
+ import { u as H } from "./index-oLxS08vN.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";
6
- import { _ as J } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js";
6
+ import { _ as J } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
7
7
  import { _ as O } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
8
8
  const P = {
9
9
  key: 0,
@@ -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-Bj6pm5g3.js";
2
+ import { u as ue } from "./index-oLxS08vN.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-Bj6pm5g3.js";
3
+ import { u as L } from "./index-oLxS08vN.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,10 +1,10 @@
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-Bj6pm5g3.js";
3
+ import { u as $ } from "./index-oLxS08vN.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";
7
- import { _ as F } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js";
7
+ import { _ as F } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
8
8
  const L = {
9
9
  key: 0,
10
10
  class: "ss-dash-empty"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as _, ref as f, computed as v, openBlock as n, createElementBlock as r, createElementVNode as e, withDirectives as g, vModelText as y, toDisplayString as o, Fragment as k, renderList as w, createTextVNode as x, unref as d, createCommentVNode as T, createVNode as C } from "vue";
2
2
  import { TAB_ICONS as h, formatTime as A, timeAgo as B } from "adonisjs-server-stats/core";
3
3
  import { u as L } from "./useResizableTable-BoivAevK.js";
4
- import { _ as N } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js";
4
+ import { _ as N } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
5
5
  const V = { class: "ss-dbg-search-bar" }, E = { class: "ss-dbg-summary" }, $ = {
6
6
  key: 0,
7
7
  class: "ss-dbg-empty"
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as L, inject as h, ref as p, computed as g, openBlock as o, createElementBlock as d, createElementVNode as s, toDisplayString as n, createCommentVNode as v, createVNode as k, unref as a, withCtx as z, Fragment as _, renderList as x, normalizeClass as w, withModifiers as K, createBlock as M } from "vue";
2
2
  import { extractJobs as O, extractJobStats as Q, JOB_STATUS_FILTERS as W, getJobStatusBadgeColor as q, formatDuration as G, formatTime as H, timeAgo as X } from "adonisjs-server-stats/core";
3
- import { u as Y } from "./index-Bj6pm5g3.js";
3
+ import { u as Y } from "./index-oLxS08vN.js";
4
4
  import { u as Z } from "./useResizableTable-BoivAevK.js";
5
- import { _ as I } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js";
5
+ import { _ as I } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
6
6
  import { _ as j } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
7
7
  import { _ as ss } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
8
8
  const ts = {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as T, ref as j, computed as c, openBlock as l, createElementBlock as o, createElementVNode as s, toDisplayString as a, Fragment as _, renderList as g, unref as i, normalizeClass as m, createVNode as D, createCommentVNode as R } from "vue";
2
2
  import { JOB_STATUS_FILTERS as S, getJobStatusCssClass as x, formatDuration as A, formatTime as J, timeAgo as N } from "adonisjs-server-stats/core";
3
3
  import { u as F } from "./useResizableTable-BoivAevK.js";
4
- import { _ as $ } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js";
4
+ import { _ as $ } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
5
5
  const B = { class: "ss-dbg-job-stats-area" }, E = { class: "ss-dbg-job-stats" }, V = { class: "ss-dbg-job-stat" }, w = { class: "ss-dbg-job-stat-value" }, z = { class: "ss-dbg-job-stat" }, I = { class: "ss-dbg-job-stat-value" }, L = { class: "ss-dbg-job-stat" }, q = { class: "ss-dbg-job-stat-value" }, O = { class: "ss-dbg-job-stat" }, P = { class: "ss-dbg-job-stat-value" }, U = { class: "ss-dbg-job-stat" }, W = { class: "ss-dbg-job-stat-value ss-dbg-c-red" }, G = { class: "ss-dbg-log-filters" }, H = ["onClick"], K = {
6
6
  key: 0,
7
7
  class: "ss-dbg-empty"
@@ -1,14 +1,15 @@
1
- import { defineComponent as y, ref as x, computed as c, openBlock as r, createElementBlock as o, normalizeClass as l, createElementVNode as s, toDisplayString as v, withModifiers as g, createCommentVNode as k } from "vue";
1
+ import { defineComponent as x, ref as k, computed as i, openBlock as t, createElementBlock as n, normalizeClass as l, toDisplayString as c, createCommentVNode as v, createElementVNode as d, withModifiers as g } from "vue";
2
2
  import { compactPreview as p } from "adonisjs-server-stats/core";
3
- const P = /* @__PURE__ */ y({
3
+ const P = /* @__PURE__ */ x({
4
4
  __name: "JsonViewer",
5
5
  props: {
6
6
  value: {},
7
7
  maxLen: {},
8
- classPrefix: { default: "ss-dash" }
8
+ classPrefix: { default: "ss-dash" },
9
+ defaultExpanded: { type: Boolean, default: !1 }
9
10
  },
10
- setup(a) {
11
- const e = a, t = x(!1), f = c(() => {
11
+ setup(r) {
12
+ const e = r, a = k(e.defaultExpanded), f = i(() => {
12
13
  if (e.value === null || e.value === void 0) return "-";
13
14
  if (typeof e.value == "string")
14
15
  try {
@@ -17,7 +18,7 @@ const P = /* @__PURE__ */ y({
17
18
  return e.value.length > 100 ? e.value.slice(0, 100) + "..." : e.value;
18
19
  }
19
20
  return p(e.value, e.maxLen || 100);
20
- }), i = c(() => {
21
+ }), u = i(() => {
21
22
  if (e.value === null || e.value === void 0) return "";
22
23
  if (typeof e.value == "string")
23
24
  try {
@@ -27,38 +28,39 @@ const P = /* @__PURE__ */ y({
27
28
  }
28
29
  return JSON.stringify(e.value, null, 2);
29
30
  });
30
- function n() {
31
- t.value = !t.value;
31
+ function o() {
32
+ a.value = !a.value;
32
33
  }
33
- function d() {
34
- navigator.clipboard?.writeText(i.value);
34
+ function m() {
35
+ navigator.clipboard?.writeText(u.value);
35
36
  }
36
- return (C, u) => a.value === null || a.value === void 0 ? (r(), o("span", {
37
+ return (C, s) => r.value === null || r.value === void 0 ? (t(), n("span", {
37
38
  key: 0,
38
39
  class: l(`ss-dim ${e.classPrefix}-c-dim`)
39
- }, "-", 2)) : (r(), o("div", {
40
+ }, "-", 2)) : (t(), n("div", {
40
41
  key: 1,
41
42
  class: l(`${e.classPrefix}-data-cell`)
42
43
  }, [
43
- s("span", {
44
+ a.value ? v("", !0) : (t(), n("span", {
45
+ key: 0,
44
46
  class: l(`${e.classPrefix}-data-preview`),
45
47
  role: "button",
46
48
  tabindex: 0,
47
- onClick: n,
48
- onKeydown: u[0] || (u[0] = (m) => m.key === "Enter" && n())
49
- }, v(f.value), 35),
50
- t.value ? (r(), o("div", {
51
- key: 0,
49
+ onClick: o,
50
+ onKeydown: s[0] || (s[0] = (y) => y.key === "Enter" && o())
51
+ }, c(f.value), 35)),
52
+ a.value ? (t(), n("div", {
53
+ key: 1,
52
54
  class: l(`${e.classPrefix}-data-full`),
53
- onClick: n
55
+ onClick: o
54
56
  }, [
55
- s("button", {
57
+ d("button", {
56
58
  class: l(`${e.classPrefix}-copy-btn`),
57
59
  title: "Copy to clipboard",
58
- onClick: g(d, ["stop"])
60
+ onClick: g(m, ["stop"])
59
61
  }, " Copy ", 2),
60
- s("pre", null, v(i.value), 1)
61
- ], 2)) : k("", !0)
62
+ d("pre", null, c(u.value), 1)
63
+ ], 2)) : v("", !0)
62
64
  ], 2));
63
65
  }
64
66
  });
@@ -0,0 +1,252 @@
1
+ import { defineComponent as ie, inject as C, ref as u, computed as B, openBlock as a, createElementBlock as o, createVNode as O, unref as s, withCtx as ue, createElementVNode as n, Fragment as q, renderList as x, normalizeClass as $, toDisplayString as i, withKeys as V, createCommentVNode as _, createStaticVNode as re, createTextVNode as w, withModifiers as U, createBlock as de } from "vue";
2
+ import { LOG_LEVELS as ce, getStructuredData as m, getLogLevelCssClass as ve, resolveLogLevel as W, resolveLogTimestamp as F, formatTime as pe, timeAgo as he, resolveLogRequestId as g, resolveLogMessage as _e } from "adonisjs-server-stats/core";
3
+ import { _ as fe } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
4
+ import { u as me } from "./index-oLxS08vN.js";
5
+ import { _ as ge } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
6
+ import { _ as ye } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
7
+ const ke = { class: "ss-dash-log-filters" }, be = ["onClick"], Ce = ["value"], qe = { class: "ss-dash-structured-search" }, $e = ["value"], Fe = ["value"], Le = ["value"], Se = {
8
+ key: 0,
9
+ class: "ss-dash-filter-chips"
10
+ }, Ie = {
11
+ key: 0,
12
+ class: "ss-dash-filter-chip"
13
+ }, xe = {
14
+ key: 1,
15
+ class: "ss-dash-filter-chip"
16
+ }, Ve = ["onClick"], we = {
17
+ key: 1,
18
+ class: "ss-dash-empty"
19
+ }, Ee = {
20
+ key: 2,
21
+ class: "ss-dash-empty"
22
+ }, Ke = {
23
+ key: 3,
24
+ class: "ss-dash-empty"
25
+ }, Ne = {
26
+ key: 4,
27
+ class: "ss-dash-log-entries"
28
+ }, De = ["onClick"], Pe = ["title"], Te = ["title", "onClick", "onKeydown"], Re = {
29
+ key: 1,
30
+ class: "ss-dash-log-reqid-empty"
31
+ }, Ae = {
32
+ key: 3,
33
+ style: { width: "14px" }
34
+ }, Be = { class: "ss-dash-log-msg" }, Oe = {
35
+ key: 0,
36
+ class: "ss-dash-log-detail"
37
+ }, Je = /* @__PURE__ */ ie({
38
+ __name: "LogsSection",
39
+ setup(Ue) {
40
+ const j = C("ss-refresh-key", u(0)), M = C("ss-dashboard-endpoint", "/__stats/api"), z = C("ss-auth-token", void 0), G = C("ss-base-url", ""), {
41
+ data: y,
42
+ loading: H,
43
+ error: J,
44
+ pagination: v,
45
+ filter: Q,
46
+ goToPage: X,
47
+ setSearch: Y,
48
+ setFilter: p,
49
+ refresh: Z
50
+ } = me(() => "logs", {
51
+ baseUrl: G,
52
+ dashboardEndpoint: M,
53
+ authToken: z,
54
+ refreshKey: j
55
+ }), E = u(""), d = u("all"), r = u(""), h = u(""), k = u(null), f = u([]), L = u("level"), S = u("equals"), b = u(""), K = B(() => {
56
+ if (!y.value) return [];
57
+ const t = y.value;
58
+ return t.data || t.logs || y.value || [];
59
+ }), ee = B(
60
+ () => d.value !== "all" || r.value !== "" || f.value.length > 0
61
+ );
62
+ function te(t, l) {
63
+ l && (k.value = k.value === t ? null : t);
64
+ }
65
+ function se(t) {
66
+ E.value = t, Y(t);
67
+ }
68
+ function le(t) {
69
+ d.value = t, t === "all" ? p("level", "") : p("level", t);
70
+ }
71
+ function N(t) {
72
+ r.value = t, h.value = t, p("request_id", t);
73
+ }
74
+ function ae() {
75
+ const t = h.value.trim();
76
+ r.value = t, p("request_id", t);
77
+ }
78
+ function D() {
79
+ r.value = "", h.value = "", p("request_id", "");
80
+ }
81
+ function oe() {
82
+ d.value = "all", p("level", "");
83
+ }
84
+ function P() {
85
+ const t = Q;
86
+ for (const l of Object.keys(t))
87
+ (l.startsWith("filter_field_") || l.startsWith("filter_op_") || l.startsWith("filter_value_")) && delete t[l];
88
+ f.value.forEach((l, e) => {
89
+ t[`filter_field_${e}`] = l.field, t[`filter_op_${e}`] = l.operator, t[`filter_value_${e}`] = l.value;
90
+ }), v.page = 1, Z();
91
+ }
92
+ function T() {
93
+ const t = b.value.trim();
94
+ t && (f.value.push({
95
+ field: L.value,
96
+ operator: S.value,
97
+ value: t
98
+ }), b.value = "", P());
99
+ }
100
+ function ne(t) {
101
+ f.value.splice(t, 1), P();
102
+ }
103
+ function R(t) {
104
+ return t.target.value;
105
+ }
106
+ function A(t) {
107
+ return t.target.value;
108
+ }
109
+ return (t, l) => (a(), o("div", null, [
110
+ O(ge, {
111
+ "model-value": E.value,
112
+ placeholder: "Search logs...",
113
+ summary: `${s(v).total ?? 0} logs`,
114
+ "onUpdate:modelValue": se
115
+ }, {
116
+ default: ue(() => [
117
+ n("div", ke, [
118
+ (a(!0), o(q, null, x(s(ce), (e) => (a(), o("button", {
119
+ key: e,
120
+ type: "button",
121
+ class: $(`ss-dash-log-filter ${d.value === e ? "ss-dash-active" : ""}`),
122
+ onClick: (c) => le(e)
123
+ }, i(e), 11, be))), 128)),
124
+ n("input", {
125
+ type: "text",
126
+ class: "ss-dash-filter-input ss-dash-reqid-input",
127
+ placeholder: "Filter by request ID...",
128
+ value: h.value,
129
+ onInput: l[0] || (l[0] = (e) => h.value = R(e)),
130
+ onKeydown: V(ae, ["enter"])
131
+ }, null, 40, Ce),
132
+ h.value || r.value ? (a(), o("button", {
133
+ key: 0,
134
+ type: "button",
135
+ class: "ss-dash-btn ss-dash-reqid-clear",
136
+ onClick: D
137
+ }, " Clear ")) : _("", !0)
138
+ ])
139
+ ]),
140
+ _: 1
141
+ }, 8, ["model-value", "summary"]),
142
+ n("div", qe, [
143
+ n("select", {
144
+ class: "ss-dash-filter-select",
145
+ value: L.value,
146
+ onChange: l[1] || (l[1] = (e) => L.value = A(e))
147
+ }, [...l[4] || (l[4] = [
148
+ re('<option value="level">level</option><option value="message">message</option><option value="request_id">request_id</option><option value="userId">userId</option><option value="email">email</option><option value="path">path</option>', 6)
149
+ ])], 40, $e),
150
+ n("select", {
151
+ class: "ss-dash-filter-select",
152
+ value: S.value,
153
+ onChange: l[2] || (l[2] = (e) => S.value = A(e))
154
+ }, [...l[5] || (l[5] = [
155
+ n("option", { value: "equals" }, "equals", -1),
156
+ n("option", { value: "contains" }, "contains", -1),
157
+ n("option", { value: "starts_with" }, "starts with", -1)
158
+ ])], 40, Fe),
159
+ n("input", {
160
+ class: "ss-dash-filter-input",
161
+ placeholder: "Value...",
162
+ value: b.value,
163
+ onInput: l[3] || (l[3] = (e) => b.value = R(e)),
164
+ onKeydown: V(T, ["enter"])
165
+ }, null, 40, Le),
166
+ n("button", {
167
+ type: "button",
168
+ class: "ss-dash-btn",
169
+ onClick: T
170
+ }, "Add")
171
+ ]),
172
+ ee.value ? (a(), o("div", Se, [
173
+ d.value !== "all" ? (a(), o("span", Ie, [
174
+ w(" level: " + i(d.value) + " ", 1),
175
+ n("button", {
176
+ type: "button",
177
+ class: "ss-dash-filter-chip-remove",
178
+ onClick: oe
179
+ }, " × ")
180
+ ])) : _("", !0),
181
+ r.value ? (a(), o("span", xe, [
182
+ w(" requestId: " + i(r.value.slice(0, 8)) + "... ", 1),
183
+ n("button", {
184
+ type: "button",
185
+ class: "ss-dash-filter-chip-remove",
186
+ onClick: D
187
+ }, " × ")
188
+ ])) : _("", !0),
189
+ (a(!0), o(q, null, x(f.value, (e, c) => (a(), o("span", {
190
+ key: c,
191
+ class: "ss-dash-filter-chip"
192
+ }, [
193
+ w(i(e.field) + " " + i(e.operator) + ' "' + i(e.value) + '" ', 1),
194
+ n("button", {
195
+ type: "button",
196
+ class: "ss-dash-filter-chip-remove",
197
+ onClick: (I) => ne(c)
198
+ }, " × ", 8, Ve)
199
+ ]))), 128))
200
+ ])) : _("", !0),
201
+ s(J) ? (a(), o("div", we, "Failed to load logs")) : s(H) && !s(y) ? (a(), o("div", Ee, "Loading logs...")) : K.value.length === 0 ? (a(), o("div", Ke, " No log entries" + i(r.value ? ` matching request ${r.value}` : d.value !== "all" ? ` for ${d.value}` : ""), 1)) : (a(), o("div", Ne, [
202
+ (a(!0), o(q, null, x(K.value, (e, c) => (a(), o(q, {
203
+ key: String(e.id || c)
204
+ }, [
205
+ n("div", {
206
+ class: $(["ss-dash-log-entry", { "ss-dash-log-entry-expandable": !!s(m)(e) }]),
207
+ onClick: (I) => te(c, !!s(m)(e))
208
+ }, [
209
+ n("span", {
210
+ class: $(`ss-dash-log-level ${s(ve)(s(W)(e), "ss-dash-log-level")}`)
211
+ }, i(s(W)(e).toUpperCase()), 3),
212
+ n("span", {
213
+ class: "ss-dash-log-time",
214
+ title: s(F)(e) ? s(pe)(s(F)(e)) : ""
215
+ }, i(s(F)(e) ? s(he)(s(F)(e)) : "-"), 9, Pe),
216
+ s(g)(e) ? (a(), o("span", {
217
+ key: 0,
218
+ class: "ss-dash-log-reqid",
219
+ title: s(g)(e),
220
+ role: "button",
221
+ tabindex: "0",
222
+ onClick: U((I) => N(s(g)(e)), ["stop"]),
223
+ onKeydown: V(U((I) => N(s(g)(e)), ["stop"]), ["enter"])
224
+ }, i(s(g)(e).slice(0, 8)), 41, Te)) : (a(), o("span", Re, "--")),
225
+ s(m)(e) ? (a(), o("span", {
226
+ key: 2,
227
+ class: $(["ss-dash-log-expand-icon", { "ss-dash-log-expand-icon-open": k.value === c }])
228
+ }, "▶", 2)) : (a(), o("span", Ae)),
229
+ n("span", Be, i(s(_e)(e)), 1)
230
+ ], 10, De),
231
+ k.value === c && s(m)(e) ? (a(), o("div", Oe, [
232
+ O(fe, {
233
+ value: s(m)(e),
234
+ "class-prefix": "ss-dash",
235
+ "default-expanded": ""
236
+ }, null, 8, ["value"])
237
+ ])) : _("", !0)
238
+ ], 64))), 128))
239
+ ])),
240
+ s(v).totalPages > 1 ? (a(), de(ye, {
241
+ key: 5,
242
+ page: s(v).page,
243
+ "last-page": s(v).totalPages,
244
+ total: s(v).total,
245
+ onPageChange: s(X)
246
+ }, null, 8, ["page", "last-page", "total", "onPageChange"])) : _("", !0)
247
+ ]));
248
+ }
249
+ });
250
+ export {
251
+ Je as default
252
+ };
@@ -0,0 +1,147 @@
1
+ import { defineComponent as D, ref as b, computed as q, openBlock as o, createElementBlock as l, createElementVNode as a, Fragment as k, renderList as B, unref as s, normalizeClass as y, toDisplayString as d, createCommentVNode as x, withDirectives as $, vModelText as I, withKeys as F, withModifiers as L, createVNode as R } from "vue";
2
+ import { filterLogsByLevel as K, resolveLogRequestId as u, resolveLogMessage as T, LOG_LEVELS as P, getStructuredData as v, getLogLevelCssClass as U, resolveLogLevel as A, resolveLogTimestamp as h, formatTime as H, timeAgo as O, TAB_ICONS as V } from "adonisjs-server-stats/core";
3
+ import { _ as j } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
4
+ const z = { class: "ss-dbg-log-filters" }, G = ["onClick"], J = {
5
+ class: "ss-dbg-summary",
6
+ style: { "margin-left": "auto" }
7
+ }, Q = { class: "ss-dbg-search-bar" }, W = { class: "ss-dbg-summary" }, X = {
8
+ key: 0,
9
+ class: "ss-dbg-empty"
10
+ }, Y = ["onClick"], Z = ["title"], ee = ["title", "onClick", "onKeydown"], se = {
11
+ key: 1,
12
+ class: "ss-dbg-log-reqid-empty"
13
+ }, te = {
14
+ key: 3,
15
+ style: { width: "14px" }
16
+ }, ne = { class: "ss-dbg-log-msg" }, oe = ["href"], le = ["viewBox", "innerHTML"], ae = {
17
+ key: 0,
18
+ class: "ss-dbg-log-detail"
19
+ }, ue = /* @__PURE__ */ D({
20
+ __name: "LogsTab",
21
+ props: {
22
+ data: {},
23
+ dashboardPath: {}
24
+ },
25
+ emits: ["filterByRequestId"],
26
+ setup(f, { emit: E }) {
27
+ const C = f, M = E, _ = b("all"), g = b(""), i = b(""), p = b(null), m = q(() => {
28
+ const n = C.data;
29
+ let t = n ? (Array.isArray(n) ? n : n.logs || n.entries) || [] : [];
30
+ if (t = K(t, _.value), i.value.trim()) {
31
+ const e = i.value.trim().toLowerCase();
32
+ t = t.filter((r) => {
33
+ const c = u(r);
34
+ return c && c.toLowerCase().includes(e);
35
+ });
36
+ }
37
+ if (g.value.trim()) {
38
+ const e = g.value.trim().toLowerCase();
39
+ t = t.filter((r) => T(r).toLowerCase().includes(e));
40
+ }
41
+ return t;
42
+ }), N = q(() => {
43
+ const n = C.data, t = n ? (Array.isArray(n) ? n : n.logs || n.entries) || [] : [];
44
+ return `${m.value.length} of ${t.length} entries`;
45
+ });
46
+ function S(n, t) {
47
+ t && (p.value = p.value === n ? null : n);
48
+ }
49
+ function w(n) {
50
+ i.value = n, M("filterByRequestId", n);
51
+ }
52
+ return (n, t) => (o(), l("div", null, [
53
+ a("div", z, [
54
+ (o(!0), l(k, null, B(s(P), (e) => (o(), l("button", {
55
+ key: e,
56
+ type: "button",
57
+ class: y(["ss-dbg-log-filter", { "ss-dbg-active": _.value === e }]),
58
+ onClick: (r) => _.value = e
59
+ }, d(e), 11, G))), 128)),
60
+ i.value ? (o(), l("button", {
61
+ key: 0,
62
+ type: "button",
63
+ class: "ss-dbg-log-filter ss-dbg-active",
64
+ onClick: t[0] || (t[0] = (e) => i.value = "")
65
+ }, " req: " + d(i.value.slice(0, 8)) + " x ", 1)) : x("", !0),
66
+ a("span", J, d(m.value.length) + " entries", 1)
67
+ ]),
68
+ a("div", Q, [
69
+ $(a("input", {
70
+ "onUpdate:modelValue": t[1] || (t[1] = (e) => g.value = e),
71
+ class: "ss-dbg-search",
72
+ placeholder: "Filter log messages...",
73
+ type: "text"
74
+ }, null, 512), [
75
+ [I, g.value]
76
+ ]),
77
+ $(a("input", {
78
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => i.value = e),
79
+ class: "ss-dbg-search ss-dbg-reqid-input",
80
+ placeholder: "Filter by request ID...",
81
+ type: "text"
82
+ }, null, 512), [
83
+ [I, i.value]
84
+ ]),
85
+ a("span", W, d(N.value), 1)
86
+ ]),
87
+ m.value.length === 0 ? (o(), l("div", X, "No log entries")) : (o(!0), l(k, { key: 1 }, B(m.value, (e, r) => (o(), l(k, {
88
+ key: String(e.id || r)
89
+ }, [
90
+ a("div", {
91
+ class: y(["ss-dbg-log-entry", { "ss-dbg-log-entry-expandable": !!s(v)(e) }]),
92
+ onClick: (c) => S(r, !!s(v)(e))
93
+ }, [
94
+ a("span", {
95
+ class: y(["ss-dbg-log-level", s(U)(s(A)(e))])
96
+ }, d(s(A)(e).toUpperCase()), 3),
97
+ a("span", {
98
+ class: "ss-dbg-log-time",
99
+ title: s(h)(e) ? s(H)(s(h)(e)) : ""
100
+ }, d(s(h)(e) ? s(O)(s(h)(e)) : "-"), 9, Z),
101
+ s(u)(e) ? (o(), l("span", {
102
+ key: 0,
103
+ class: "ss-dbg-log-reqid",
104
+ role: "button",
105
+ tabindex: "0",
106
+ title: s(u)(e),
107
+ onClick: L((c) => w(s(u)(e)), ["stop"]),
108
+ onKeydown: F(L((c) => w(s(u)(e)), ["stop"]), ["enter"])
109
+ }, d(s(u)(e).slice(0, 8)), 41, ee)) : (o(), l("span", se, "-")),
110
+ s(v)(e) ? (o(), l("span", {
111
+ key: 2,
112
+ class: y(["ss-dbg-log-expand-icon", { "ss-dbg-log-expand-icon-open": p.value === r }])
113
+ }, "▶", 2)) : (o(), l("span", te)),
114
+ a("span", ne, d(s(T)(e)), 1),
115
+ f.dashboardPath && s(u)(e) ? (o(), l("a", {
116
+ key: 4,
117
+ href: `${f.dashboardPath}#logs?requestId=${s(u)(e)}`,
118
+ target: "_blank",
119
+ class: "ss-dbg-deeplink",
120
+ onClick: t[3] || (t[3] = L(() => {
121
+ }, ["stop"]))
122
+ }, [
123
+ (o(), l("svg", {
124
+ viewBox: s(V)["open-external"].viewBox,
125
+ width: "12",
126
+ height: "12",
127
+ fill: "none",
128
+ stroke: "currentColor",
129
+ "stroke-width": "2",
130
+ innerHTML: s(V)["open-external"].elements.join("")
131
+ }, null, 8, le))
132
+ ], 8, oe)) : x("", !0)
133
+ ], 10, Y),
134
+ p.value === r && s(v)(e) ? (o(), l("div", ae, [
135
+ R(j, {
136
+ value: s(v)(e),
137
+ "class-prefix": "ss-dbg",
138
+ "default-expanded": ""
139
+ }, null, 8, ["value"])
140
+ ])) : x("", !0)
141
+ ], 64))), 128))
142
+ ]));
143
+ }
144
+ });
145
+ export {
146
+ ue as default
147
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as ws, openBlock as o, createElementBlock as n, Fragment as _, renderList as k, createElementVNode as s, normalizeClass as b, toDisplayString as r, inject as P, ref as D, watch as ms, computed as d, onUnmounted as Ws, unref as x, createVNode as F, createCommentVNode as v, normalizeStyle as ts, createTextVNode as gs } from "vue";
2
2
  import { formatDuration as N, formatTime as Os, timeAgo as Hs, durationSeverity as Ks } from "adonisjs-server-stats/core";
3
- import { u as xs, _ as U } from "./index-Bj6pm5g3.js";
3
+ import { u as xs, _ as U } from "./index-oLxS08vN.js";
4
4
  const Gs = { class: "ss-dash-btn-group" }, Xs = ["onClick"], Ys = /* @__PURE__ */ ws({
5
5
  __name: "TimeRangeSelector",
6
6
  props: {