@lunora/studio 1.0.0-alpha.4 → 1.0.0-alpha.41
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/LICENSE.md +6 -0
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.ts +33 -18
- package/dist/index.js +29 -29
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +3 -2
- 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} +29 -41
- package/dist/{packem_shared/ExportImportPanel-dxY56TDF.js → packem_chunks/ExportImportPanel.js} +16 -11
- 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} +153 -208
- 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} +108 -69
- package/dist/{packem_shared/LogsPanel-CTW8CFcM.js → packem_chunks/LogsPanel.js} +46 -58
- package/dist/{packem_shared/MailPanel-BwkvfIHF.js → packem_chunks/MailPanel.js} +45 -139
- package/dist/{packem_shared/MetricsPanel-BLuOhZQ4.js → packem_chunks/MetricsPanel.js} +41 -322
- package/dist/{packem_shared/MigrationsPanel-DT3lnwHF.js → packem_chunks/MigrationsPanel.js} +44 -51
- package/dist/{packem_shared/PitrPanel-CdErL7EJ.js → packem_chunks/PitrPanel.js} +9 -9
- package/dist/{packem_shared/SchemaViewer-LJDcmNIO.js → packem_chunks/SchemaViewer.js} +17 -16
- package/dist/{packem_shared/SecurityAdvisorPanel-C_ETsPih.js → packem_chunks/SecurityAdvisorPanel.js} +47 -31
- package/dist/packem_chunks/SettingsPanel.js +391 -0
- package/dist/{packem_shared/sql-editor-panel-BFRpzj6r.js → packem_chunks/SqlEditorPanel.js} +158 -387
- 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 +365 -0
- package/dist/packem_chunks/auth-sessions-panel.js +175 -0
- package/dist/packem_chunks/containers-panel.js +247 -0
- package/dist/packem_chunks/dashboards-panel.js +780 -0
- package/dist/packem_chunks/fanout-panel.js +482 -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 +3178 -0
- package/dist/packem_chunks/payments-panel.js +186 -0
- package/dist/packem_chunks/permissions-panel.js +805 -0
- package/dist/packem_chunks/queues-panel.js +1075 -0
- package/dist/packem_chunks/rls-panel.js +315 -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 +140 -0
- package/dist/packem_chunks/subscriptions-panel.js +238 -0
- package/dist/packem_chunks/users-panel.js +1731 -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-BHHJi3Gb.js} +7 -0
- package/dist/packem_shared/{ApiDocsPanel-C5-yJ1p7.js → ApiDocsPanel-CBma-lnp.js} +2 -2
- package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-CQM3pPN7.js} +2 -1
- package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-X2tkbyHk.js} +1 -1
- package/dist/packem_shared/{DataBrowser-CtBe1So9.js → DataBrowser-D2ywrdId.js} +198 -247
- package/dist/packem_shared/{GlobalDataBrowser-BTEmGrph.js → GlobalDataBrowser-BkTPLzAY.js} +37 -66
- package/dist/packem_shared/HomePanel-D1Q9LZgK.js +14 -0
- package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-Dno-hfDb.js} +2 -1
- package/dist/packem_shared/{ScheduledJobs-CabfKbyM.js → ScheduledJobs-Ctw4jYtU.js} +163 -60
- package/dist/packem_shared/Studio-lJhzDAze.js +16 -0
- package/dist/packem_shared/{StudioApp-CHOZA-z-.js → StudioApp-DiMkupvZ.js} +276 -11
- package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-BX8OhG0w.js} +6 -6
- package/dist/packem_shared/alert-CdAET2K_.js +68 -0
- package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-CNLRTrWw.d.ts} +1 -1
- package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-DSwcWIRy.js} +5 -4
- package/dist/packem_shared/browser-storage-BTrX4y3B.js +215 -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-CdXztApG.js} +1 -1
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
- package/dist/packem_shared/error-alert-CXjqyGw9.js +114 -0
- package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-BF-KBDFz.js} +131 -163
- package/dist/packem_shared/home-panel-TFcRf9Ui.js +1889 -0
- package/dist/packem_shared/{internal-rXJEAhXS.js → internal-CYcbqMjX.js} +44 -3
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
- package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-DUiJcILV.js} +6 -45
- package/dist/packem_shared/scroll-area-DLhcy-ml.js +93 -0
- 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-BnA1kC9X.js} +1 -1
- package/dist/packem_shared/studio-Dh9UlaF_.js +4015 -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-UVIXQJdU.js} +1 -1
- package/dist/packem_shared/use-admin-query-CfHYWx5n.js +106 -0
- package/dist/packem_shared/use-async-submit-DJQiPc-_.js +91 -0
- package/dist/standalone/chunk-25AYY4H7.js +2 -0
- package/dist/standalone/chunk-2ANAF4ZM.js +1 -0
- package/dist/standalone/chunk-2K47A3P6.js +1 -0
- package/dist/standalone/chunk-2NGUNNGW.js +1 -0
- package/dist/standalone/chunk-3CJW6NWG.js +4 -0
- package/dist/standalone/chunk-3OA7PECS.js +6 -0
- package/dist/standalone/chunk-3OIHOXVV.js +1 -0
- package/dist/standalone/chunk-447TAUFD.js +1 -0
- package/dist/standalone/chunk-4QHKBC77.js +1 -0
- package/dist/standalone/chunk-5C4TSNE6.js +1 -0
- package/dist/standalone/chunk-5OIBXYZM.js +1 -0
- package/dist/standalone/chunk-6HSHEMZV.js +76 -0
- package/dist/standalone/chunk-6JIZ34MB.js +3 -0
- package/dist/standalone/chunk-6VO23MMW.js +4 -0
- package/dist/standalone/chunk-7MVSQS7B.js +1 -0
- package/dist/standalone/chunk-7TJJXVSE.js +1 -0
- package/dist/standalone/chunk-7YXOPTWI.js +1 -0
- package/dist/standalone/chunk-AHILM3ZP.js +1 -0
- package/dist/standalone/chunk-BGXOXASQ.js +1 -0
- package/dist/standalone/chunk-BJGBHGK3.js +1 -0
- package/dist/standalone/chunk-BOXSWNXZ.js +1 -0
- package/dist/standalone/chunk-BX5MKYOC.js +1 -0
- package/dist/standalone/chunk-CKSHCYGC.js +2 -0
- package/dist/standalone/chunk-DWDILV2E.js +1 -0
- package/dist/standalone/chunk-E75ANNWX.js +19 -0
- package/dist/standalone/chunk-EQZQOTJY.js +1 -0
- package/dist/standalone/chunk-GTLEWM5Y.js +1 -0
- package/dist/standalone/chunk-GTM65MVX.js +1 -0
- package/dist/standalone/chunk-GUI5GFFI.js +1 -0
- package/dist/standalone/chunk-HN6KJXYQ.js +1 -0
- package/dist/standalone/chunk-HV7G6DFP.js +5 -0
- package/dist/standalone/chunk-HYDJNCGW.js +1 -0
- package/dist/standalone/chunk-HZK5RQHG.js +1 -0
- package/dist/standalone/chunk-IN2SYVJB.js +1 -0
- package/dist/standalone/chunk-IOANPSJN.js +1 -0
- package/dist/standalone/chunk-ISDZPW3V.js +1 -0
- package/dist/standalone/chunk-IXDH4GL5.js +1 -0
- package/dist/standalone/chunk-J6J54MBP.js +1 -0
- package/dist/standalone/chunk-J73VHFCL.js +1 -0
- package/dist/standalone/chunk-JHKMUTIF.js +13 -0
- package/dist/standalone/chunk-JPRH6DPK.js +1 -0
- package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
- package/dist/standalone/chunk-KA5YB3VP.js +1 -0
- package/dist/standalone/chunk-KBB75WNT.js +1 -0
- package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
- package/dist/standalone/chunk-KJJ3WM6H.js +4 -0
- package/dist/standalone/chunk-KQV4NGH3.js +1 -0
- package/dist/standalone/chunk-KSKXW5PX.js +1 -0
- package/dist/standalone/chunk-KUH4P5F5.js +1 -0
- package/dist/standalone/chunk-KYJPPVGB.js +1 -0
- package/dist/standalone/chunk-KZ6INM5M.js +1 -0
- package/dist/standalone/chunk-L2TJVSDQ.js +1 -0
- package/dist/standalone/chunk-L7SK4ZZD.js +1 -0
- package/dist/standalone/chunk-LAK5VSPI.js +1 -0
- package/dist/standalone/chunk-LBN7LPVK.js +1 -0
- package/dist/standalone/chunk-LNZIB2MD.js +1 -0
- package/dist/standalone/chunk-MJWVMKQ4.js +6 -0
- package/dist/standalone/chunk-MLZYX5CQ.js +1 -0
- package/dist/standalone/chunk-N2X2OO4V.js +1 -0
- package/dist/standalone/chunk-NGKITPQP.js +13 -0
- package/dist/standalone/chunk-O3NAGRTR.js +1 -0
- package/dist/standalone/chunk-OZACQNKG.js +1 -0
- package/dist/standalone/chunk-PNDNXS5Z.js +1 -0
- package/dist/standalone/chunk-Q7DMUTUE.js +1 -0
- package/dist/standalone/chunk-QAFAJBAW.js +1 -0
- package/dist/standalone/chunk-QBAT52GB.js +1 -0
- package/dist/standalone/chunk-RHZ4M2NZ.js +1 -0
- package/dist/standalone/chunk-RRCPZMC2.js +22 -0
- package/dist/standalone/chunk-SEU5V7I6.js +1 -0
- package/dist/standalone/chunk-TAD43CG5.js +1 -0
- package/dist/standalone/chunk-TBMYIZIO.js +1 -0
- package/dist/standalone/chunk-TDZ44E5I.js +4 -0
- package/dist/standalone/chunk-THNBTMUF.js +1 -0
- package/dist/standalone/chunk-TIQISBGK.js +1 -0
- package/dist/standalone/chunk-TMYVNQ66.js +1 -0
- package/dist/standalone/chunk-TQ36RWOP.js +1 -0
- package/dist/standalone/chunk-UGUEC6BC.js +1 -0
- package/dist/standalone/chunk-UJB2LEI4.js +4 -0
- package/dist/standalone/chunk-UK64ZSUW.js +1 -0
- package/dist/standalone/chunk-UKDJ4H7I.js +1 -0
- package/dist/standalone/chunk-VLXV72QE.js +1 -0
- package/dist/standalone/chunk-VON7JUPG.js +1 -0
- package/dist/standalone/chunk-W3JK4YWR.js +1 -0
- package/dist/standalone/chunk-W3SHEIAL.js +3 -0
- package/dist/standalone/chunk-WI7GWFEG.js +1 -0
- package/dist/standalone/chunk-WIHXMNUY.js +1 -0
- package/dist/standalone/chunk-WLDVXVI2.js +1 -0
- package/dist/standalone/chunk-XLXNLJ4N.js +1 -0
- package/dist/standalone/chunk-XNJNSCLM.js +1 -0
- package/dist/standalone/chunk-YAECF5LW.js +1 -0
- package/dist/standalone/chunk-YBGC4PPD.js +1 -0
- package/dist/standalone/chunk-YJAPWSDC.js +4 -0
- package/dist/standalone/chunk-ZEJB6DXU.js +8 -0
- package/dist/standalone/chunk-ZFNBPAIZ.js +1 -0
- package/dist/standalone/chunk-ZHVTQ37P.js +1 -0
- package/dist/standalone/chunk-ZIGWVHCS.js +1 -0
- package/dist/standalone/chunk-ZPP2KOR4.js +1 -0
- package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
- package/dist/standalone/studio.js +104 -246
- package/dist/styles.css +2 -2
- package/package.json +15 -13
- package/dist/packem_shared/HomePanel-Cw16stjq.js +0 -1273
- 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
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useLunora } from '@lunora/react';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
|
-
import { ShardInput } from '
|
|
4
|
-
import { B as Badge } from '
|
|
5
|
-
import { B as Button } from '
|
|
6
|
-
import { I as Input } from '
|
|
7
|
-
import { L as Label } from '
|
|
8
|
-
import { T as Textarea } from '
|
|
9
|
-
import { useT } from '
|
|
10
|
-
import { ADMIN_FUNCTIONS } from '
|
|
11
|
-
import { e as errorMessage,
|
|
12
|
-
import { r as recordShard } from '
|
|
3
|
+
import { ShardInput } from '../packem_shared/ShardInput-gx_DZXXn.js';
|
|
4
|
+
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
5
|
+
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
6
|
+
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
7
|
+
import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
|
|
8
|
+
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
9
|
+
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
|
+
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js';
|
|
11
|
+
import { e as errorMessage, i as formatTimestamp, f as fireAndForget, a as adminRef } from '../packem_shared/internal-CYcbqMjX.js';
|
|
12
|
+
import { r as recordShard } from '../packem_shared/shard-history-DyebH1R5.js';
|
|
13
13
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
14
14
|
|
|
15
15
|
const argumentType = (argument) => {
|
package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js}
RENAMED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { L as LiveError } from '
|
|
5
|
-
import { ShardInput } from '
|
|
6
|
-
import { B as Badge } from '
|
|
7
|
-
import { B as Button } from '
|
|
8
|
-
import { C as Card, a as CardContent } from '
|
|
9
|
-
import { E as EmptyState } from '
|
|
10
|
-
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '
|
|
11
|
-
import { u as
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { E as ErrorAlert } from '../packem_shared/error-alert-CXjqyGw9.js';
|
|
4
|
+
import { L as LiveError } from '../packem_shared/live-status-FZ0psC1z.js';
|
|
5
|
+
import { ShardInput } from '../packem_shared/ShardInput-gx_DZXXn.js';
|
|
6
|
+
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
7
|
+
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
8
|
+
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
9
|
+
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
10
|
+
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';
|
|
11
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-CfHYWx5n.js';
|
|
12
|
+
import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
|
|
13
|
+
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
14
|
+
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js';
|
|
15
|
+
import { i as formatTimestamp } from '../packem_shared/internal-CYcbqMjX.js';
|
|
16
|
+
import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';
|
|
17
17
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
18
18
|
|
|
19
|
-
const GET_FUNCTION_STATS = adminRef(ADMIN_FUNCTIONS.getFunctionStats);
|
|
20
19
|
const KIND_VARIANT = {
|
|
21
20
|
action: "outline",
|
|
22
21
|
mutation: "default",
|
|
@@ -53,218 +52,164 @@ const SORTERS = {
|
|
|
53
52
|
slowest: (a, b) => b.maxDurationMs - a.maxDurationMs
|
|
54
53
|
};
|
|
55
54
|
const FunctionStatsPanel = (t0) => {
|
|
56
|
-
const $ = c(
|
|
55
|
+
const $ = c(47);
|
|
57
56
|
const {
|
|
58
57
|
functions,
|
|
59
58
|
initialShardKey
|
|
60
59
|
} = t0;
|
|
61
|
-
const client = useLunora();
|
|
62
60
|
const t = useT();
|
|
63
61
|
const [shardKey, setShardKey] = useState(initialShardKey ?? "");
|
|
64
|
-
const [stats, setStats] = useState(null);
|
|
65
|
-
const [error, setError] = useState(null);
|
|
66
62
|
const [sortKey, setSortKey] = useState("recent");
|
|
67
|
-
const [liveError, setLiveError] = useState(void 0);
|
|
68
|
-
const mountedRef = useRef(true);
|
|
69
63
|
let t1;
|
|
64
|
+
if ($[0] !== shardKey) {
|
|
65
|
+
t1 = shardKey.trim();
|
|
66
|
+
$[0] = shardKey;
|
|
67
|
+
$[1] = t1;
|
|
68
|
+
} else {
|
|
69
|
+
t1 = $[1];
|
|
70
|
+
}
|
|
71
|
+
const debouncedShard = useDebounced(t1, 400);
|
|
70
72
|
let t2;
|
|
71
|
-
if ($[
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return () => {
|
|
75
|
-
mountedRef.current = false;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
t2 = [];
|
|
79
|
-
$[0] = t1;
|
|
80
|
-
$[1] = t2;
|
|
73
|
+
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
74
|
+
t2 = {};
|
|
75
|
+
$[2] = t2;
|
|
81
76
|
} else {
|
|
82
|
-
|
|
83
|
-
t2 = $[1];
|
|
77
|
+
t2 = $[2];
|
|
84
78
|
}
|
|
85
|
-
useEffect(t1, t2);
|
|
86
79
|
let t3;
|
|
87
|
-
if ($[
|
|
88
|
-
t3 =
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
if ($[3] !== debouncedShard) {
|
|
81
|
+
t3 = {
|
|
82
|
+
live: true,
|
|
83
|
+
shardKey: debouncedShard
|
|
84
|
+
};
|
|
85
|
+
$[3] = debouncedShard;
|
|
86
|
+
$[4] = t3;
|
|
91
87
|
} else {
|
|
92
|
-
t3 = $[
|
|
88
|
+
t3 = $[4];
|
|
93
89
|
}
|
|
94
|
-
const
|
|
90
|
+
const {
|
|
91
|
+
data,
|
|
92
|
+
error,
|
|
93
|
+
errorSource,
|
|
94
|
+
liveError
|
|
95
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.getFunctionStats, t2, t3);
|
|
96
|
+
const stats = data?.functions ?? null;
|
|
95
97
|
let t4;
|
|
96
|
-
if ($[
|
|
97
|
-
t4 = (
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
setStats(result.functions);
|
|
101
|
-
};
|
|
102
|
-
$[4] = t4;
|
|
98
|
+
if ($[5] !== functions) {
|
|
99
|
+
t4 = new Map((functions ?? []).map(_temp));
|
|
100
|
+
$[5] = functions;
|
|
101
|
+
$[6] = t4;
|
|
103
102
|
} else {
|
|
104
|
-
t4 = $[
|
|
103
|
+
t4 = $[6];
|
|
105
104
|
}
|
|
106
|
-
const
|
|
105
|
+
const kindByPath = t4;
|
|
107
106
|
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
107
|
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) => {
|
|
108
|
+
t5 = (event) => {
|
|
164
109
|
setSortKey(event.currentTarget.dataset.sort);
|
|
165
110
|
};
|
|
166
|
-
$[
|
|
111
|
+
$[7] = t5;
|
|
167
112
|
} else {
|
|
168
|
-
|
|
113
|
+
t5 = $[7];
|
|
169
114
|
}
|
|
170
|
-
const selectSort =
|
|
171
|
-
let
|
|
172
|
-
if ($[
|
|
115
|
+
const selectSort = t5;
|
|
116
|
+
let t6;
|
|
117
|
+
if ($[8] !== error || $[9] !== errorSource || $[10] !== kindByPath || $[11] !== liveError || $[12] !== shardKey || $[13] !== sortKey || $[14] !== stats || $[15] !== t) {
|
|
173
118
|
const sorted = stats === null ? [] : stats.toSorted(SORTERS[sortKey]);
|
|
174
|
-
let
|
|
175
|
-
if ($[
|
|
176
|
-
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
119
|
+
let t7;
|
|
120
|
+
if ($[17] !== t) {
|
|
121
|
+
t7 = t("Recent");
|
|
122
|
+
$[17] = t;
|
|
123
|
+
$[18] = t7;
|
|
179
124
|
} else {
|
|
180
|
-
|
|
125
|
+
t7 = $[18];
|
|
181
126
|
}
|
|
182
|
-
let
|
|
183
|
-
if ($[
|
|
184
|
-
|
|
127
|
+
let t8;
|
|
128
|
+
if ($[19] !== t7) {
|
|
129
|
+
t8 = {
|
|
185
130
|
key: "recent",
|
|
186
|
-
label:
|
|
131
|
+
label: t7
|
|
187
132
|
};
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
133
|
+
$[19] = t7;
|
|
134
|
+
$[20] = t8;
|
|
190
135
|
} else {
|
|
191
|
-
|
|
136
|
+
t8 = $[20];
|
|
192
137
|
}
|
|
193
|
-
let
|
|
194
|
-
if ($[
|
|
195
|
-
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
138
|
+
let t9;
|
|
139
|
+
if ($[21] !== t) {
|
|
140
|
+
t9 = t("Most called");
|
|
141
|
+
$[21] = t;
|
|
142
|
+
$[22] = t9;
|
|
198
143
|
} else {
|
|
199
|
-
|
|
144
|
+
t9 = $[22];
|
|
200
145
|
}
|
|
201
|
-
let
|
|
202
|
-
if ($[
|
|
203
|
-
|
|
146
|
+
let t10;
|
|
147
|
+
if ($[23] !== t9) {
|
|
148
|
+
t10 = {
|
|
204
149
|
key: "calls",
|
|
205
|
-
label:
|
|
150
|
+
label: t9
|
|
206
151
|
};
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
152
|
+
$[23] = t9;
|
|
153
|
+
$[24] = t10;
|
|
209
154
|
} else {
|
|
210
|
-
|
|
155
|
+
t10 = $[24];
|
|
211
156
|
}
|
|
212
|
-
let
|
|
213
|
-
if ($[
|
|
214
|
-
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
157
|
+
let t11;
|
|
158
|
+
if ($[25] !== t) {
|
|
159
|
+
t11 = t("Slowest");
|
|
160
|
+
$[25] = t;
|
|
161
|
+
$[26] = t11;
|
|
217
162
|
} else {
|
|
218
|
-
|
|
163
|
+
t11 = $[26];
|
|
219
164
|
}
|
|
220
|
-
let
|
|
221
|
-
if ($[
|
|
222
|
-
|
|
165
|
+
let t12;
|
|
166
|
+
if ($[27] !== t11) {
|
|
167
|
+
t12 = {
|
|
223
168
|
key: "slowest",
|
|
224
|
-
label:
|
|
169
|
+
label: t11
|
|
225
170
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
171
|
+
$[27] = t11;
|
|
172
|
+
$[28] = t12;
|
|
228
173
|
} else {
|
|
229
|
-
|
|
174
|
+
t12 = $[28];
|
|
230
175
|
}
|
|
231
|
-
let
|
|
232
|
-
if ($[
|
|
233
|
-
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
176
|
+
let t13;
|
|
177
|
+
if ($[29] !== t10 || $[30] !== t12 || $[31] !== t8) {
|
|
178
|
+
t13 = [t8, t10, t12];
|
|
179
|
+
$[29] = t10;
|
|
180
|
+
$[30] = t12;
|
|
181
|
+
$[31] = t8;
|
|
182
|
+
$[32] = t13;
|
|
238
183
|
} else {
|
|
239
|
-
|
|
184
|
+
t13 = $[32];
|
|
240
185
|
}
|
|
241
|
-
const sortButtons =
|
|
242
|
-
let
|
|
243
|
-
if ($[
|
|
244
|
-
|
|
186
|
+
const sortButtons = t13;
|
|
187
|
+
let t14;
|
|
188
|
+
if ($[33] !== shardKey) {
|
|
189
|
+
t14 = /* @__PURE__ */ jsxDEV(ShardInput, {
|
|
245
190
|
onChange: setShardKey,
|
|
246
191
|
testId: "fs-shard-input",
|
|
247
192
|
value: shardKey
|
|
248
193
|
}, void 0, false);
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
194
|
+
$[33] = shardKey;
|
|
195
|
+
$[34] = t14;
|
|
251
196
|
} else {
|
|
252
|
-
|
|
197
|
+
t14 = $[34];
|
|
253
198
|
}
|
|
254
|
-
let
|
|
255
|
-
if ($[
|
|
256
|
-
|
|
199
|
+
let t15;
|
|
200
|
+
if ($[35] !== liveError) {
|
|
201
|
+
t15 = /* @__PURE__ */ jsxDEV(LiveError, {
|
|
257
202
|
message: liveError,
|
|
258
203
|
prefix: "fs"
|
|
259
204
|
}, void 0, false);
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
205
|
+
$[35] = liveError;
|
|
206
|
+
$[36] = t15;
|
|
262
207
|
} else {
|
|
263
|
-
|
|
208
|
+
t15 = $[36];
|
|
264
209
|
}
|
|
265
|
-
let
|
|
266
|
-
if ($[
|
|
267
|
-
|
|
210
|
+
let t16;
|
|
211
|
+
if ($[37] !== sortButtons || $[38] !== sortKey) {
|
|
212
|
+
t16 = /* @__PURE__ */ jsxDEV("div", {
|
|
268
213
|
className: "ml-auto flex items-center gap-1",
|
|
269
214
|
role: "group",
|
|
270
215
|
children: sortButtons.map((option) => /* @__PURE__ */ jsxDEV(Button, {
|
|
@@ -277,42 +222,41 @@ const FunctionStatsPanel = (t0) => {
|
|
|
277
222
|
children: option.label
|
|
278
223
|
}, option.key, false))
|
|
279
224
|
}, void 0, false);
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
225
|
+
$[37] = sortButtons;
|
|
226
|
+
$[38] = sortKey;
|
|
227
|
+
$[39] = t16;
|
|
283
228
|
} else {
|
|
284
|
-
|
|
229
|
+
t16 = $[39];
|
|
285
230
|
}
|
|
286
|
-
let
|
|
287
|
-
if ($[
|
|
288
|
-
|
|
231
|
+
let t17;
|
|
232
|
+
if ($[40] !== t14 || $[41] !== t15 || $[42] !== t16) {
|
|
233
|
+
t17 = /* @__PURE__ */ jsxDEV("div", {
|
|
289
234
|
className: "flex flex-wrap items-center gap-2",
|
|
290
|
-
children: [
|
|
235
|
+
children: [t14, t15, t16]
|
|
291
236
|
}, void 0, true);
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
237
|
+
$[40] = t14;
|
|
238
|
+
$[41] = t15;
|
|
239
|
+
$[42] = t16;
|
|
240
|
+
$[43] = t17;
|
|
296
241
|
} else {
|
|
297
|
-
|
|
242
|
+
t17 = $[43];
|
|
298
243
|
}
|
|
299
|
-
let
|
|
300
|
-
if ($[
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
role: "alert",
|
|
305
|
-
children: error
|
|
244
|
+
let t18;
|
|
245
|
+
if ($[44] !== error || $[45] !== errorSource) {
|
|
246
|
+
t18 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
247
|
+
error: errorSource,
|
|
248
|
+
testId: "fs-error"
|
|
306
249
|
}, void 0, false);
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
250
|
+
$[44] = error;
|
|
251
|
+
$[45] = errorSource;
|
|
252
|
+
$[46] = t18;
|
|
309
253
|
} else {
|
|
310
|
-
|
|
254
|
+
t18 = $[46];
|
|
311
255
|
}
|
|
312
|
-
|
|
256
|
+
t6 = /* @__PURE__ */ jsxDEV("div", {
|
|
313
257
|
className: "flex flex-col gap-4",
|
|
314
258
|
"data-testid": "lunora-function-stats",
|
|
315
|
-
children: [
|
|
259
|
+
children: [t17, t18, stats !== null && sorted.length === 0 && error === null && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
316
260
|
description: t("Per-function call counts, error rates, and latency land here after your first request."),
|
|
317
261
|
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
318
262
|
"aria-hidden": "true",
|
|
@@ -412,18 +356,19 @@ const FunctionStatsPanel = (t0) => {
|
|
|
412
356
|
}, void 0, false)
|
|
413
357
|
}, void 0, false)]
|
|
414
358
|
}, void 0, true);
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
359
|
+
$[8] = error;
|
|
360
|
+
$[9] = errorSource;
|
|
361
|
+
$[10] = kindByPath;
|
|
362
|
+
$[11] = liveError;
|
|
363
|
+
$[12] = shardKey;
|
|
364
|
+
$[13] = sortKey;
|
|
365
|
+
$[14] = stats;
|
|
366
|
+
$[15] = t;
|
|
367
|
+
$[16] = t6;
|
|
423
368
|
} else {
|
|
424
|
-
|
|
369
|
+
t6 = $[16];
|
|
425
370
|
}
|
|
426
|
-
return
|
|
371
|
+
return t6;
|
|
427
372
|
};
|
|
428
373
|
function _temp(descriptor) {
|
|
429
374
|
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-CfHYWx5n.js';
|
|
9
|
+
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
|
+
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js';
|
|
11
|
+
import { f as fireAndForget, i as formatTimestamp, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-CYcbqMjX.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-BnA1kC9X.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, {
|