@lunora/studio 1.0.0-alpha.3 → 1.0.0-alpha.30
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/__assets__/package-og.svg +1 -1
- package/dist/index.d.ts +29 -18
- package/dist/index.js +29 -29
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +1 -1
- package/dist/{packem_shared/ApiTab-W3no0KOj.js → packem_chunks/ApiTab.js} +5 -5
- package/dist/{packem_shared/AuditPanel-Bq4o_IqT.js → packem_chunks/AuditPanel.js} +24 -36
- package/dist/{packem_shared/ExportImportPanel-dxY56TDF.js → packem_chunks/ExportImportPanel.js} +13 -9
- package/dist/{packem_shared/FileBrowser-Dhy4zES8.js → packem_chunks/FileBrowser.js} +15 -15
- package/dist/{packem_shared/FunctionRunner--fQJRPAD.js → packem_chunks/FunctionRunner.js} +10 -10
- package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js} +147 -204
- package/dist/{packem_shared/HealthPanel-PxclMWmA.js → packem_chunks/HealthPanel.js} +37 -29
- package/dist/{packem_shared/InsightsPanel-CWS_C-xW.js → packem_chunks/InsightsPanel.js} +107 -69
- package/dist/{packem_shared/LogsPanel-CTW8CFcM.js → packem_chunks/LogsPanel.js} +41 -53
- package/dist/{packem_shared/MailPanel-BwkvfIHF.js → packem_chunks/MailPanel.js} +37 -44
- package/dist/{packem_shared/MetricsPanel-BLuOhZQ4.js → packem_chunks/MetricsPanel.js} +41 -322
- package/dist/{packem_shared/MigrationsPanel-DT3lnwHF.js → packem_chunks/MigrationsPanel.js} +39 -46
- package/dist/{packem_shared/PitrPanel-CdErL7EJ.js → packem_chunks/PitrPanel.js} +9 -9
- package/dist/{packem_shared/SchemaViewer-LJDcmNIO.js → packem_chunks/SchemaViewer.js} +15 -15
- package/dist/{packem_shared/SecurityAdvisorPanel-C_ETsPih.js → packem_chunks/SecurityAdvisorPanel.js} +44 -31
- package/dist/packem_chunks/SettingsPanel.js +390 -0
- package/dist/{packem_shared/sql-editor-panel-BFRpzj6r.js → packem_chunks/SqlEditorPanel.js} +12 -252
- package/dist/{packem_shared/TableEditor-ChfUOZec.js → packem_chunks/TableEditor.js} +10 -68
- package/dist/packem_chunks/analytics-panel.js +261 -0
- package/dist/packem_chunks/auth-config-panel.js +179 -0
- package/dist/packem_chunks/auth-sessions-panel.js +175 -0
- package/dist/packem_chunks/dashboards-panel.js +779 -0
- package/dist/packem_chunks/fanout-panel.js +481 -0
- package/dist/packem_chunks/flags-panel.js +176 -0
- package/dist/packem_chunks/kv-browser.js +1896 -0
- package/dist/packem_chunks/log-drains-panel.js +273 -0
- package/dist/packem_chunks/organizations-panel.js +670 -0
- package/dist/packem_chunks/payments-panel.js +185 -0
- package/dist/packem_chunks/permissions-panel.js +804 -0
- package/dist/packem_chunks/queues-panel.js +147 -0
- package/dist/packem_chunks/rls-panel.js +313 -0
- package/dist/packem_chunks/schedule-panel.js +831 -0
- package/dist/packem_chunks/sparkline.js +79 -0
- package/dist/packem_chunks/storage-rules-panel.js +138 -0
- package/dist/packem_chunks/subscriptions-panel.js +236 -0
- package/dist/packem_chunks/users-panel.js +1265 -0
- package/dist/packem_chunks/vector-browser.js +281 -0
- package/dist/packem_chunks/workflows-panel.js +562 -0
- package/dist/packem_shared/{ADMIN_FUNCTIONS-DmBqMZ-z.js → ADMIN_FUNCTIONS-CdaxLGkE.js} +3 -0
- package/dist/packem_shared/{ApiDocsPanel-C5-yJ1p7.js → ApiDocsPanel-B6u_wnz-.js} +2 -2
- package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-Drz4UO0a.js} +2 -1
- package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-B5BertvU.js} +1 -1
- package/dist/packem_shared/{DataBrowser-CtBe1So9.js → DataBrowser-ANTHLWWh.js} +198 -247
- package/dist/packem_shared/{GlobalDataBrowser-BTEmGrph.js → GlobalDataBrowser-CjgTG_wa.js} +37 -66
- package/dist/packem_shared/HomePanel-c2FodE9t.js +14 -0
- package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-CspFdbUT.js} +2 -1
- package/dist/packem_shared/{ScheduledJobs-CabfKbyM.js → ScheduledJobs-BEJXtsBn.js} +163 -60
- package/dist/packem_shared/Studio-CVTtA_sB.js +16 -0
- package/dist/packem_shared/{StudioApp-CHOZA-z-.js → StudioApp-BSYV2fz6.js} +277 -3
- package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-DzqyvUU3.js} +1 -1
- package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-B6MyY_al.d.ts} +1 -1
- package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-Bb__F5-u.js} +1 -1
- package/dist/packem_shared/browser-storage-d03UsV7v.js +249 -0
- package/dist/packem_shared/{cf-links-2cktDedA.js → cf-links-BZfRdxSE.js} +1 -1
- package/dist/packem_shared/{data-grid-B5CaV3wS.js → data-grid-Dsg6nRjo.js} +1 -1
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
- package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-D7nNzBYm.js} +4 -99
- package/dist/packem_shared/{HomePanel-Cw16stjq.js → home-panel-aOR_drVv.js} +833 -469
- package/dist/packem_shared/{internal-rXJEAhXS.js → internal-FcNZ3beb.js} +1 -1
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
- package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-Doy1XlQq.js} +4 -44
- package/dist/packem_shared/select-UkNYCT3s.js +273 -0
- package/dist/packem_shared/skeleton-CGhL0p20.js +45 -0
- package/dist/packem_shared/{sparkline-10dG-_f0.js → sparkline-KgMPHS4u.js} +1 -1
- package/dist/packem_shared/studio-dMTJ-kRR.js +3987 -0
- package/dist/packem_shared/{table-_RzNvy3R.js → table-DsCa9Qp9.js} +1 -1
- package/dist/packem_shared/{table-list-sidebar-Bg7uzbvC.js → table-list-sidebar-VMo0ftxD.js} +1 -1
- package/dist/packem_shared/use-admin-query-BViPA3US.js +105 -0
- package/dist/packem_shared/use-auth-capabilities-BHkoBnbZ.js +32 -0
- package/dist/standalone/chunk-2DS7JLWL.js +13 -0
- package/dist/standalone/chunk-2K47A3P6.js +1 -0
- package/dist/standalone/chunk-2NGUNNGW.js +1 -0
- package/dist/standalone/chunk-2PDQ4KZ6.js +1 -0
- package/dist/standalone/chunk-3BP4BTLR.js +4 -0
- package/dist/standalone/chunk-3OA7PECS.js +6 -0
- package/dist/standalone/chunk-4QHKBC77.js +1 -0
- package/dist/standalone/chunk-57LYXHXH.js +1 -0
- package/dist/standalone/chunk-5NSZVXCS.js +1 -0
- package/dist/standalone/chunk-5OIBXYZM.js +1 -0
- package/dist/standalone/chunk-63XKJQTQ.js +1 -0
- package/dist/standalone/chunk-6RC6L33K.js +4 -0
- package/dist/standalone/chunk-6VTGE3WJ.js +1 -0
- package/dist/standalone/chunk-7PBZKXYA.js +1 -0
- package/dist/standalone/chunk-7POIIWC5.js +3 -0
- package/dist/standalone/chunk-7RYIQKZA.js +1 -0
- package/dist/standalone/chunk-7TJJXVSE.js +1 -0
- package/dist/standalone/chunk-AB6QGMBF.js +1 -0
- package/dist/standalone/chunk-AHILM3ZP.js +1 -0
- package/dist/standalone/chunk-AQGOX5DK.js +1 -0
- package/dist/standalone/chunk-ASLGNHAX.js +1 -0
- package/dist/standalone/chunk-BHTPZS7L.js +4 -0
- package/dist/standalone/chunk-BJGBHGK3.js +1 -0
- package/dist/standalone/chunk-D7HKX4DI.js +1 -0
- package/dist/standalone/chunk-DGWTR4G7.js +1 -0
- package/dist/standalone/chunk-DSX53PBM.js +1 -0
- package/dist/standalone/chunk-DV2MNASX.js +1 -0
- package/dist/standalone/chunk-DWDILV2E.js +1 -0
- package/dist/standalone/chunk-E7AVZZKO.js +1 -0
- package/dist/standalone/chunk-EGJX34WM.js +1 -0
- package/dist/standalone/chunk-FCR3HKFV.js +1 -0
- package/dist/standalone/chunk-FKO3HO6I.js +4 -0
- package/dist/standalone/chunk-FQKNJSRA.js +76 -0
- package/dist/standalone/chunk-G2TFEWEQ.js +4 -0
- package/dist/standalone/chunk-GABMIICA.js +1 -0
- package/dist/standalone/chunk-GTM65MVX.js +1 -0
- package/dist/standalone/chunk-GZXPPJVK.js +1 -0
- package/dist/standalone/chunk-HFBRE65A.js +1 -0
- package/dist/standalone/chunk-HFMQNUBC.js +1 -0
- package/dist/standalone/chunk-HG7Q5B3H.js +1 -0
- package/dist/standalone/chunk-HTQL7AXU.js +1 -0
- package/dist/standalone/chunk-HV7G6DFP.js +5 -0
- package/dist/standalone/chunk-ITLLHEVG.js +1 -0
- package/dist/standalone/chunk-J6J54MBP.js +1 -0
- package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
- package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
- package/dist/standalone/chunk-KG3QTFWE.js +1 -0
- package/dist/standalone/chunk-KGS7KM4A.js +2 -0
- package/dist/standalone/chunk-KODWGUAB.js +1 -0
- package/dist/standalone/chunk-KZ6INM5M.js +1 -0
- package/dist/standalone/chunk-MGFEVTRI.js +1 -0
- package/dist/standalone/chunk-N2QDG3MW.js +1 -0
- package/dist/standalone/chunk-N4JI6VQD.js +1 -0
- package/dist/standalone/chunk-NNISYDNI.js +1 -0
- package/dist/standalone/chunk-O4PXDNR3.js +1 -0
- package/dist/standalone/chunk-O77VNUFD.js +1 -0
- package/dist/standalone/chunk-OD2POGPJ.js +1 -0
- package/dist/standalone/chunk-OXCK3ZUG.js +1 -0
- package/dist/standalone/chunk-P7DSVO4U.js +1 -0
- package/dist/standalone/chunk-PKAM3N5C.js +1 -0
- package/dist/standalone/chunk-QGXGBHQO.js +1 -0
- package/dist/standalone/chunk-QHA3TAEJ.js +1 -0
- package/dist/standalone/chunk-QQWC62X7.js +1 -0
- package/dist/standalone/chunk-RMYA7NAH.js +1 -0
- package/dist/standalone/chunk-RRCPZMC2.js +22 -0
- package/dist/standalone/chunk-S53RUBW5.js +1 -0
- package/dist/standalone/chunk-SB4GT6PK.js +1 -0
- package/dist/standalone/chunk-SEU5V7I6.js +1 -0
- package/dist/standalone/chunk-SHIOUDOT.js +1 -0
- package/dist/standalone/chunk-SIDRSX7Y.js +1 -0
- package/dist/standalone/chunk-SVR644RF.js +1 -0
- package/dist/standalone/chunk-TAD43CG5.js +1 -0
- package/dist/standalone/chunk-TBMYIZIO.js +1 -0
- package/dist/standalone/chunk-TICVNLPM.js +1 -0
- package/dist/standalone/chunk-TQ36RWOP.js +1 -0
- package/dist/standalone/chunk-UGMRUEBU.js +1 -0
- package/dist/standalone/chunk-UII66UVF.js +1 -0
- package/dist/standalone/chunk-VJPQUBN6.js +8 -0
- package/dist/standalone/chunk-VLXV72QE.js +1 -0
- package/dist/standalone/chunk-VMJKJWG6.js +1 -0
- package/dist/standalone/chunk-VPDPN5RR.js +2 -0
- package/dist/standalone/chunk-VSEGZA3J.js +1 -0
- package/dist/standalone/chunk-VXBZQIGY.js +4 -0
- package/dist/standalone/chunk-W7PCVQTE.js +1 -0
- package/dist/standalone/chunk-XLILSHPE.js +1 -0
- package/dist/standalone/chunk-XURNGQSS.js +1 -0
- package/dist/standalone/chunk-YJGANMU7.js +18 -0
- package/dist/standalone/chunk-YQQJ4N6U.js +1 -0
- package/dist/standalone/chunk-ZH7UES4T.js +2 -0
- package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
- package/dist/standalone/chunk-ZQCVDXDL.js +1 -0
- package/dist/standalone/studio.js +104 -246
- package/dist/styles.css +1 -1
- package/package.json +13 -12
- package/dist/packem_shared/SettingsPanel-C0uLRf5P.js +0 -176
- package/dist/packem_shared/SqlEditorPanel-CguV7otm.js +0 -13
- package/dist/packem_shared/Studio-DFWAlcuf.js +0 -33
- package/dist/packem_shared/studio-Bj8psK1c.js +0 -10303
- package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
- package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js}
RENAMED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { B as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import { useT } from '
|
|
13
|
-
import { ADMIN_FUNCTIONS } from '
|
|
14
|
-
import {
|
|
15
|
-
import { c as cn } from '
|
|
16
|
-
import { u as useLiveShardSeed } from './use-live-shard-seed-Cuk3dnH0.js';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { L as LiveError } from '../packem_shared/live-status-FZ0psC1z.js';
|
|
4
|
+
import { ShardInput } from '../packem_shared/ShardInput-gx_DZXXn.js';
|
|
5
|
+
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
6
|
+
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
7
|
+
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
8
|
+
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
9
|
+
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
10
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-BViPA3US.js';
|
|
11
|
+
import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
|
|
12
|
+
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
13
|
+
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
|
|
14
|
+
import { g as formatTimestamp } from '../packem_shared/internal-FcNZ3beb.js';
|
|
15
|
+
import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';
|
|
17
16
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
18
17
|
|
|
19
|
-
const GET_FUNCTION_STATS = adminRef(ADMIN_FUNCTIONS.getFunctionStats);
|
|
20
18
|
const KIND_VARIANT = {
|
|
21
19
|
action: "outline",
|
|
22
20
|
mutation: "default",
|
|
@@ -53,218 +51,163 @@ const SORTERS = {
|
|
|
53
51
|
slowest: (a, b) => b.maxDurationMs - a.maxDurationMs
|
|
54
52
|
};
|
|
55
53
|
const FunctionStatsPanel = (t0) => {
|
|
56
|
-
const $ = c(
|
|
54
|
+
const $ = c(45);
|
|
57
55
|
const {
|
|
58
56
|
functions,
|
|
59
57
|
initialShardKey
|
|
60
58
|
} = t0;
|
|
61
|
-
const client = useLunora();
|
|
62
59
|
const t = useT();
|
|
63
60
|
const [shardKey, setShardKey] = useState(initialShardKey ?? "");
|
|
64
|
-
const [stats, setStats] = useState(null);
|
|
65
|
-
const [error, setError] = useState(null);
|
|
66
61
|
const [sortKey, setSortKey] = useState("recent");
|
|
67
|
-
const [liveError, setLiveError] = useState(void 0);
|
|
68
|
-
const mountedRef = useRef(true);
|
|
69
62
|
let t1;
|
|
63
|
+
if ($[0] !== shardKey) {
|
|
64
|
+
t1 = shardKey.trim();
|
|
65
|
+
$[0] = shardKey;
|
|
66
|
+
$[1] = t1;
|
|
67
|
+
} else {
|
|
68
|
+
t1 = $[1];
|
|
69
|
+
}
|
|
70
|
+
const debouncedShard = useDebounced(t1, 400);
|
|
70
71
|
let t2;
|
|
71
|
-
if ($[
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return () => {
|
|
75
|
-
mountedRef.current = false;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
t2 = [];
|
|
79
|
-
$[0] = t1;
|
|
80
|
-
$[1] = t2;
|
|
72
|
+
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
73
|
+
t2 = {};
|
|
74
|
+
$[2] = t2;
|
|
81
75
|
} else {
|
|
82
|
-
|
|
83
|
-
t2 = $[1];
|
|
76
|
+
t2 = $[2];
|
|
84
77
|
}
|
|
85
|
-
useEffect(t1, t2);
|
|
86
78
|
let t3;
|
|
87
|
-
if ($[
|
|
88
|
-
t3 =
|
|
89
|
-
|
|
90
|
-
|
|
79
|
+
if ($[3] !== debouncedShard) {
|
|
80
|
+
t3 = {
|
|
81
|
+
live: true,
|
|
82
|
+
shardKey: debouncedShard
|
|
83
|
+
};
|
|
84
|
+
$[3] = debouncedShard;
|
|
85
|
+
$[4] = t3;
|
|
91
86
|
} else {
|
|
92
|
-
t3 = $[
|
|
87
|
+
t3 = $[4];
|
|
93
88
|
}
|
|
94
|
-
const
|
|
89
|
+
const {
|
|
90
|
+
data,
|
|
91
|
+
error,
|
|
92
|
+
liveError
|
|
93
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.getFunctionStats, t2, t3);
|
|
94
|
+
const stats = data?.functions ?? null;
|
|
95
95
|
let t4;
|
|
96
|
-
if ($[
|
|
97
|
-
t4 = (
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
setStats(result.functions);
|
|
101
|
-
};
|
|
102
|
-
$[4] = t4;
|
|
96
|
+
if ($[5] !== functions) {
|
|
97
|
+
t4 = new Map((functions ?? []).map(_temp));
|
|
98
|
+
$[5] = functions;
|
|
99
|
+
$[6] = t4;
|
|
103
100
|
} else {
|
|
104
|
-
t4 = $[
|
|
101
|
+
t4 = $[6];
|
|
105
102
|
}
|
|
106
|
-
const
|
|
103
|
+
const kindByPath = t4;
|
|
107
104
|
let t5;
|
|
108
|
-
if ($[5] !== client) {
|
|
109
|
-
t5 = async (shard) => {
|
|
110
|
-
try {
|
|
111
|
-
const next = await client.query(GET_FUNCTION_STATS, {}, callOptions(shard));
|
|
112
|
-
if (mountedRef.current) {
|
|
113
|
-
applyResult(next);
|
|
114
|
-
}
|
|
115
|
-
} catch (t62) {
|
|
116
|
-
const error_ = t62;
|
|
117
|
-
if (mountedRef.current) {
|
|
118
|
-
setStats(null);
|
|
119
|
-
setError(errorMessage(error_));
|
|
120
|
-
}
|
|
121
|
-
throw error_;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
$[5] = client;
|
|
125
|
-
$[6] = t5;
|
|
126
|
-
} else {
|
|
127
|
-
t5 = $[6];
|
|
128
|
-
}
|
|
129
|
-
const refresh = t5;
|
|
130
|
-
const committedShard = useLiveShardSeed(shardKey, refresh);
|
|
131
|
-
let t6;
|
|
132
105
|
if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
133
|
-
|
|
134
|
-
$[7] = t6;
|
|
135
|
-
} else {
|
|
136
|
-
t6 = $[7];
|
|
137
|
-
}
|
|
138
|
-
let t7;
|
|
139
|
-
if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
140
|
-
t7 = (next_0) => {
|
|
141
|
-
if (mountedRef.current) {
|
|
142
|
-
applyResult(next_0);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
$[8] = t7;
|
|
146
|
-
} else {
|
|
147
|
-
t7 = $[8];
|
|
148
|
-
}
|
|
149
|
-
let t8;
|
|
150
|
-
if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
-
t8 = (message) => {
|
|
152
|
-
if (mountedRef.current) {
|
|
153
|
-
setLiveError(message);
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
$[9] = t8;
|
|
157
|
-
} else {
|
|
158
|
-
t8 = $[9];
|
|
159
|
-
}
|
|
160
|
-
useLiveAdmin(ADMIN_FUNCTIONS.getFunctionStats, t6, committedShard ?? "", t7, committedShard !== void 0, t8);
|
|
161
|
-
let t9;
|
|
162
|
-
if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
163
|
-
t9 = (event) => {
|
|
106
|
+
t5 = (event) => {
|
|
164
107
|
setSortKey(event.currentTarget.dataset.sort);
|
|
165
108
|
};
|
|
166
|
-
$[
|
|
109
|
+
$[7] = t5;
|
|
167
110
|
} else {
|
|
168
|
-
|
|
111
|
+
t5 = $[7];
|
|
169
112
|
}
|
|
170
|
-
const selectSort =
|
|
171
|
-
let
|
|
172
|
-
if ($[
|
|
113
|
+
const selectSort = t5;
|
|
114
|
+
let t6;
|
|
115
|
+
if ($[8] !== error || $[9] !== kindByPath || $[10] !== liveError || $[11] !== shardKey || $[12] !== sortKey || $[13] !== stats || $[14] !== t) {
|
|
173
116
|
const sorted = stats === null ? [] : stats.toSorted(SORTERS[sortKey]);
|
|
174
|
-
let
|
|
175
|
-
if ($[
|
|
176
|
-
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
117
|
+
let t7;
|
|
118
|
+
if ($[16] !== t) {
|
|
119
|
+
t7 = t("Recent");
|
|
120
|
+
$[16] = t;
|
|
121
|
+
$[17] = t7;
|
|
179
122
|
} else {
|
|
180
|
-
|
|
123
|
+
t7 = $[17];
|
|
181
124
|
}
|
|
182
|
-
let
|
|
183
|
-
if ($[
|
|
184
|
-
|
|
125
|
+
let t8;
|
|
126
|
+
if ($[18] !== t7) {
|
|
127
|
+
t8 = {
|
|
185
128
|
key: "recent",
|
|
186
|
-
label:
|
|
129
|
+
label: t7
|
|
187
130
|
};
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
131
|
+
$[18] = t7;
|
|
132
|
+
$[19] = t8;
|
|
190
133
|
} else {
|
|
191
|
-
|
|
134
|
+
t8 = $[19];
|
|
192
135
|
}
|
|
193
|
-
let
|
|
194
|
-
if ($[
|
|
195
|
-
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
136
|
+
let t9;
|
|
137
|
+
if ($[20] !== t) {
|
|
138
|
+
t9 = t("Most called");
|
|
139
|
+
$[20] = t;
|
|
140
|
+
$[21] = t9;
|
|
198
141
|
} else {
|
|
199
|
-
|
|
142
|
+
t9 = $[21];
|
|
200
143
|
}
|
|
201
|
-
let
|
|
202
|
-
if ($[
|
|
203
|
-
|
|
144
|
+
let t10;
|
|
145
|
+
if ($[22] !== t9) {
|
|
146
|
+
t10 = {
|
|
204
147
|
key: "calls",
|
|
205
|
-
label:
|
|
148
|
+
label: t9
|
|
206
149
|
};
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
150
|
+
$[22] = t9;
|
|
151
|
+
$[23] = t10;
|
|
209
152
|
} else {
|
|
210
|
-
|
|
153
|
+
t10 = $[23];
|
|
211
154
|
}
|
|
212
|
-
let
|
|
213
|
-
if ($[
|
|
214
|
-
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
155
|
+
let t11;
|
|
156
|
+
if ($[24] !== t) {
|
|
157
|
+
t11 = t("Slowest");
|
|
158
|
+
$[24] = t;
|
|
159
|
+
$[25] = t11;
|
|
217
160
|
} else {
|
|
218
|
-
|
|
161
|
+
t11 = $[25];
|
|
219
162
|
}
|
|
220
|
-
let
|
|
221
|
-
if ($[
|
|
222
|
-
|
|
163
|
+
let t12;
|
|
164
|
+
if ($[26] !== t11) {
|
|
165
|
+
t12 = {
|
|
223
166
|
key: "slowest",
|
|
224
|
-
label:
|
|
167
|
+
label: t11
|
|
225
168
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
169
|
+
$[26] = t11;
|
|
170
|
+
$[27] = t12;
|
|
228
171
|
} else {
|
|
229
|
-
|
|
172
|
+
t12 = $[27];
|
|
230
173
|
}
|
|
231
|
-
let
|
|
232
|
-
if ($[
|
|
233
|
-
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
174
|
+
let t13;
|
|
175
|
+
if ($[28] !== t10 || $[29] !== t12 || $[30] !== t8) {
|
|
176
|
+
t13 = [t8, t10, t12];
|
|
177
|
+
$[28] = t10;
|
|
178
|
+
$[29] = t12;
|
|
179
|
+
$[30] = t8;
|
|
180
|
+
$[31] = t13;
|
|
238
181
|
} else {
|
|
239
|
-
|
|
182
|
+
t13 = $[31];
|
|
240
183
|
}
|
|
241
|
-
const sortButtons =
|
|
242
|
-
let
|
|
243
|
-
if ($[
|
|
244
|
-
|
|
184
|
+
const sortButtons = t13;
|
|
185
|
+
let t14;
|
|
186
|
+
if ($[32] !== shardKey) {
|
|
187
|
+
t14 = /* @__PURE__ */ jsxDEV(ShardInput, {
|
|
245
188
|
onChange: setShardKey,
|
|
246
189
|
testId: "fs-shard-input",
|
|
247
190
|
value: shardKey
|
|
248
191
|
}, void 0, false);
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
192
|
+
$[32] = shardKey;
|
|
193
|
+
$[33] = t14;
|
|
251
194
|
} else {
|
|
252
|
-
|
|
195
|
+
t14 = $[33];
|
|
253
196
|
}
|
|
254
|
-
let
|
|
255
|
-
if ($[
|
|
256
|
-
|
|
197
|
+
let t15;
|
|
198
|
+
if ($[34] !== liveError) {
|
|
199
|
+
t15 = /* @__PURE__ */ jsxDEV(LiveError, {
|
|
257
200
|
message: liveError,
|
|
258
201
|
prefix: "fs"
|
|
259
202
|
}, void 0, false);
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
203
|
+
$[34] = liveError;
|
|
204
|
+
$[35] = t15;
|
|
262
205
|
} else {
|
|
263
|
-
|
|
206
|
+
t15 = $[35];
|
|
264
207
|
}
|
|
265
|
-
let
|
|
266
|
-
if ($[
|
|
267
|
-
|
|
208
|
+
let t16;
|
|
209
|
+
if ($[36] !== sortButtons || $[37] !== sortKey) {
|
|
210
|
+
t16 = /* @__PURE__ */ jsxDEV("div", {
|
|
268
211
|
className: "ml-auto flex items-center gap-1",
|
|
269
212
|
role: "group",
|
|
270
213
|
children: sortButtons.map((option) => /* @__PURE__ */ jsxDEV(Button, {
|
|
@@ -277,42 +220,42 @@ const FunctionStatsPanel = (t0) => {
|
|
|
277
220
|
children: option.label
|
|
278
221
|
}, option.key, false))
|
|
279
222
|
}, void 0, false);
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
223
|
+
$[36] = sortButtons;
|
|
224
|
+
$[37] = sortKey;
|
|
225
|
+
$[38] = t16;
|
|
283
226
|
} else {
|
|
284
|
-
|
|
227
|
+
t16 = $[38];
|
|
285
228
|
}
|
|
286
|
-
let
|
|
287
|
-
if ($[
|
|
288
|
-
|
|
229
|
+
let t17;
|
|
230
|
+
if ($[39] !== t14 || $[40] !== t15 || $[41] !== t16) {
|
|
231
|
+
t17 = /* @__PURE__ */ jsxDEV("div", {
|
|
289
232
|
className: "flex flex-wrap items-center gap-2",
|
|
290
|
-
children: [
|
|
233
|
+
children: [t14, t15, t16]
|
|
291
234
|
}, void 0, true);
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
235
|
+
$[39] = t14;
|
|
236
|
+
$[40] = t15;
|
|
237
|
+
$[41] = t16;
|
|
238
|
+
$[42] = t17;
|
|
296
239
|
} else {
|
|
297
|
-
|
|
240
|
+
t17 = $[42];
|
|
298
241
|
}
|
|
299
|
-
let
|
|
300
|
-
if ($[
|
|
301
|
-
|
|
242
|
+
let t18;
|
|
243
|
+
if ($[43] !== error) {
|
|
244
|
+
t18 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
302
245
|
className: "text-sm text-destructive",
|
|
303
246
|
"data-testid": "fs-error",
|
|
304
247
|
role: "alert",
|
|
305
248
|
children: error
|
|
306
249
|
}, void 0, false);
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
250
|
+
$[43] = error;
|
|
251
|
+
$[44] = t18;
|
|
309
252
|
} else {
|
|
310
|
-
|
|
253
|
+
t18 = $[44];
|
|
311
254
|
}
|
|
312
|
-
|
|
255
|
+
t6 = /* @__PURE__ */ jsxDEV("div", {
|
|
313
256
|
className: "flex flex-col gap-4",
|
|
314
257
|
"data-testid": "lunora-function-stats",
|
|
315
|
-
children: [
|
|
258
|
+
children: [t17, t18, stats !== null && sorted.length === 0 && error === null && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
316
259
|
description: t("Per-function call counts, error rates, and latency land here after your first request."),
|
|
317
260
|
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
318
261
|
"aria-hidden": "true",
|
|
@@ -412,18 +355,18 @@ const FunctionStatsPanel = (t0) => {
|
|
|
412
355
|
}, void 0, false)
|
|
413
356
|
}, void 0, false)]
|
|
414
357
|
}, void 0, true);
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
358
|
+
$[8] = error;
|
|
359
|
+
$[9] = kindByPath;
|
|
360
|
+
$[10] = liveError;
|
|
361
|
+
$[11] = shardKey;
|
|
362
|
+
$[12] = sortKey;
|
|
363
|
+
$[13] = stats;
|
|
364
|
+
$[14] = t;
|
|
365
|
+
$[15] = t6;
|
|
423
366
|
} else {
|
|
424
|
-
|
|
367
|
+
t6 = $[15];
|
|
425
368
|
}
|
|
426
|
-
return
|
|
369
|
+
return t6;
|
|
427
370
|
};
|
|
428
371
|
function _temp(descriptor) {
|
|
429
372
|
return [descriptor.path, descriptor.kind];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useLunora } from '@lunora/react';
|
|
3
3
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
4
|
-
import ConnectionBadge from '
|
|
5
|
-
import { L as LiveError } from '
|
|
6
|
-
import { B as Badge } from '
|
|
7
|
-
import { C as Card } from '
|
|
8
|
-
import { u as
|
|
9
|
-
import { useT } from '
|
|
10
|
-
import { ADMIN_FUNCTIONS } from '
|
|
11
|
-
import { f as fireAndForget,
|
|
12
|
-
import { l as loadRecentShards } from '
|
|
13
|
-
import { c as cn } from '
|
|
14
|
-
import { shardsToAggregate } from '
|
|
15
|
-
import { S as Sparkline } from '
|
|
4
|
+
import ConnectionBadge from '../packem_shared/ConnectionBadge-B2DDM2Tn.js';
|
|
5
|
+
import { L as LiveError } from '../packem_shared/live-status-FZ0psC1z.js';
|
|
6
|
+
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
7
|
+
import { C as Card } from '../packem_shared/card-DURq3ElK.js';
|
|
8
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-BViPA3US.js';
|
|
9
|
+
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
|
+
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
|
|
11
|
+
import { f as fireAndForget, g as formatTimestamp, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-FcNZ3beb.js';
|
|
12
|
+
import { l as loadRecentShards } from '../packem_shared/shard-history-DyebH1R5.js';
|
|
13
|
+
import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';
|
|
14
|
+
import { shardsToAggregate } from '../packem_shared/aggregateMetrics-D4nUHEKU.js';
|
|
15
|
+
import { S as Sparkline } from '../packem_shared/sparkline-KgMPHS4u.js';
|
|
16
16
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
17
17
|
|
|
18
18
|
const STATUS_RANK = {
|
|
@@ -333,7 +333,6 @@ const HealthPanel = ({
|
|
|
333
333
|
const [auth, setAuth] = useState(null);
|
|
334
334
|
const [scheduler, setScheduler] = useState(null);
|
|
335
335
|
const [migrations, setMigrations] = useState([]);
|
|
336
|
-
const [liveError, setLiveError] = useState(void 0);
|
|
337
336
|
const [recentShards] = useState(loadRecentShards);
|
|
338
337
|
const inFlightRef = useRef(false);
|
|
339
338
|
const mountedRef = useRef(true);
|
|
@@ -387,10 +386,19 @@ const HealthPanel = ({
|
|
|
387
386
|
clearTimeout(trailingTimerRef.current);
|
|
388
387
|
}
|
|
389
388
|
}, []);
|
|
390
|
-
|
|
391
|
-
|
|
389
|
+
const {
|
|
390
|
+
data: liveMetrics,
|
|
391
|
+
liveError
|
|
392
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.getMetrics, {}, {
|
|
393
|
+
live: true,
|
|
394
|
+
shardKey: rootShard
|
|
395
|
+
});
|
|
396
|
+
useEffect(() => {
|
|
397
|
+
if (liveMetrics === void 0) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
392
400
|
scheduleFanOut();
|
|
393
|
-
},
|
|
401
|
+
}, [liveMetrics]);
|
|
394
402
|
const recentErrors = entries.filter((entry) => entry.level === "error");
|
|
395
403
|
const topErrors = recentErrors.slice(0, RECENT_ERROR_LIMIT);
|
|
396
404
|
const trend = requestErrorSeries(totals?.history);
|
|
@@ -398,7 +406,7 @@ const HealthPanel = ({
|
|
|
398
406
|
const buckets = auth?.history ?? [];
|
|
399
407
|
return {
|
|
400
408
|
attempts: buckets.map((bucket) => bucket.attempts),
|
|
401
|
-
failures: buckets.map((
|
|
409
|
+
failures: buckets.map((bucket) => bucket.failures)
|
|
402
410
|
};
|
|
403
411
|
}, [auth?.history]);
|
|
404
412
|
const worstFunctions = functions.filter((stat) => stat.calls > 0).toSorted((a, b) => b.errors / b.calls - a.errors / a.calls || b.calls - a.calls).slice(0, TOP_FUNCTION_LIMIT);
|
|
@@ -549,25 +557,25 @@ const HealthPanel = ({
|
|
|
549
557
|
children: t("No function activity yet.")
|
|
550
558
|
}, void 0, false) : /* @__PURE__ */ jsxDEV("ul", {
|
|
551
559
|
className: "divide-y divide-border",
|
|
552
|
-
children: worstFunctions.map((
|
|
560
|
+
children: worstFunctions.map((stat) => /* @__PURE__ */ jsxDEV("li", {
|
|
553
561
|
className: "flex flex-wrap items-center justify-between gap-2 px-4 py-2 text-xs",
|
|
554
562
|
"data-testid": "hl-fn-row",
|
|
555
563
|
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
556
564
|
className: "truncate font-mono text-foreground",
|
|
557
|
-
children:
|
|
565
|
+
children: stat.path
|
|
558
566
|
}, void 0, false), /* @__PURE__ */ jsxDEV("span", {
|
|
559
567
|
className: "flex shrink-0 items-center gap-2",
|
|
560
568
|
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
561
569
|
className: "tabular-nums text-muted-foreground",
|
|
562
570
|
children: t("{count} calls", {
|
|
563
|
-
count:
|
|
571
|
+
count: stat.calls.toString()
|
|
564
572
|
})
|
|
565
573
|
}, void 0, false), /* @__PURE__ */ jsxDEV(Badge, {
|
|
566
|
-
variant: LEVEL_VARIANT[rateLevel(
|
|
567
|
-
children: ratePercent(
|
|
574
|
+
variant: LEVEL_VARIANT[rateLevel(stat.errors / stat.calls, REQUEST_ERROR_WARN, REQUEST_ERROR_CRIT)],
|
|
575
|
+
children: ratePercent(stat.errors, stat.calls)
|
|
568
576
|
}, void 0, false)]
|
|
569
577
|
}, void 0, true)]
|
|
570
|
-
},
|
|
578
|
+
}, stat.path, true))
|
|
571
579
|
}, void 0, false)]
|
|
572
580
|
}, void 0, true), /* @__PURE__ */ jsxDEV(Card, {
|
|
573
581
|
className: "gap-0 py-0",
|
|
@@ -592,23 +600,23 @@ const HealthPanel = ({
|
|
|
592
600
|
children: t("No recent errors.")
|
|
593
601
|
}, void 0, false), topErrors.length > 0 && /* @__PURE__ */ jsxDEV("ul", {
|
|
594
602
|
className: "divide-y divide-border",
|
|
595
|
-
children: topErrors.map((
|
|
603
|
+
children: topErrors.map((entry, index) => /* @__PURE__ */ jsxDEV("li", {
|
|
596
604
|
className: "flex flex-col gap-0.5 px-4 py-2 text-xs",
|
|
597
605
|
"data-testid": "hl-error-row",
|
|
598
606
|
children: [/* @__PURE__ */ jsxDEV("span", {
|
|
599
607
|
className: "flex items-center gap-2",
|
|
600
608
|
children: [/* @__PURE__ */ jsxDEV("time", {
|
|
601
609
|
className: "shrink-0 text-muted-foreground",
|
|
602
|
-
children: formatTimestamp(
|
|
603
|
-
}, void 0, false),
|
|
610
|
+
children: formatTimestamp(entry.timestamp)
|
|
611
|
+
}, void 0, false), entry.functionPath !== void 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
604
612
|
className: "truncate font-mono text-foreground",
|
|
605
|
-
children:
|
|
613
|
+
children: entry.functionPath
|
|
606
614
|
}, void 0, false)]
|
|
607
615
|
}, void 0, true), /* @__PURE__ */ jsxDEV("span", {
|
|
608
616
|
className: "text-destructive",
|
|
609
|
-
children:
|
|
617
|
+
children: entry.message
|
|
610
618
|
}, void 0, false)]
|
|
611
|
-
}, `${
|
|
619
|
+
}, `${entry.timestamp.toString()}-${index.toString()}`, true))
|
|
612
620
|
}, void 0, false)]
|
|
613
621
|
}, void 0, true)]
|
|
614
622
|
}, void 0, true), /* @__PURE__ */ jsxDEV(Card, {
|