adonisjs-server-stats 1.10.3 → 1.11.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 (89) hide show
  1. package/dist/core/field-resolvers.d.ts +64 -0
  2. package/dist/core/formatters.d.ts +15 -0
  3. package/dist/core/index.d.ts +1 -1
  4. package/dist/core/index.js +208 -203
  5. package/dist/react/CacheSection-BYN53kYO.js +135 -0
  6. package/dist/react/CacheStatsBar-CRodCOeP.js +27 -0
  7. package/dist/react/CacheTab-DOhuK05d.js +106 -0
  8. package/dist/react/{ConfigSection-DGgqjAal.js → ConfigSection-B9EHh4Rp.js} +1 -1
  9. package/dist/react/{ConfigTab-H3OnYqmK.js → ConfigTab-C8kriE2b.js} +1 -1
  10. package/dist/react/CustomPaneTab-CvzQS_Wh.js +99 -0
  11. package/dist/react/EmailPreviewOverlay-BmXOAvqG.js +58 -0
  12. package/dist/react/EmailsSection-BJyFJf7A.js +226 -0
  13. package/dist/react/EmailsTab-Ch8jp10B.js +110 -0
  14. package/dist/react/{EventsSection-C7RQW_LY.js → EventsSection-DJPwHeT8.js} +27 -26
  15. package/dist/react/EventsTab-B-FoehXC.js +58 -0
  16. package/dist/react/{InternalsContent-DBzsI0CG.js → InternalsContent-O8ino9oM.js} +133 -109
  17. package/dist/react/InternalsSection-B6VlVx5f.js +22 -0
  18. package/dist/react/InternalsTab-CkEKpRMU.js +17 -0
  19. package/dist/react/JobStatsBar-C7RslAFE.js +30 -0
  20. package/dist/react/JobsSection-DWF4i1t_.js +167 -0
  21. package/dist/react/JobsTab-DqnifQXV.js +129 -0
  22. package/dist/react/LogEntryRow-CMMkqA9M.js +43 -0
  23. package/dist/react/LogsSection-C1xC5aP4.js +198 -0
  24. package/dist/react/LogsTab-CS4sLfLw.js +79 -0
  25. package/dist/react/{OverviewSection-ABP9ueBo.js → OverviewSection-CxvfOR0v.js} +70 -80
  26. package/dist/react/QueriesSection-CrMdU5Ax.js +458 -0
  27. package/dist/react/{QueriesTab-BQzcxEiW.js → QueriesTab-x85PjkyS.js} +22 -21
  28. package/dist/react/RequestsSection-DETN9oZb.js +321 -0
  29. package/dist/react/{RoutesSection-BRhxrtjZ.js → RoutesSection-CmorkJeC.js} +1 -1
  30. package/dist/react/{RoutesTab-CpYH5lUw.js → RoutesTab-CbzBOzpc.js} +12 -12
  31. package/dist/react/SplitPaneWrapper-BiIgT4ND.js +49 -0
  32. package/dist/react/TimeAgoCell-o3KigGfM.js +8 -0
  33. package/dist/react/{TimelineTab-DjLR35Ce.js → TimelineTab-Ue9tUD_n.js} +71 -91
  34. package/dist/react/{index-CsImORX6.js → index-DwDK-4oX.js} +4 -4
  35. package/dist/react/index.js +6 -6
  36. package/dist/react/react/components/shared/CacheStatsBar.d.ts +13 -0
  37. package/dist/react/react/components/shared/EmailPreviewOverlay.d.ts +29 -0
  38. package/dist/react/react/components/shared/JobStatsBar.d.ts +12 -0
  39. package/dist/react/react/components/shared/LogEntryRow.d.ts +9 -0
  40. package/dist/react/react/components/shared/RelatedLogs.d.ts +2 -2
  41. package/dist/react/react/components/shared/SplitPaneWrapper.d.ts +7 -0
  42. package/dist/react/react/components/shared/TimeAgoCell.d.ts +17 -0
  43. package/dist/react/react/hooks/useDiagnosticsData.d.ts +14 -0
  44. package/dist/react/style.css +1 -1
  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 +3 -3
  48. package/dist/src/edge/client-vue/debug-panel-deferred.js +4 -4
  49. package/dist/src/styles/components.css +67 -0
  50. package/dist/src/styles/dashboard.css +5 -15
  51. package/dist/src/styles/debug-panel.css +1 -22
  52. package/dist/src/styles/utilities.css +3 -1
  53. package/dist/vue/{CacheSection-ITqvpfH5.js → CacheSection-DT2Mwf_s.js} +1 -1
  54. package/dist/vue/{ConfigSection-DTn3GslE.js → ConfigSection-BwKwS9lh.js} +1 -1
  55. package/dist/vue/CustomPaneTab-Hr1IBHfz.js +172 -0
  56. package/dist/vue/{EmailsSection-DtLJ4XoS.js → EmailsSection-B65g0FVS.js} +1 -1
  57. package/dist/vue/{EventsSection-BOYYz0Ty.js → EventsSection-CxqtVF-o.js} +1 -1
  58. package/dist/vue/{JobsSection-BazTxcJL.js → JobsSection-rMIyMb-g.js} +1 -1
  59. package/dist/vue/{LogsSection-D55PjTKX.js → LogsSection-DmmZVJ7D.js} +1 -1
  60. package/dist/vue/{OverviewSection-1uBKo-Tu.js → OverviewSection-BMabyqw-.js} +49 -50
  61. package/dist/vue/{QueriesSection-rpoZ4ogd.js → QueriesSection-BfDFwGqH.js} +44 -45
  62. package/dist/vue/{QueriesTab-C8_7oprC.js → QueriesTab-DuTG7cpC.js} +30 -31
  63. package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-Py1iu9GU.js +77 -0
  64. package/dist/vue/{RequestsSection-x7LvT0MC.js → RequestsSection-CTu4jPZ_.js} +143 -147
  65. package/dist/vue/{RoutesSection-CCD0zZqQ.js → RoutesSection-zQZDedL7.js} +1 -1
  66. package/dist/vue/TimelineTab-DHfXsX7t.js +334 -0
  67. package/dist/vue/components/shared/RelatedLogs.vue.d.ts +1 -4
  68. package/dist/vue/{index-C8MxnS7Q.js → index-CM3yNVUR.js} +2 -2
  69. package/dist/vue/index.js +1 -1
  70. package/dist/vue/style.css +1 -1
  71. package/package.json +1 -1
  72. package/dist/react/CacheSection-baMZotSn.js +0 -146
  73. package/dist/react/CacheTab-2cw_rMzj.js +0 -117
  74. package/dist/react/CustomPaneTab-B6r7ha0u.js +0 -98
  75. package/dist/react/EmailsSection-C-UZISG-.js +0 -262
  76. package/dist/react/EmailsTab-DbK4Eobn.js +0 -139
  77. package/dist/react/EventsTab-CfVr7AiM.js +0 -57
  78. package/dist/react/InternalsSection-t7ihcWO-.js +0 -32
  79. package/dist/react/InternalsTab-Oij0A2fN.js +0 -30
  80. package/dist/react/JobsSection-CQHNK_Ls.js +0 -187
  81. package/dist/react/JobsTab-znzf6jzk.js +0 -153
  82. package/dist/react/LogsSection-Dmm3rE2B.js +0 -233
  83. package/dist/react/LogsTab-D8unMV5P.js +0 -108
  84. package/dist/react/QueriesSection-CnmSkznA.js +0 -461
  85. package/dist/react/RelatedLogs-3A8RuGKH.js +0 -52
  86. package/dist/react/RequestsSection-kW79_M7k.js +0 -341
  87. package/dist/vue/CustomPaneTab-BJxT5Dp7.js +0 -172
  88. package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +0 -84
  89. package/dist/vue/TimelineTab-zj5Z5OdT.js +0 -338
@@ -0,0 +1,64 @@
1
+ type Row = Record<string, unknown>;
2
+ /**
3
+ * Resolve a field value from a row, trying multiple candidate key names.
4
+ * Returns the first truthy value found, or the fallback.
5
+ */
6
+ export declare function resolveField<T>(row: Row, ...keys: string[]): T | undefined;
7
+ /**
8
+ * Resolve a timestamp field. Tries `createdAt`, `created_at`, `timestamp`.
9
+ */
10
+ export declare function resolveTimestamp(row: Row): string | number | undefined;
11
+ /**
12
+ * Resolve a timestamp for jobs. Tries `timestamp`, `createdAt`, `processedAt`, `created_at`.
13
+ */
14
+ export declare function resolveJobTimestamp(row: Row): string | number | undefined;
15
+ /**
16
+ * Resolve HTTP status code. Tries `statusCode`, `status_code`.
17
+ */
18
+ export declare function resolveStatusCode(row: Row): number | undefined;
19
+ /**
20
+ * Resolve request duration. Tries `total_duration`, `totalDuration`, `duration`.
21
+ */
22
+ export declare function resolveDuration(row: Row): number;
23
+ /**
24
+ * Resolve span count. Tries `span_count`, `spanCount`.
25
+ */
26
+ export declare function resolveSpanCount(row: Row): number;
27
+ /**
28
+ * Resolve warning count. Tries `warning_count`, `warningCount`.
29
+ */
30
+ export declare function resolveWarningCount(row: Row): number;
31
+ /**
32
+ * Resolve email "from" address. Tries `from_addr`, `from`.
33
+ */
34
+ export declare function resolveFromAddr(row: Row): string;
35
+ /**
36
+ * Resolve email "to" address. Tries `to_addr`, `to`.
37
+ */
38
+ export declare function resolveToAddr(row: Row): string;
39
+ /**
40
+ * Resolve email CC address. Tries `cc`, `cc_addr`.
41
+ */
42
+ export declare function resolveCcAddr(row: Row): string;
43
+ /**
44
+ * Resolve attachment count. Tries `attachment_count`, `attachmentCount`.
45
+ */
46
+ export declare function resolveAttachmentCount(row: Row): number;
47
+ /**
48
+ * Resolve event name. Tries `event_name`, `eventName`, `event`.
49
+ */
50
+ export declare function resolveEventName(row: Row): string;
51
+ /**
52
+ * Resolve SQL method. Tries `method`, `sql_method`.
53
+ */
54
+ export declare function resolveSqlMethod(row: Row): string;
55
+ /**
56
+ * Resolve normalized SQL text. Tries `sqlNormalized`, `normalizedSql`, `sql_normalized`, `sql`.
57
+ */
58
+ export declare function resolveNormalizedSql(row: Row): string;
59
+ /**
60
+ * Resolve overview metric with snake_case fallback. Returns the camelCase
61
+ * value if present, otherwise converts the snake_case raw value to a number.
62
+ */
63
+ export declare function resolveMetric(metrics: Row, camelKey: string, snakeKey: string): number;
64
+ export {};
@@ -144,6 +144,21 @@ export declare function statusColor(statusCode: number): ThresholdColor;
144
144
  * @param ms - Duration in milliseconds.
145
145
  */
146
146
  export declare function durationSeverity(ms: number): 'normal' | 'slow' | 'very-slow';
147
+ /**
148
+ * Return a CSS severity class for a duration value.
149
+ *
150
+ * Combines {@link durationSeverity} with a CSS-prefix to produce the
151
+ * appropriate class name. Returns an empty string for normal durations.
152
+ *
153
+ * Examples (with default prefix `'ss-dash'`):
154
+ * - `> 500ms` -> `'ss-dash-very-slow'`
155
+ * - `> 100ms` -> `'ss-dash-slow'`
156
+ * - Otherwise -> `''`
157
+ *
158
+ * @param ms - Duration in milliseconds.
159
+ * @param prefix - CSS class prefix (default `'ss-dash'`).
160
+ */
161
+ export declare function durationClassName(ms: number, prefix?: string): string;
147
162
  /**
148
163
  * Truncate a request ID to a short preview.
149
164
  *
@@ -6,7 +6,7 @@ export type { ServerStats, MetricValue, ServerStatsConfig, ResolvedServerStatsCo
6
6
  export { getTheme, setTheme, toggleTheme, onThemeChange } from './theme.js';
7
7
  export { generateSparklinePoints, generateSparklinePath, generateGradientId, computeStats, buildSparklineData, } from './sparkline.js';
8
8
  export type { SparklineStats, SparklineData } from './sparkline.js';
9
- export { formatUptime, formatBytes, formatMb, formatCount, formatDuration, formatTime, timeAgo, formatStatNum, getThresholdColor, getThresholdColorInverse, getRatioColor, compactPreview, statusColor, durationSeverity, shortReqId, THRESHOLD_CSS_CLASS, THRESHOLD_HEX_FALLBACK, THRESHOLD_CSS_VAR, formatTtl, formatCacheSize, } from './formatters.js';
9
+ export { formatUptime, formatBytes, formatMb, formatCount, formatDuration, formatTime, timeAgo, formatStatNum, getThresholdColor, getThresholdColorInverse, getRatioColor, compactPreview, statusColor, durationSeverity, durationClassName, shortReqId, THRESHOLD_CSS_CLASS, THRESHOLD_HEX_FALLBACK, THRESHOLD_CSS_VAR, formatTtl, formatCacheSize, } from './formatters.js';
10
10
  export { DEFAULT_PER_PAGE, buildQueryString, buildQueryParams, computePagination, parsePaginatedResponse, createPaginationState, createFilterState, createSortState, getPageNumbers, } from './pagination.js';
11
11
  export type { RawPaginatedResponse } from './pagination.js';
12
12
  export { fetchFeatures, detectFeatures, DEFAULT_FEATURES, getVisibleMetricGroups, detectMetricGroupsFromStats, } from './feature-detect.js';