adonisjs-server-stats 1.11.6 → 1.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/core/types-diagnostics.d.ts +2 -0
- package/dist/react/{CacheSection-BYN53kYO.js → CacheSection-DOUnyUrw.js} +1 -1
- package/dist/react/{CacheTab-DOhuK05d.js → CacheTab-D9o6bsPc.js} +1 -1
- package/dist/react/{ConfigSection-B9EHh4Rp.js → ConfigSection-DzNC7pOJ.js} +1 -1
- package/dist/react/{ConfigTab-C8kriE2b.js → ConfigTab-CT-Tu-ct.js} +1 -1
- package/dist/react/{CustomPaneTab-CvzQS_Wh.js → CustomPaneTab-CvIPe7NP.js} +1 -1
- package/dist/react/{EmailsSection-BJyFJf7A.js → EmailsSection-B1LT7Nx3.js} +1 -1
- package/dist/react/{EmailsTab-Ch8jp10B.js → EmailsTab-DKxK322z.js} +1 -1
- package/dist/react/{EventsSection-DJPwHeT8.js → EventsSection-D3AK0mhw.js} +1 -1
- package/dist/react/{EventsTab-B-FoehXC.js → EventsTab-BRRSW6RI.js} +1 -1
- package/dist/react/InternalsContent-BNOnSoi9.js +393 -0
- package/dist/react/{InternalsSection-B6VlVx5f.js → InternalsSection-BwrTfpjA.js} +1 -1
- package/dist/react/{InternalsTab-CkEKpRMU.js → InternalsTab--RD-L1dX.js} +1 -1
- package/dist/react/{JobsSection-DWF4i1t_.js → JobsSection-BMvj5886.js} +1 -1
- package/dist/react/{JobsTab-DqnifQXV.js → JobsTab-CQXWCrl8.js} +1 -1
- package/dist/react/{LogEntryRow-CMMkqA9M.js → LogEntryRow-DFI52ZEw.js} +1 -1
- package/dist/react/{LogsSection-C1xC5aP4.js → LogsSection-CW2hQ976.js} +2 -2
- package/dist/react/{LogsTab-CS4sLfLw.js → LogsTab-CV4Gf_yb.js} +2 -2
- package/dist/react/{OverviewSection-CxvfOR0v.js → OverviewSection-CxF9cabq.js} +1 -1
- package/dist/react/{QueriesSection-CrMdU5Ax.js → QueriesSection-CZJ-imAb.js} +117 -101
- package/dist/react/{QueriesTab-x85PjkyS.js → QueriesTab-CQHa1ck3.js} +23 -14
- package/dist/react/{RequestsSection-DETN9oZb.js → RequestsSection-Cb5YeqvI.js} +2 -2
- package/dist/react/{RoutesSection-CmorkJeC.js → RoutesSection-B43olD9v.js} +1 -1
- package/dist/react/{RoutesTab-CbzBOzpc.js → RoutesTab-RfhCUbkx.js} +1 -1
- package/dist/react/{SplitPaneWrapper-BiIgT4ND.js → SplitPaneWrapper-B05Mg6Sg.js} +1 -1
- package/dist/react/{TimelineTab-Ue9tUD_n.js → TimelineTab-Dx4686Ti.js} +2 -2
- package/dist/react/components/Dashboard/shared/DataTable.d.ts +1 -1
- package/dist/react/{index-DwDK-4oX.js → index-C4EMJrkH.js} +2 -2
- package/dist/react/index.js +1 -1
- package/dist/react/style.css +1 -1
- package/dist/src/collectors/db_pool_collector.js +17 -23
- package/dist/src/edge/client/dashboard.js +2 -2
- package/dist/src/edge/client/debug-panel-deferred.js +1 -1
- package/dist/src/edge/client-vue/dashboard.js +3 -3
- package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
- package/dist/src/provider/diagnostics.d.ts +3 -0
- package/dist/src/provider/diagnostics.js +1 -0
- package/dist/src/provider/server_stats_provider.d.ts +7 -0
- package/dist/src/provider/server_stats_provider.js +36 -0
- package/dist/src/styles/components.css +16 -0
- package/dist/src/styles/dashboard.css +20 -12
- package/dist/vue/{CacheSection-DT2Mwf_s.js → CacheSection-BAotiuQq.js} +1 -1
- package/dist/vue/{ConfigSection-BwKwS9lh.js → ConfigSection-JZjK5E5F.js} +1 -1
- package/dist/vue/{EmailsSection-B65g0FVS.js → EmailsSection-BLwyQO7B.js} +1 -1
- package/dist/vue/{EventsSection-CxqtVF-o.js → EventsSection-BUEwO-0A.js} +1 -1
- package/dist/vue/{InternalsSection-BJUXE-5F.js → InternalsSection-jhTCuK3j.js} +149 -130
- package/dist/vue/{InternalsTab-DEMjqtlw.js → InternalsTab-521fxYYj.js} +152 -133
- package/dist/vue/{JobsSection-rMIyMb-g.js → JobsSection-21A0yQMq.js} +1 -1
- package/dist/vue/{LogsSection-DmmZVJ7D.js → LogsSection-BmOx8SNa.js} +1 -1
- package/dist/vue/{OverviewSection-BMabyqw-.js → OverviewSection-BRDK3Ony.js} +1 -1
- package/dist/vue/QueriesSection-D2WGsuR4.js +444 -0
- package/dist/vue/QueriesTab-6D_xfi7Q.js +114 -0
- package/dist/vue/{RequestsSection-CTu4jPZ_.js → RequestsSection-DLrjCfcE.js} +1 -1
- package/dist/vue/{RoutesSection-zQZDedL7.js → RoutesSection-CPr9w42B.js} +1 -1
- package/dist/vue/{index-CM3yNVUR.js → index-CYaqRGIT.js} +2 -2
- package/dist/vue/index.js +1 -1
- package/dist/vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/react/InternalsContent-O8ino9oM.js +0 -370
- package/dist/vue/QueriesSection-BfDFwGqH.js +0 -428
- package/dist/vue/QueriesTab-DuTG7cpC.js +0 -106
|
@@ -23,6 +23,8 @@ export interface DiagnosticsInput {
|
|
|
23
23
|
hasQueueCollector?: boolean;
|
|
24
24
|
resolvedCollectors?: CollectorRef[];
|
|
25
25
|
config: DiagnosticsConfig | null;
|
|
26
|
+
/** Lucid connections that have debug: true (empty = no query events emitted). */
|
|
27
|
+
lucidDebugConnections?: string[];
|
|
26
28
|
}
|
|
27
29
|
interface DiagnosticsConfig {
|
|
28
30
|
intervalMs: number;
|
|
@@ -130,5 +132,6 @@ export declare function buildDiagnostics(input: DiagnosticsInput): {
|
|
|
130
132
|
slowQueryThresholdMs: number;
|
|
131
133
|
enabled: boolean;
|
|
132
134
|
};
|
|
135
|
+
lucidDebugConnections: string[];
|
|
133
136
|
};
|
|
134
137
|
export {};
|
|
@@ -123,5 +123,6 @@ export function buildDiagnostics(input) {
|
|
|
123
123
|
integrations: buildIntegrationsDiagnostics(input),
|
|
124
124
|
config: buildConfigDiagnostics(input.config),
|
|
125
125
|
devToolbar: buildDevToolbarDiagnostics(input.config),
|
|
126
|
+
lucidDebugConnections: input.lucidDebugConnections ?? [],
|
|
126
127
|
};
|
|
127
128
|
}
|
|
@@ -31,6 +31,7 @@ export default class ServerStatsProvider {
|
|
|
31
31
|
transmitChannels: string[];
|
|
32
32
|
private resolvedConfig;
|
|
33
33
|
private resolvedCollectors;
|
|
34
|
+
private lucidDebugConnections;
|
|
34
35
|
/** Resolves when initStats completes (or rejects). Null if not yet scheduled. */
|
|
35
36
|
private initPromise;
|
|
36
37
|
constructor(app: ApplicationService);
|
|
@@ -49,6 +50,11 @@ export default class ServerStatsProvider {
|
|
|
49
50
|
private setupDevToolbar;
|
|
50
51
|
private setupLogBroadcast;
|
|
51
52
|
private resolve;
|
|
53
|
+
/**
|
|
54
|
+
* Check Lucid database connections for `debug: true` and warn if missing.
|
|
55
|
+
* Without it, Lucid won't emit `db:query` events and no queries will be captured.
|
|
56
|
+
*/
|
|
57
|
+
private checkLucidDebugFlag;
|
|
52
58
|
getDiagnostics(): {
|
|
53
59
|
timers: {
|
|
54
60
|
collectionInterval: {
|
|
@@ -124,6 +130,7 @@ export default class ServerStatsProvider {
|
|
|
124
130
|
slowQueryThresholdMs: number;
|
|
125
131
|
enabled: boolean;
|
|
126
132
|
};
|
|
133
|
+
lucidDebugConnections: string[];
|
|
127
134
|
};
|
|
128
135
|
shutdown(): Promise<void>;
|
|
129
136
|
}
|
|
@@ -33,6 +33,7 @@ export default class ServerStatsProvider {
|
|
|
33
33
|
transmitChannels = [];
|
|
34
34
|
resolvedConfig = null;
|
|
35
35
|
resolvedCollectors = [];
|
|
36
|
+
lucidDebugConnections = [];
|
|
36
37
|
/** Resolves when initStats completes (or rejects). Null if not yet scheduled. */
|
|
37
38
|
initPromise = null;
|
|
38
39
|
constructor(app) {
|
|
@@ -126,6 +127,7 @@ export default class ServerStatsProvider {
|
|
|
126
127
|
const SC = (await import('../controller/server_stats_controller.js')).default;
|
|
127
128
|
this.statsController = new SC(this.engine);
|
|
128
129
|
if (config.devToolbar?.enabled && !this.app.inProduction) {
|
|
130
|
+
this.checkLucidDebugFlag();
|
|
129
131
|
await this.setupDevToolbar(config);
|
|
130
132
|
}
|
|
131
133
|
const iv = await setupStatsIntervalHelper(this.engine, config, container);
|
|
@@ -193,6 +195,39 @@ export default class ServerStatsProvider {
|
|
|
193
195
|
return null;
|
|
194
196
|
}
|
|
195
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Check Lucid database connections for `debug: true` and warn if missing.
|
|
200
|
+
* Without it, Lucid won't emit `db:query` events and no queries will be captured.
|
|
201
|
+
*/
|
|
202
|
+
checkLucidDebugFlag() {
|
|
203
|
+
const dbConfig = this.app.config.get('database');
|
|
204
|
+
if (!dbConfig?.connections)
|
|
205
|
+
return;
|
|
206
|
+
const enabled = [];
|
|
207
|
+
const disabled = [];
|
|
208
|
+
for (const [name, conn] of Object.entries(dbConfig.connections)) {
|
|
209
|
+
if (conn?.debug)
|
|
210
|
+
enabled.push(name);
|
|
211
|
+
else
|
|
212
|
+
disabled.push(name);
|
|
213
|
+
}
|
|
214
|
+
this.lucidDebugConnections = enabled;
|
|
215
|
+
if (enabled.length === 0 && disabled.length > 0) {
|
|
216
|
+
log.block('query capture is disabled — no Lucid connections have debug: true', [
|
|
217
|
+
'',
|
|
218
|
+
dim('Lucid only emits db:query events when debug is enabled on a connection.'),
|
|
219
|
+
dim('Add this to your database connection in config/database.ts:'),
|
|
220
|
+
'',
|
|
221
|
+
` ${disabled[0]}: {`,
|
|
222
|
+
` client: '...',`,
|
|
223
|
+
` debug: true, ${dim('// ← enables query capture')}`,
|
|
224
|
+
` connection: { ... },`,
|
|
225
|
+
` }`,
|
|
226
|
+
'',
|
|
227
|
+
dim(`Connections without debug: ${disabled.join(', ')}`),
|
|
228
|
+
]);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
196
231
|
getDiagnostics() {
|
|
197
232
|
return buildDiagnostics({
|
|
198
233
|
intervalId: this.intervalId,
|
|
@@ -209,6 +244,7 @@ export default class ServerStatsProvider {
|
|
|
209
244
|
hasCacheCollector: this.resolvedCollectors.some((c) => c.name === 'redis'),
|
|
210
245
|
hasQueueCollector: this.resolvedCollectors.some((c) => c.name === 'queue'),
|
|
211
246
|
config: this.resolvedConfig,
|
|
247
|
+
lucidDebugConnections: this.lucidDebugConnections,
|
|
212
248
|
});
|
|
213
249
|
}
|
|
214
250
|
async shutdown() {
|
|
@@ -94,13 +94,29 @@
|
|
|
94
94
|
.ss-dash-empty,
|
|
95
95
|
.ss-dbg-empty {
|
|
96
96
|
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
97
98
|
align-items: center;
|
|
98
99
|
justify-content: center;
|
|
100
|
+
gap: 6px;
|
|
99
101
|
height: 100%;
|
|
100
102
|
min-height: 120px;
|
|
101
103
|
color: var(--ss-dim);
|
|
102
104
|
font-size: 12px;
|
|
103
105
|
}
|
|
106
|
+
.ss-empty-hint {
|
|
107
|
+
font-size: 11px;
|
|
108
|
+
color: var(--ss-dim);
|
|
109
|
+
opacity: 0.7;
|
|
110
|
+
max-width: 420px;
|
|
111
|
+
text-align: center;
|
|
112
|
+
line-height: 1.5;
|
|
113
|
+
}
|
|
114
|
+
.ss-empty-hint code {
|
|
115
|
+
background: var(--ss-surface, rgba(255,255,255,0.06));
|
|
116
|
+
padding: 1px 5px;
|
|
117
|
+
border-radius: 3px;
|
|
118
|
+
font-size: 10px;
|
|
119
|
+
}
|
|
104
120
|
|
|
105
121
|
/* ── Info cards ───────────────────────────────────────────────── */
|
|
106
122
|
.ss-info-cards,
|
|
@@ -4,28 +4,36 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* ── Reset & base ──────────────────────────────────────────────── */
|
|
7
|
-
|
|
8
|
-
#ss-dash
|
|
9
|
-
#ss-dash
|
|
10
|
-
#ss-dash *::
|
|
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;
|
|
@@ -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-
|
|
2
|
+
import { u as H } from "./index-CYaqRGIT.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-
|
|
2
|
+
import { u as ue } from "./index-CYaqRGIT.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-
|
|
3
|
+
import { u as L } from "./index-CYaqRGIT.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-
|
|
3
|
+
import { u as $ } from "./index-CYaqRGIT.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";
|