adonisjs-server-stats 1.10.0 → 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.
- package/README.md +23 -14
- package/dist/core/config-utils.d.ts +8 -0
- package/dist/core/constants.d.ts +4 -0
- package/dist/core/dashboard-data-controller.d.ts +16 -0
- package/dist/core/dashboard-data-helpers.d.ts +12 -0
- package/dist/core/debug-data-controller.d.ts +4 -0
- package/dist/core/define-config-helpers.d.ts +25 -0
- package/dist/core/feature-detect-helpers.d.ts +36 -0
- package/dist/core/field-resolvers.d.ts +64 -0
- package/dist/core/formatters-helpers.d.ts +23 -0
- package/dist/core/formatters.d.ts +15 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +599 -509
- package/dist/core/log-utils-helpers.d.ts +13 -0
- package/dist/core/metrics.d.ts +3 -28
- package/dist/core/pagination.d.ts +0 -9
- package/dist/core/server-stats-controller.d.ts +6 -0
- package/dist/core/transmit-helpers.d.ts +7 -0
- package/dist/core/types-dashboard.d.ts +178 -0
- package/dist/core/types-diagnostics.d.ts +85 -0
- package/dist/core/types.d.ts +10 -442
- package/dist/react/CacheSection-BYN53kYO.js +135 -0
- package/dist/react/CacheStatsBar-CRodCOeP.js +27 -0
- package/dist/react/CacheTab-DOhuK05d.js +106 -0
- package/dist/react/{ConfigSection-DfFd-WRq.js → ConfigSection-B9EHh4Rp.js} +1 -1
- package/dist/react/{ConfigTab-Bdg8YMer.js → ConfigTab-C8kriE2b.js} +1 -1
- package/dist/react/CustomPaneTab-CvzQS_Wh.js +99 -0
- package/dist/react/EmailPreviewOverlay-BmXOAvqG.js +58 -0
- package/dist/react/EmailsSection-BJyFJf7A.js +226 -0
- package/dist/react/EmailsTab-Ch8jp10B.js +110 -0
- package/dist/react/{EventsSection-ByQ-9blq.js → EventsSection-DJPwHeT8.js} +28 -27
- package/dist/react/EventsTab-B-FoehXC.js +58 -0
- package/dist/react/{FilterBar-DQRXpWrb.js → FilterBar-CQ7bD669.js} +15 -15
- package/dist/react/{InternalsContent-DBzsI0CG.js → InternalsContent-O8ino9oM.js} +133 -109
- package/dist/react/InternalsSection-B6VlVx5f.js +22 -0
- package/dist/react/InternalsTab-CkEKpRMU.js +17 -0
- package/dist/react/JobStatsBar-C7RslAFE.js +30 -0
- package/dist/react/JobsSection-DWF4i1t_.js +167 -0
- package/dist/react/JobsTab-DqnifQXV.js +129 -0
- package/dist/react/LogEntryRow-CMMkqA9M.js +43 -0
- package/dist/react/LogsSection-C1xC5aP4.js +198 -0
- package/dist/react/LogsTab-CS4sLfLw.js +79 -0
- package/dist/react/{OverviewSection-C4T1ur51.js → OverviewSection-CxvfOR0v.js} +70 -80
- package/dist/react/QueriesSection-CrMdU5Ax.js +458 -0
- package/dist/react/{QueriesTab-osLUWd4L.js → QueriesTab-x85PjkyS.js} +38 -40
- package/dist/react/RequestsSection-DETN9oZb.js +321 -0
- package/dist/react/{RoutesSection-BUSkM6PY.js → RoutesSection-CmorkJeC.js} +2 -2
- package/dist/react/RoutesTab-CbzBOzpc.js +68 -0
- package/dist/react/SplitPaneWrapper-BiIgT4ND.js +49 -0
- package/dist/react/TimeAgoCell-o3KigGfM.js +8 -0
- package/dist/react/{TimelineTab-Covg5weo.js → TimelineTab-Ue9tUD_n.js} +76 -102
- package/dist/react/index-DwDK-4oX.js +1121 -0
- package/dist/react/index.js +6 -6
- package/dist/react/react/components/shared/CacheStatsBar.d.ts +13 -0
- package/dist/react/react/components/shared/EmailPreviewOverlay.d.ts +29 -0
- package/dist/react/react/components/{Dashboard/shared → shared}/FilterBar.d.ts +4 -3
- package/dist/react/react/components/shared/JobStatsBar.d.ts +12 -0
- package/dist/react/react/components/shared/LogEntryRow.d.ts +9 -0
- package/dist/react/react/components/shared/RelatedLogs.d.ts +2 -2
- package/dist/react/react/components/shared/SplitPaneWrapper.d.ts +7 -0
- package/dist/react/react/components/shared/TimeAgoCell.d.ts +17 -0
- package/dist/react/react/hooks/useDashboardData.d.ts +4 -8
- package/dist/react/react/hooks/useDiagnosticsData.d.ts +14 -0
- package/dist/react/style.css +1 -1
- package/dist/src/collectors/app_collector.d.ts +0 -8
- package/dist/src/collectors/app_collector.js +45 -52
- package/dist/src/collectors/auto_detect.d.ts +0 -23
- package/dist/src/collectors/auto_detect.js +33 -55
- package/dist/src/collectors/db_pool_collector.d.ts +14 -16
- package/dist/src/collectors/db_pool_collector.js +72 -57
- package/dist/src/collectors/log_collector.d.ts +0 -47
- package/dist/src/collectors/log_collector.js +36 -65
- package/dist/src/collectors/queue_collector.d.ts +0 -20
- package/dist/src/collectors/queue_collector.js +60 -76
- package/dist/src/collectors/redis_collector.d.ts +10 -10
- package/dist/src/collectors/redis_collector.js +69 -66
- package/dist/src/config/deprecation_migration.d.ts +7 -0
- package/dist/src/config/deprecation_migration.js +201 -0
- package/dist/src/controller/debug_controller.d.ts +1 -1
- package/dist/src/controller/debug_controller.js +87 -81
- package/dist/src/dashboard/cache_handlers.d.ts +14 -0
- package/dist/src/dashboard/cache_handlers.js +52 -0
- package/dist/src/dashboard/chart_aggregator.d.ts +0 -7
- package/dist/src/dashboard/chart_aggregator.js +68 -50
- package/dist/src/dashboard/coalesce_cache.d.ts +25 -0
- package/dist/src/dashboard/coalesce_cache.js +47 -0
- package/dist/src/dashboard/dashboard_controller.d.ts +11 -37
- package/dist/src/dashboard/dashboard_controller.js +51 -544
- package/dist/src/dashboard/dashboard_page_assets.d.ts +17 -0
- package/dist/src/dashboard/dashboard_page_assets.js +51 -0
- package/dist/src/dashboard/dashboard_store.d.ts +19 -218
- package/dist/src/dashboard/dashboard_store.js +115 -1116
- package/dist/src/dashboard/dashboard_types.d.ts +83 -0
- package/dist/src/dashboard/dashboard_types.js +4 -0
- package/dist/src/dashboard/detail_queries.d.ts +19 -0
- package/dist/src/dashboard/detail_queries.js +98 -0
- package/dist/src/dashboard/email_event_builder.d.ts +8 -0
- package/dist/src/dashboard/email_event_builder.js +65 -0
- package/dist/src/dashboard/explain_query.d.ts +8 -0
- package/dist/src/dashboard/explain_query.js +22 -0
- package/dist/src/dashboard/filter_handlers.d.ts +23 -0
- package/dist/src/dashboard/filter_handlers.js +56 -0
- package/dist/src/dashboard/filtered_queries.d.ts +15 -0
- package/dist/src/dashboard/filtered_queries.js +155 -0
- package/dist/src/dashboard/flush_manager.d.ts +25 -0
- package/dist/src/dashboard/flush_manager.js +107 -0
- package/dist/src/dashboard/format_helpers.d.ts +126 -0
- package/dist/src/dashboard/format_helpers.js +140 -0
- package/dist/src/dashboard/inspector_manager.d.ts +36 -0
- package/dist/src/dashboard/inspector_manager.js +102 -0
- package/dist/src/dashboard/integrations/config_inspector.js +11 -13
- package/dist/src/dashboard/integrations/queue_inspector.d.ts +3 -3
- package/dist/src/dashboard/integrations/queue_inspector.js +13 -10
- package/dist/src/dashboard/jobs_handlers.d.ts +14 -0
- package/dist/src/dashboard/jobs_handlers.js +61 -0
- package/dist/src/dashboard/knex_factory.d.ts +18 -0
- package/dist/src/dashboard/knex_factory.js +91 -0
- package/dist/src/dashboard/migrator.js +30 -159
- package/dist/src/dashboard/migrator_tables.d.ts +19 -0
- package/dist/src/dashboard/migrator_tables.js +153 -0
- package/dist/src/dashboard/overview_queries.d.ts +66 -0
- package/dist/src/dashboard/overview_queries.js +155 -0
- package/dist/src/dashboard/overview_query_runners.d.ts +25 -0
- package/dist/src/dashboard/overview_query_runners.js +84 -0
- package/dist/src/dashboard/overview_store_queries.d.ts +40 -0
- package/dist/src/dashboard/overview_store_queries.js +69 -0
- package/dist/src/dashboard/paginate_helper.d.ts +12 -0
- package/dist/src/dashboard/paginate_helper.js +33 -0
- package/dist/src/dashboard/query_explain_handler.d.ts +10 -0
- package/dist/src/dashboard/query_explain_handler.js +80 -0
- package/dist/src/dashboard/read_queries.d.ts +32 -0
- package/dist/src/dashboard/read_queries.js +107 -0
- package/dist/src/dashboard/saved_filter_queries.d.ts +10 -0
- package/dist/src/dashboard/saved_filter_queries.js +24 -0
- package/dist/src/dashboard/storage_stats.d.ts +41 -0
- package/dist/src/dashboard/storage_stats.js +81 -0
- package/dist/src/dashboard/write_queue.d.ts +106 -0
- package/dist/src/dashboard/write_queue.js +225 -0
- package/dist/src/data/data_access.d.ts +2 -39
- package/dist/src/data/data_access.js +17 -193
- package/dist/src/data/data_access_helpers.d.ts +130 -0
- package/dist/src/data/data_access_helpers.js +212 -0
- package/dist/src/debug/debug_store.js +37 -32
- package/dist/src/debug/email_collector.d.ts +1 -10
- package/dist/src/debug/email_collector.js +78 -81
- package/dist/src/debug/event_collector.d.ts +0 -9
- package/dist/src/debug/event_collector.js +79 -62
- package/dist/src/debug/query_collector.js +23 -19
- package/dist/src/debug/route_inspector.d.ts +1 -5
- package/dist/src/debug/route_inspector.js +50 -51
- package/dist/src/debug/trace_collector.d.ts +9 -1
- package/dist/src/debug/trace_collector.js +21 -15
- package/dist/src/debug/types.d.ts +1 -1
- package/dist/src/define_config.d.ts +0 -65
- package/dist/src/define_config.js +93 -333
- 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/stats-bar.js +1 -1
- package/dist/src/edge/client-vue/dashboard.js +5 -5
- package/dist/src/edge/client-vue/debug-panel-deferred.js +4 -4
- package/dist/src/edge/client-vue/stats-bar.js +3 -3
- package/dist/src/edge/plugin.d.ts +0 -16
- package/dist/src/edge/plugin.js +57 -64
- package/dist/src/engine/request_metrics.d.ts +1 -0
- package/dist/src/engine/request_metrics.js +32 -42
- package/dist/src/middleware/request_tracking_middleware.d.ts +2 -8
- package/dist/src/middleware/request_tracking_middleware.js +65 -93
- package/dist/src/provider/auth_middleware_detector.d.ts +16 -0
- package/dist/src/provider/auth_middleware_detector.js +97 -0
- package/dist/src/provider/boot_helpers.d.ts +20 -0
- package/dist/src/provider/boot_helpers.js +91 -0
- package/dist/src/provider/boot_initializer.d.ts +28 -0
- package/dist/src/provider/boot_initializer.js +35 -0
- package/dist/src/provider/dashboard_init.d.ts +30 -0
- package/dist/src/provider/dashboard_init.js +138 -0
- package/dist/src/provider/dashboard_setup.d.ts +25 -0
- package/dist/src/provider/dashboard_setup.js +78 -0
- package/dist/src/provider/diagnostics.d.ts +134 -0
- package/dist/src/provider/diagnostics.js +127 -0
- package/dist/src/provider/email_bridge.d.ts +43 -0
- package/dist/src/provider/email_bridge.js +80 -0
- package/dist/src/provider/email_helpers.d.ts +13 -0
- package/dist/src/provider/email_helpers.js +68 -0
- package/dist/src/provider/pino_hook.d.ts +17 -0
- package/dist/src/provider/pino_hook.js +35 -0
- package/dist/src/provider/provider_helpers_extra.d.ts +47 -0
- package/dist/src/provider/provider_helpers_extra.js +177 -0
- package/dist/src/provider/server_stats_provider.d.ts +39 -85
- package/dist/src/provider/server_stats_provider.js +132 -951
- package/dist/src/provider/shutdown_helpers.d.ts +43 -0
- package/dist/src/provider/shutdown_helpers.js +70 -0
- package/dist/src/provider/toolbar_setup.d.ts +57 -0
- package/dist/src/provider/toolbar_setup.js +141 -0
- package/dist/src/routes/dashboard_routes.d.ts +14 -0
- package/dist/src/routes/dashboard_routes.js +197 -0
- package/dist/src/routes/debug_routes.d.ts +14 -0
- package/dist/src/routes/debug_routes.js +101 -0
- package/dist/src/routes/register_routes.d.ts +0 -78
- package/dist/src/routes/register_routes.js +22 -352
- package/dist/src/routes/stats_routes.d.ts +5 -0
- package/dist/src/routes/stats_routes.js +14 -0
- package/dist/src/styles/components.css +163 -0
- package/dist/src/styles/dashboard.css +13 -105
- package/dist/src/styles/debug-panel.css +2 -53
- package/dist/src/styles/utilities.css +3 -1
- package/dist/src/types.d.ts +305 -14
- package/dist/vue/{CacheSection-oFAJL3mo.js → CacheSection-DT2Mwf_s.js} +1 -1
- package/dist/vue/{ConfigSection-BhfJ4KqL.js → ConfigSection-BwKwS9lh.js} +1 -1
- package/dist/vue/CustomPaneTab-Hr1IBHfz.js +172 -0
- package/dist/vue/{EmailsSection-BcNyhyHs.js → EmailsSection-B65g0FVS.js} +1 -1
- package/dist/vue/{EventsSection-r60Q5Lmu.js → EventsSection-CxqtVF-o.js} +1 -1
- package/dist/vue/{JobsSection-BHL-hkQw.js → JobsSection-rMIyMb-g.js} +1 -1
- package/dist/vue/{LogsSection-DRMGzJmg.js → LogsSection-DmmZVJ7D.js} +9 -3
- package/dist/vue/{LogsTab-Bg3o0Mm6.js → LogsTab-47zEK7jL.js} +4 -1
- package/dist/vue/{OverviewSection-CXh6Ja1B.js → OverviewSection-BMabyqw-.js} +49 -50
- package/dist/vue/{QueriesSection-IodIsCJ-.js → QueriesSection-BfDFwGqH.js} +44 -45
- package/dist/vue/{QueriesTab-C8_7oprC.js → QueriesTab-DuTG7cpC.js} +30 -31
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-Py1iu9GU.js +77 -0
- package/dist/vue/{RequestsSection-BPuMdmMc.js → RequestsSection-CTu4jPZ_.js} +143 -147
- package/dist/vue/{RoutesSection-NKo3Rbq3.js → RoutesSection-zQZDedL7.js} +1 -1
- package/dist/vue/TimelineTab-DHfXsX7t.js +334 -0
- package/dist/vue/components/shared/RelatedLogs.vue.d.ts +1 -4
- package/dist/vue/composables/useDashboardData.d.ts +12 -23
- package/dist/vue/index-CM3yNVUR.js +1232 -0
- package/dist/vue/index.js +1 -1
- package/dist/vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/react/CacheSection-UCMptWyn.js +0 -146
- package/dist/react/CacheTab-CA8LB1J5.js +0 -123
- package/dist/react/CustomPaneTab-Bxtv_8Rw.js +0 -104
- package/dist/react/EmailsSection-CM7stSyh.js +0 -262
- package/dist/react/EmailsTab-BDhEiomM.js +0 -153
- package/dist/react/EventsTab-CMfY98Rl.js +0 -63
- package/dist/react/InternalsSection-t7ihcWO-.js +0 -32
- package/dist/react/InternalsTab-Oij0A2fN.js +0 -30
- package/dist/react/JobsSection-DF3qEv9O.js +0 -187
- package/dist/react/JobsTab-BbrBWIOb.js +0 -141
- package/dist/react/LogsSection-DcFTZY7b.js +0 -227
- package/dist/react/LogsTab-CicucmVk.js +0 -103
- package/dist/react/QueriesSection-PswteoF9.js +0 -461
- package/dist/react/RelatedLogs-DFDOyUMr.js +0 -40
- package/dist/react/RequestsSection-Nag30rEA.js +0 -341
- package/dist/react/RoutesTab-DgVzd2PZ.js +0 -74
- package/dist/react/index-Cflz9Ebj.js +0 -1069
- package/dist/vue/CustomPaneTab-BJxT5Dp7.js +0 -172
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +0 -84
- package/dist/vue/TimelineTab-zj5Z5OdT.js +0 -338
- package/dist/vue/index-Dtgysd26.js +0 -1229
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as H, inject as A, ref as
|
|
2
|
-
import { formatTime as
|
|
3
|
-
import { u as vt } from "./index-
|
|
1
|
+
import { defineComponent as H, inject as A, ref as $, computed as g, openBlock as o, createElementBlock as i, createVNode as W, withCtx as it, createElementVNode as e, normalizeClass as f, unref as r, createTextVNode as b, toDisplayString as u, createCommentVNode as v, Fragment as k, renderList as T, withKeys as B, withModifiers as L, createBlock as ut, h as D } from "vue";
|
|
2
|
+
import { formatTime as rt, timeAgo as dt, SLOW_DURATION_MS as pt, durationClassName as ct } from "adonisjs-server-stats/core";
|
|
3
|
+
import { u as vt } from "./index-CM3yNVUR.js";
|
|
4
4
|
import { u as ht } from "./useResizableTable-BoivAevK.js";
|
|
5
5
|
import { _ as mt } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
|
|
6
6
|
import { _ as ft } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
|
|
@@ -19,7 +19,7 @@ const yt = { class: "ss-dash-btn-group" }, xt = {
|
|
|
19
19
|
}, wt = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "ss-dash-sort-arrow"
|
|
22
|
-
},
|
|
22
|
+
}, Ct = ["onClick", "onKeydown"], $t = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "ss-dash-dup"
|
|
25
25
|
}, gt = { style: { color: "var(--ss-muted)", "text-align": "center", display: "block" } }, Dt = { class: "ss-dash-duration" }, Nt = { class: "ss-dash-duration" }, Pt = { style: { color: "var(--ss-muted)", "text-align": "center", display: "block" } }, St = {
|
|
@@ -88,12 +88,12 @@ const J = H({
|
|
|
88
88
|
...Gt,
|
|
89
89
|
__name: "QueriesSection",
|
|
90
90
|
setup(n) {
|
|
91
|
-
const z = A("ss-refresh-key",
|
|
91
|
+
const z = A("ss-refresh-key", $(0)), F = A("ss-dashboard-endpoint", "/__stats/api"), K = A("ss-auth-token", void 0), j = A("ss-base-url", ""), c = $("list"), d = $(null), a = $(null), y = $(null), N = g(() => c.value === "grouped" ? "queries/grouped" : "queries"), { data: w, loading: G, pagination: P, sort: h, goToPage: X, setSearch: Y, setSort: Z, explainQuery: tt } = vt(() => N.value, {
|
|
92
92
|
baseUrl: j,
|
|
93
93
|
dashboardEndpoint: F,
|
|
94
94
|
authToken: K,
|
|
95
95
|
refreshKey: z
|
|
96
|
-
}), M =
|
|
96
|
+
}), M = $(""), O = g(() => w.value ? c.value === "grouped" ? w.value.groups || [] : w.value.data || w.value || [] : []), m = g(() => c.value !== "grouped" ? O.value : O.value.map((s) => {
|
|
97
97
|
const t = { ...s };
|
|
98
98
|
return (t.sqlNormalized === null || t.sqlNormalized === void 0 && (s.sql_normalized || s.pattern)) && (t.sqlNormalized = s.sql_normalized || s.pattern || ""), (t.count === null || t.count === void 0) && s.total_count !== null && s.total_count !== void 0 && (t.count = s.total_count), (t.avgDuration === null || t.avgDuration === void 0) && s.avg_duration !== null && s.avg_duration !== void 0 && (t.avgDuration = s.avg_duration), (t.maxDuration === null || t.maxDuration === void 0) && s.max_duration !== null && s.max_duration !== void 0 && (t.maxDuration = s.max_duration), (t.minDuration === null || t.minDuration === void 0) && s.min_duration !== null && s.min_duration !== void 0 && (t.minDuration = s.min_duration), (t.totalDuration === null || t.totalDuration === void 0) && s.total_duration !== null && s.total_duration !== void 0 && (t.totalDuration = s.total_duration), (t.percentOfTotal === null || t.percentOfTotal === void 0) && s.pct_time !== null && s.pct_time !== void 0 && (t.percentOfTotal = s.pct_time), t;
|
|
99
99
|
})), R = g(() => {
|
|
@@ -103,7 +103,7 @@ const J = H({
|
|
|
103
103
|
s.set(l, (s.get(l) || 0) + 1);
|
|
104
104
|
}
|
|
105
105
|
return s;
|
|
106
|
-
}),
|
|
106
|
+
}), C = g(() => {
|
|
107
107
|
const s = P.total ?? m.value.length;
|
|
108
108
|
let t = 0, l = 0, p = 0, x = 0;
|
|
109
109
|
for (const _ of m.value) {
|
|
@@ -115,8 +115,8 @@ const J = H({
|
|
|
115
115
|
return { total: s, slow: t, duplicates: l, avgDuration: x > 0 ? p / x : 0 };
|
|
116
116
|
}), st = g(() => {
|
|
117
117
|
if (c.value === "grouped") return `${m.value.length} query patterns`;
|
|
118
|
-
const s = [`${
|
|
119
|
-
return
|
|
118
|
+
const s = [`${C.value.total} queries`];
|
|
119
|
+
return C.value.slow > 0 && s.push(`${C.value.slow} slow`), C.value.duplicates > 0 && s.push(`${C.value.duplicates} dup`), s.push(`avg ${(C.value.avgDuration || 0).toFixed(1)}ms`), s.join(", ");
|
|
120
120
|
});
|
|
121
121
|
function et(s) {
|
|
122
122
|
M.value = s, Y(s);
|
|
@@ -147,8 +147,7 @@ const J = H({
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
function E(s) {
|
|
150
|
-
|
|
151
|
-
return t === "very-slow" ? "ss-dash-very-slow" : t === "slow" ? "ss-dash-slow" : "";
|
|
150
|
+
return ct(s, "ss-dash");
|
|
152
151
|
}
|
|
153
152
|
function q() {
|
|
154
153
|
const s = a.value?.plan;
|
|
@@ -191,7 +190,7 @@ const J = H({
|
|
|
191
190
|
]),
|
|
192
191
|
_: 1
|
|
193
192
|
}, 8, ["model-value", "summary"]),
|
|
194
|
-
|
|
193
|
+
r(G) && !r(w) ? (o(), i("div", xt, "Loading queries...")) : c.value === "grouped" ? (o(), i("div", _t, [
|
|
195
194
|
m.value.length > 0 ? (o(), i("table", {
|
|
196
195
|
key: 0,
|
|
197
196
|
ref_key: "tableRef",
|
|
@@ -206,14 +205,14 @@ const J = H({
|
|
|
206
205
|
onClick: t[2] || (t[2] = (l) => S("count"))
|
|
207
206
|
}, [
|
|
208
207
|
t[8] || (t[8] = b(" Count ", -1)),
|
|
209
|
-
|
|
208
|
+
r(h).column === "count" ? (o(), i("span", bt, u(r(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
210
209
|
]),
|
|
211
210
|
e("th", {
|
|
212
211
|
class: "ss-dash-sortable",
|
|
213
212
|
onClick: t[3] || (t[3] = (l) => S("avgDuration"))
|
|
214
213
|
}, [
|
|
215
214
|
t[9] || (t[9] = b(" Avg ", -1)),
|
|
216
|
-
|
|
215
|
+
r(h).column === "avgDuration" ? (o(), i("span", kt, u(r(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
217
216
|
]),
|
|
218
217
|
t[12] || (t[12] = e("th", null, "Min", -1)),
|
|
219
218
|
t[13] || (t[13] = e("th", null, "Max", -1)),
|
|
@@ -222,7 +221,7 @@ const J = H({
|
|
|
222
221
|
onClick: t[4] || (t[4] = (l) => S("totalDuration"))
|
|
223
222
|
}, [
|
|
224
223
|
t[10] || (t[10] = b(" Total ", -1)),
|
|
225
|
-
|
|
224
|
+
r(h).column === "totalDuration" ? (o(), i("span", wt, u(r(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
226
225
|
]),
|
|
227
226
|
t[14] || (t[14] = e("th", null, "% Time", -1))
|
|
228
227
|
])
|
|
@@ -237,30 +236,30 @@ const J = H({
|
|
|
237
236
|
tabindex: "0",
|
|
238
237
|
onClick: L((x) => d.value = d.value === l.sqlNormalized ? null : l.sqlNormalized, ["stop"]),
|
|
239
238
|
onKeydown: B((x) => d.value = d.value === l.sqlNormalized ? null : l.sqlNormalized, ["enter"])
|
|
240
|
-
},
|
|
241
|
-
(l.count || 0) >= 3 ? (o(), i("span",
|
|
239
|
+
}, u(l.sqlNormalized), 43, Ct),
|
|
240
|
+
(l.count || 0) >= 3 ? (o(), i("span", $t, "DUP")) : v("", !0)
|
|
242
241
|
]),
|
|
243
242
|
e("td", null, [
|
|
244
|
-
e("span", gt,
|
|
243
|
+
e("span", gt, u(l.count || 0), 1)
|
|
245
244
|
]),
|
|
246
245
|
e("td", null, [
|
|
247
246
|
e("span", {
|
|
248
247
|
class: f(`ss-dash-duration ${E(l.avgDuration || 0)}`)
|
|
249
|
-
},
|
|
248
|
+
}, u((l.avgDuration || 0).toFixed(2)) + "ms ", 3)
|
|
250
249
|
]),
|
|
251
250
|
e("td", null, [
|
|
252
|
-
e("span", Dt,
|
|
251
|
+
e("span", Dt, u((l.minDuration || 0).toFixed(2)) + "ms", 1)
|
|
253
252
|
]),
|
|
254
253
|
e("td", null, [
|
|
255
254
|
e("span", {
|
|
256
255
|
class: f(`ss-dash-duration ${E(l.maxDuration || 0)}`)
|
|
257
|
-
},
|
|
256
|
+
}, u((l.maxDuration || 0).toFixed(2)) + "ms ", 3)
|
|
258
257
|
]),
|
|
259
258
|
e("td", null, [
|
|
260
|
-
e("span", Nt,
|
|
259
|
+
e("span", Nt, u((l.totalDuration || 0).toFixed(1)) + "ms", 1)
|
|
261
260
|
]),
|
|
262
261
|
e("td", null, [
|
|
263
|
-
e("span", Pt,
|
|
262
|
+
e("span", Pt, u((l.percentOfTotal || 0).toFixed(1)) + "%", 1)
|
|
264
263
|
])
|
|
265
264
|
]))), 128))
|
|
266
265
|
])
|
|
@@ -292,7 +291,7 @@ const J = H({
|
|
|
292
291
|
onClick: t[5] || (t[5] = (l) => S("duration"))
|
|
293
292
|
}, [
|
|
294
293
|
t[15] || (t[15] = b(" Duration ", -1)),
|
|
295
|
-
|
|
294
|
+
r(h).column === "duration" ? (o(), i("span", zt, u(r(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
296
295
|
]),
|
|
297
296
|
t[19] || (t[19] = e("th", null, "Method", -1)),
|
|
298
297
|
t[20] || (t[20] = e("th", null, "Model", -1)),
|
|
@@ -302,7 +301,7 @@ const J = H({
|
|
|
302
301
|
onClick: t[6] || (t[6] = (l) => S("createdAt"))
|
|
303
302
|
}, [
|
|
304
303
|
t[16] || (t[16] = b(" Time ", -1)),
|
|
305
|
-
|
|
304
|
+
r(h).column === "createdAt" ? (o(), i("span", jt, u(r(h).direction === "asc" ? " ▲" : " ▼"), 1)) : v("", !0)
|
|
306
305
|
]),
|
|
307
306
|
t[22] || (t[22] = e("th", null, null, -1))
|
|
308
307
|
])
|
|
@@ -313,7 +312,7 @@ const J = H({
|
|
|
313
312
|
}, [
|
|
314
313
|
e("tr", null, [
|
|
315
314
|
e("td", null, [
|
|
316
|
-
e("span", At,
|
|
315
|
+
e("span", At, u(l.id), 1)
|
|
317
316
|
]),
|
|
318
317
|
e("td", null, [
|
|
319
318
|
e("div", null, [
|
|
@@ -324,10 +323,10 @@ const J = H({
|
|
|
324
323
|
tabindex: "0",
|
|
325
324
|
onClick: L((p) => d.value = d.value === l.id ? null : l.id, ["stop"]),
|
|
326
325
|
onKeydown: B((p) => d.value = d.value === l.id ? null : l.id, ["enter"])
|
|
327
|
-
},
|
|
326
|
+
}, u(l.sql || l.sql_text || ""), 43, Ft),
|
|
328
327
|
(R.value.get(
|
|
329
328
|
(l.sqlNormalized || l.sql || l.sql_text) ?? ""
|
|
330
|
-
) ?? 0) > 1 ? (o(), i("span", Kt, " ×" +
|
|
329
|
+
) ?? 0) > 1 ? (o(), i("span", Kt, " ×" + u(R.value.get(
|
|
331
330
|
(l.sqlNormalized || l.sql || l.sql_text) ?? ""
|
|
332
331
|
)), 1)) : v("", !0)
|
|
333
332
|
])
|
|
@@ -335,29 +334,29 @@ const J = H({
|
|
|
335
334
|
e("td", null, [
|
|
336
335
|
e("span", {
|
|
337
336
|
class: f(`ss-dash-duration ${E(l.duration || 0)}`)
|
|
338
|
-
},
|
|
337
|
+
}, u((l.duration || 0).toFixed(2)) + "ms ", 3)
|
|
339
338
|
]),
|
|
340
339
|
e("td", null, [
|
|
341
340
|
e("span", {
|
|
342
341
|
class: f(`ss-dash-method ss-dash-method-${(l.method || l.sql_method || "").toLowerCase()}`)
|
|
343
|
-
},
|
|
342
|
+
}, u(l.method || l.sql_method || ""), 3)
|
|
344
343
|
]),
|
|
345
344
|
e("td", null, [
|
|
346
345
|
e("span", {
|
|
347
346
|
style: { color: "var(--ss-muted)", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" },
|
|
348
347
|
title: l.model
|
|
349
|
-
},
|
|
348
|
+
}, u(l.model || "-"), 9, Rt)
|
|
350
349
|
]),
|
|
351
350
|
e("td", null, [
|
|
352
|
-
e("span", Et,
|
|
351
|
+
e("span", Et, u(l.connection || "-"), 1)
|
|
353
352
|
]),
|
|
354
353
|
e("td", null, [
|
|
355
354
|
e("span", {
|
|
356
355
|
class: "ss-dash-event-time",
|
|
357
|
-
title:
|
|
356
|
+
title: r(rt)(
|
|
358
357
|
l.createdAt || l.created_at || l.timestamp || ""
|
|
359
358
|
)
|
|
360
|
-
}, r(
|
|
359
|
+
}, u(r(dt)(
|
|
361
360
|
l.createdAt || l.created_at || l.timestamp || ""
|
|
362
361
|
)), 9, Lt)
|
|
363
362
|
]),
|
|
@@ -368,7 +367,7 @@ const J = H({
|
|
|
368
367
|
class: f(`ss-dash-explain-btn${a.value?.queryId === l.id && !a.value?.error ? " ss-dash-explain-btn-active" : ""}`),
|
|
369
368
|
disabled: y.value === l.id,
|
|
370
369
|
onClick: L((p) => lt(l.id), ["stop"])
|
|
371
|
-
},
|
|
370
|
+
}, u(y.value === l.id ? "..." : "EXPLAIN"), 11, Mt)) : v("", !0)
|
|
372
371
|
])
|
|
373
372
|
]),
|
|
374
373
|
a.value && a.value.queryId === l.id ? (o(), i("tr", Ot, [
|
|
@@ -377,11 +376,11 @@ const J = H({
|
|
|
377
376
|
e("div", Ut, [
|
|
378
377
|
a.value.error ? (o(), i("div", Qt, [
|
|
379
378
|
t[23] || (t[23] = e("strong", null, "Error:", -1)),
|
|
380
|
-
b(" " +
|
|
379
|
+
b(" " + u(a.value.error) + " ", 1),
|
|
381
380
|
a.value.message ? (o(), i("br", Wt)) : v("", !0),
|
|
382
|
-
b(" " +
|
|
381
|
+
b(" " + u(a.value.message), 1)
|
|
383
382
|
])) : at() ? (o(), i("div", Bt, [
|
|
384
|
-
W(
|
|
383
|
+
W(r(J), {
|
|
385
384
|
node: ot(),
|
|
386
385
|
depth: 0
|
|
387
386
|
}, null, 8, ["node"])
|
|
@@ -389,12 +388,12 @@ const J = H({
|
|
|
389
388
|
e("table", null, [
|
|
390
389
|
e("thead", null, [
|
|
391
390
|
e("tr", null, [
|
|
392
|
-
(o(!0), i(k, null, T(q(), (p) => (o(), i("th", { key: p },
|
|
391
|
+
(o(!0), i(k, null, T(q(), (p) => (o(), i("th", { key: p }, u(p), 1))), 128))
|
|
393
392
|
])
|
|
394
393
|
]),
|
|
395
394
|
e("tbody", null, [
|
|
396
395
|
(o(!0), i(k, null, T(a.value.plan, (p, x) => (o(), i("tr", { key: x }, [
|
|
397
|
-
(o(!0), i(k, null, T(q(), (_) => (o(), i("td", { key: _ },
|
|
396
|
+
(o(!0), i(k, null, T(q(), (_) => (o(), i("td", { key: _ }, u(nt(p, _)), 1))), 128))
|
|
398
397
|
]))), 128))
|
|
399
398
|
])
|
|
400
399
|
])
|
|
@@ -413,12 +412,12 @@ const J = H({
|
|
|
413
412
|
])
|
|
414
413
|
], 512)) : (o(), i("div", Jt, "No queries recorded"))
|
|
415
414
|
]),
|
|
416
|
-
|
|
415
|
+
r(P).totalPages > 1 ? (o(), ut(ft, {
|
|
417
416
|
key: 0,
|
|
418
|
-
page:
|
|
419
|
-
"last-page":
|
|
420
|
-
total:
|
|
421
|
-
onPageChange:
|
|
417
|
+
page: r(P).page,
|
|
418
|
+
"last-page": r(P).totalPages,
|
|
419
|
+
total: r(P).total,
|
|
420
|
+
onPageChange: r(X)
|
|
422
421
|
}, null, 8, ["page", "last-page", "total", "onPageChange"])) : v("", !0)
|
|
423
422
|
], 64))
|
|
424
423
|
]));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as $, ref as D, computed as d, openBlock as
|
|
2
|
-
import { filterQueries as K, countDuplicateQueries as L, computeQuerySummary as M, formatDuration as y, formatTime as R, timeAgo as V,
|
|
1
|
+
import { defineComponent as $, ref as D, computed as d, openBlock as l, createElementBlock as n, createElementVNode as e, withDirectives as Q, vModelText as N, toDisplayString as a, Fragment as S, renderList as E, withKeys as A, normalizeClass as h, createCommentVNode as f, unref as v } from "vue";
|
|
2
|
+
import { filterQueries as K, countDuplicateQueries as L, computeQuerySummary as M, formatDuration as y, formatTime as R, timeAgo as V, durationClassName as z } from "adonisjs-server-stats/core";
|
|
3
3
|
import { u as B } from "./useResizableTable-BoivAevK.js";
|
|
4
4
|
const F = { class: "ss-dbg-search-bar" }, I = { class: "ss-dbg-summary" }, P = {
|
|
5
5
|
key: 0,
|
|
@@ -20,44 +20,43 @@ const F = { class: "ss-dbg-search-bar" }, I = { class: "ss-dbg-summary" }, P = {
|
|
|
20
20
|
dashboardPath: {}
|
|
21
21
|
},
|
|
22
22
|
setup(_) {
|
|
23
|
-
const b = _, c = D(""),
|
|
23
|
+
const b = _, c = D(""), r = /* @__PURE__ */ new Set(), m = d(() => {
|
|
24
24
|
if (!b.data) return [];
|
|
25
25
|
const s = b.data;
|
|
26
26
|
return (Array.isArray(s) ? s : s.queries) || [];
|
|
27
|
-
}),
|
|
28
|
-
let s = `${
|
|
29
|
-
return
|
|
27
|
+
}), o = d(() => K(m.value, c.value)), p = d(() => L(m.value)), u = d(() => M(m.value, p.value)), C = d(() => {
|
|
28
|
+
let s = `${o.value.length} queries`;
|
|
29
|
+
return u.value.slowCount > 0 && (s += ` | ${u.value.slowCount} slow`), u.value.dupCount > 0 && (s += ` | ${u.value.dupCount} dup`), o.value.length > 0 && (s += ` | avg ${y(u.value.avgDuration)}`), s;
|
|
30
30
|
});
|
|
31
31
|
function g(s) {
|
|
32
|
-
|
|
32
|
+
r.has(s) ? r.delete(s) : r.add(s);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
34
|
+
function w(s) {
|
|
35
|
+
return r.has(s);
|
|
36
36
|
}
|
|
37
37
|
function k(s) {
|
|
38
|
-
|
|
39
|
-
return n === "very-slow" ? "ss-dbg-very-slow" : n === "slow" ? "ss-dbg-slow" : "";
|
|
38
|
+
return z(s, "ss-dbg");
|
|
40
39
|
}
|
|
41
|
-
const { tableRef: x } = B(() =>
|
|
42
|
-
return (s,
|
|
40
|
+
const { tableRef: x } = B(() => o.value);
|
|
41
|
+
return (s, i) => (l(), n("div", null, [
|
|
43
42
|
e("div", F, [
|
|
44
43
|
Q(e("input", {
|
|
45
|
-
"onUpdate:modelValue":
|
|
44
|
+
"onUpdate:modelValue": i[0] || (i[0] = (t) => c.value = t),
|
|
46
45
|
class: "ss-dbg-search",
|
|
47
46
|
placeholder: "Filter queries...",
|
|
48
47
|
type: "text"
|
|
49
48
|
}, null, 512), [
|
|
50
|
-
[
|
|
49
|
+
[N, c.value]
|
|
51
50
|
]),
|
|
52
|
-
e("span", I,
|
|
51
|
+
e("span", I, a(C.value), 1)
|
|
53
52
|
]),
|
|
54
|
-
|
|
53
|
+
o.value.length === 0 ? (l(), n("div", P, "No queries captured")) : (l(), n("table", {
|
|
55
54
|
key: 1,
|
|
56
55
|
ref_key: "tableRef",
|
|
57
56
|
ref: x,
|
|
58
57
|
class: "ss-dbg-table"
|
|
59
58
|
}, [
|
|
60
|
-
|
|
59
|
+
i[1] || (i[1] = e("thead", null, [
|
|
61
60
|
e("tr", null, [
|
|
62
61
|
e("th", null, "#"),
|
|
63
62
|
e("th", null, "SQL"),
|
|
@@ -68,34 +67,34 @@ const F = { class: "ss-dbg-search-bar" }, I = { class: "ss-dbg-summary" }, P = {
|
|
|
68
67
|
])
|
|
69
68
|
], -1)),
|
|
70
69
|
e("tbody", null, [
|
|
71
|
-
(
|
|
70
|
+
(l(!0), n(S, null, E(o.value, (t) => (l(), n("tr", {
|
|
72
71
|
key: t.id
|
|
73
72
|
}, [
|
|
74
|
-
e("td", U,
|
|
73
|
+
e("td", U, a(t.id), 1),
|
|
75
74
|
e("td", null, [
|
|
76
75
|
e("span", {
|
|
77
|
-
class:
|
|
76
|
+
class: h(["ss-dbg-sql", { "ss-dbg-expanded": w(t.id) }]),
|
|
78
77
|
role: "button",
|
|
79
78
|
tabindex: "0",
|
|
80
79
|
onClick: (T) => g(t.id),
|
|
81
80
|
onKeydown: A((T) => g(t.id), ["enter"])
|
|
82
|
-
},
|
|
83
|
-
p.value[t.sql] > 1 ? (
|
|
84
|
-
t.inTransaction ? (
|
|
81
|
+
}, a(t.sql), 43, X),
|
|
82
|
+
p.value[t.sql] > 1 ? (l(), n("span", j, " x" + a(p.value[t.sql]), 1)) : f("", !0),
|
|
83
|
+
t.inTransaction ? (l(), n("span", G, " TXN")) : f("", !0)
|
|
85
84
|
]),
|
|
86
85
|
e("td", {
|
|
87
|
-
class:
|
|
88
|
-
},
|
|
86
|
+
class: h(["ss-dbg-duration", k(t.duration)])
|
|
87
|
+
}, a(v(y)(t.duration)), 3),
|
|
89
88
|
e("td", null, [
|
|
90
89
|
e("span", {
|
|
91
|
-
class:
|
|
92
|
-
},
|
|
90
|
+
class: h(`ss-dbg-method ss-dbg-method-${t.method.toLowerCase()}`)
|
|
91
|
+
}, a(t.method), 3)
|
|
93
92
|
]),
|
|
94
|
-
e("td", H,
|
|
93
|
+
e("td", H, a(t.model || "-"), 1),
|
|
95
94
|
e("td", {
|
|
96
95
|
class: "ss-dbg-event-time",
|
|
97
|
-
title:
|
|
98
|
-
},
|
|
96
|
+
title: v(R)(t.timestamp)
|
|
97
|
+
}, a(v(V)(t.timestamp)), 9, J)
|
|
99
98
|
]))), 128))
|
|
100
99
|
])
|
|
101
100
|
], 512))
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as y, ref as k, openBlock as t, createElementBlock as o, createElementVNode as l, createTextVNode as x, toDisplayString as n, Fragment as g, renderList as L, unref as e, normalizeClass as _, createVNode as C, createCommentVNode as v } from "vue";
|
|
2
|
+
import { getStructuredData as a, getLogLevelCssClass as N, resolveLogLevel as f, resolveLogTimestamp as c, formatTime as V, timeAgo as q, resolveLogRequestId as m, resolveLogMessage as E } from "adonisjs-server-stats/core";
|
|
3
|
+
import { _ as R } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
|
|
4
|
+
const T = { key: 0 }, b = { class: "ss-related-logs-title" }, w = { class: "ss-related-logs-count" }, B = { style: { overflow: "auto" } }, D = ["onClick"], I = ["title"], S = ["title"], $ = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "ss-log-reqid-empty"
|
|
7
|
+
}, z = {
|
|
8
|
+
key: 3,
|
|
9
|
+
style: { width: "14px" }
|
|
10
|
+
}, A = { class: "ss-log-msg" }, F = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "ss-log-detail"
|
|
13
|
+
}, H = /* @__PURE__ */ y({
|
|
14
|
+
__name: "RelatedLogs",
|
|
15
|
+
props: {
|
|
16
|
+
logs: {}
|
|
17
|
+
},
|
|
18
|
+
setup(p) {
|
|
19
|
+
const r = k(null);
|
|
20
|
+
function h(u, i) {
|
|
21
|
+
i && (r.value = r.value === u ? null : u);
|
|
22
|
+
}
|
|
23
|
+
return (u, i) => p.logs.length > 0 ? (t(), o("div", T, [
|
|
24
|
+
l("div", b, [
|
|
25
|
+
i[0] || (i[0] = x(" Related Logs ", -1)),
|
|
26
|
+
l("span", w, "(" + n(p.logs.length) + ")", 1)
|
|
27
|
+
]),
|
|
28
|
+
l("div", B, [
|
|
29
|
+
(t(!0), o(g, null, L(p.logs, (s, d) => (t(), o(g, {
|
|
30
|
+
key: s.id || d
|
|
31
|
+
}, [
|
|
32
|
+
l("div", {
|
|
33
|
+
class: _([
|
|
34
|
+
"ss-log-entry",
|
|
35
|
+
e(a)(s) ? "ss-log-entry-expandable" : ""
|
|
36
|
+
]),
|
|
37
|
+
onClick: (M) => h(d, !!e(a)(s))
|
|
38
|
+
}, [
|
|
39
|
+
l("span", {
|
|
40
|
+
class: _([
|
|
41
|
+
"ss-log-level",
|
|
42
|
+
e(N)(e(f)(s), "ss-log-level")
|
|
43
|
+
])
|
|
44
|
+
}, n(e(f)(s).toUpperCase()), 3),
|
|
45
|
+
l("span", {
|
|
46
|
+
class: "ss-log-time",
|
|
47
|
+
title: e(c)(s) ? e(V)(e(c)(s)) : ""
|
|
48
|
+
}, n(e(c)(s) ? e(q)(e(c)(s)) : "-"), 9, I),
|
|
49
|
+
e(m)(s) ? (t(), o("span", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "ss-log-reqid",
|
|
52
|
+
title: e(m)(s)
|
|
53
|
+
}, n(e(m)(s).slice(0, 8)), 9, S)) : (t(), o("span", $, "--")),
|
|
54
|
+
e(a)(s) ? (t(), o("span", {
|
|
55
|
+
key: 2,
|
|
56
|
+
class: _([
|
|
57
|
+
"ss-log-expand-icon",
|
|
58
|
+
r.value === d ? "ss-log-expand-icon-open" : ""
|
|
59
|
+
])
|
|
60
|
+
}, "▶", 2)) : (t(), o("span", z)),
|
|
61
|
+
l("span", A, n(e(E)(s)), 1)
|
|
62
|
+
], 10, D),
|
|
63
|
+
r.value === d && e(a)(s) ? (t(), o("div", F, [
|
|
64
|
+
C(R, {
|
|
65
|
+
value: e(a)(s),
|
|
66
|
+
"class-prefix": "ss-dbg",
|
|
67
|
+
"default-expanded": !0
|
|
68
|
+
}, null, 8, ["value"])
|
|
69
|
+
])) : v("", !0)
|
|
70
|
+
], 64))), 128))
|
|
71
|
+
])
|
|
72
|
+
])) : v("", !0);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
H as _
|
|
77
|
+
};
|