adonisjs-server-stats 1.11.5 → 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 +19 -6
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.js +550 -468
- 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 +27 -18
- 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
package/README.md
CHANGED
|
@@ -97,6 +97,19 @@ export default defineConfig({
|
|
|
97
97
|
})
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
> **Tip: Enable query capture** -- Lucid only emits `db:query` events when `debug: true` is set on the connection. Without it, the Queries panel will be empty.
|
|
101
|
+
>
|
|
102
|
+
> ```ts
|
|
103
|
+
> // config/database.ts
|
|
104
|
+
> connections: {
|
|
105
|
+
> postgres: {
|
|
106
|
+
> client: 'pg',
|
|
107
|
+
> debug: app.inDev, // ← enables query capture in development
|
|
108
|
+
> connection: { ... },
|
|
109
|
+
> },
|
|
110
|
+
> }
|
|
111
|
+
> ```
|
|
112
|
+
|
|
100
113
|
**Full control** -- override auto-detection with explicit collectors:
|
|
101
114
|
|
|
102
115
|
```ts
|
|
@@ -495,13 +508,13 @@ import { ServerStatsBar, DebugPanel, DashboardPage } from 'adonisjs-server-stats
|
|
|
495
508
|
import 'adonisjs-server-stats/react/css'
|
|
496
509
|
|
|
497
510
|
// Stats bar — drop into your layout
|
|
498
|
-
<ServerStatsBar endpoint="/admin/api/server-stats"
|
|
511
|
+
<ServerStatsBar endpoint="/admin/api/server-stats" pollInterval={3000} />
|
|
499
512
|
|
|
500
513
|
// Debug panel — same layout, add below the stats bar
|
|
501
|
-
<DebugPanel
|
|
514
|
+
<DebugPanel debugEndpoint="/admin/api/debug" />
|
|
502
515
|
|
|
503
516
|
// Dashboard — use as a full Inertia page
|
|
504
|
-
<DashboardPage
|
|
517
|
+
<DashboardPage dashboardEndpoint="/__stats/api" />
|
|
505
518
|
```
|
|
506
519
|
|
|
507
520
|
Available hooks:
|
|
@@ -526,13 +539,13 @@ import 'adonisjs-server-stats/vue/css'
|
|
|
526
539
|
|
|
527
540
|
<template>
|
|
528
541
|
<!-- Stats bar — drop into your layout -->
|
|
529
|
-
<ServerStatsBar endpoint="/admin/api/server-stats" :interval
|
|
542
|
+
<ServerStatsBar endpoint="/admin/api/server-stats" :poll-interval="3000" />
|
|
530
543
|
|
|
531
544
|
<!-- Debug panel -->
|
|
532
|
-
<DebugPanel endpoint="/admin/api/debug" />
|
|
545
|
+
<DebugPanel debug-endpoint="/admin/api/debug" />
|
|
533
546
|
|
|
534
547
|
<!-- Dashboard — use as a full Inertia page -->
|
|
535
|
-
<DashboardPage endpoint="/__stats/api" />
|
|
548
|
+
<DashboardPage dashboard-endpoint="/__stats/api" />
|
|
536
549
|
</template>
|
|
537
550
|
```
|
|
538
551
|
|
package/dist/core/index.d.ts
CHANGED
|
@@ -23,9 +23,10 @@ export { OVERVIEW_REFRESH_MS, SECTION_REFRESH_MS, DEBUG_REFRESH_MS, SLOW_DURATIO
|
|
|
23
23
|
export { TAB_ICONS } from './icons.js';
|
|
24
24
|
export type { TabIconDef } from './icons.js';
|
|
25
25
|
export { initResizableColumns } from './resizable-columns.js';
|
|
26
|
+
export { initSplitPane } from './split-pane.js';
|
|
26
27
|
export { DebugDataController } from './debug-data-controller.js';
|
|
27
28
|
export type { DebugDataControllerConfig, DebugDataControllerCallbacks, } from './debug-data-controller.js';
|
|
28
|
-
export { LOG_LEVELS, resolveLogLevel, resolveLogMessage, resolveLogTimestamp, resolveLogRequestId, getLogLevelCssClass, filterLogsByLevel, } from './log-utils.js';
|
|
29
|
+
export { LOG_LEVELS, resolveLogLevel, resolveLogMessage, resolveLogTimestamp, resolveLogRequestId, getLogLevelCssClass, filterLogsByLevel, getStructuredData, } from './log-utils.js';
|
|
29
30
|
export type { LogEntry } from './log-utils.js';
|
|
30
31
|
export { filterQueries, countDuplicateQueries, computeQuerySummary } from './query-utils.js';
|
|
31
32
|
export type { QuerySummary } from './query-utils.js';
|