adonisjs-server-stats 1.9.0 → 1.10.3
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/formatters-helpers.d.ts +23 -0
- package/dist/core/index.js +596 -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/split-pane.d.ts +18 -0
- package/dist/core/trace-utils.d.ts +5 -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 +11 -443
- package/dist/react/{CacheSection-xH75hwXu.js → CacheSection-baMZotSn.js} +2 -2
- package/dist/react/CacheTab-2cw_rMzj.js +117 -0
- package/dist/react/{ConfigSection-D8BO1Ry9.js → ConfigSection-DGgqjAal.js} +1 -1
- package/dist/react/{ConfigTab-CcN-tfjv.js → ConfigTab-H3OnYqmK.js} +1 -1
- package/dist/react/CustomPaneTab-B6r7ha0u.js +98 -0
- package/dist/react/{EmailsSection-BzlsTdPs.js → EmailsSection-C-UZISG-.js} +2 -2
- package/dist/react/EmailsTab-DbK4Eobn.js +139 -0
- package/dist/react/{EventsSection-CGQWiIdV.js → EventsSection-C7RQW_LY.js} +2 -2
- package/dist/react/EventsTab-CfVr7AiM.js +57 -0
- package/dist/react/{FilterBar-DQRXpWrb.js → FilterBar-CQ7bD669.js} +15 -15
- package/dist/react/{JobsSection-D7AHQmZi.js → JobsSection-CQHNK_Ls.js} +2 -2
- package/dist/react/{JobsTab-B3Lfdqed.js → JobsTab-znzf6jzk.js} +54 -42
- package/dist/react/{LogsSection-Cly1dpvS.js → LogsSection-Dmm3rE2B.js} +9 -3
- package/dist/react/LogsTab-D8unMV5P.js +108 -0
- package/dist/react/{OverviewSection-CkBGFEWq.js → OverviewSection-ABP9ueBo.js} +1 -1
- package/dist/react/{QueriesSection-CfCpnNUD.js → QueriesSection-CnmSkznA.js} +2 -2
- package/dist/react/{QueriesTab-DbBmAqzO.js → QueriesTab-BQzcxEiW.js} +37 -40
- package/dist/react/RelatedLogs-3A8RuGKH.js +52 -0
- package/dist/react/RequestsSection-kW79_M7k.js +341 -0
- package/dist/react/{RoutesSection-CRqF-cNM.js → RoutesSection-BRhxrtjZ.js} +2 -2
- package/dist/react/RoutesTab-CpYH5lUw.js +68 -0
- package/dist/react/TimelineTab-DjLR35Ce.js +214 -0
- package/dist/react/index-CsImORX6.js +1121 -0
- package/dist/react/index.js +1 -1
- package/dist/react/react/components/{Dashboard/shared → shared}/FilterBar.d.ts +4 -3
- package/dist/react/react/components/shared/RelatedLogs.d.ts +7 -0
- package/dist/react/react/hooks/useDashboardData.d.ts +4 -8
- 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 +52 -532
- 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 -217
- package/dist/src/dashboard/dashboard_store.js +115 -1069
- 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 -153
- 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 +6 -36
- package/dist/src/data/data_access.js +43 -188
- 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 +10 -2
- package/dist/src/debug/trace_collector.js +23 -16
- package/dist/src/debug/types.d.ts +5 -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 +3 -3
- 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 +3 -8
- package/dist/src/middleware/request_tracking_middleware.js +65 -91
- 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 +131 -936
- 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 -347
- 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 +177 -0
- package/dist/src/styles/dashboard.css +8 -90
- package/dist/src/styles/debug-panel.css +10 -31
- package/dist/src/types.d.ts +306 -15
- package/dist/vue/{CacheSection-Cx-hj09X.js → CacheSection-ITqvpfH5.js} +1 -1
- package/dist/vue/{ConfigSection-CMXyryf6.js → ConfigSection-DTn3GslE.js} +1 -1
- package/dist/vue/{EmailsSection-DgKl9xGT.js → EmailsSection-DtLJ4XoS.js} +1 -1
- package/dist/vue/{EventsSection-BNMCAim1.js → EventsSection-BOYYz0Ty.js} +1 -1
- package/dist/vue/{JobsSection-CCMgMlxd.js → JobsSection-BazTxcJL.js} +1 -1
- package/dist/vue/{LogsSection-CvOnTxUu.js → LogsSection-D55PjTKX.js} +9 -3
- package/dist/vue/{LogsTab-Bg3o0Mm6.js → LogsTab-47zEK7jL.js} +4 -1
- package/dist/vue/{OverviewSection-CHgaKtUR.js → OverviewSection-1uBKo-Tu.js} +1 -1
- package/dist/vue/{QueriesSection-BnHRD98z.js → QueriesSection-rpoZ4ogd.js} +1 -1
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +84 -0
- package/dist/vue/RequestsSection-x7LvT0MC.js +401 -0
- package/dist/vue/{RoutesSection-BrceOcKQ.js → RoutesSection-CCD0zZqQ.js} +1 -1
- package/dist/vue/TimelineTab-zj5Z5OdT.js +338 -0
- package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +4 -0
- package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +4 -0
- package/dist/vue/components/{Dashboard/sections/TimelineSection.vue.d.ts → shared/RelatedLogs.vue.d.ts} +5 -6
- package/dist/vue/composables/useDashboardData.d.ts +12 -23
- package/dist/vue/index-C8MxnS7Q.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/CacheTab-DYmsZJJ1.js +0 -123
- package/dist/react/CustomPaneTab-D7_o3Ec6.js +0 -104
- package/dist/react/EmailsTab-Uh2CQY3o.js +0 -153
- package/dist/react/EventsTab-CC6DQzEm.js +0 -63
- package/dist/react/LogsTab-BbYK-iyh.js +0 -103
- package/dist/react/RequestsSection-Cb5a6MlT.js +0 -209
- package/dist/react/RoutesTab-Bwreij3e.js +0 -74
- package/dist/react/TimelineSection-B2y06kRE.js +0 -158
- package/dist/react/TimelineTab-6hthfdBB.js +0 -193
- package/dist/react/WaterfallChart-Cj73WdfM.js +0 -100
- package/dist/react/index-CecA4IdQ.js +0 -1075
- package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +0 -8
- package/dist/vue/RequestsSection-B-uSlM0f.js +0 -243
- package/dist/vue/TimelineSection-CfvnA2Oo.js +0 -186
- package/dist/vue/TimelineTab-Db6lKKsD.js +0 -250
- package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +0 -118
- package/dist/vue/index-oLxS08vN.js +0 -1235
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DashboardHookOptions } from '../../../../core/types.js';
|
|
2
|
-
interface TimelineSectionProps {
|
|
3
|
-
options?: DashboardHookOptions;
|
|
4
|
-
/** When false, show a "tracing disabled" message instead of fetching. Defaults to true. */
|
|
5
|
-
tracingEnabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function TimelineSection({ options, tracingEnabled }: TimelineSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default TimelineSection;
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, inject as _, ref as h, computed as U, openBlock as o, createElementBlock as l, Fragment as m, createElementVNode as s, normalizeClass as v, toDisplayString as n, createVNode as D, unref as a, createCommentVNode as u, createTextVNode as y, renderList as j, createBlock as K } from "vue";
|
|
2
|
-
import { formatTime as G, timeAgo as H, normalizeTraceFields as I, durationSeverity as J } from "adonisjs-server-stats/core";
|
|
3
|
-
import { u as O } from "./useApiClient-BQQ9CF-q.js";
|
|
4
|
-
import { u as Q } from "./index-oLxS08vN.js";
|
|
5
|
-
import { u as W } from "./useResizableTable-BoivAevK.js";
|
|
6
|
-
import { _ as X } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
|
|
7
|
-
import { _ as Y } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
|
|
8
|
-
import { _ as Z } from "./WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js";
|
|
9
|
-
const ss = { class: "ss-dash-tl-detail-header" }, ts = { style: { color: "var(--ss-text)" } }, es = { class: "ss-dash-tl-meta" }, as = { class: "ss-dash-tl-detail-header" }, os = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "ss-dash-empty"
|
|
12
|
-
}, ls = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "ss-dash-empty"
|
|
15
|
-
}, ns = { class: "ss-dash-table-wrap" }, ds = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "ss-dash-sort-arrow"
|
|
18
|
-
}, is = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "ss-dash-sort-arrow"
|
|
21
|
-
}, rs = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "ss-dash-sort-arrow"
|
|
24
|
-
}, us = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "ss-dash-sort-arrow"
|
|
27
|
-
}, cs = {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "ss-dash-sort-arrow"
|
|
30
|
-
}, ps = ["onClick"], hs = { style: { color: "var(--ss-dim)" } }, ms = ["title"], vs = { style: { color: "var(--ss-muted)", "text-align": "center" } }, ys = {
|
|
31
|
-
key: 0,
|
|
32
|
-
style: { color: "var(--ss-amber-fg)", "text-align": "center", display: "block" }
|
|
33
|
-
}, fs = {
|
|
34
|
-
key: 1,
|
|
35
|
-
style: { color: "var(--ss-dim)", "text-align": "center", display: "block" }
|
|
36
|
-
}, ks = ["title"], _s = {
|
|
37
|
-
key: 1,
|
|
38
|
-
class: "ss-dash-empty"
|
|
39
|
-
}, Rs = /* @__PURE__ */ M({
|
|
40
|
-
__name: "RequestsSection",
|
|
41
|
-
setup(gs) {
|
|
42
|
-
const S = _("ss-refresh-key", h(0)), C = _("ss-dashboard-endpoint", "/__stats/api"), b = _("ss-auth-token", void 0), x = _("ss-base-url", ""), { data: f, loading: R, error: T, pagination: c, sort: r, goToPage: L, setSearch: A, setSort: B } = Q(
|
|
43
|
-
() => "requests",
|
|
44
|
-
{
|
|
45
|
-
baseUrl: x,
|
|
46
|
-
dashboardEndpoint: C,
|
|
47
|
-
authToken: b,
|
|
48
|
-
refreshKey: S
|
|
49
|
-
}
|
|
50
|
-
), $ = h(""), g = h(null), k = h(!1), d = h(null), w = U(() => {
|
|
51
|
-
if (!f.value) return [];
|
|
52
|
-
const i = f.value;
|
|
53
|
-
return i.data || i.requests || f.value || [];
|
|
54
|
-
}), F = O(x, b);
|
|
55
|
-
async function N(i) {
|
|
56
|
-
const t = i.id;
|
|
57
|
-
k.value = !0;
|
|
58
|
-
try {
|
|
59
|
-
const e = C || "/__stats/api", q = await F().fetch(`${e}/requests/${t}`);
|
|
60
|
-
d.value = I(q), g.value = i;
|
|
61
|
-
} catch {
|
|
62
|
-
} finally {
|
|
63
|
-
k.value = !1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function P() {
|
|
67
|
-
g.value = null, d.value = null;
|
|
68
|
-
}
|
|
69
|
-
function V(i) {
|
|
70
|
-
$.value = i, A(i);
|
|
71
|
-
}
|
|
72
|
-
function p(i) {
|
|
73
|
-
B(i);
|
|
74
|
-
}
|
|
75
|
-
function z(i) {
|
|
76
|
-
const t = J(i);
|
|
77
|
-
return t === "very-slow" ? "ss-dash-very-slow" : t === "slow" ? "ss-dash-slow" : "";
|
|
78
|
-
}
|
|
79
|
-
const { tableRef: E } = W(() => w.value);
|
|
80
|
-
return (i, t) => (o(), l("div", null, [
|
|
81
|
-
d.value && g.value ? (o(), l(m, { key: 0 }, [
|
|
82
|
-
s("div", ss, [
|
|
83
|
-
s("button", {
|
|
84
|
-
type: "button",
|
|
85
|
-
class: "ss-dash-btn",
|
|
86
|
-
onClick: P
|
|
87
|
-
}, " ← Back to Requests "),
|
|
88
|
-
s("span", {
|
|
89
|
-
class: v(`ss-dash-method ss-dash-method-${(d.value.method || "").toLowerCase()}`)
|
|
90
|
-
}, n(d.value.method), 3),
|
|
91
|
-
s("span", ts, n(d.value.url), 1),
|
|
92
|
-
s("span", {
|
|
93
|
-
class: v(`ss-dash-status ss-dash-status-${Math.floor((d.value.statusCode || 200) / 100)}xx`)
|
|
94
|
-
}, n(d.value.statusCode), 3),
|
|
95
|
-
s("span", es, n(d.value.totalDuration.toFixed(1)) + "ms · " + n(d.value.spanCount) + " spans ", 1)
|
|
96
|
-
]),
|
|
97
|
-
D(Z, {
|
|
98
|
-
spans: d.value.spans,
|
|
99
|
-
"total-duration": d.value.totalDuration,
|
|
100
|
-
warnings: d.value.warnings
|
|
101
|
-
}, null, 8, ["spans", "total-duration", "warnings"])
|
|
102
|
-
], 64)) : k.value ? (o(), l(m, { key: 1 }, [
|
|
103
|
-
s("div", as, [
|
|
104
|
-
s("button", {
|
|
105
|
-
type: "button",
|
|
106
|
-
class: "ss-dash-btn",
|
|
107
|
-
onClick: t[0] || (t[0] = (e) => k.value = !1)
|
|
108
|
-
}, " ← Back to Requests ")
|
|
109
|
-
]),
|
|
110
|
-
t[6] || (t[6] = s("div", { class: "ss-dash-empty" }, "Loading request detail...", -1))
|
|
111
|
-
], 64)) : (o(), l(m, { key: 2 }, [
|
|
112
|
-
D(X, {
|
|
113
|
-
"model-value": $.value,
|
|
114
|
-
placeholder: "Filter requests...",
|
|
115
|
-
summary: `${a(c).total ?? 0} requests`,
|
|
116
|
-
"onUpdate:modelValue": V
|
|
117
|
-
}, null, 8, ["model-value", "summary"]),
|
|
118
|
-
a(T) ? (o(), l("div", os, "Failed to load requests")) : u("", !0),
|
|
119
|
-
a(R) && !a(f) ? (o(), l("div", ls, "Loading requests...")) : (o(), l(m, { key: 2 }, [
|
|
120
|
-
s("div", ns, [
|
|
121
|
-
w.value.length > 0 ? (o(), l("table", {
|
|
122
|
-
key: 0,
|
|
123
|
-
ref_key: "tableRef",
|
|
124
|
-
ref: E,
|
|
125
|
-
class: "ss-dash-table"
|
|
126
|
-
}, [
|
|
127
|
-
t[15] || (t[15] = s("colgroup", null, [
|
|
128
|
-
s("col", { style: { width: "40px" } }),
|
|
129
|
-
s("col", { style: { width: "70px" } }),
|
|
130
|
-
s("col"),
|
|
131
|
-
s("col", { style: { width: "60px" } }),
|
|
132
|
-
s("col", { style: { width: "80px" } }),
|
|
133
|
-
s("col", { style: { width: "50px" } }),
|
|
134
|
-
s("col", { style: { width: "40px" } }),
|
|
135
|
-
s("col", { style: { width: "80px" } })
|
|
136
|
-
], -1)),
|
|
137
|
-
s("thead", null, [
|
|
138
|
-
s("tr", null, [
|
|
139
|
-
t[12] || (t[12] = s("th", null, "#", -1)),
|
|
140
|
-
s("th", {
|
|
141
|
-
class: "ss-dash-sortable",
|
|
142
|
-
onClick: t[1] || (t[1] = (e) => p("method"))
|
|
143
|
-
}, [
|
|
144
|
-
t[7] || (t[7] = y(" Method ", -1)),
|
|
145
|
-
a(r).column === "method" ? (o(), l("span", ds, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
146
|
-
]),
|
|
147
|
-
s("th", {
|
|
148
|
-
class: "ss-dash-sortable",
|
|
149
|
-
onClick: t[2] || (t[2] = (e) => p("url"))
|
|
150
|
-
}, [
|
|
151
|
-
t[8] || (t[8] = y(" URL ", -1)),
|
|
152
|
-
a(r).column === "url" ? (o(), l("span", is, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
153
|
-
]),
|
|
154
|
-
s("th", {
|
|
155
|
-
class: "ss-dash-sortable",
|
|
156
|
-
onClick: t[3] || (t[3] = (e) => p("statusCode"))
|
|
157
|
-
}, [
|
|
158
|
-
t[9] || (t[9] = y(" Status ", -1)),
|
|
159
|
-
a(r).column === "statusCode" ? (o(), l("span", rs, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
160
|
-
]),
|
|
161
|
-
s("th", {
|
|
162
|
-
class: "ss-dash-sortable",
|
|
163
|
-
onClick: t[4] || (t[4] = (e) => p("duration"))
|
|
164
|
-
}, [
|
|
165
|
-
t[10] || (t[10] = y(" Duration ", -1)),
|
|
166
|
-
a(r).column === "duration" ? (o(), l("span", us, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
167
|
-
]),
|
|
168
|
-
t[13] || (t[13] = s("th", null, "Spans", -1)),
|
|
169
|
-
t[14] || (t[14] = s("th", null, "⚠", -1)),
|
|
170
|
-
s("th", {
|
|
171
|
-
class: "ss-dash-sortable",
|
|
172
|
-
onClick: t[5] || (t[5] = (e) => p("createdAt"))
|
|
173
|
-
}, [
|
|
174
|
-
t[11] || (t[11] = y(" Time ", -1)),
|
|
175
|
-
a(r).column === "createdAt" ? (o(), l("span", cs, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
176
|
-
])
|
|
177
|
-
])
|
|
178
|
-
]),
|
|
179
|
-
s("tbody", null, [
|
|
180
|
-
(o(!0), l(m, null, j(w.value, (e) => (o(), l("tr", {
|
|
181
|
-
key: e.id,
|
|
182
|
-
class: "ss-dash-clickable",
|
|
183
|
-
onClick: (q) => N(e)
|
|
184
|
-
}, [
|
|
185
|
-
s("td", null, [
|
|
186
|
-
s("span", hs, n(e.id), 1)
|
|
187
|
-
]),
|
|
188
|
-
s("td", null, [
|
|
189
|
-
s("span", {
|
|
190
|
-
class: v(`ss-dash-method ss-dash-method-${(e.method || "").toLowerCase()}`)
|
|
191
|
-
}, n(e.method), 3)
|
|
192
|
-
]),
|
|
193
|
-
s("td", null, [
|
|
194
|
-
s("span", {
|
|
195
|
-
style: { color: "var(--ss-text)", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" },
|
|
196
|
-
title: e.url
|
|
197
|
-
}, n(e.url), 9, ms)
|
|
198
|
-
]),
|
|
199
|
-
s("td", null, [
|
|
200
|
-
s("span", {
|
|
201
|
-
class: v(`ss-dash-status ss-dash-status-${Math.floor((e.status_code || e.statusCode || 200) / 100)}xx`)
|
|
202
|
-
}, n(e.status_code || e.statusCode), 3)
|
|
203
|
-
]),
|
|
204
|
-
s("td", null, [
|
|
205
|
-
s("span", {
|
|
206
|
-
class: v(`ss-dash-duration ${z(e.total_duration || e.totalDuration || e.duration || 0)}`)
|
|
207
|
-
}, n((e.total_duration || e.totalDuration || e.duration || 0).toFixed(1)) + "ms ", 3)
|
|
208
|
-
]),
|
|
209
|
-
s("td", null, [
|
|
210
|
-
s("span", vs, n(e.span_count || e.spanCount || 0), 1)
|
|
211
|
-
]),
|
|
212
|
-
s("td", null, [
|
|
213
|
-
(e.warning_count || e.warningCount || 0) > 0 ? (o(), l("span", ys, n(e.warning_count || e.warningCount || 0), 1)) : (o(), l("span", fs, "-"))
|
|
214
|
-
]),
|
|
215
|
-
s("td", null, [
|
|
216
|
-
s("span", {
|
|
217
|
-
class: "ss-dash-event-time",
|
|
218
|
-
title: a(G)(
|
|
219
|
-
e.createdAt || e.created_at || e.timestamp || ""
|
|
220
|
-
)
|
|
221
|
-
}, n(a(H)(
|
|
222
|
-
e.createdAt || e.created_at || e.timestamp || ""
|
|
223
|
-
)), 9, ks)
|
|
224
|
-
])
|
|
225
|
-
], 8, ps))), 128))
|
|
226
|
-
])
|
|
227
|
-
], 512)) : (o(), l("div", _s, "No requests recorded yet"))
|
|
228
|
-
]),
|
|
229
|
-
a(c).totalPages > 1 ? (o(), K(Y, {
|
|
230
|
-
key: 0,
|
|
231
|
-
page: a(c).page,
|
|
232
|
-
"last-page": a(c).totalPages,
|
|
233
|
-
total: a(c).total,
|
|
234
|
-
onPageChange: a(L)
|
|
235
|
-
}, null, 8, ["page", "last-page", "total", "onPageChange"])) : u("", !0)
|
|
236
|
-
], 64))
|
|
237
|
-
], 64))
|
|
238
|
-
]));
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
export {
|
|
242
|
-
Rs as default
|
|
243
|
-
};
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, inject as v, ref as i, computed as U, openBlock as l, createElementBlock as o, Fragment as c, createElementVNode as s, normalizeClass as h, toDisplayString as n, unref as a, createVNode as C, createCommentVNode as x, renderList as z, createBlock as j } from "vue";
|
|
2
|
-
import { parseTraceSpans as $, parseTraceWarnings as I, formatTime as K, timeAgo as W, durationSeverity as q } from "adonisjs-server-stats/core";
|
|
3
|
-
import { u as G } from "./useApiClient-BQQ9CF-q.js";
|
|
4
|
-
import { u as H } from "./index-oLxS08vN.js";
|
|
5
|
-
import { u as J } from "./useResizableTable-BoivAevK.js";
|
|
6
|
-
import { _ as O } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
|
|
7
|
-
import { _ as Q } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
|
|
8
|
-
import { _ as X } from "./WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js";
|
|
9
|
-
const Y = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "ss-dash-empty"
|
|
12
|
-
}, Z = { class: "ss-dash-tl-detail-header" }, ss = { style: { color: "var(--ss-text)" } }, ts = { class: "ss-dash-tl-meta" }, es = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "ss-dash-empty"
|
|
15
|
-
}, as = {
|
|
16
|
-
key: 1,
|
|
17
|
-
class: "ss-dash-empty"
|
|
18
|
-
}, ls = { class: "ss-dash-table-wrap" }, os = ["onClick"], ns = { style: { color: "var(--ss-dim)" } }, rs = ["title"], ds = { style: { color: "var(--ss-muted)", "text-align": "center" } }, us = ["title"], is = {
|
|
19
|
-
key: 1,
|
|
20
|
-
class: "ss-dash-empty"
|
|
21
|
-
}, ks = /* @__PURE__ */ M({
|
|
22
|
-
__name: "TimelineSection",
|
|
23
|
-
props: {
|
|
24
|
-
tracingEnabled: { type: Boolean, default: !0 }
|
|
25
|
-
},
|
|
26
|
-
setup(D) {
|
|
27
|
-
const T = D, S = v("ss-refresh-key", i(0)), f = v("ss-dashboard-endpoint", "/__stats/api"), g = v("ss-auth-token", void 0), k = v("ss-base-url", ""), { data: p, loading: B, error: L, pagination: u, goToPage: E, setSearch: F } = H(() => "traces", {
|
|
28
|
-
baseUrl: k,
|
|
29
|
-
dashboardEndpoint: f,
|
|
30
|
-
authToken: g,
|
|
31
|
-
refreshKey: S
|
|
32
|
-
}), b = i(""), m = i(null), e = i(null), _ = i(!1), y = U(() => {
|
|
33
|
-
if (!p.value) return [];
|
|
34
|
-
const r = p.value;
|
|
35
|
-
return r.data || r.traces || p.value || [];
|
|
36
|
-
}), P = G(k, g);
|
|
37
|
-
async function A(r) {
|
|
38
|
-
m.value = r, _.value = !0, e.value = null;
|
|
39
|
-
try {
|
|
40
|
-
const d = f || "/__stats/api", t = await P().fetch(`${d}/traces/${r}`);
|
|
41
|
-
e.value = t;
|
|
42
|
-
} catch {
|
|
43
|
-
} finally {
|
|
44
|
-
_.value = !1;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function w() {
|
|
48
|
-
m.value = null, e.value = null;
|
|
49
|
-
}
|
|
50
|
-
function N(r) {
|
|
51
|
-
b.value = r, F(r);
|
|
52
|
-
}
|
|
53
|
-
function R(r) {
|
|
54
|
-
const d = q(r);
|
|
55
|
-
return d === "very-slow" ? "ss-dash-very-slow" : d === "slow" ? "ss-dash-slow" : "";
|
|
56
|
-
}
|
|
57
|
-
const { tableRef: V } = J(() => y.value);
|
|
58
|
-
return (r, d) => (l(), o("div", null, [
|
|
59
|
-
T.tracingEnabled ? m.value && e.value ? (l(), o(c, { key: 1 }, [
|
|
60
|
-
s("div", Z, [
|
|
61
|
-
s("button", {
|
|
62
|
-
type: "button",
|
|
63
|
-
class: "ss-dash-btn",
|
|
64
|
-
onClick: w
|
|
65
|
-
}, "← Back"),
|
|
66
|
-
s("span", {
|
|
67
|
-
class: h(`ss-dash-method ss-dash-method-${(e.value.method || "").toLowerCase()}`)
|
|
68
|
-
}, n(e.value.method), 3),
|
|
69
|
-
s("span", ss, n(e.value.url), 1),
|
|
70
|
-
s("span", {
|
|
71
|
-
class: h(`ss-dash-status ss-dash-status-${Math.floor((e.value.status_code || e.value.statusCode || 0) / 100)}xx`)
|
|
72
|
-
}, n(e.value.status_code || e.value.statusCode || 0), 3),
|
|
73
|
-
s("span", ts, n((e.value.total_duration || e.value.totalDuration || 0).toFixed(1)) + "ms · " + n(e.value.spanCount ?? a($)(e.value.spans).length) + " spans ", 1)
|
|
74
|
-
]),
|
|
75
|
-
C(X, {
|
|
76
|
-
spans: a($)(e.value.spans),
|
|
77
|
-
"total-duration": e.value.total_duration || e.value.totalDuration || 0,
|
|
78
|
-
warnings: a(I)(e.value.warnings)
|
|
79
|
-
}, null, 8, ["spans", "total-duration", "warnings"])
|
|
80
|
-
], 64)) : m.value && _.value ? (l(), o(c, { key: 2 }, [
|
|
81
|
-
s("div", { class: "ss-dash-tl-detail-header" }, [
|
|
82
|
-
s("button", {
|
|
83
|
-
type: "button",
|
|
84
|
-
class: "ss-dash-btn",
|
|
85
|
-
onClick: w
|
|
86
|
-
}, "← Back")
|
|
87
|
-
]),
|
|
88
|
-
d[0] || (d[0] = s("div", { class: "ss-dash-empty" }, "Loading trace detail...", -1))
|
|
89
|
-
], 64)) : (l(), o(c, { key: 3 }, [
|
|
90
|
-
C(O, {
|
|
91
|
-
"model-value": b.value,
|
|
92
|
-
placeholder: "Filter traces...",
|
|
93
|
-
summary: `${a(u).total ?? 0} traces`,
|
|
94
|
-
"onUpdate:modelValue": N
|
|
95
|
-
}, null, 8, ["model-value", "summary"]),
|
|
96
|
-
a(L) ? (l(), o("div", es, "Failed to load traces")) : x("", !0),
|
|
97
|
-
a(B) && !a(p) ? (l(), o("div", as, "Loading traces...")) : (l(), o(c, { key: 2 }, [
|
|
98
|
-
s("div", ls, [
|
|
99
|
-
y.value.length > 0 ? (l(), o("table", {
|
|
100
|
-
key: 0,
|
|
101
|
-
ref_key: "tableRef",
|
|
102
|
-
ref: V,
|
|
103
|
-
class: "ss-dash-table"
|
|
104
|
-
}, [
|
|
105
|
-
d[1] || (d[1] = s("colgroup", null, [
|
|
106
|
-
s("col", { style: { width: "40px" } }),
|
|
107
|
-
s("col", { style: { width: "70px" } }),
|
|
108
|
-
s("col"),
|
|
109
|
-
s("col", { style: { width: "60px" } }),
|
|
110
|
-
s("col", { style: { width: "80px" } }),
|
|
111
|
-
s("col", { style: { width: "50px" } }),
|
|
112
|
-
s("col", { style: { width: "80px" } })
|
|
113
|
-
], -1)),
|
|
114
|
-
d[2] || (d[2] = s("thead", null, [
|
|
115
|
-
s("tr", null, [
|
|
116
|
-
s("th", null, "#"),
|
|
117
|
-
s("th", null, "Method"),
|
|
118
|
-
s("th", null, "URL"),
|
|
119
|
-
s("th", null, "Status"),
|
|
120
|
-
s("th", null, "Duration"),
|
|
121
|
-
s("th", null, "Spans"),
|
|
122
|
-
s("th", null, "Time")
|
|
123
|
-
])
|
|
124
|
-
], -1)),
|
|
125
|
-
s("tbody", null, [
|
|
126
|
-
(l(!0), o(c, null, z(y.value, (t) => (l(), o("tr", {
|
|
127
|
-
key: t.id,
|
|
128
|
-
class: "ss-dash-clickable",
|
|
129
|
-
onClick: (cs) => A(t.id)
|
|
130
|
-
}, [
|
|
131
|
-
s("td", null, [
|
|
132
|
-
s("span", ns, n(t.id), 1)
|
|
133
|
-
]),
|
|
134
|
-
s("td", null, [
|
|
135
|
-
s("span", {
|
|
136
|
-
class: h(`ss-dash-method ss-dash-method-${(t.method || "").toLowerCase()}`)
|
|
137
|
-
}, n(t.method), 3)
|
|
138
|
-
]),
|
|
139
|
-
s("td", null, [
|
|
140
|
-
s("span", {
|
|
141
|
-
style: { color: "var(--ss-text)", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" },
|
|
142
|
-
title: t.url
|
|
143
|
-
}, n(t.url), 9, rs)
|
|
144
|
-
]),
|
|
145
|
-
s("td", null, [
|
|
146
|
-
s("span", {
|
|
147
|
-
class: h(`ss-dash-status ss-dash-status-${Math.floor((t.statusCode || t.status_code || 0) / 100)}xx`)
|
|
148
|
-
}, n(t.statusCode || t.status_code || 0), 3)
|
|
149
|
-
]),
|
|
150
|
-
s("td", null, [
|
|
151
|
-
s("span", {
|
|
152
|
-
class: h(`ss-dash-duration ${R(t.totalDuration || t.total_duration || 0)}`)
|
|
153
|
-
}, n((t.totalDuration || t.total_duration || 0).toFixed(1)) + "ms ", 3)
|
|
154
|
-
]),
|
|
155
|
-
s("td", null, [
|
|
156
|
-
s("span", ds, n(t.spanCount || t.span_count || 0), 1)
|
|
157
|
-
]),
|
|
158
|
-
s("td", null, [
|
|
159
|
-
s("span", {
|
|
160
|
-
class: "ss-dash-event-time",
|
|
161
|
-
title: a(K)(
|
|
162
|
-
t.createdAt || t.created_at || t.timestamp
|
|
163
|
-
)
|
|
164
|
-
}, n(a(W)(
|
|
165
|
-
t.createdAt || t.created_at || t.timestamp
|
|
166
|
-
)), 9, us)
|
|
167
|
-
])
|
|
168
|
-
], 8, os))), 128))
|
|
169
|
-
])
|
|
170
|
-
], 512)) : (l(), o("div", is, "No traces recorded"))
|
|
171
|
-
]),
|
|
172
|
-
a(u).totalPages > 1 ? (l(), j(Q, {
|
|
173
|
-
key: 0,
|
|
174
|
-
page: a(u).page,
|
|
175
|
-
"last-page": a(u).totalPages,
|
|
176
|
-
total: a(u).total,
|
|
177
|
-
onPageChange: a(E)
|
|
178
|
-
}, null, 8, ["page", "last-page", "total", "onPageChange"])) : x("", !0)
|
|
179
|
-
], 64))
|
|
180
|
-
], 64)) : (l(), o("div", Y, " Tracing is not enabled. Enable tracing in your server-stats config to use the timeline. "))
|
|
181
|
-
]));
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
export {
|
|
185
|
-
ks as default
|
|
186
|
-
};
|