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
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { defineComponent as I, ref as c, computed as $, watch as Y, nextTick as j, onBeforeUnmount as K, openBlock as s, createElementBlock as l, Fragment as r, createElementVNode as e, toDisplayString as a, normalizeClass as g, unref as u, renderList as b, normalizeStyle as L, createTextVNode as N, createCommentVNode as f, createVNode as J, withDirectives as Q, vModelText as X, withModifiers as Z } from "vue";
|
|
2
|
+
import { initSplitPane as tt, formatDuration as m, TAB_ICONS as V, formatTime as et, timeAgo as st, durationClassName as lt } from "adonisjs-server-stats/core";
|
|
3
|
+
import { u as at } from "./useApiClient-BQQ9CF-q.js";
|
|
4
|
+
import { u as nt } from "./useResizableTable-BoivAevK.js";
|
|
5
|
+
import { _ as ot } from "./RelatedLogs.vue_vue_type_script_setup_true_lang-Py1iu9GU.js";
|
|
6
|
+
const dt = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "ss-dbg-empty"
|
|
9
|
+
}, it = { class: "ss-dbg-empty" }, rt = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "ss-dbg-tl-detail-wrapper"
|
|
12
|
+
}, ut = { class: "ss-dbg-tl-detail-header" }, ct = { class: "ss-dbg-tl-detail-url" }, gt = { class: "ss-dbg-tl-meta" }, bt = { class: "ss-dbg-tl-legend" }, vt = { id: "ss-dbg-tl-waterfall" }, ht = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "ss-dbg-empty"
|
|
15
|
+
}, mt = ["title"], pt = { class: "ss-dbg-tl-track" }, ft = ["title"], _t = { class: "ss-dbg-tl-dur" }, yt = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "ss-dbg-tl-warnings"
|
|
18
|
+
}, kt = { class: "ss-dbg-tl-legend" }, wt = { id: "ss-dbg-tl-waterfall" }, Ct = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "ss-dbg-empty"
|
|
21
|
+
}, Tt = ["title"], xt = { class: "ss-dbg-tl-track" }, $t = ["title"], Lt = { class: "ss-dbg-tl-dur" }, Rt = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "ss-dbg-tl-warnings"
|
|
24
|
+
}, Bt = {
|
|
25
|
+
key: 3,
|
|
26
|
+
class: "ss-dbg-empty"
|
|
27
|
+
}, Dt = { class: "ss-dbg-search-bar" }, Et = { class: "ss-dbg-summary" }, At = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "ss-dbg-empty"
|
|
30
|
+
}, St = ["onClick"], Mt = {
|
|
31
|
+
class: "ss-dbg-c-dim",
|
|
32
|
+
style: { "white-space": "nowrap" }
|
|
33
|
+
}, Nt = { class: "ss-dbg-c-text" }, qt = ["href"], Ot = ["viewBox", "innerHTML"], Pt = {
|
|
34
|
+
class: "ss-dbg-c-muted",
|
|
35
|
+
style: { "text-align": "center" }
|
|
36
|
+
}, Vt = ["title"], Gt = /* @__PURE__ */ I({
|
|
37
|
+
__name: "TimelineTab",
|
|
38
|
+
props: {
|
|
39
|
+
data: {},
|
|
40
|
+
dashboardPath: {},
|
|
41
|
+
baseUrl: {},
|
|
42
|
+
debugEndpoint: {},
|
|
43
|
+
authToken: {}
|
|
44
|
+
},
|
|
45
|
+
setup(R) {
|
|
46
|
+
const _ = R, y = c(""), v = c(null), n = c(null), B = c(!1), h = c(null), U = at(_.baseUrl || "", _.authToken), k = $(() => {
|
|
47
|
+
const d = _.data;
|
|
48
|
+
if (!d) return [];
|
|
49
|
+
const i = Array.isArray(d) ? d : d.traces || [];
|
|
50
|
+
if (!y.value.trim()) return i;
|
|
51
|
+
const t = y.value.toLowerCase();
|
|
52
|
+
return i.filter(
|
|
53
|
+
(o) => o.url.toLowerCase().includes(t) || o.method.toLowerCase().includes(t) || String(o.statusCode).includes(t)
|
|
54
|
+
);
|
|
55
|
+
}), w = {
|
|
56
|
+
request: "#1e3a5f",
|
|
57
|
+
middleware: "rgba(30, 58, 95, 0.7)",
|
|
58
|
+
db: "#6d28d9",
|
|
59
|
+
view: "#0e7490",
|
|
60
|
+
mail: "#059669",
|
|
61
|
+
event: "#b45309",
|
|
62
|
+
custom: "#525252"
|
|
63
|
+
}, q = {
|
|
64
|
+
request: "Request",
|
|
65
|
+
middleware: "Middleware",
|
|
66
|
+
db: "Database",
|
|
67
|
+
view: "View",
|
|
68
|
+
mail: "Mail",
|
|
69
|
+
event: "Event",
|
|
70
|
+
custom: "Custom"
|
|
71
|
+
};
|
|
72
|
+
function H(d) {
|
|
73
|
+
v.value === d.id ? (v.value = null, n.value = null, h.value = null) : (v.value = d.id, z(d.id));
|
|
74
|
+
}
|
|
75
|
+
function O() {
|
|
76
|
+
v.value = null, n.value = null, h.value = null;
|
|
77
|
+
}
|
|
78
|
+
let p = null;
|
|
79
|
+
async function z(d) {
|
|
80
|
+
p && p.abort(), p = new AbortController(), B.value = !0, h.value = null, n.value = null;
|
|
81
|
+
const i = _.debugEndpoint || "/admin/api/debug";
|
|
82
|
+
try {
|
|
83
|
+
const o = await U().get(`${i}/traces/${d}`);
|
|
84
|
+
n.value = o;
|
|
85
|
+
} catch (t) {
|
|
86
|
+
if (t instanceof Error && t.name === "AbortError") return;
|
|
87
|
+
h.value = t instanceof Error ? t.message : "Failed to load trace";
|
|
88
|
+
} finally {
|
|
89
|
+
B.value = !1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const C = $(() => n.value?.spans || []), T = $(() => n.value?.warnings || []);
|
|
93
|
+
function P(d, i) {
|
|
94
|
+
const t = i || 1, o = t > 0 ? d.startOffset / t * 100 : 0, G = t > 0 ? Math.max(d.duration / t * 100, 0.5) : 0.5;
|
|
95
|
+
return {
|
|
96
|
+
left: `${o}%`,
|
|
97
|
+
width: `${G}%`,
|
|
98
|
+
background: w[d.category] || w.custom
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
const { tableRef: F } = nt(() => k.value), D = c(null), E = c(null), A = c(null), S = c(null);
|
|
102
|
+
let x = null;
|
|
103
|
+
const M = $(() => n.value ? n.value.logs || [] : []);
|
|
104
|
+
Y([v, n], async () => {
|
|
105
|
+
x?.(), x = null, n.value && M.value.length > 0 && (await j(), D.value && E.value && A.value && S.value && (x = tt({
|
|
106
|
+
container: D.value,
|
|
107
|
+
handle: E.value,
|
|
108
|
+
topPane: A.value,
|
|
109
|
+
bottomPane: S.value,
|
|
110
|
+
storageKey: "ss-dbg-timeline-split"
|
|
111
|
+
})));
|
|
112
|
+
}), K(() => {
|
|
113
|
+
p && p.abort(), x?.();
|
|
114
|
+
});
|
|
115
|
+
function W(d) {
|
|
116
|
+
return lt(d, "ss-dbg");
|
|
117
|
+
}
|
|
118
|
+
return (d, i) => (s(), l("div", null, [
|
|
119
|
+
v.value !== null ? (s(), l(r, { key: 0 }, [
|
|
120
|
+
B.value ? (s(), l("div", dt, "Loading trace detail...")) : h.value ? (s(), l(r, { key: 1 }, [
|
|
121
|
+
e("div", { class: "ss-dbg-tl-detail-header" }, [
|
|
122
|
+
e("button", {
|
|
123
|
+
type: "button",
|
|
124
|
+
class: "ss-dbg-btn-clear",
|
|
125
|
+
onClick: O
|
|
126
|
+
}, "← Back")
|
|
127
|
+
]),
|
|
128
|
+
e("div", it, "Error: " + a(h.value), 1)
|
|
129
|
+
], 64)) : n.value ? (s(), l("div", rt, [
|
|
130
|
+
e("div", ut, [
|
|
131
|
+
e("button", {
|
|
132
|
+
type: "button",
|
|
133
|
+
class: "ss-dbg-btn-clear",
|
|
134
|
+
onClick: O
|
|
135
|
+
}, "← Back"),
|
|
136
|
+
e("span", {
|
|
137
|
+
class: g(`ss-dbg-method ss-dbg-method-${n.value.method.toLowerCase()}`)
|
|
138
|
+
}, a(n.value.method), 3),
|
|
139
|
+
e("span", ct, a(n.value.url), 1),
|
|
140
|
+
e("span", {
|
|
141
|
+
class: g(`ss-dbg-status ss-dbg-status-${Math.floor(n.value.statusCode / 100)}xx`)
|
|
142
|
+
}, a(n.value.statusCode), 3),
|
|
143
|
+
e("span", gt, a(u(m)(n.value.totalDuration)) + " · " + a(n.value.spanCount) + " spans ", 1)
|
|
144
|
+
]),
|
|
145
|
+
M.value.length > 0 ? (s(), l("div", {
|
|
146
|
+
key: 0,
|
|
147
|
+
ref_key: "splitContainerRef",
|
|
148
|
+
ref: D,
|
|
149
|
+
class: "ss-dbg-split-container"
|
|
150
|
+
}, [
|
|
151
|
+
e("div", {
|
|
152
|
+
ref_key: "splitTopRef",
|
|
153
|
+
ref: A,
|
|
154
|
+
class: "ss-dbg-split-top"
|
|
155
|
+
}, [
|
|
156
|
+
e("div", bt, [
|
|
157
|
+
(s(), l(r, null, b(w, (t, o) => e("span", {
|
|
158
|
+
key: o,
|
|
159
|
+
class: "ss-dbg-tl-legend-item"
|
|
160
|
+
}, [
|
|
161
|
+
e("span", {
|
|
162
|
+
class: "ss-dbg-tl-legend-dot",
|
|
163
|
+
style: L({ background: t })
|
|
164
|
+
}, null, 4),
|
|
165
|
+
N(" " + a(q[o] || o), 1)
|
|
166
|
+
])), 64))
|
|
167
|
+
]),
|
|
168
|
+
e("div", vt, [
|
|
169
|
+
C.value.length === 0 ? (s(), l("div", ht, " No spans captured for this request ")) : f("", !0),
|
|
170
|
+
(s(!0), l(r, null, b(C.value, (t) => (s(), l("div", {
|
|
171
|
+
key: t.id,
|
|
172
|
+
class: "ss-dbg-tl-row"
|
|
173
|
+
}, [
|
|
174
|
+
e("span", {
|
|
175
|
+
class: "ss-dbg-tl-label",
|
|
176
|
+
title: t.label
|
|
177
|
+
}, a(t.label), 9, mt),
|
|
178
|
+
e("span", pt, [
|
|
179
|
+
e("span", {
|
|
180
|
+
class: g(`ss-dbg-tl-bar ss-dbg-tl-bar-${t.category}`),
|
|
181
|
+
style: L(P(t, n.value.totalDuration)),
|
|
182
|
+
title: `${t.label}: ${u(m)(t.duration)}`
|
|
183
|
+
}, null, 14, ft)
|
|
184
|
+
]),
|
|
185
|
+
e("span", _t, a(u(m)(t.duration)), 1)
|
|
186
|
+
]))), 128))
|
|
187
|
+
]),
|
|
188
|
+
T.value.length > 0 ? (s(), l("div", yt, [
|
|
189
|
+
i[2] || (i[2] = e("div", { class: "ss-dbg-tl-warnings-title" }, "Warnings", -1)),
|
|
190
|
+
(s(!0), l(r, null, b(T.value, (t, o) => (s(), l("div", {
|
|
191
|
+
key: o,
|
|
192
|
+
class: "ss-dbg-tl-warning"
|
|
193
|
+
}, a(t), 1))), 128))
|
|
194
|
+
])) : f("", !0)
|
|
195
|
+
], 512),
|
|
196
|
+
e("div", {
|
|
197
|
+
ref_key: "splitHandleRef",
|
|
198
|
+
ref: E,
|
|
199
|
+
class: "ss-dbg-split-handle"
|
|
200
|
+
}, null, 512),
|
|
201
|
+
e("div", {
|
|
202
|
+
ref_key: "splitBottomRef",
|
|
203
|
+
ref: S,
|
|
204
|
+
class: "ss-dbg-split-bottom"
|
|
205
|
+
}, [
|
|
206
|
+
J(ot, { logs: M.value }, null, 8, ["logs"])
|
|
207
|
+
], 512)
|
|
208
|
+
], 512)) : (s(), l(r, { key: 1 }, [
|
|
209
|
+
e("div", kt, [
|
|
210
|
+
(s(), l(r, null, b(w, (t, o) => e("span", {
|
|
211
|
+
key: o,
|
|
212
|
+
class: "ss-dbg-tl-legend-item"
|
|
213
|
+
}, [
|
|
214
|
+
e("span", {
|
|
215
|
+
class: "ss-dbg-tl-legend-dot",
|
|
216
|
+
style: L({ background: t })
|
|
217
|
+
}, null, 4),
|
|
218
|
+
N(" " + a(q[o] || o), 1)
|
|
219
|
+
])), 64))
|
|
220
|
+
]),
|
|
221
|
+
e("div", wt, [
|
|
222
|
+
C.value.length === 0 ? (s(), l("div", Ct, " No spans captured for this request ")) : f("", !0),
|
|
223
|
+
(s(!0), l(r, null, b(C.value, (t) => (s(), l("div", {
|
|
224
|
+
key: t.id,
|
|
225
|
+
class: "ss-dbg-tl-row"
|
|
226
|
+
}, [
|
|
227
|
+
e("span", {
|
|
228
|
+
class: "ss-dbg-tl-label",
|
|
229
|
+
title: t.label
|
|
230
|
+
}, a(t.label), 9, Tt),
|
|
231
|
+
e("span", xt, [
|
|
232
|
+
e("span", {
|
|
233
|
+
class: g(`ss-dbg-tl-bar ss-dbg-tl-bar-${t.category}`),
|
|
234
|
+
style: L(P(t, n.value.totalDuration)),
|
|
235
|
+
title: `${t.label}: ${u(m)(t.duration)}`
|
|
236
|
+
}, null, 14, $t)
|
|
237
|
+
]),
|
|
238
|
+
e("span", Lt, a(u(m)(t.duration)), 1)
|
|
239
|
+
]))), 128))
|
|
240
|
+
]),
|
|
241
|
+
T.value.length > 0 ? (s(), l("div", Rt, [
|
|
242
|
+
i[3] || (i[3] = e("div", { class: "ss-dbg-tl-warnings-title" }, "Warnings", -1)),
|
|
243
|
+
(s(!0), l(r, null, b(T.value, (t, o) => (s(), l("div", {
|
|
244
|
+
key: o,
|
|
245
|
+
class: "ss-dbg-tl-warning"
|
|
246
|
+
}, a(t), 1))), 128))
|
|
247
|
+
])) : f("", !0)
|
|
248
|
+
], 64))
|
|
249
|
+
])) : (s(), l("div", Bt, "Loading trace detail..."))
|
|
250
|
+
], 64)) : (s(), l(r, { key: 1 }, [
|
|
251
|
+
e("div", Dt, [
|
|
252
|
+
Q(e("input", {
|
|
253
|
+
"onUpdate:modelValue": i[0] || (i[0] = (t) => y.value = t),
|
|
254
|
+
class: "ss-dbg-search",
|
|
255
|
+
placeholder: "Filter traces...",
|
|
256
|
+
type: "text"
|
|
257
|
+
}, null, 512), [
|
|
258
|
+
[X, y.value]
|
|
259
|
+
]),
|
|
260
|
+
e("span", Et, a(k.value.length) + " traces", 1)
|
|
261
|
+
]),
|
|
262
|
+
k.value.length === 0 ? (s(), l("div", At, "No traces captured")) : (s(), l("table", {
|
|
263
|
+
key: 1,
|
|
264
|
+
ref_key: "tableRef",
|
|
265
|
+
ref: F,
|
|
266
|
+
class: "ss-dbg-table"
|
|
267
|
+
}, [
|
|
268
|
+
i[4] || (i[4] = e("thead", null, [
|
|
269
|
+
e("tr", null, [
|
|
270
|
+
e("th", null, "#"),
|
|
271
|
+
e("th", null, "Method"),
|
|
272
|
+
e("th", null, "URL"),
|
|
273
|
+
e("th", null, "Status"),
|
|
274
|
+
e("th", null, "Duration"),
|
|
275
|
+
e("th", null, "Spans"),
|
|
276
|
+
e("th", null, "Time")
|
|
277
|
+
])
|
|
278
|
+
], -1)),
|
|
279
|
+
e("tbody", null, [
|
|
280
|
+
(s(!0), l(r, null, b(k.value, (t) => (s(), l("tr", {
|
|
281
|
+
key: t.id,
|
|
282
|
+
class: "ss-dbg-email-row",
|
|
283
|
+
onClick: (o) => H(t)
|
|
284
|
+
}, [
|
|
285
|
+
e("td", Mt, a(t.id), 1),
|
|
286
|
+
e("td", null, [
|
|
287
|
+
e("span", {
|
|
288
|
+
class: g(`ss-dbg-method ss-dbg-method-${t.method.toLowerCase()}`)
|
|
289
|
+
}, a(t.method), 3)
|
|
290
|
+
]),
|
|
291
|
+
e("td", Nt, [
|
|
292
|
+
N(a(t.url) + " ", 1),
|
|
293
|
+
R.dashboardPath ? (s(), l("a", {
|
|
294
|
+
key: 0,
|
|
295
|
+
href: `${R.dashboardPath}#requests?id=${t.id}`,
|
|
296
|
+
target: "_blank",
|
|
297
|
+
class: "ss-dbg-deeplink",
|
|
298
|
+
onClick: i[1] || (i[1] = Z(() => {
|
|
299
|
+
}, ["stop"]))
|
|
300
|
+
}, [
|
|
301
|
+
(s(), l("svg", {
|
|
302
|
+
viewBox: u(V)["open-external"].viewBox,
|
|
303
|
+
width: "12",
|
|
304
|
+
height: "12",
|
|
305
|
+
fill: "none",
|
|
306
|
+
stroke: "currentColor",
|
|
307
|
+
"stroke-width": "2",
|
|
308
|
+
innerHTML: u(V)["open-external"].elements.join("")
|
|
309
|
+
}, null, 8, Ot))
|
|
310
|
+
], 8, qt)) : f("", !0)
|
|
311
|
+
]),
|
|
312
|
+
e("td", null, [
|
|
313
|
+
e("span", {
|
|
314
|
+
class: g(`ss-dbg-status ss-dbg-status-${Math.floor(t.statusCode / 100)}xx`)
|
|
315
|
+
}, a(t.statusCode), 3)
|
|
316
|
+
]),
|
|
317
|
+
e("td", {
|
|
318
|
+
class: g(["ss-dbg-duration", W(t.totalDuration)])
|
|
319
|
+
}, a(u(m)(t.totalDuration)), 3),
|
|
320
|
+
e("td", Pt, a(t.spanCount), 1),
|
|
321
|
+
e("td", {
|
|
322
|
+
class: "ss-dbg-event-time",
|
|
323
|
+
title: u(et)(t.timestamp)
|
|
324
|
+
}, a(u(st)(t.timestamp)), 9, Vt)
|
|
325
|
+
], 8, St))), 128))
|
|
326
|
+
])
|
|
327
|
+
], 512))
|
|
328
|
+
], 64))
|
|
329
|
+
]));
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
export {
|
|
333
|
+
Gt as default
|
|
334
|
+
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { LogEntry } from '../../../core/log-utils.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
logs: LogEntry[];
|
|
4
|
-
classPrefix?: 'ss-dash' | 'ss-dbg';
|
|
5
4
|
};
|
|
6
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
-
classPrefix: "ss-dash" | "ss-dbg";
|
|
8
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
6
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref, WatchSource } from 'vue';
|
|
2
|
-
import { DashboardSection, TimeRange } from '../../core/index.js';
|
|
2
|
+
import { DashboardSection, PaginationState, TimeRange } from '../../core/index.js';
|
|
3
3
|
export interface UseDashboardDataOptions {
|
|
4
4
|
/** Base URL for API requests. */
|
|
5
5
|
baseUrl?: string;
|
|
@@ -15,18 +15,22 @@ export interface UseDashboardDataOptions {
|
|
|
15
15
|
refreshKey?: Ref<number> | WatchSource<number>;
|
|
16
16
|
}
|
|
17
17
|
export declare function useDashboardData(section: () => DashboardSection | string, options?: UseDashboardDataOptions): {
|
|
18
|
+
mutate(path: string, method?: "post" | "delete", body?: unknown): Promise<unknown>;
|
|
19
|
+
refresh(): void;
|
|
20
|
+
startRefresh(): void;
|
|
21
|
+
stopRefresh(): void;
|
|
22
|
+
goToPage(page: number): void;
|
|
23
|
+
setSearch(search: string): void;
|
|
24
|
+
setFilter(key: string, value: string | number | boolean): void;
|
|
25
|
+
setSort(column: string, direction?: "asc" | "desc"): void;
|
|
26
|
+
setTimeRange(range: TimeRange): void;
|
|
18
27
|
data: Ref<unknown, unknown>;
|
|
19
28
|
loading: Ref<boolean, boolean>;
|
|
20
29
|
error: Ref<Error | null, Error | null>;
|
|
21
30
|
isUnauthorized: Ref<boolean, boolean>;
|
|
22
|
-
pagination:
|
|
23
|
-
page: number;
|
|
24
|
-
perPage: number;
|
|
25
|
-
total: number;
|
|
26
|
-
totalPages: number;
|
|
27
|
-
};
|
|
31
|
+
pagination: PaginationState;
|
|
28
32
|
filter: {
|
|
29
|
-
[
|
|
33
|
+
[key: string]: string | number | boolean;
|
|
30
34
|
search: string;
|
|
31
35
|
};
|
|
32
36
|
sort: {
|
|
@@ -34,19 +38,4 @@ export declare function useDashboardData(section: () => DashboardSection | strin
|
|
|
34
38
|
direction: "asc" | "desc";
|
|
35
39
|
};
|
|
36
40
|
timeRange: Ref<TimeRange, TimeRange>;
|
|
37
|
-
goToPage: (page: number) => void;
|
|
38
|
-
setSearch: (search: string) => void;
|
|
39
|
-
setFilter: (key: string, value: string | number | boolean) => void;
|
|
40
|
-
setSort: (column: string, direction?: "asc" | "desc") => void;
|
|
41
|
-
setTimeRange: (range: TimeRange) => void;
|
|
42
|
-
refresh: () => void;
|
|
43
|
-
startRefresh: () => void;
|
|
44
|
-
stopRefresh: () => void;
|
|
45
|
-
mutate: (path: string, method?: "post" | "delete", body?: unknown) => Promise<unknown>;
|
|
46
|
-
fetchChart: (range: TimeRange) => Promise<unknown>;
|
|
47
|
-
fetchGroupedQueries: () => Promise<unknown>;
|
|
48
|
-
explainQuery: (queryId: number) => Promise<unknown>;
|
|
49
|
-
retryJob: (jobId: string) => Promise<boolean>;
|
|
50
|
-
deleteCacheKey: (key: string) => Promise<boolean>;
|
|
51
|
-
fetchEmailPreview: (emailId: number) => Promise<string | null>;
|
|
52
41
|
};
|