adonisjs-server-stats 1.8.0 → 1.10.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/dist/core/index.js +24 -22
- package/dist/core/log-utils.d.ts +14 -0
- package/dist/core/split-pane.d.ts +18 -0
- package/dist/core/trace-utils.d.ts +5 -0
- package/dist/core/types.d.ts +1 -1
- package/dist/react/{CacheSection-D5J5moz7.js → CacheSection-UCMptWyn.js} +1 -1
- package/dist/react/{CacheTab-F1MkWSZl.js → CacheTab-CA8LB1J5.js} +1 -1
- package/dist/react/{ConfigSection-DerLBu4o.js → ConfigSection-DfFd-WRq.js} +1 -1
- package/dist/react/{ConfigTab-Bsj7v9JW.js → ConfigTab-Bdg8YMer.js} +1 -1
- package/dist/react/{CustomPaneTab-gzdtDEvz.js → CustomPaneTab-Bxtv_8Rw.js} +1 -1
- package/dist/react/{EmailsSection-ndH3cvJk.js → EmailsSection-CM7stSyh.js} +1 -1
- package/dist/react/{EmailsTab-DVPHRx0L.js → EmailsTab-BDhEiomM.js} +1 -1
- package/dist/react/{EventsSection-ClIByDSk.js → EventsSection-ByQ-9blq.js} +1 -1
- package/dist/react/{EventsTab-CCzWEKrk.js → EventsTab-CMfY98Rl.js} +1 -1
- package/dist/react/{JobsSection-CVMyAs7O.js → JobsSection-DF3qEv9O.js} +1 -1
- package/dist/react/{JobsTab-CATUyb9V.js → JobsTab-BbrBWIOb.js} +1 -1
- package/dist/react/LogsSection-DcFTZY7b.js +227 -0
- package/dist/react/LogsTab-CicucmVk.js +103 -0
- package/dist/react/{OverviewSection-ae5AO2RG.js → OverviewSection-C4T1ur51.js} +1 -1
- package/dist/react/{QueriesSection-DFFr9Tbb.js → QueriesSection-PswteoF9.js} +1 -1
- package/dist/react/{QueriesTab-GrHRAREt.js → QueriesTab-osLUWd4L.js} +1 -1
- package/dist/react/RelatedLogs-DFDOyUMr.js +40 -0
- package/dist/react/RequestsSection-Nag30rEA.js +341 -0
- package/dist/react/{RoutesSection-F7nANhF0.js → RoutesSection-BUSkM6PY.js} +1 -1
- package/dist/react/{RoutesTab-rugjhCPH.js → RoutesTab-DgVzd2PZ.js} +1 -1
- package/dist/react/TimelineTab-Covg5weo.js +220 -0
- package/dist/react/{index-DDzo1bZk.js → index-Cflz9Ebj.js} +390 -395
- package/dist/react/index.js +1 -1
- package/dist/react/react/components/shared/JsonViewer.d.ts +2 -1
- package/dist/react/react/components/shared/RelatedLogs.d.ts +7 -0
- package/dist/react/style.css +1 -1
- package/dist/src/controller/debug_controller.js +1 -1
- package/dist/src/dashboard/dashboard_controller.js +13 -0
- package/dist/src/dashboard/dashboard_store.d.ts +1 -0
- package/dist/src/dashboard/dashboard_store.js +88 -41
- package/dist/src/dashboard/migrator.js +6 -0
- package/dist/src/data/data_access.d.ts +7 -0
- package/dist/src/data/data_access.js +32 -1
- package/dist/src/debug/trace_collector.d.ts +1 -1
- package/dist/src/debug/trace_collector.js +2 -1
- package/dist/src/debug/types.d.ts +4 -0
- package/dist/src/edge/client/dashboard.js +2 -2
- package/dist/src/edge/client/debug-panel-deferred.js +1 -1
- package/dist/src/edge/client-vue/dashboard.js +4 -4
- package/dist/src/edge/client-vue/debug-panel-deferred.js +3 -3
- package/dist/src/middleware/request_tracking_middleware.d.ts +1 -0
- package/dist/src/middleware/request_tracking_middleware.js +3 -1
- package/dist/src/provider/server_stats_provider.d.ts +3 -3
- package/dist/src/provider/server_stats_provider.js +29 -15
- package/dist/src/routes/register_routes.js +7 -2
- package/dist/src/styles/components.css +162 -0
- package/dist/src/styles/debug-panel.css +9 -0
- package/dist/src/types.d.ts +1 -1
- package/dist/vue/{CacheSection-DDvJ7bs2.js → CacheSection-oFAJL3mo.js} +2 -2
- package/dist/vue/{ConfigSection-GTCrvsPr.js → ConfigSection-BhfJ4KqL.js} +1 -1
- package/dist/vue/{EmailsSection-Ct5vsLCc.js → EmailsSection-BcNyhyHs.js} +1 -1
- package/dist/vue/{EventsSection-CRVhtagq.js → EventsSection-r60Q5Lmu.js} +2 -2
- package/dist/vue/{EventsTab-DQ4Nd6AK.js → EventsTab-BBM7olXF.js} +1 -1
- package/dist/vue/{JobsSection-B_wH2Co7.js → JobsSection-BHL-hkQw.js} +2 -2
- package/dist/vue/{JobsTab-BCvhOARO.js → JobsTab-WFnxPdN7.js} +1 -1
- package/dist/vue/{JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js → JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js} +25 -23
- package/dist/vue/LogsSection-DRMGzJmg.js +252 -0
- package/dist/vue/LogsTab-Bg3o0Mm6.js +147 -0
- package/dist/vue/{OverviewSection-BqSwuMKH.js → OverviewSection-CXh6Ja1B.js} +1 -1
- package/dist/vue/{QueriesSection-D4Fs0YH6.js → QueriesSection-IodIsCJ-.js} +1 -1
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +84 -0
- package/dist/vue/RequestsSection-BPuMdmMc.js +401 -0
- package/dist/vue/{RoutesSection-Ys5dTzvF.js → RoutesSection-NKo3Rbq3.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/shared/JsonViewer.vue.d.ts +3 -0
- package/dist/vue/components/{Dashboard/sections/TimelineSection.vue.d.ts → shared/RelatedLogs.vue.d.ts} +5 -6
- package/dist/vue/index-Dtgysd26.js +1229 -0
- package/dist/vue/index.js +1 -1
- package/dist/vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/react/LogsSection-hAsLaKOC.js +0 -212
- package/dist/react/LogsTab-QouH4NPQ.js +0 -88
- package/dist/react/RequestsSection-DtwnJOnM.js +0 -209
- package/dist/react/TimelineSection-F5ThmTdy.js +0 -158
- package/dist/react/TimelineTab-Dvpf-I5C.js +0 -193
- package/dist/react/WaterfallChart-Cj73WdfM.js +0 -100
- package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +0 -8
- package/dist/vue/LogsSection-C4NRFOpA.js +0 -227
- package/dist/vue/LogsTab-DpEQ7euu.js +0 -122
- package/dist/vue/RequestsSection-B0A5SKcM.js +0 -243
- package/dist/vue/TimelineSection-D38iHB08.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-Bj6pm5g3.js +0 -1235
|
@@ -1,1235 +0,0 @@
|
|
|
1
|
-
import { ref as v, reactive as oe, computed as m, onMounted as X, onUnmounted as te, defineComponent as se, openBlock as t, createElementBlock as o, normalizeStyle as pe, Fragment as W, createElementVNode as l, watch as ee, nextTick as ke, onBeforeUnmount as de, normalizeClass as z, toDisplayString as M, createCommentVNode as E, createBlock as V, Teleport as ye, withModifiers as we, unref as s, createVNode as ue, renderList as ae, defineAsyncComponent as $, createTextVNode as Te, provide as ne, Suspense as Ce, withCtx as he, resolveDynamicComponent as _e } from "vue";
|
|
2
|
-
import { ServerStatsController as Ee, DEFAULT_FEATURES as Se, detectFeatures as xe, getTheme as ve, onThemeChange as $e, toggleTheme as Le, buildSparklineData as Be, computeStats as Me, formatStatNum as re, detectMetricGroupsFromStats as Pe, getVisibleMetricGroups as Ue, getMetricsByGroup as Re, TAB_ICONS as j, DebugDataController as fe, DashboardDataController as De, UnauthorizedError as je, subscribeToChannel as He } from "adonisjs-server-stats/core";
|
|
3
|
-
function Ae(e = {}) {
|
|
4
|
-
const {
|
|
5
|
-
baseUrl: T = "",
|
|
6
|
-
endpoint: a = "/admin/api/server-stats",
|
|
7
|
-
channelName: S = "admin/server-stats",
|
|
8
|
-
authToken: i,
|
|
9
|
-
pollInterval: f = 3e3
|
|
10
|
-
} = e, C = v(null), k = oe({}), x = v(!1), P = v(!1), U = v(null), _ = v(!1), h = v(!1), b = v(!1);
|
|
11
|
-
let u = null;
|
|
12
|
-
const r = m(() => _.value ? "disconnected" : h.value ? "live" : b.value ? "polling" : "disconnected");
|
|
13
|
-
return X(() => {
|
|
14
|
-
_.value || (u = new Ee({
|
|
15
|
-
baseUrl: T,
|
|
16
|
-
endpoint: a,
|
|
17
|
-
channelName: S,
|
|
18
|
-
authToken: i,
|
|
19
|
-
pollInterval: f,
|
|
20
|
-
onStatsUpdate: (p) => {
|
|
21
|
-
C.value = p;
|
|
22
|
-
},
|
|
23
|
-
onConnectionChange: (p) => {
|
|
24
|
-
x.value = p;
|
|
25
|
-
},
|
|
26
|
-
onStaleChange: (p) => {
|
|
27
|
-
P.value = p;
|
|
28
|
-
},
|
|
29
|
-
onError: (p) => {
|
|
30
|
-
U.value = p;
|
|
31
|
-
},
|
|
32
|
-
onUnauthorizedChange: (p) => {
|
|
33
|
-
_.value = p;
|
|
34
|
-
},
|
|
35
|
-
onHistoryChange: (p) => {
|
|
36
|
-
for (const y of Object.keys(p))
|
|
37
|
-
k[y] = p[y];
|
|
38
|
-
},
|
|
39
|
-
onSseActiveChange: (p) => {
|
|
40
|
-
h.value = p;
|
|
41
|
-
},
|
|
42
|
-
onPollActiveChange: (p) => {
|
|
43
|
-
b.value = p;
|
|
44
|
-
}
|
|
45
|
-
}), u.start());
|
|
46
|
-
}), te(() => {
|
|
47
|
-
u?.stop(), u = null;
|
|
48
|
-
}), {
|
|
49
|
-
stats: C,
|
|
50
|
-
history: k,
|
|
51
|
-
isConnected: x,
|
|
52
|
-
isStale: P,
|
|
53
|
-
isUnauthorized: _,
|
|
54
|
-
error: U,
|
|
55
|
-
connectionMode: r
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function ce(e = {}) {
|
|
59
|
-
const { baseUrl: T = "", debugEndpoint: a = "/admin/api/debug", authToken: S } = e, i = v({ ...Se }), f = v(!0);
|
|
60
|
-
return X(async () => {
|
|
61
|
-
i.value = await xe({ baseUrl: T, debugEndpoint: a, authToken: S }), f.value = !1;
|
|
62
|
-
}), {
|
|
63
|
-
features: i,
|
|
64
|
-
loading: f
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function le() {
|
|
68
|
-
const e = v(ve());
|
|
69
|
-
let T = null;
|
|
70
|
-
function a(i) {
|
|
71
|
-
e.value = i;
|
|
72
|
-
}
|
|
73
|
-
function S() {
|
|
74
|
-
const i = Le();
|
|
75
|
-
return e.value = i, i;
|
|
76
|
-
}
|
|
77
|
-
return X(() => {
|
|
78
|
-
e.value = ve(), T = $e(a);
|
|
79
|
-
}), te(() => {
|
|
80
|
-
T?.();
|
|
81
|
-
}), {
|
|
82
|
-
theme: e,
|
|
83
|
-
toggleTheme: S
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
const Ie = ["width", "height", "viewBox"], qe = ["id"], Oe = ["stop-color"], ze = ["stop-color"], Ne = ["d", "fill"], Fe = ["d", "stroke"], Ve = ["x", "y"], Ge = /* @__PURE__ */ se({
|
|
87
|
-
__name: "Sparkline",
|
|
88
|
-
props: {
|
|
89
|
-
data: {},
|
|
90
|
-
color: { default: "#34d399" },
|
|
91
|
-
width: { default: 120 },
|
|
92
|
-
height: { default: 32 }
|
|
93
|
-
},
|
|
94
|
-
setup(e) {
|
|
95
|
-
const T = e, a = m(
|
|
96
|
-
() => Be(T.data, {
|
|
97
|
-
width: T.width,
|
|
98
|
-
height: T.height,
|
|
99
|
-
color: T.color
|
|
100
|
-
})
|
|
101
|
-
), S = m(() => a.value !== null), i = m(() => `sg-${T.color.replace("#", "")}`);
|
|
102
|
-
return (f, C) => (t(), o("div", {
|
|
103
|
-
class: "ss-dash-sparkline",
|
|
104
|
-
style: pe({ "--ss-accent": e.color })
|
|
105
|
-
}, [
|
|
106
|
-
(t(), o("svg", {
|
|
107
|
-
width: e.width,
|
|
108
|
-
height: e.height,
|
|
109
|
-
viewBox: `0 0 ${e.width} ${e.height}`,
|
|
110
|
-
style: { display: "block" }
|
|
111
|
-
}, [
|
|
112
|
-
S.value && a.value ? (t(), o(W, { key: 0 }, [
|
|
113
|
-
l("defs", null, [
|
|
114
|
-
l("linearGradient", {
|
|
115
|
-
id: i.value,
|
|
116
|
-
x1: "0",
|
|
117
|
-
y1: "0",
|
|
118
|
-
x2: "0",
|
|
119
|
-
y2: "1"
|
|
120
|
-
}, [
|
|
121
|
-
l("stop", {
|
|
122
|
-
offset: "0%",
|
|
123
|
-
"stop-color": e.color,
|
|
124
|
-
"stop-opacity": "0.25"
|
|
125
|
-
}, null, 8, Oe),
|
|
126
|
-
l("stop", {
|
|
127
|
-
offset: "100%",
|
|
128
|
-
"stop-color": e.color,
|
|
129
|
-
"stop-opacity": "0.02"
|
|
130
|
-
}, null, 8, ze)
|
|
131
|
-
], 8, qe)
|
|
132
|
-
]),
|
|
133
|
-
l("path", {
|
|
134
|
-
d: a.value.areaPath,
|
|
135
|
-
fill: `url(#${i.value})`
|
|
136
|
-
}, null, 8, Ne),
|
|
137
|
-
l("path", {
|
|
138
|
-
class: "ss-dash-sparkline-line",
|
|
139
|
-
d: "M" + a.value.points.replace(/ /g, " L"),
|
|
140
|
-
fill: "none",
|
|
141
|
-
stroke: e.color,
|
|
142
|
-
"stroke-width": "1.5",
|
|
143
|
-
"stroke-linejoin": "round",
|
|
144
|
-
"stroke-linecap": "round"
|
|
145
|
-
}, null, 8, Fe)
|
|
146
|
-
], 64)) : (t(), o("text", {
|
|
147
|
-
key: 1,
|
|
148
|
-
x: e.width / 2,
|
|
149
|
-
y: e.height / 2 + 3,
|
|
150
|
-
"text-anchor": "middle",
|
|
151
|
-
fill: "#737373",
|
|
152
|
-
"font-size": "9"
|
|
153
|
-
}, " collecting... ", 8, Ve))
|
|
154
|
-
], 8, Ie))
|
|
155
|
-
], 4));
|
|
156
|
-
}
|
|
157
|
-
}), Qe = ["id"], Ke = { class: "ss-label" }, Je = {
|
|
158
|
-
class: "ss-tooltip-inner",
|
|
159
|
-
style: { position: "relative" }
|
|
160
|
-
}, We = { class: "ss-tooltip-header" }, Xe = { class: "ss-tooltip-title" }, Ye = {
|
|
161
|
-
key: 0,
|
|
162
|
-
class: "ss-tooltip-unit"
|
|
163
|
-
}, Ze = { class: "ss-tooltip-current" }, et = { class: "ss-tooltip-current-value" }, tt = {
|
|
164
|
-
key: 1,
|
|
165
|
-
class: "ss-tooltip-stats"
|
|
166
|
-
}, st = {
|
|
167
|
-
key: 2,
|
|
168
|
-
class: "ss-tooltip-details"
|
|
169
|
-
}, nt = {
|
|
170
|
-
key: 3,
|
|
171
|
-
class: "ss-tooltip-sparkline"
|
|
172
|
-
}, at = {
|
|
173
|
-
key: 4,
|
|
174
|
-
class: "ss-tooltip-samples"
|
|
175
|
-
}, ot = /* @__PURE__ */ se({
|
|
176
|
-
__name: "MetricCard",
|
|
177
|
-
props: {
|
|
178
|
-
metric: {},
|
|
179
|
-
stats: {},
|
|
180
|
-
history: {}
|
|
181
|
-
},
|
|
182
|
-
emits: ["pin"],
|
|
183
|
-
setup(e, { emit: T }) {
|
|
184
|
-
const a = e, S = T, i = v(!1), f = v(!1), C = v(null), k = v(null), x = v(null), P = v({
|
|
185
|
-
position: "absolute",
|
|
186
|
-
bottom: "100%",
|
|
187
|
-
left: "0",
|
|
188
|
-
marginBottom: "10px",
|
|
189
|
-
zIndex: "180"
|
|
190
|
-
});
|
|
191
|
-
X(() => {
|
|
192
|
-
C.value && (x.value = C.value.closest(".ss-bar"));
|
|
193
|
-
});
|
|
194
|
-
function U() {
|
|
195
|
-
const L = C.value, F = k.value, Z = x.value;
|
|
196
|
-
if (!L || !F || !Z) return;
|
|
197
|
-
const K = L.getBoundingClientRect(), G = Z.getBoundingClientRect(), J = K.left - G.left + K.width / 2;
|
|
198
|
-
P.value = {
|
|
199
|
-
position: "absolute",
|
|
200
|
-
bottom: "100%",
|
|
201
|
-
left: `${J}px`,
|
|
202
|
-
transform: "translateX(-50%)",
|
|
203
|
-
marginBottom: "10px",
|
|
204
|
-
zIndex: "180"
|
|
205
|
-
}, requestAnimationFrame(() => {
|
|
206
|
-
if (!k.value) return;
|
|
207
|
-
const w = k.value.getBoundingClientRect();
|
|
208
|
-
let A = 0;
|
|
209
|
-
w.left < 8 ? A = 8 - w.left : w.right > window.innerWidth - 8 && (A = window.innerWidth - 8 - w.right), A && (P.value = {
|
|
210
|
-
...P.value,
|
|
211
|
-
transform: `translateX(calc(-50% + ${A}px))`
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
const _ = m(() => i.value || f.value);
|
|
216
|
-
ee(_, (L) => {
|
|
217
|
-
L && ke(U);
|
|
218
|
-
});
|
|
219
|
-
let h = null;
|
|
220
|
-
function b() {
|
|
221
|
-
_.value && U();
|
|
222
|
-
}
|
|
223
|
-
function u() {
|
|
224
|
-
_.value && U();
|
|
225
|
-
}
|
|
226
|
-
X(() => {
|
|
227
|
-
h = C.value?.closest(".ss-bar-scroll") ?? null, h?.addEventListener("scroll", b), window.addEventListener("resize", u);
|
|
228
|
-
}), de(() => {
|
|
229
|
-
h?.removeEventListener("scroll", b), window.removeEventListener("resize", u);
|
|
230
|
-
});
|
|
231
|
-
const r = m(() => a.stats ? (a.metric.value || a.metric.format)(a.stats) : "..."), p = m(() => !a.stats || !a.metric.color ? "green" : a.metric.color(a.stats)), y = m(() => !a.stats || !a.metric.show ? !0 : a.metric.show(a.stats)), R = m(() => a.metric.detail ? typeof a.metric.detail == "function" ? a.stats ? a.metric.detail(a.stats) : "" : a.metric.detail : ""), q = m(() => ({
|
|
232
|
-
green: "#34d399",
|
|
233
|
-
amber: "#fbbf24",
|
|
234
|
-
red: "#f87171",
|
|
235
|
-
muted: "#737373"
|
|
236
|
-
})[p.value] || "#34d399"), D = m(() => Me(a.history));
|
|
237
|
-
function c() {
|
|
238
|
-
i.value = !0;
|
|
239
|
-
}
|
|
240
|
-
function g() {
|
|
241
|
-
i.value = !1;
|
|
242
|
-
}
|
|
243
|
-
function O() {
|
|
244
|
-
f.value = !f.value, f.value && S("pin", a.metric.id);
|
|
245
|
-
}
|
|
246
|
-
function H() {
|
|
247
|
-
f.value = !1;
|
|
248
|
-
}
|
|
249
|
-
function Y(L) {
|
|
250
|
-
L.key === "Enter" && O();
|
|
251
|
-
}
|
|
252
|
-
function N(L) {
|
|
253
|
-
const F = L.target;
|
|
254
|
-
C.value && !C.value.contains(F) && k.value && !k.value.contains(F) && (f.value = !1);
|
|
255
|
-
}
|
|
256
|
-
function Q(L) {
|
|
257
|
-
L.key === "Escape" && (f.value = !1);
|
|
258
|
-
}
|
|
259
|
-
return ee(f, (L) => {
|
|
260
|
-
L ? (document.addEventListener("click", N), document.addEventListener("keydown", Q)) : (document.removeEventListener("click", N), document.removeEventListener("keydown", Q));
|
|
261
|
-
}), de(() => {
|
|
262
|
-
document.removeEventListener("click", N), document.removeEventListener("keydown", Q);
|
|
263
|
-
}), (L, F) => (t(), o(W, null, [
|
|
264
|
-
y.value ? (t(), o("div", {
|
|
265
|
-
key: 0,
|
|
266
|
-
ref_key: "badgeRef",
|
|
267
|
-
ref: C,
|
|
268
|
-
id: `ss-b-${e.metric.id}`,
|
|
269
|
-
class: z(["ss-badge", { "ss-pinned": f.value }]),
|
|
270
|
-
role: "button",
|
|
271
|
-
tabindex: 0,
|
|
272
|
-
onMouseenter: c,
|
|
273
|
-
onMouseleave: g,
|
|
274
|
-
onClick: O,
|
|
275
|
-
onKeydown: Y
|
|
276
|
-
}, [
|
|
277
|
-
l("span", Ke, M(e.metric.label), 1),
|
|
278
|
-
l("span", {
|
|
279
|
-
class: z(["ss-value", `ss-${p.value}`])
|
|
280
|
-
}, M(r.value), 3)
|
|
281
|
-
], 42, Qe)) : E("", !0),
|
|
282
|
-
_.value && x.value ? (t(), V(ye, {
|
|
283
|
-
key: 1,
|
|
284
|
-
to: x.value
|
|
285
|
-
}, [
|
|
286
|
-
l("div", {
|
|
287
|
-
ref_key: "tooltipRef",
|
|
288
|
-
ref: k,
|
|
289
|
-
class: z(["ss-tooltip", { "ss-pinned": f.value }]),
|
|
290
|
-
style: pe(P.value)
|
|
291
|
-
}, [
|
|
292
|
-
l("div", Je, [
|
|
293
|
-
f.value ? (t(), o("button", {
|
|
294
|
-
key: 0,
|
|
295
|
-
class: "ss-tooltip-close",
|
|
296
|
-
onClick: we(H, ["stop"])
|
|
297
|
-
}, "×")) : E("", !0),
|
|
298
|
-
l("div", We, [
|
|
299
|
-
l("span", Xe, M(e.metric.title), 1),
|
|
300
|
-
e.metric.unit ? (t(), o("span", Ye, M(e.metric.unit), 1)) : E("", !0)
|
|
301
|
-
]),
|
|
302
|
-
l("div", Ze, [
|
|
303
|
-
F[0] || (F[0] = l("span", { class: "ss-tooltip-current-label" }, "Current: ", -1)),
|
|
304
|
-
l("span", et, M(r.value), 1)
|
|
305
|
-
]),
|
|
306
|
-
D.value ? (t(), o("div", tt, [
|
|
307
|
-
l("span", null, "Min: " + M(s(re)(D.value.min, e.metric.unit)), 1),
|
|
308
|
-
l("span", null, "Max: " + M(s(re)(D.value.max, e.metric.unit)), 1),
|
|
309
|
-
l("span", null, "Avg: " + M(s(re)(D.value.avg, e.metric.unit)), 1)
|
|
310
|
-
])) : E("", !0),
|
|
311
|
-
R.value ? (t(), o("div", st, M(R.value), 1)) : E("", !0),
|
|
312
|
-
e.history.length > 0 ? (t(), o("div", nt, [
|
|
313
|
-
ue(Ge, {
|
|
314
|
-
data: e.history,
|
|
315
|
-
color: q.value
|
|
316
|
-
}, null, 8, ["data", "color"])
|
|
317
|
-
])) : E("", !0),
|
|
318
|
-
e.history.length > 0 ? (t(), o("div", at, " Last " + M(Math.min(e.history.length, 60)) + " samples (~" + M(Math.round(Math.min(e.history.length, 60) * 3 / 60)) + " min) ", 1)) : E("", !0)
|
|
319
|
-
]),
|
|
320
|
-
F[1] || (F[1] = l("div", { class: "ss-tooltip-arrow" }, null, -1))
|
|
321
|
-
], 6)
|
|
322
|
-
], 8, ["to"])) : E("", !0)
|
|
323
|
-
], 64));
|
|
324
|
-
}
|
|
325
|
-
}), lt = ["data-ss-theme"], it = { class: "ss-bar-left" }, rt = ["viewBox", "innerHTML"], ut = { class: "ss-group" }, ct = {
|
|
326
|
-
key: 0,
|
|
327
|
-
class: "ss-group-sep"
|
|
328
|
-
}, dt = ["data-ss-theme", "title"], ht = {
|
|
329
|
-
key: 0,
|
|
330
|
-
class: "ss-toggle-summary",
|
|
331
|
-
style: { display: "flex" }
|
|
332
|
-
}, vt = {
|
|
333
|
-
key: 1,
|
|
334
|
-
class: "ss-value ss-green"
|
|
335
|
-
}, ft = {
|
|
336
|
-
key: 1,
|
|
337
|
-
class: "ss-toggle-label",
|
|
338
|
-
style: { color: "#737373" }
|
|
339
|
-
}, bt = { class: "ss-toggle-arrow" }, be = "admin:stats-bar", as = /* @__PURE__ */ se({
|
|
340
|
-
__name: "StatsBar",
|
|
341
|
-
props: {
|
|
342
|
-
debugEndpoint: { default: "/admin/api/debug" },
|
|
343
|
-
baseUrl: { default: "" },
|
|
344
|
-
endpoint: { default: "/admin/api/server-stats" },
|
|
345
|
-
channelName: { default: "admin/server-stats" },
|
|
346
|
-
authToken: {},
|
|
347
|
-
pollInterval: { default: 3e3 },
|
|
348
|
-
className: {},
|
|
349
|
-
debugPanelOpen: { type: Boolean, default: !1 }
|
|
350
|
-
},
|
|
351
|
-
emits: ["openDebugPanel", "connectionChange"],
|
|
352
|
-
setup(e, { emit: T }) {
|
|
353
|
-
const a = e, S = T, { stats: i, history: f, isStale: C, isUnauthorized: k, isConnected: x, connectionMode: P } = Ae({
|
|
354
|
-
baseUrl: a.baseUrl,
|
|
355
|
-
endpoint: a.endpoint,
|
|
356
|
-
channelName: a.channelName,
|
|
357
|
-
authToken: a.authToken,
|
|
358
|
-
pollInterval: a.pollInterval
|
|
359
|
-
});
|
|
360
|
-
ee(x, (g) => {
|
|
361
|
-
S("connectionChange", g);
|
|
362
|
-
});
|
|
363
|
-
const { features: U } = ce({
|
|
364
|
-
baseUrl: a.baseUrl,
|
|
365
|
-
debugEndpoint: a.debugEndpoint,
|
|
366
|
-
authToken: a.authToken
|
|
367
|
-
}), { theme: _ } = le(), h = v(!0), b = v(null);
|
|
368
|
-
X(() => {
|
|
369
|
-
h.value = localStorage.getItem(be) !== "hidden";
|
|
370
|
-
const g = b.value;
|
|
371
|
-
if (g) {
|
|
372
|
-
const O = (H) => {
|
|
373
|
-
Math.abs(H.deltaX) > Math.abs(H.deltaY) || (H.preventDefault(), g.scrollLeft += H.deltaY);
|
|
374
|
-
};
|
|
375
|
-
g.addEventListener("wheel", O, { passive: !1 }), te(() => g.removeEventListener("wheel", O));
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
function u() {
|
|
379
|
-
h.value = !h.value, localStorage.setItem(be, h.value ? "visible" : "hidden");
|
|
380
|
-
}
|
|
381
|
-
ee(k, (g) => {
|
|
382
|
-
g && (h.value = !1);
|
|
383
|
-
});
|
|
384
|
-
const r = m(() => i.value ? Pe(i.value) : Ue(U.value)), p = m(() => {
|
|
385
|
-
const g = Re();
|
|
386
|
-
return Array.from(g.entries()).filter(([O]) => r.value.has(O)).map(([O, H]) => ({
|
|
387
|
-
name: O,
|
|
388
|
-
metrics: H
|
|
389
|
-
}));
|
|
390
|
-
});
|
|
391
|
-
function y(g) {
|
|
392
|
-
return g ? f[g] || [] : [];
|
|
393
|
-
}
|
|
394
|
-
const R = m(() => i.value ? `${i.value.cpuPercent.toFixed(0)}%` : "..."), q = m(() => i.value ? i.value.memHeapUsed !== void 0 ? Math.round(i.value.memHeapUsed / (1024 * 1024)) + "M" : "-" : "..."), D = m(() => i.value ? i.value.redisOk ? "✓" : "✗" : "..."), c = m(() => _.value);
|
|
395
|
-
return (g, O) => (t(), o(W, null, [
|
|
396
|
-
s(k) ? E("", !0) : (t(), o("div", {
|
|
397
|
-
key: 0,
|
|
398
|
-
id: "ss-bar",
|
|
399
|
-
class: z(["ss-bar", { "ss-hidden": !h.value }]),
|
|
400
|
-
"data-ss-theme": c.value
|
|
401
|
-
}, [
|
|
402
|
-
l("div", it, [
|
|
403
|
-
s(U).tracing || r.value.has("redis") || r.value.has("queue") ? (t(), o("button", {
|
|
404
|
-
key: 0,
|
|
405
|
-
type: "button",
|
|
406
|
-
class: z(["ss-dbg-btn", { "ss-dbg-active": e.debugPanelOpen }]),
|
|
407
|
-
title: "Toggle debug panel",
|
|
408
|
-
id: "ss-dbg-wrench",
|
|
409
|
-
onClick: O[0] || (O[0] = (H) => S("openDebugPanel"))
|
|
410
|
-
}, [
|
|
411
|
-
(t(), o("svg", {
|
|
412
|
-
width: "14",
|
|
413
|
-
height: "14",
|
|
414
|
-
viewBox: s(j).wrench.viewBox,
|
|
415
|
-
fill: "none",
|
|
416
|
-
stroke: "currentColor",
|
|
417
|
-
"stroke-width": "2",
|
|
418
|
-
"stroke-linecap": "round",
|
|
419
|
-
"stroke-linejoin": "round",
|
|
420
|
-
innerHTML: s(j).wrench.elements.join("")
|
|
421
|
-
}, null, 8, rt))
|
|
422
|
-
], 2)) : E("", !0),
|
|
423
|
-
l("div", {
|
|
424
|
-
class: z(["ss-dot", { "ss-stale": s(C) }])
|
|
425
|
-
}, null, 2)
|
|
426
|
-
]),
|
|
427
|
-
l("div", {
|
|
428
|
-
ref_key: "scrollRef",
|
|
429
|
-
ref: b,
|
|
430
|
-
id: "ss-bar-scroll",
|
|
431
|
-
class: "ss-bar-scroll"
|
|
432
|
-
}, [
|
|
433
|
-
(t(!0), o(W, null, ae(p.value, (H, Y) => (t(), o(W, {
|
|
434
|
-
key: H.name
|
|
435
|
-
}, [
|
|
436
|
-
l("div", ut, [
|
|
437
|
-
(t(!0), o(W, null, ae(H.metrics, (N) => (t(), V(ot, {
|
|
438
|
-
key: N.id,
|
|
439
|
-
metric: N,
|
|
440
|
-
stats: s(i),
|
|
441
|
-
history: y(N.historyKey)
|
|
442
|
-
}, null, 8, ["metric", "stats", "history"]))), 128))
|
|
443
|
-
]),
|
|
444
|
-
Y < p.value.length - 1 ? (t(), o("div", ct)) : E("", !0)
|
|
445
|
-
], 64))), 128))
|
|
446
|
-
], 512)
|
|
447
|
-
], 10, lt)),
|
|
448
|
-
s(k) ? E("", !0) : (t(), o("button", {
|
|
449
|
-
key: 1,
|
|
450
|
-
type: "button",
|
|
451
|
-
class: z(["ss-toggle", h.value ? "ss-visible" : "ss-collapsed"]),
|
|
452
|
-
"data-ss-theme": c.value,
|
|
453
|
-
title: h.value ? "Hide stats bar" : "Show stats bar",
|
|
454
|
-
onClick: u
|
|
455
|
-
}, [
|
|
456
|
-
!h.value && s(i) ? (t(), o("span", ht, [
|
|
457
|
-
r.value.has("process") ? (t(), o("span", {
|
|
458
|
-
key: 0,
|
|
459
|
-
class: z([
|
|
460
|
-
"ss-value",
|
|
461
|
-
s(i).cpuPercent > 80 ? "ss-red" : s(i).cpuPercent > 50 ? "ss-amber" : "ss-green"
|
|
462
|
-
])
|
|
463
|
-
}, M(R.value), 3)) : E("", !0),
|
|
464
|
-
r.value.has("process") ? (t(), o("span", vt, M(q.value), 1)) : E("", !0),
|
|
465
|
-
r.value.has("redis") && s(i)?.redisOk !== void 0 ? (t(), o("span", {
|
|
466
|
-
key: 2,
|
|
467
|
-
class: z(["ss-value", s(i)?.redisOk ? "ss-green" : "ss-red"])
|
|
468
|
-
}, M(D.value), 3)) : E("", !0)
|
|
469
|
-
])) : E("", !0),
|
|
470
|
-
h.value ? (t(), o("span", ft, "hide stats")) : E("", !0),
|
|
471
|
-
l("span", bt, M(h.value ? "▼" : "▲"), 1)
|
|
472
|
-
], 10, dt))
|
|
473
|
-
], 64));
|
|
474
|
-
}
|
|
475
|
-
}), ge = /* @__PURE__ */ new Set(["cache", "jobs", "config"]);
|
|
476
|
-
function gt(e, T = {}) {
|
|
477
|
-
const {
|
|
478
|
-
baseUrl: a = "",
|
|
479
|
-
debugEndpoint: S = "/admin/api/debug",
|
|
480
|
-
dashboardEndpoint: i,
|
|
481
|
-
authToken: f,
|
|
482
|
-
refreshInterval: C
|
|
483
|
-
} = T, k = v(null), x = v(!1), P = v(null), U = v(!1), _ = new fe({
|
|
484
|
-
baseUrl: a,
|
|
485
|
-
endpoint: S,
|
|
486
|
-
authToken: f,
|
|
487
|
-
refreshInterval: C,
|
|
488
|
-
onData: (c) => {
|
|
489
|
-
k.value = c;
|
|
490
|
-
},
|
|
491
|
-
onLoading: (c) => {
|
|
492
|
-
x.value = c;
|
|
493
|
-
},
|
|
494
|
-
onError: (c) => {
|
|
495
|
-
P.value = c;
|
|
496
|
-
},
|
|
497
|
-
onUnauthorized: () => {
|
|
498
|
-
U.value = !0;
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
let h = null;
|
|
502
|
-
function b() {
|
|
503
|
-
return !h && i && (h = new fe({
|
|
504
|
-
baseUrl: a,
|
|
505
|
-
endpoint: i,
|
|
506
|
-
authToken: f,
|
|
507
|
-
refreshInterval: C,
|
|
508
|
-
onData: (c) => {
|
|
509
|
-
k.value = c;
|
|
510
|
-
},
|
|
511
|
-
onLoading: (c) => {
|
|
512
|
-
x.value = c;
|
|
513
|
-
},
|
|
514
|
-
onError: (c) => {
|
|
515
|
-
P.value = c;
|
|
516
|
-
},
|
|
517
|
-
onUnauthorized: () => {
|
|
518
|
-
U.value = !0;
|
|
519
|
-
}
|
|
520
|
-
})), h;
|
|
521
|
-
}
|
|
522
|
-
function u() {
|
|
523
|
-
const c = e();
|
|
524
|
-
if (c && !c.startsWith("custom-"))
|
|
525
|
-
if (ge.has(c) && i) {
|
|
526
|
-
const g = b();
|
|
527
|
-
_.stop(), g.start(c);
|
|
528
|
-
} else
|
|
529
|
-
h?.stop(), _.start(c);
|
|
530
|
-
}
|
|
531
|
-
function r() {
|
|
532
|
-
_.stop(), h?.stop();
|
|
533
|
-
}
|
|
534
|
-
async function p(c, g = !1) {
|
|
535
|
-
await _.fetchCustomPane(c, g);
|
|
536
|
-
}
|
|
537
|
-
function y() {
|
|
538
|
-
u();
|
|
539
|
-
}
|
|
540
|
-
function R() {
|
|
541
|
-
r();
|
|
542
|
-
}
|
|
543
|
-
function q() {
|
|
544
|
-
const c = e();
|
|
545
|
-
ge.has(c) && i && h ? h.refresh() : _.refresh();
|
|
546
|
-
}
|
|
547
|
-
function D() {
|
|
548
|
-
k.value = null;
|
|
549
|
-
}
|
|
550
|
-
return ee(e, () => {
|
|
551
|
-
D(), u();
|
|
552
|
-
}), X(() => {
|
|
553
|
-
y();
|
|
554
|
-
}), te(() => {
|
|
555
|
-
r();
|
|
556
|
-
}), {
|
|
557
|
-
data: k,
|
|
558
|
-
loading: x,
|
|
559
|
-
error: P,
|
|
560
|
-
isUnauthorized: U,
|
|
561
|
-
refresh: q,
|
|
562
|
-
clear: D,
|
|
563
|
-
fetchCustomPane: p,
|
|
564
|
-
startRefresh: y,
|
|
565
|
-
stopRefresh: R
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
const pt = ["title", "aria-label"], mt = ["viewBox", "innerHTML"], kt = ["viewBox", "innerHTML"], me = /* @__PURE__ */ se({
|
|
569
|
-
__name: "ThemeToggle",
|
|
570
|
-
props: {
|
|
571
|
-
classPrefix: { default: "ss-dbg" }
|
|
572
|
-
},
|
|
573
|
-
setup(e) {
|
|
574
|
-
const T = e, { theme: a, toggleTheme: S } = le(), i = m(() => a.value === "dark"), f = m(() => i.value ? "Switch to light theme" : "Switch to dark theme"), C = m(
|
|
575
|
-
() => T.classPrefix === "ss-dbg" ? "ss-dbg-theme-toggle" : "ss-dash-theme-btn"
|
|
576
|
-
);
|
|
577
|
-
return (k, x) => (t(), o("button", {
|
|
578
|
-
type: "button",
|
|
579
|
-
class: z(C.value),
|
|
580
|
-
title: f.value,
|
|
581
|
-
"aria-label": f.value,
|
|
582
|
-
onClick: x[0] || (x[0] = //@ts-ignore
|
|
583
|
-
(...P) => s(S) && s(S)(...P))
|
|
584
|
-
}, [
|
|
585
|
-
i.value ? (t(), o("svg", {
|
|
586
|
-
key: 0,
|
|
587
|
-
width: "16",
|
|
588
|
-
height: "16",
|
|
589
|
-
viewBox: s(j).sun.viewBox,
|
|
590
|
-
fill: "none",
|
|
591
|
-
stroke: "currentColor",
|
|
592
|
-
"stroke-width": "2",
|
|
593
|
-
"stroke-linecap": "round",
|
|
594
|
-
"stroke-linejoin": "round",
|
|
595
|
-
innerHTML: s(j).sun.elements.join("")
|
|
596
|
-
}, null, 8, mt)) : (t(), o("svg", {
|
|
597
|
-
key: 1,
|
|
598
|
-
width: "16",
|
|
599
|
-
height: "16",
|
|
600
|
-
viewBox: s(j).moon.viewBox,
|
|
601
|
-
fill: "none",
|
|
602
|
-
stroke: "currentColor",
|
|
603
|
-
"stroke-width": "2",
|
|
604
|
-
"stroke-linecap": "round",
|
|
605
|
-
"stroke-linejoin": "round",
|
|
606
|
-
innerHTML: s(j).moon.elements.join("")
|
|
607
|
-
}, null, 8, kt))
|
|
608
|
-
], 10, pt));
|
|
609
|
-
}
|
|
610
|
-
}), yt = ["data-ss-theme"], wt = { class: "ss-dbg-tabs" }, Tt = { class: "ss-dbg-tabs-scroll" }, Ct = ["onClick"], _t = ["viewBox", "innerHTML"], Et = { class: "ss-dbg-tabs-right" }, St = ["title"], xt = ["href"], $t = ["viewBox", "innerHTML"], Lt = { class: "ss-dbg-content" }, Bt = {
|
|
611
|
-
key: 0,
|
|
612
|
-
class: "ss-dbg-empty"
|
|
613
|
-
}, Mt = {
|
|
614
|
-
key: 1,
|
|
615
|
-
class: "ss-dbg-empty",
|
|
616
|
-
style: { color: "var(--ss-red-fg)" }
|
|
617
|
-
}, os = /* @__PURE__ */ se({
|
|
618
|
-
__name: "DebugPanel",
|
|
619
|
-
props: {
|
|
620
|
-
dashboardPath: { default: "/__stats" },
|
|
621
|
-
tracingEnabled: { type: Boolean, default: !1 },
|
|
622
|
-
isLive: { type: Boolean, default: !1 },
|
|
623
|
-
baseUrl: { default: "" },
|
|
624
|
-
debugEndpoint: { default: "/admin/api/debug" },
|
|
625
|
-
authToken: {},
|
|
626
|
-
className: {},
|
|
627
|
-
defaultOpen: { type: Boolean, default: !1 }
|
|
628
|
-
},
|
|
629
|
-
setup(e, { expose: T }) {
|
|
630
|
-
const a = $(() => import("./QueriesTab-C8_7oprC.js")), S = $(() => import("./EventsTab-DQ4Nd6AK.js")), i = $(() => import("./EmailsTab-CNyEODVB.js")), f = $(() => import("./RoutesTab-Dz0MkZuF.js")), C = $(() => import("./LogsTab-DpEQ7euu.js")), k = $(() => import("./TimelineTab-Db6lKKsD.js")), x = $(() => import("./CacheTab-BPisYYiQ.js")), P = $(() => import("./JobsTab-BCvhOARO.js")), U = $(() => import("./ConfigTab-C8cafGUj.js")), _ = $(() => import("./InternalsTab-DEMjqtlw.js")), h = $(() => import("./CustomPaneTab-BJxT5Dp7.js")), b = e, u = v(b.defaultOpen), r = v("queries"), { theme: p } = le(), { features: y } = ce({
|
|
631
|
-
baseUrl: b.baseUrl,
|
|
632
|
-
debugEndpoint: b.debugEndpoint,
|
|
633
|
-
authToken: b.authToken
|
|
634
|
-
}), R = b.dashboardPath ? b.dashboardPath.replace(/\/+$/, "") + "/api" : void 0, q = m(() => r.value.startsWith("custom-")), D = m(() => q.value || r.value === "internals"), { data: c, loading: g, error: O, isUnauthorized: H, refresh: Y, startRefresh: N, stopRefresh: Q } = gt(
|
|
635
|
-
() => r.value,
|
|
636
|
-
{
|
|
637
|
-
baseUrl: b.baseUrl,
|
|
638
|
-
debugEndpoint: b.debugEndpoint,
|
|
639
|
-
dashboardEndpoint: R,
|
|
640
|
-
authToken: b.authToken
|
|
641
|
-
}
|
|
642
|
-
), L = m(() => {
|
|
643
|
-
const w = [
|
|
644
|
-
{ id: "queries", label: "Queries", icon: "Q" },
|
|
645
|
-
{ id: "events", label: "Events", icon: "E" },
|
|
646
|
-
{ id: "emails", label: "Emails", icon: "M" },
|
|
647
|
-
{ id: "routes", label: "Routes", icon: "R" },
|
|
648
|
-
{ id: "logs", label: "Logs", icon: "L" }
|
|
649
|
-
];
|
|
650
|
-
(y.value.tracing || b.tracingEnabled) && w.push({ id: "timeline", label: "Timeline", icon: "T" }), y.value.cache && w.push({ id: "cache", label: "Cache", icon: "C" }), y.value.queues && w.push({ id: "jobs", label: "Jobs", icon: "J" }), w.push({ id: "config", label: "Config", icon: "G" }), w.push({ id: "internals", label: "Internals", icon: "I" });
|
|
651
|
-
for (const A of y.value.customPanes)
|
|
652
|
-
w.push({
|
|
653
|
-
id: `custom-${A.id}`,
|
|
654
|
-
label: A.label,
|
|
655
|
-
icon: A.label.charAt(0).toUpperCase()
|
|
656
|
-
});
|
|
657
|
-
return w;
|
|
658
|
-
});
|
|
659
|
-
function F(w) {
|
|
660
|
-
const A = w.replace("custom-", "");
|
|
661
|
-
return y.value.customPanes.find((n) => n.id === A);
|
|
662
|
-
}
|
|
663
|
-
function Z() {
|
|
664
|
-
u.value = !0, N();
|
|
665
|
-
}
|
|
666
|
-
function K() {
|
|
667
|
-
u.value = !1, Q();
|
|
668
|
-
}
|
|
669
|
-
function G() {
|
|
670
|
-
u.value ? K() : Z();
|
|
671
|
-
}
|
|
672
|
-
function J(w) {
|
|
673
|
-
r.value = w;
|
|
674
|
-
}
|
|
675
|
-
return ee(u, (w) => {
|
|
676
|
-
w ? N() : Q();
|
|
677
|
-
}), T({ toggle: G, open: Z, close: K }), (w, A) => s(H) ? E("", !0) : (t(), o("div", {
|
|
678
|
-
key: 0,
|
|
679
|
-
class: z(["ss-dbg-panel", { "ss-dbg-open": u.value }]),
|
|
680
|
-
"data-ss-theme": s(p)
|
|
681
|
-
}, [
|
|
682
|
-
l("div", wt, [
|
|
683
|
-
l("div", Tt, [
|
|
684
|
-
(t(!0), o(W, null, ae(L.value, (n) => (t(), o("button", {
|
|
685
|
-
key: n.id,
|
|
686
|
-
type: "button",
|
|
687
|
-
class: z(["ss-dbg-tab", { "ss-dbg-active": r.value === n.id }]),
|
|
688
|
-
onClick: (d) => J(n.id)
|
|
689
|
-
}, [
|
|
690
|
-
s(j)[n.id] ? (t(), o("svg", {
|
|
691
|
-
key: 0,
|
|
692
|
-
class: "ss-dbg-tab-icon",
|
|
693
|
-
viewBox: s(j)[n.id].viewBox,
|
|
694
|
-
innerHTML: s(j)[n.id].elements.join("")
|
|
695
|
-
}, null, 8, _t)) : E("", !0),
|
|
696
|
-
Te(" " + M(n.label), 1)
|
|
697
|
-
], 10, Ct))), 128))
|
|
698
|
-
]),
|
|
699
|
-
l("div", Et, [
|
|
700
|
-
l("span", {
|
|
701
|
-
class: z(["ss-dbg-conn-mode", e.isLive ? "ss-dbg-conn-live" : "ss-dbg-conn-polling"]),
|
|
702
|
-
title: e.isLive ? "Connected via Transmit (SSE) — real-time updates" : "Polling every 3s"
|
|
703
|
-
}, M(e.isLive ? "live" : "polling"), 11, St),
|
|
704
|
-
e.dashboardPath && s(y).dashboard ? (t(), o("a", {
|
|
705
|
-
key: 0,
|
|
706
|
-
href: e.dashboardPath,
|
|
707
|
-
target: "_blank",
|
|
708
|
-
rel: "noopener noreferrer",
|
|
709
|
-
class: "ss-dbg-dashboard-link",
|
|
710
|
-
title: "Open dashboard"
|
|
711
|
-
}, [
|
|
712
|
-
(t(), o("svg", {
|
|
713
|
-
width: "14",
|
|
714
|
-
height: "14",
|
|
715
|
-
viewBox: s(j)["external-link"].viewBox,
|
|
716
|
-
fill: "none",
|
|
717
|
-
stroke: "currentColor",
|
|
718
|
-
"stroke-width": "2",
|
|
719
|
-
"stroke-linecap": "round",
|
|
720
|
-
"stroke-linejoin": "round",
|
|
721
|
-
innerHTML: s(j)["external-link"].elements.join("")
|
|
722
|
-
}, null, 8, $t))
|
|
723
|
-
], 8, xt)) : E("", !0),
|
|
724
|
-
ue(me),
|
|
725
|
-
l("button", {
|
|
726
|
-
type: "button",
|
|
727
|
-
class: "ss-dbg-close",
|
|
728
|
-
onClick: K,
|
|
729
|
-
title: "Close panel"
|
|
730
|
-
}, " × ")
|
|
731
|
-
])
|
|
732
|
-
]),
|
|
733
|
-
l("div", Lt, [
|
|
734
|
-
s(g) && !s(c) && !D.value ? (t(), o("div", Bt, "Loading...")) : s(O) && !D.value ? (t(), o("div", Mt, " Error: " + M(s(O).message), 1)) : (t(), o(W, { key: 2 }, [
|
|
735
|
-
r.value === "queries" ? (t(), V(s(a), {
|
|
736
|
-
key: 0,
|
|
737
|
-
data: s(c),
|
|
738
|
-
"dashboard-path": e.dashboardPath
|
|
739
|
-
}, null, 8, ["data", "dashboard-path"])) : r.value === "events" ? (t(), V(s(S), {
|
|
740
|
-
key: 1,
|
|
741
|
-
data: s(c),
|
|
742
|
-
"dashboard-path": e.dashboardPath
|
|
743
|
-
}, null, 8, ["data", "dashboard-path"])) : r.value === "emails" ? (t(), V(s(i), {
|
|
744
|
-
key: 2,
|
|
745
|
-
data: s(c),
|
|
746
|
-
"dashboard-path": e.dashboardPath,
|
|
747
|
-
"debug-endpoint": e.debugEndpoint,
|
|
748
|
-
"auth-token": e.authToken
|
|
749
|
-
}, null, 8, ["data", "dashboard-path", "debug-endpoint", "auth-token"])) : r.value === "routes" ? (t(), V(s(f), {
|
|
750
|
-
key: 3,
|
|
751
|
-
data: s(c)
|
|
752
|
-
}, null, 8, ["data"])) : r.value === "logs" ? (t(), V(s(C), {
|
|
753
|
-
key: 4,
|
|
754
|
-
data: s(c),
|
|
755
|
-
"dashboard-path": e.dashboardPath
|
|
756
|
-
}, null, 8, ["data", "dashboard-path"])) : r.value === "timeline" ? (t(), V(s(k), {
|
|
757
|
-
key: 5,
|
|
758
|
-
data: s(c),
|
|
759
|
-
"dashboard-path": e.dashboardPath,
|
|
760
|
-
"base-url": e.baseUrl,
|
|
761
|
-
"debug-endpoint": e.debugEndpoint,
|
|
762
|
-
"auth-token": e.authToken
|
|
763
|
-
}, null, 8, ["data", "dashboard-path", "base-url", "debug-endpoint", "auth-token"])) : r.value === "cache" ? (t(), V(s(x), {
|
|
764
|
-
key: 6,
|
|
765
|
-
data: s(c)
|
|
766
|
-
}, null, 8, ["data"])) : r.value === "jobs" ? (t(), V(s(P), {
|
|
767
|
-
key: 7,
|
|
768
|
-
data: s(c)
|
|
769
|
-
}, null, 8, ["data"])) : r.value === "config" ? (t(), V(s(U), {
|
|
770
|
-
key: 8,
|
|
771
|
-
data: s(c)
|
|
772
|
-
}, null, 8, ["data"])) : r.value === "internals" ? (t(), V(s(_), {
|
|
773
|
-
key: 9,
|
|
774
|
-
data: s(c),
|
|
775
|
-
"base-url": e.baseUrl,
|
|
776
|
-
"debug-endpoint": e.debugEndpoint,
|
|
777
|
-
"auth-token": e.authToken
|
|
778
|
-
}, null, 8, ["data", "base-url", "debug-endpoint", "auth-token"])) : r.value.startsWith("custom-") ? (t(), V(s(h), {
|
|
779
|
-
key: 10,
|
|
780
|
-
pane: F(r.value),
|
|
781
|
-
"base-url": e.baseUrl,
|
|
782
|
-
"auth-token": e.authToken
|
|
783
|
-
}, null, 8, ["pane", "base-url", "auth-token"])) : E("", !0)
|
|
784
|
-
], 64))
|
|
785
|
-
])
|
|
786
|
-
], 10, yt));
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
function Pt(e, T = {}) {
|
|
790
|
-
const {
|
|
791
|
-
baseUrl: a = "",
|
|
792
|
-
dashboardEndpoint: S = "/__stats/api",
|
|
793
|
-
authToken: i,
|
|
794
|
-
perPage: f = 50,
|
|
795
|
-
refreshKey: C
|
|
796
|
-
} = T, k = v(null), x = v(!1), P = v(null), U = v(!1), _ = v("1h"), h = oe({
|
|
797
|
-
page: 1,
|
|
798
|
-
perPage: f,
|
|
799
|
-
total: 0,
|
|
800
|
-
totalPages: 1
|
|
801
|
-
}), b = oe({
|
|
802
|
-
search: ""
|
|
803
|
-
}), u = oe({
|
|
804
|
-
column: "",
|
|
805
|
-
direction: "desc"
|
|
806
|
-
}), r = new De({
|
|
807
|
-
baseUrl: a,
|
|
808
|
-
endpoint: S,
|
|
809
|
-
authToken: i,
|
|
810
|
-
section: e(),
|
|
811
|
-
perPage: f,
|
|
812
|
-
callbacks: {
|
|
813
|
-
onData: (n) => {
|
|
814
|
-
p = n;
|
|
815
|
-
},
|
|
816
|
-
onPagination: (n) => {
|
|
817
|
-
n ? (h.total = n.total, h.totalPages = n.lastPage ?? (Math.ceil(n.total / h.perPage) || 1), k.value = { data: p, meta: n }) : k.value = p;
|
|
818
|
-
},
|
|
819
|
-
onLoading: (n) => {
|
|
820
|
-
x.value = n;
|
|
821
|
-
},
|
|
822
|
-
onError: (n) => {
|
|
823
|
-
P.value = n;
|
|
824
|
-
},
|
|
825
|
-
onUnauthorized: () => {
|
|
826
|
-
U.value = !0;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
});
|
|
830
|
-
let p = null;
|
|
831
|
-
const y = r.getApi();
|
|
832
|
-
async function R(n) {
|
|
833
|
-
try {
|
|
834
|
-
return await y.fetchChart(n);
|
|
835
|
-
} catch (d) {
|
|
836
|
-
return d instanceof je && (U.value = !0), null;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
async function q() {
|
|
840
|
-
try {
|
|
841
|
-
return await y.fetchGroupedQueries();
|
|
842
|
-
} catch {
|
|
843
|
-
return null;
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
async function D(n) {
|
|
847
|
-
try {
|
|
848
|
-
return await y.explainQuery(n);
|
|
849
|
-
} catch {
|
|
850
|
-
return null;
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
async function c(n) {
|
|
854
|
-
try {
|
|
855
|
-
return await y.retryJob(n), !0;
|
|
856
|
-
} catch {
|
|
857
|
-
return !1;
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
async function g(n) {
|
|
861
|
-
try {
|
|
862
|
-
return await y.deleteCacheKey(n), !0;
|
|
863
|
-
} catch {
|
|
864
|
-
return !1;
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
async function O(n) {
|
|
868
|
-
try {
|
|
869
|
-
return (await y.fetchEmailPreview(n))?.html || null;
|
|
870
|
-
} catch {
|
|
871
|
-
return null;
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
function H(n) {
|
|
875
|
-
h.page = n, A();
|
|
876
|
-
}
|
|
877
|
-
function Y(n) {
|
|
878
|
-
b.search = n, h.page = 1, A();
|
|
879
|
-
}
|
|
880
|
-
function N(n, d) {
|
|
881
|
-
b[n] = d, h.page = 1, A();
|
|
882
|
-
}
|
|
883
|
-
function Q(n, d) {
|
|
884
|
-
u.column === n && !d ? u.direction = u.direction === "asc" ? "desc" : "asc" : (u.column = n, u.direction = d || "desc"), A();
|
|
885
|
-
}
|
|
886
|
-
function L(n) {
|
|
887
|
-
_.value = n, A();
|
|
888
|
-
}
|
|
889
|
-
async function F(n, d = "post", I) {
|
|
890
|
-
return r.mutate(n, d, I);
|
|
891
|
-
}
|
|
892
|
-
function Z() {
|
|
893
|
-
w(), r.fetch(!0);
|
|
894
|
-
}
|
|
895
|
-
function K() {
|
|
896
|
-
r.start();
|
|
897
|
-
}
|
|
898
|
-
function G() {
|
|
899
|
-
r.stop();
|
|
900
|
-
}
|
|
901
|
-
function J() {
|
|
902
|
-
const n = {};
|
|
903
|
-
for (const [d, I] of Object.entries(b))
|
|
904
|
-
d !== "search" && I !== "" && I !== void 0 && I !== null && (n[d] = String(I));
|
|
905
|
-
return n;
|
|
906
|
-
}
|
|
907
|
-
function w() {
|
|
908
|
-
const n = e(), d = J();
|
|
909
|
-
r.configure({
|
|
910
|
-
page: h.page,
|
|
911
|
-
perPage: h.perPage,
|
|
912
|
-
search: b.search || void 0,
|
|
913
|
-
sort: u.column || void 0,
|
|
914
|
-
sortDir: u.column ? u.direction : void 0,
|
|
915
|
-
filters: Object.keys(d).length > 0 ? d : void 0,
|
|
916
|
-
timeRange: n.startsWith("overview") ? _.value : void 0
|
|
917
|
-
});
|
|
918
|
-
}
|
|
919
|
-
function A() {
|
|
920
|
-
w(), r.fetch(!1);
|
|
921
|
-
}
|
|
922
|
-
return ee(e, () => {
|
|
923
|
-
h.page = 1;
|
|
924
|
-
for (const n of Object.keys(b))
|
|
925
|
-
n === "search" ? b.search = "" : delete b[n];
|
|
926
|
-
u.column = "", k.value = null, r.setSection(e()), w();
|
|
927
|
-
}), C && ee(C, () => {
|
|
928
|
-
w(), r.handleRefreshSignal();
|
|
929
|
-
}), X(() => {
|
|
930
|
-
w(), r.start();
|
|
931
|
-
}), te(() => {
|
|
932
|
-
r.stop();
|
|
933
|
-
}), {
|
|
934
|
-
data: k,
|
|
935
|
-
loading: x,
|
|
936
|
-
error: P,
|
|
937
|
-
isUnauthorized: U,
|
|
938
|
-
pagination: h,
|
|
939
|
-
filter: b,
|
|
940
|
-
sort: u,
|
|
941
|
-
timeRange: _,
|
|
942
|
-
goToPage: H,
|
|
943
|
-
setSearch: Y,
|
|
944
|
-
setFilter: N,
|
|
945
|
-
setSort: Q,
|
|
946
|
-
setTimeRange: L,
|
|
947
|
-
refresh: Z,
|
|
948
|
-
startRefresh: K,
|
|
949
|
-
stopRefresh: G,
|
|
950
|
-
mutate: F,
|
|
951
|
-
fetchChart: R,
|
|
952
|
-
fetchGroupedQueries: q,
|
|
953
|
-
explainQuery: D,
|
|
954
|
-
retryJob: c,
|
|
955
|
-
deleteCacheKey: g,
|
|
956
|
-
fetchEmailPreview: O
|
|
957
|
-
};
|
|
958
|
-
}
|
|
959
|
-
const Ut = ["data-theme"], Rt = { class: "ss-dash-header" }, Dt = { class: "ss-dash-header-center" }, jt = { class: "ss-dash-header-right" }, Ht = ["href"], At = { class: "ss-dash-body" }, It = { class: "ss-dash-nav" }, qt = ["data-ss-section", "onClick", "title"], Ot = { class: "ss-dash-nav-icon" }, zt = ["viewBox", "innerHTML"], Nt = { class: "ss-dash-nav-label" }, Ft = {
|
|
960
|
-
key: 0,
|
|
961
|
-
class: "ss-dash-nav-sep"
|
|
962
|
-
}, Vt = ["onClick", "title"], Gt = { class: "ss-dash-nav-icon" }, Qt = ["viewBox", "innerHTML"], Kt = { class: "ss-dash-nav-label" }, Jt = ["title"], Wt = ["viewBox", "innerHTML"], Xt = ["viewBox", "innerHTML"], Yt = { class: "ss-dash-main" }, Zt = ["id"], es = { class: "ss-dash-pane-inner" }, ts = {
|
|
963
|
-
key: 1,
|
|
964
|
-
class: "ss-dash-empty"
|
|
965
|
-
}, ls = /* @__PURE__ */ se({
|
|
966
|
-
__name: "DashboardPage",
|
|
967
|
-
props: {
|
|
968
|
-
baseUrl: { default: "" },
|
|
969
|
-
dashboardEndpoint: { default: "/__stats/api" },
|
|
970
|
-
debugEndpoint: { default: void 0 },
|
|
971
|
-
authToken: { default: void 0 },
|
|
972
|
-
backUrl: { default: "/" },
|
|
973
|
-
channelName: { default: "server-stats/dashboard" }
|
|
974
|
-
},
|
|
975
|
-
setup(e) {
|
|
976
|
-
const T = $(() => import("./OverviewSection-BqSwuMKH.js")), a = $(() => import("./RequestsSection-B0A5SKcM.js")), S = $(() => import("./QueriesSection-D4Fs0YH6.js")), i = $(() => import("./EventsSection-CRVhtagq.js")), f = $(() => import("./RoutesSection-Ys5dTzvF.js")), C = $(() => import("./LogsSection-C4NRFOpA.js")), k = $(() => import("./EmailsSection-Ct5vsLCc.js")), x = $(() => import("./TimelineSection-D38iHB08.js")), P = $(() => import("./CacheSection-DDvJ7bs2.js")), U = $(() => import("./JobsSection-B_wH2Co7.js")), _ = $(() => import("./ConfigSection-GTCrvsPr.js")), h = $(() => import("./InternalsSection-BJUXE-5F.js")), b = [
|
|
977
|
-
"overview",
|
|
978
|
-
"requests",
|
|
979
|
-
"queries",
|
|
980
|
-
"events",
|
|
981
|
-
"routes",
|
|
982
|
-
"logs",
|
|
983
|
-
"emails",
|
|
984
|
-
"timeline",
|
|
985
|
-
"cache",
|
|
986
|
-
"jobs",
|
|
987
|
-
"config",
|
|
988
|
-
"internals"
|
|
989
|
-
], u = e, { theme: r, toggleTheme: p } = le(), { features: y } = ce({
|
|
990
|
-
baseUrl: u.baseUrl,
|
|
991
|
-
debugEndpoint: u.debugEndpoint,
|
|
992
|
-
authToken: u.authToken
|
|
993
|
-
}), R = v("overview"), q = v(!1), D = v(!1), c = v(0);
|
|
994
|
-
ne("ss-refresh-key", c), ne("ss-base-url", u.baseUrl), ne("ss-dashboard-endpoint", u.dashboardEndpoint), ne("ss-debug-endpoint", u.debugEndpoint), ne("ss-auth-token", u.authToken), typeof window < "u" && (q.value = localStorage.getItem("ss-dash-sidebar") === "collapsed");
|
|
995
|
-
let g = null;
|
|
996
|
-
function O() {
|
|
997
|
-
if (g && (g(), g = null), !u.channelName) return;
|
|
998
|
-
g = He({
|
|
999
|
-
baseUrl: u.baseUrl,
|
|
1000
|
-
channelName: u.channelName,
|
|
1001
|
-
authToken: u.authToken,
|
|
1002
|
-
onMessage: () => {
|
|
1003
|
-
c.value += 1;
|
|
1004
|
-
},
|
|
1005
|
-
onConnect: () => {
|
|
1006
|
-
D.value = !0;
|
|
1007
|
-
},
|
|
1008
|
-
onDisconnect: () => {
|
|
1009
|
-
D.value = !1;
|
|
1010
|
-
},
|
|
1011
|
-
onError: () => {
|
|
1012
|
-
D.value = !1;
|
|
1013
|
-
}
|
|
1014
|
-
}).unsubscribe;
|
|
1015
|
-
}
|
|
1016
|
-
X(() => {
|
|
1017
|
-
O();
|
|
1018
|
-
}), te(() => {
|
|
1019
|
-
g && (g(), g = null);
|
|
1020
|
-
});
|
|
1021
|
-
const H = m(() => y.value.customPanes || []);
|
|
1022
|
-
function Y(d) {
|
|
1023
|
-
const I = d.replace("#", "").split("?")[0];
|
|
1024
|
-
return I && [...b, ...H.value.map((ie) => ie.id)].includes(I) ? I : "overview";
|
|
1025
|
-
}
|
|
1026
|
-
function N() {
|
|
1027
|
-
const d = Y(window.location.hash);
|
|
1028
|
-
d !== R.value && (R.value = d);
|
|
1029
|
-
}
|
|
1030
|
-
X(() => {
|
|
1031
|
-
if (typeof window > "u") return;
|
|
1032
|
-
const d = Y(window.location.hash);
|
|
1033
|
-
(d !== "overview" || window.location.hash) && (R.value = d), window.addEventListener("hashchange", N);
|
|
1034
|
-
}), te(() => {
|
|
1035
|
-
window.removeEventListener("hashchange", N);
|
|
1036
|
-
}), ee(R, (d) => {
|
|
1037
|
-
typeof window < "u" && (window.location.hash = d);
|
|
1038
|
-
});
|
|
1039
|
-
function Q() {
|
|
1040
|
-
q.value = !q.value, localStorage.setItem("ss-dash-sidebar", q.value ? "collapsed" : "expanded");
|
|
1041
|
-
}
|
|
1042
|
-
function L(d) {
|
|
1043
|
-
d !== R.value && (R.value = d);
|
|
1044
|
-
}
|
|
1045
|
-
const F = m(() => [
|
|
1046
|
-
{ id: "overview", label: "Overview", visible: !0 },
|
|
1047
|
-
{ id: "requests", label: "Requests", visible: !0 },
|
|
1048
|
-
{ id: "queries", label: "Queries", visible: !0 },
|
|
1049
|
-
{ id: "events", label: "Events", visible: !0 },
|
|
1050
|
-
{ id: "routes", label: "Routes", visible: !0 },
|
|
1051
|
-
{ id: "logs", label: "Logs", visible: !0 },
|
|
1052
|
-
{ id: "emails", label: "Emails", visible: !0 },
|
|
1053
|
-
{ id: "timeline", label: "Timeline", visible: y.value.tracing },
|
|
1054
|
-
{ id: "cache", label: "Cache", visible: y.value.cache },
|
|
1055
|
-
{ id: "jobs", label: "Jobs", visible: y.value.queues },
|
|
1056
|
-
{ id: "config", label: "Config", visible: !0 },
|
|
1057
|
-
{ id: "internals", label: "Internals", visible: !0 }
|
|
1058
|
-
]), Z = m(() => F.value.filter((d) => d.visible)), { data: K } = Pt(() => "overview", {
|
|
1059
|
-
baseUrl: u.baseUrl,
|
|
1060
|
-
dashboardEndpoint: u.dashboardEndpoint,
|
|
1061
|
-
authToken: u.authToken,
|
|
1062
|
-
refreshKey: c
|
|
1063
|
-
}), G = m(() => K.value), J = m(() => {
|
|
1064
|
-
const d = {};
|
|
1065
|
-
if (!G.value) return d;
|
|
1066
|
-
if (G.value.totalRequests > 0 && (d.requests = { count: G.value.totalRequests }), G.value.queryStats?.total > 0 && (d.queries = { count: G.value.queryStats.total }), G.value.logLevelBreakdown) {
|
|
1067
|
-
const I = G.value.logLevelBreakdown, B = I.error + I.warn + I.info + I.debug;
|
|
1068
|
-
B > 0 && (d.logs = { count: B });
|
|
1069
|
-
}
|
|
1070
|
-
return d;
|
|
1071
|
-
}), w = {
|
|
1072
|
-
overview: T,
|
|
1073
|
-
requests: a,
|
|
1074
|
-
queries: S,
|
|
1075
|
-
events: i,
|
|
1076
|
-
routes: f,
|
|
1077
|
-
logs: C,
|
|
1078
|
-
emails: k,
|
|
1079
|
-
timeline: x,
|
|
1080
|
-
cache: P,
|
|
1081
|
-
jobs: U,
|
|
1082
|
-
config: _,
|
|
1083
|
-
internals: h
|
|
1084
|
-
}, A = m(() => w[R.value] || null);
|
|
1085
|
-
function n(d) {
|
|
1086
|
-
return d === "timeline" ? "dashboard-timeline" : d;
|
|
1087
|
-
}
|
|
1088
|
-
return (d, I) => (t(), o("div", {
|
|
1089
|
-
class: "ss-dash",
|
|
1090
|
-
"data-theme": s(r),
|
|
1091
|
-
id: "ss-dash"
|
|
1092
|
-
}, [
|
|
1093
|
-
l("div", Rt, [
|
|
1094
|
-
I[0] || (I[0] = l("div", { class: "ss-dash-header-left" }, [
|
|
1095
|
-
l("span", { class: "ss-dash-logo" }, "Server Stats"),
|
|
1096
|
-
l("span", { class: "ss-dash-logo-sub" }, "Dashboard")
|
|
1097
|
-
], -1)),
|
|
1098
|
-
l("div", Dt, [
|
|
1099
|
-
l("span", {
|
|
1100
|
-
class: z(["ss-dash-live-dot", { "ss-dash-connected": D.value }]),
|
|
1101
|
-
id: "ss-dash-live-dot"
|
|
1102
|
-
}, null, 2),
|
|
1103
|
-
l("span", {
|
|
1104
|
-
class: z(["ss-dash-live-label", { "ss-dash-connected": D.value }]),
|
|
1105
|
-
id: "ss-dash-live-label"
|
|
1106
|
-
}, M(D.value ? "Live" : "Polling"), 3)
|
|
1107
|
-
]),
|
|
1108
|
-
l("div", jt, [
|
|
1109
|
-
ue(me, { "class-prefix": "ss-dash" }),
|
|
1110
|
-
e.backUrl ? (t(), o("a", {
|
|
1111
|
-
key: 0,
|
|
1112
|
-
href: e.backUrl,
|
|
1113
|
-
class: "ss-dash-back-link",
|
|
1114
|
-
title: "Back to app"
|
|
1115
|
-
}, " ← App ", 8, Ht)) : E("", !0)
|
|
1116
|
-
])
|
|
1117
|
-
]),
|
|
1118
|
-
l("div", At, [
|
|
1119
|
-
l("div", {
|
|
1120
|
-
class: z(["ss-dash-sidebar", { "ss-dash-collapsed": q.value }]),
|
|
1121
|
-
id: "ss-dash-sidebar"
|
|
1122
|
-
}, [
|
|
1123
|
-
l("nav", It, [
|
|
1124
|
-
(t(!0), o(W, null, ae(Z.value, (B) => (t(), o("button", {
|
|
1125
|
-
key: B.id,
|
|
1126
|
-
type: "button",
|
|
1127
|
-
class: z(["ss-dash-nav-item", { "ss-dash-active": R.value === B.id }]),
|
|
1128
|
-
"data-ss-section": B.id,
|
|
1129
|
-
onClick: (ie) => L(B.id),
|
|
1130
|
-
title: q.value ? B.label : void 0
|
|
1131
|
-
}, [
|
|
1132
|
-
l("span", Ot, [
|
|
1133
|
-
(t(), o("svg", {
|
|
1134
|
-
width: "20",
|
|
1135
|
-
height: "20",
|
|
1136
|
-
viewBox: (s(j)[n(B.id)] || s(j).config).viewBox,
|
|
1137
|
-
fill: "none",
|
|
1138
|
-
stroke: "currentColor",
|
|
1139
|
-
"stroke-width": "2",
|
|
1140
|
-
"stroke-linecap": "round",
|
|
1141
|
-
"stroke-linejoin": "round",
|
|
1142
|
-
innerHTML: (s(j)[n(B.id)] || s(j).config).elements.join("")
|
|
1143
|
-
}, null, 8, zt))
|
|
1144
|
-
]),
|
|
1145
|
-
l("span", Nt, M(B.label), 1),
|
|
1146
|
-
J.value[B.id] && J.value[B.id].count > 0 ? (t(), o("span", {
|
|
1147
|
-
key: 0,
|
|
1148
|
-
class: z(["ss-dash-nav-badge", J.value[B.id].variant || ""])
|
|
1149
|
-
}, M(J.value[B.id].count), 3)) : E("", !0)
|
|
1150
|
-
], 10, qt))), 128)),
|
|
1151
|
-
H.value.length > 0 ? (t(), o("div", Ft)) : E("", !0),
|
|
1152
|
-
(t(!0), o(W, null, ae(H.value, (B) => (t(), o("button", {
|
|
1153
|
-
key: B.id,
|
|
1154
|
-
type: "button",
|
|
1155
|
-
class: z(["ss-dash-nav-item", { "ss-dash-active": R.value === B.id }]),
|
|
1156
|
-
onClick: (ie) => L(B.id),
|
|
1157
|
-
title: q.value ? B.label : void 0
|
|
1158
|
-
}, [
|
|
1159
|
-
l("span", Gt, [
|
|
1160
|
-
(t(), o("svg", {
|
|
1161
|
-
width: "20",
|
|
1162
|
-
height: "20",
|
|
1163
|
-
viewBox: s(j)["custom-pane"].viewBox,
|
|
1164
|
-
fill: "none",
|
|
1165
|
-
stroke: "currentColor",
|
|
1166
|
-
"stroke-width": "2",
|
|
1167
|
-
"stroke-linecap": "round",
|
|
1168
|
-
"stroke-linejoin": "round",
|
|
1169
|
-
innerHTML: s(j)["custom-pane"].elements.join("")
|
|
1170
|
-
}, null, 8, Qt))
|
|
1171
|
-
]),
|
|
1172
|
-
l("span", Kt, M(B.label), 1)
|
|
1173
|
-
], 10, Vt))), 128))
|
|
1174
|
-
]),
|
|
1175
|
-
l("button", {
|
|
1176
|
-
type: "button",
|
|
1177
|
-
class: "ss-dash-sidebar-toggle",
|
|
1178
|
-
id: "ss-dash-sidebar-toggle",
|
|
1179
|
-
onClick: Q,
|
|
1180
|
-
title: q.value ? "Expand sidebar" : "Collapse sidebar"
|
|
1181
|
-
}, [
|
|
1182
|
-
q.value ? (t(), o("svg", {
|
|
1183
|
-
key: 0,
|
|
1184
|
-
width: "16",
|
|
1185
|
-
height: "16",
|
|
1186
|
-
viewBox: s(j)["chevron-right"].viewBox,
|
|
1187
|
-
fill: "none",
|
|
1188
|
-
stroke: "currentColor",
|
|
1189
|
-
"stroke-width": "1.5",
|
|
1190
|
-
innerHTML: s(j)["chevron-right"].elements.join("")
|
|
1191
|
-
}, null, 8, Wt)) : (t(), o("svg", {
|
|
1192
|
-
key: 1,
|
|
1193
|
-
width: "16",
|
|
1194
|
-
height: "16",
|
|
1195
|
-
viewBox: s(j)["chevron-left"].viewBox,
|
|
1196
|
-
fill: "none",
|
|
1197
|
-
stroke: "currentColor",
|
|
1198
|
-
"stroke-width": "1.5",
|
|
1199
|
-
innerHTML: s(j)["chevron-left"].elements.join("")
|
|
1200
|
-
}, null, 8, Xt))
|
|
1201
|
-
], 8, Jt)
|
|
1202
|
-
], 2),
|
|
1203
|
-
l("div", Yt, [
|
|
1204
|
-
l("div", {
|
|
1205
|
-
class: "ss-dash-pane ss-dash-active",
|
|
1206
|
-
id: `ss-dash-pane-${R.value}`
|
|
1207
|
-
}, [
|
|
1208
|
-
l("div", es, [
|
|
1209
|
-
(t(), V(Ce, null, {
|
|
1210
|
-
fallback: he(() => [...I[1] || (I[1] = [
|
|
1211
|
-
l("div", { class: "ss-dash-empty" }, "Loading...", -1)
|
|
1212
|
-
])]),
|
|
1213
|
-
default: he(() => [
|
|
1214
|
-
A.value ? (t(), V(_e(A.value), { key: 0 })) : (t(), o("div", ts, "Unknown section"))
|
|
1215
|
-
]),
|
|
1216
|
-
_: 1
|
|
1217
|
-
}))
|
|
1218
|
-
])
|
|
1219
|
-
], 8, Zt)
|
|
1220
|
-
])
|
|
1221
|
-
])
|
|
1222
|
-
], 8, Ut));
|
|
1223
|
-
}
|
|
1224
|
-
});
|
|
1225
|
-
export {
|
|
1226
|
-
Ge as _,
|
|
1227
|
-
ls as a,
|
|
1228
|
-
os as b,
|
|
1229
|
-
as as c,
|
|
1230
|
-
gt as d,
|
|
1231
|
-
ce as e,
|
|
1232
|
-
Ae as f,
|
|
1233
|
-
le as g,
|
|
1234
|
-
Pt as u
|
|
1235
|
-
};
|