@lunora/studio 1.0.0-alpha.30 → 1.0.0-alpha.32
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/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +3 -2
- package/dist/packem_chunks/ApiTab.js +3 -3
- package/dist/packem_chunks/AuditPanel.js +7 -7
- package/dist/packem_chunks/ExportImportPanel.js +5 -4
- package/dist/packem_chunks/FileBrowser.js +2 -2
- package/dist/packem_chunks/FunctionRunner.js +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +72 -70
- package/dist/packem_chunks/HealthPanel.js +3 -3
- package/dist/packem_chunks/InsightsPanel.js +4 -3
- package/dist/packem_chunks/LogsPanel.js +6 -6
- package/dist/packem_chunks/MailPanel.js +8 -7
- package/dist/packem_chunks/MetricsPanel.js +3 -3
- package/dist/packem_chunks/MigrationsPanel.js +7 -7
- package/dist/packem_chunks/PitrPanel.js +1 -1
- package/dist/packem_chunks/SchemaViewer.js +3 -2
- package/dist/packem_chunks/SecurityAdvisorPanel.js +11 -8
- package/dist/packem_chunks/SettingsPanel.js +50 -49
- package/dist/packem_chunks/SqlEditorPanel.js +5 -4
- package/dist/packem_chunks/TableEditor.js +3 -3
- package/dist/packem_chunks/analytics-panel.js +1 -1
- package/dist/packem_chunks/auth-config-panel.js +1 -1
- package/dist/packem_chunks/auth-sessions-panel.js +2 -2
- package/dist/packem_chunks/containers-panel.js +247 -0
- package/dist/packem_chunks/dashboards-panel.js +3 -2
- package/dist/packem_chunks/fanout-panel.js +31 -30
- package/dist/packem_chunks/flags-panel.js +6 -6
- package/dist/packem_chunks/kv-browser.js +2 -2
- package/dist/packem_chunks/log-drains-panel.js +1 -1
- package/dist/packem_chunks/organizations-panel.js +3 -3
- package/dist/packem_chunks/payments-panel.js +6 -5
- package/dist/packem_chunks/permissions-panel.js +12 -11
- package/dist/packem_chunks/queues-panel.js +32 -31
- package/dist/packem_chunks/rls-panel.js +86 -84
- package/dist/packem_chunks/schedule-panel.js +3 -3
- package/dist/packem_chunks/sparkline.js +1 -1
- package/dist/packem_chunks/storage-rules-panel.js +27 -25
- package/dist/packem_chunks/subscriptions-panel.js +33 -31
- package/dist/packem_chunks/users-panel.js +3 -3
- package/dist/packem_chunks/vector-browser.js +1 -1
- package/dist/packem_chunks/workflows-panel.js +2 -2
- package/dist/packem_shared/{ApiDocsPanel-B6u_wnz-.js → ApiDocsPanel-Cu6mD4u7.js} +1 -1
- package/dist/packem_shared/{ApiReferencePanel-Drz4UO0a.js → ApiReferencePanel-Co_wpRF2.js} +1 -1
- package/dist/packem_shared/{CommandPalette-B5BertvU.js → CommandPalette-BUPpbpMc.js} +1 -1
- package/dist/packem_shared/{DataBrowser-ANTHLWWh.js → DataBrowser-DSNK1tPg.js} +5 -5
- package/dist/packem_shared/{GlobalDataBrowser-CjgTG_wa.js → GlobalDataBrowser-ErfvIs1S.js} +3 -3
- package/dist/packem_shared/{HomePanel-c2FodE9t.js → HomePanel-DQk3P8xX.js} +3 -3
- package/dist/packem_shared/{OpenRpcReferencePanel-CspFdbUT.js → OpenRpcReferencePanel-DLWzrIx9.js} +1 -1
- package/dist/packem_shared/{ScheduledJobs-BEJXtsBn.js → ScheduledJobs-ClaNpZsg.js} +2 -2
- package/dist/packem_shared/{Studio-CVTtA_sB.js → Studio-CFTYGEUt.js} +4 -4
- package/dist/packem_shared/{StudioApp-BSYV2fz6.js → StudioApp-Cy9vUwVl.js} +1 -1
- package/dist/packem_shared/{advisor-view-DzqyvUU3.js → advisor-view-D3-U4kRR.js} +5 -5
- package/dist/packem_shared/alert-CdAET2K_.js +68 -0
- package/dist/packem_shared/{app.d-B6MyY_al.d.ts → app.d-CNLRTrWw.d.ts} +1 -1
- package/dist/packem_shared/{bar-chart-Bb__F5-u.js → bar-chart-DSwcWIRy.js} +4 -3
- package/dist/packem_shared/{browser-storage-d03UsV7v.js → browser-storage-tLOxkIHd.js} +3 -67
- package/dist/packem_shared/{data-grid-Dsg6nRjo.js → data-grid-Jz8FqQ2C.js} +1 -1
- package/dist/packem_shared/error-alert-BBT6D22d.js +114 -0
- package/dist/packem_shared/{grid-features-D7nNzBYm.js → grid-features-CUr8Z1_O.js} +1 -1
- package/dist/packem_shared/{home-panel-aOR_drVv.js → home-panel-Bo-Mgrkn.js} +4 -2
- package/dist/packem_shared/{internal-FcNZ3beb.js → internal-DTsYVn-g.js} +30 -1
- package/dist/packem_shared/{reference-view-Doy1XlQq.js → reference-view-CSKyUyPl.js} +3 -2
- package/dist/packem_shared/{sparkline-KgMPHS4u.js → sparkline-BnA1kC9X.js} +1 -1
- package/dist/packem_shared/{studio-dMTJ-kRR.js → studio-Dg2e-dsR.js} +587 -560
- package/dist/packem_shared/{table-list-sidebar-VMo0ftxD.js → table-list-sidebar-B5psdSV1.js} +1 -1
- package/dist/packem_shared/{use-admin-query-BViPA3US.js → use-admin-query-BHPKmPuj.js} +2 -1
- package/dist/packem_shared/{use-auth-capabilities-BHkoBnbZ.js → use-auth-capabilities-C-VH0oJJ.js} +1 -1
- package/dist/standalone/{chunk-N4JI6VQD.js → chunk-25VHPD2I.js} +1 -1
- package/dist/standalone/chunk-2GGMGPEP.js +1 -0
- package/dist/standalone/{chunk-BHTPZS7L.js → chunk-3CJW6NWG.js} +1 -1
- package/dist/standalone/chunk-4H2OJBXO.js +1 -0
- package/dist/standalone/chunk-4MLAVZP4.js +1 -0
- package/dist/standalone/chunk-55YA7ZZI.js +76 -0
- package/dist/standalone/chunk-5OH3VPZF.js +1 -0
- package/dist/standalone/chunk-6GFEVKJP.js +1 -0
- package/dist/standalone/{chunk-ITLLHEVG.js → chunk-764T6X6X.js} +1 -1
- package/dist/standalone/chunk-7M3F6U4L.js +1 -0
- package/dist/standalone/{chunk-KGS7KM4A.js → chunk-7VF3IAAW.js} +1 -1
- package/dist/standalone/chunk-AJIUI7DD.js +1 -0
- package/dist/standalone/{chunk-5NSZVXCS.js → chunk-BACPICH6.js} +1 -1
- package/dist/standalone/chunk-BET2625I.js +1 -0
- package/dist/standalone/chunk-BQUQS7QN.js +1 -0
- package/dist/standalone/chunk-CKSHCYGC.js +2 -0
- package/dist/standalone/chunk-DCECRP45.js +1 -0
- package/dist/standalone/chunk-DFP2DADO.js +1 -0
- package/dist/standalone/chunk-DORBUITF.js +1 -0
- package/dist/standalone/chunk-DVKPRFIJ.js +1 -0
- package/dist/standalone/chunk-E6WUCLSI.js +1 -0
- package/dist/standalone/chunk-E7WLF6IU.js +1 -0
- package/dist/standalone/chunk-EVPLBWUT.js +8 -0
- package/dist/standalone/chunk-FCSPAJW4.js +1 -0
- package/dist/standalone/chunk-G2ICR3DL.js +1 -0
- package/dist/standalone/{chunk-2DS7JLWL.js → chunk-GJ6PGSES.js} +5 -5
- package/dist/standalone/chunk-GMSGZDDH.js +13 -0
- package/dist/standalone/chunk-GVRM4U6W.js +2 -0
- package/dist/standalone/chunk-GZDWDDXN.js +1 -0
- package/dist/standalone/chunk-ISJAJWYI.js +1 -0
- package/dist/standalone/{chunk-G2TFEWEQ.js → chunk-JIDZFLTB.js} +1 -1
- package/dist/standalone/{chunk-RMYA7NAH.js → chunk-K3GNLVYK.js} +1 -1
- package/dist/standalone/chunk-K4ZDRTQM.js +1 -0
- package/dist/standalone/{chunk-ASLGNHAX.js → chunk-LI43EKM6.js} +1 -1
- package/dist/standalone/chunk-MFPTVCJ6.js +1 -0
- package/dist/standalone/chunk-MPYFGAOW.js +1 -0
- package/dist/standalone/{chunk-TICVNLPM.js → chunk-O3NAGRTR.js} +1 -1
- package/dist/standalone/chunk-OV2WFAJX.js +1 -0
- package/dist/standalone/chunk-PA3LN4XJ.js +1 -0
- package/dist/standalone/chunk-PD6WPVYU.js +1 -0
- package/dist/standalone/{chunk-7PBZKXYA.js → chunk-PN5NCZDX.js} +1 -1
- package/dist/standalone/{chunk-YJGANMU7.js → chunk-PVZI3CXP.js} +10 -9
- package/dist/standalone/chunk-PZ7HD5T2.js +1 -0
- package/dist/standalone/{chunk-UGMRUEBU.js → chunk-QAFAJBAW.js} +1 -1
- package/dist/standalone/{chunk-6VTGE3WJ.js → chunk-QBAT52GB.js} +1 -1
- package/dist/standalone/chunk-QHIIRFG7.js +1 -0
- package/dist/standalone/chunk-RSEEHNFI.js +1 -0
- package/dist/standalone/chunk-SFJ5F4DX.js +1 -0
- package/dist/standalone/{chunk-3BP4BTLR.js → chunk-SGDQIWAR.js} +3 -3
- package/dist/standalone/chunk-SYEIXTEU.js +1 -0
- package/dist/standalone/chunk-T5HRXUSY.js +1 -0
- package/dist/standalone/{chunk-OD2POGPJ.js → chunk-TDL7NEWA.js} +1 -1
- package/dist/standalone/chunk-TM7CMA7X.js +1 -0
- package/dist/standalone/chunk-U4OAQPBT.js +1 -0
- package/dist/standalone/chunk-UDSVXA42.js +1 -0
- package/dist/standalone/chunk-UK64ZSUW.js +1 -0
- package/dist/standalone/chunk-VEZO7G5Q.js +3 -0
- package/dist/standalone/chunk-VSHUSN6T.js +1 -0
- package/dist/standalone/chunk-VYMCCC6O.js +1 -0
- package/dist/standalone/{chunk-7RYIQKZA.js → chunk-WXPWVBIY.js} +1 -1
- package/dist/standalone/chunk-X72PYOEW.js +1 -0
- package/dist/standalone/chunk-X7MMBSNW.js +1 -0
- package/dist/standalone/{chunk-6RC6L33K.js → chunk-XIGIWZLO.js} +3 -3
- package/dist/standalone/chunk-XNJNSCLM.js +1 -0
- package/dist/standalone/{chunk-NNISYDNI.js → chunk-XUGSA2NG.js} +1 -1
- package/dist/standalone/{chunk-VXBZQIGY.js → chunk-Y2ZPNDL7.js} +1 -1
- package/dist/standalone/chunk-YM6BBZDN.js +1 -0
- package/dist/standalone/chunk-ZHVTQ37P.js +1 -0
- package/dist/standalone/chunk-ZPP2KOR4.js +1 -0
- package/dist/standalone/studio.js +30 -30
- package/dist/styles.css +1 -1
- package/package.json +6 -5
- package/dist/standalone/chunk-2PDQ4KZ6.js +0 -1
- package/dist/standalone/chunk-57LYXHXH.js +0 -1
- package/dist/standalone/chunk-63XKJQTQ.js +0 -1
- package/dist/standalone/chunk-7POIIWC5.js +0 -3
- package/dist/standalone/chunk-AB6QGMBF.js +0 -1
- package/dist/standalone/chunk-D7HKX4DI.js +0 -1
- package/dist/standalone/chunk-DGWTR4G7.js +0 -1
- package/dist/standalone/chunk-DSX53PBM.js +0 -1
- package/dist/standalone/chunk-DV2MNASX.js +0 -1
- package/dist/standalone/chunk-E7AVZZKO.js +0 -1
- package/dist/standalone/chunk-EGJX34WM.js +0 -1
- package/dist/standalone/chunk-FCR3HKFV.js +0 -1
- package/dist/standalone/chunk-FQKNJSRA.js +0 -76
- package/dist/standalone/chunk-GABMIICA.js +0 -1
- package/dist/standalone/chunk-GZXPPJVK.js +0 -1
- package/dist/standalone/chunk-HFBRE65A.js +0 -1
- package/dist/standalone/chunk-HFMQNUBC.js +0 -1
- package/dist/standalone/chunk-HG7Q5B3H.js +0 -1
- package/dist/standalone/chunk-HTQL7AXU.js +0 -1
- package/dist/standalone/chunk-KG3QTFWE.js +0 -1
- package/dist/standalone/chunk-KODWGUAB.js +0 -1
- package/dist/standalone/chunk-MGFEVTRI.js +0 -1
- package/dist/standalone/chunk-N2QDG3MW.js +0 -1
- package/dist/standalone/chunk-O4PXDNR3.js +0 -1
- package/dist/standalone/chunk-OXCK3ZUG.js +0 -1
- package/dist/standalone/chunk-P7DSVO4U.js +0 -1
- package/dist/standalone/chunk-PKAM3N5C.js +0 -1
- package/dist/standalone/chunk-QGXGBHQO.js +0 -1
- package/dist/standalone/chunk-QHA3TAEJ.js +0 -1
- package/dist/standalone/chunk-QQWC62X7.js +0 -1
- package/dist/standalone/chunk-S53RUBW5.js +0 -1
- package/dist/standalone/chunk-SB4GT6PK.js +0 -1
- package/dist/standalone/chunk-SHIOUDOT.js +0 -1
- package/dist/standalone/chunk-SIDRSX7Y.js +0 -1
- package/dist/standalone/chunk-VJPQUBN6.js +0 -8
- package/dist/standalone/chunk-VMJKJWG6.js +0 -1
- package/dist/standalone/chunk-VPDPN5RR.js +0 -2
- package/dist/standalone/chunk-VSEGZA3J.js +0 -1
- package/dist/standalone/chunk-W7PCVQTE.js +0 -1
- package/dist/standalone/chunk-XLILSHPE.js +0 -1
- package/dist/standalone/chunk-XURNGQSS.js +0 -1
- package/dist/standalone/chunk-YQQJ4N6U.js +0 -1
- package/dist/standalone/chunk-ZH7UES4T.js +0 -2
- package/dist/standalone/chunk-ZQCVDXDL.js +0 -1
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { L as LiveError } from '../packem_shared/live-status-FZ0psC1z.js';
|
|
4
|
+
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
5
|
+
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
6
|
+
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
7
|
+
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';
|
|
8
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-BHPKmPuj.js';
|
|
9
|
+
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
|
+
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
|
|
11
|
+
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
12
|
+
|
|
13
|
+
const CONTAINER_LOG_PREFIX = "container:";
|
|
14
|
+
const EVENT_STATE = {
|
|
15
|
+
error: "error",
|
|
16
|
+
sleep: "sleeping",
|
|
17
|
+
start: "running",
|
|
18
|
+
stop: "stopped"
|
|
19
|
+
};
|
|
20
|
+
const parseContainerMessage = (message) => {
|
|
21
|
+
const separator = message.indexOf(":");
|
|
22
|
+
if (separator === -1) {
|
|
23
|
+
return {
|
|
24
|
+
event: message.trim()
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const detail = message.slice(separator + 1).trim();
|
|
28
|
+
const event = message.slice(0, separator).trim();
|
|
29
|
+
return detail === "" ? {
|
|
30
|
+
event
|
|
31
|
+
} : {
|
|
32
|
+
detail,
|
|
33
|
+
event
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const foldContainerInstances = (entries) => {
|
|
37
|
+
const latest = /* @__PURE__ */ new Map();
|
|
38
|
+
for (const entry of entries) {
|
|
39
|
+
const path = entry.functionPath ?? "";
|
|
40
|
+
if (!path.startsWith(CONTAINER_LOG_PREFIX)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const name = path.slice(CONTAINER_LOG_PREFIX.length);
|
|
44
|
+
if (name === "") {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
const previous = latest.get(name);
|
|
48
|
+
if (previous !== void 0 && previous.timestamp >= entry.timestamp) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const {
|
|
52
|
+
detail,
|
|
53
|
+
event
|
|
54
|
+
} = parseContainerMessage(entry.message);
|
|
55
|
+
latest.set(name, {
|
|
56
|
+
detail,
|
|
57
|
+
event,
|
|
58
|
+
level: entry.level,
|
|
59
|
+
name,
|
|
60
|
+
state: EVENT_STATE[event] ?? "unknown",
|
|
61
|
+
timestamp: entry.timestamp
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return [...latest.values()].toSorted((a, b) => a.name.localeCompare(b.name));
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const STATE_VARIANT = {
|
|
68
|
+
error: "destructive",
|
|
69
|
+
running: "success",
|
|
70
|
+
sleeping: "info",
|
|
71
|
+
stopped: "outline",
|
|
72
|
+
unknown: "secondary"
|
|
73
|
+
};
|
|
74
|
+
const entriesOf = (result) => {
|
|
75
|
+
const {
|
|
76
|
+
entries
|
|
77
|
+
} = result ?? {};
|
|
78
|
+
return Array.isArray(entries) ? entries : [];
|
|
79
|
+
};
|
|
80
|
+
const ContainersPanel = () => {
|
|
81
|
+
const $ = c(23);
|
|
82
|
+
const t = useT();
|
|
83
|
+
let t0;
|
|
84
|
+
let t1;
|
|
85
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
86
|
+
t0 = {};
|
|
87
|
+
t1 = {
|
|
88
|
+
live: true,
|
|
89
|
+
shardKey: ""
|
|
90
|
+
};
|
|
91
|
+
$[0] = t0;
|
|
92
|
+
$[1] = t1;
|
|
93
|
+
} else {
|
|
94
|
+
t0 = $[0];
|
|
95
|
+
t1 = $[1];
|
|
96
|
+
}
|
|
97
|
+
const {
|
|
98
|
+
data,
|
|
99
|
+
error,
|
|
100
|
+
liveError
|
|
101
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.getLogs, t0, t1);
|
|
102
|
+
const loaded = data !== void 0;
|
|
103
|
+
let t2;
|
|
104
|
+
if ($[2] !== data) {
|
|
105
|
+
t2 = foldContainerInstances(entriesOf(data));
|
|
106
|
+
$[2] = data;
|
|
107
|
+
$[3] = t2;
|
|
108
|
+
} else {
|
|
109
|
+
t2 = $[3];
|
|
110
|
+
}
|
|
111
|
+
const rows = t2;
|
|
112
|
+
let t3;
|
|
113
|
+
if ($[4] !== error) {
|
|
114
|
+
t3 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
115
|
+
className: "text-sm text-destructive",
|
|
116
|
+
"data-testid": "containers-error",
|
|
117
|
+
role: "alert",
|
|
118
|
+
children: error
|
|
119
|
+
}, void 0, false);
|
|
120
|
+
$[4] = error;
|
|
121
|
+
$[5] = t3;
|
|
122
|
+
} else {
|
|
123
|
+
t3 = $[5];
|
|
124
|
+
}
|
|
125
|
+
let t4;
|
|
126
|
+
if ($[6] !== t) {
|
|
127
|
+
t4 = t("Cloudflare Containers are observed from their lifecycle log stream. This shows the current state per container — ports and health checks aren't carried in that stream.");
|
|
128
|
+
$[6] = t;
|
|
129
|
+
$[7] = t4;
|
|
130
|
+
} else {
|
|
131
|
+
t4 = $[7];
|
|
132
|
+
}
|
|
133
|
+
let t5;
|
|
134
|
+
if ($[8] !== t4) {
|
|
135
|
+
t5 = /* @__PURE__ */ jsxDEV("p", {
|
|
136
|
+
className: "text-sm text-muted-foreground",
|
|
137
|
+
children: t4
|
|
138
|
+
}, void 0, false);
|
|
139
|
+
$[8] = t4;
|
|
140
|
+
$[9] = t5;
|
|
141
|
+
} else {
|
|
142
|
+
t5 = $[9];
|
|
143
|
+
}
|
|
144
|
+
let t6;
|
|
145
|
+
if ($[10] !== liveError) {
|
|
146
|
+
t6 = /* @__PURE__ */ jsxDEV(LiveError, {
|
|
147
|
+
message: liveError,
|
|
148
|
+
prefix: "containers"
|
|
149
|
+
}, void 0, false);
|
|
150
|
+
$[10] = liveError;
|
|
151
|
+
$[11] = t6;
|
|
152
|
+
} else {
|
|
153
|
+
t6 = $[11];
|
|
154
|
+
}
|
|
155
|
+
let t7;
|
|
156
|
+
if ($[12] !== t5 || $[13] !== t6) {
|
|
157
|
+
t7 = /* @__PURE__ */ jsxDEV("div", {
|
|
158
|
+
className: "flex flex-wrap items-center gap-2",
|
|
159
|
+
children: [t5, t6]
|
|
160
|
+
}, void 0, true);
|
|
161
|
+
$[12] = t5;
|
|
162
|
+
$[13] = t6;
|
|
163
|
+
$[14] = t7;
|
|
164
|
+
} else {
|
|
165
|
+
t7 = $[14];
|
|
166
|
+
}
|
|
167
|
+
let t8;
|
|
168
|
+
if ($[15] !== loaded || $[16] !== rows || $[17] !== t) {
|
|
169
|
+
t8 = loaded && rows.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
170
|
+
description: t("No container lifecycle activity yet. Instances declared with defineContainer show up here once they start, sleep, stop, or error."),
|
|
171
|
+
testId: "containers-empty",
|
|
172
|
+
title: t("No container activity")
|
|
173
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
|
|
174
|
+
className: "overflow-hidden py-0",
|
|
175
|
+
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
176
|
+
className: "px-0",
|
|
177
|
+
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
178
|
+
"data-testid": "containers-table",
|
|
179
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
180
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
181
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
182
|
+
children: t("Container")
|
|
183
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
184
|
+
children: t("State")
|
|
185
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
186
|
+
children: t("Last event")
|
|
187
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
188
|
+
children: t("Detail")
|
|
189
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
190
|
+
children: t("When")
|
|
191
|
+
}, void 0, false)]
|
|
192
|
+
}, void 0, true)
|
|
193
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
194
|
+
children: rows.map(_temp)
|
|
195
|
+
}, void 0, false)]
|
|
196
|
+
}, void 0, true)
|
|
197
|
+
}, void 0, false)
|
|
198
|
+
}, void 0, false);
|
|
199
|
+
$[15] = loaded;
|
|
200
|
+
$[16] = rows;
|
|
201
|
+
$[17] = t;
|
|
202
|
+
$[18] = t8;
|
|
203
|
+
} else {
|
|
204
|
+
t8 = $[18];
|
|
205
|
+
}
|
|
206
|
+
let t9;
|
|
207
|
+
if ($[19] !== t3 || $[20] !== t7 || $[21] !== t8) {
|
|
208
|
+
t9 = /* @__PURE__ */ jsxDEV("div", {
|
|
209
|
+
className: "flex flex-col gap-6",
|
|
210
|
+
"data-testid": "lunora-containers-panel",
|
|
211
|
+
children: [t3, t7, t8]
|
|
212
|
+
}, void 0, true);
|
|
213
|
+
$[19] = t3;
|
|
214
|
+
$[20] = t7;
|
|
215
|
+
$[21] = t8;
|
|
216
|
+
$[22] = t9;
|
|
217
|
+
} else {
|
|
218
|
+
t9 = $[22];
|
|
219
|
+
}
|
|
220
|
+
return t9;
|
|
221
|
+
};
|
|
222
|
+
function _temp(row) {
|
|
223
|
+
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
224
|
+
"data-testid": `containers-row-${row.name}`,
|
|
225
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
226
|
+
className: "font-mono text-xs",
|
|
227
|
+
children: row.name
|
|
228
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
229
|
+
children: /* @__PURE__ */ jsxDEV(Badge, {
|
|
230
|
+
variant: STATE_VARIANT[row.state],
|
|
231
|
+
children: row.state
|
|
232
|
+
}, void 0, false)
|
|
233
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
234
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
235
|
+
children: row.event
|
|
236
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
237
|
+
className: "max-w-64 truncate text-xs text-muted-foreground",
|
|
238
|
+
title: row.detail,
|
|
239
|
+
children: row.detail ?? "—"
|
|
240
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
241
|
+
className: "text-xs tabular-nums text-muted-foreground",
|
|
242
|
+
children: new Date(row.timestamp).toLocaleString()
|
|
243
|
+
}, void 0, false)]
|
|
244
|
+
}, row.name, true);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export { ContainersPanel };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useState, useCallback, useEffect } from 'react';
|
|
3
|
-
import { u as usePersistedList,
|
|
3
|
+
import { u as usePersistedList, S as SqlResultChart, n as newId } from '../packem_shared/browser-storage-tLOxkIHd.js';
|
|
4
|
+
import { A as Alert } from '../packem_shared/alert-CdAET2K_.js';
|
|
4
5
|
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
5
6
|
import { c as CardTitle, b as CardHeader, a as CardContent, C as Card } from '../packem_shared/card-DURq3ElK.js';
|
|
6
7
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
7
8
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
8
9
|
import { useLunora } from '@lunora/react';
|
|
9
10
|
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
|
|
10
|
-
import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef } from '../packem_shared/internal-
|
|
11
|
+
import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef } from '../packem_shared/internal-DTsYVn-g.js';
|
|
11
12
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
12
13
|
|
|
13
14
|
const RUN_SQL = adminRef(ADMIN_FUNCTIONS.runSql);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
+
import { E as ErrorAlert } from '../packem_shared/error-alert-BBT6D22d.js';
|
|
3
4
|
import { ShardInput } from '../packem_shared/ShardInput-gx_DZXXn.js';
|
|
4
5
|
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
5
6
|
import { C as Card } from '../packem_shared/card-DURq3ElK.js';
|
|
6
7
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
7
8
|
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';
|
|
8
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-
|
|
9
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-BHPKmPuj.js';
|
|
9
10
|
import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
10
11
|
import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
|
|
11
12
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
@@ -241,7 +242,7 @@ const PathCounters = (t0) => {
|
|
|
241
242
|
return t19;
|
|
242
243
|
};
|
|
243
244
|
const FanoutPanel = (t0) => {
|
|
244
|
-
const $ = c(
|
|
245
|
+
const $ = c(32);
|
|
245
246
|
const {
|
|
246
247
|
initialShardKey
|
|
247
248
|
} = t0;
|
|
@@ -277,6 +278,7 @@ const FanoutPanel = (t0) => {
|
|
|
277
278
|
const {
|
|
278
279
|
data: result,
|
|
279
280
|
error,
|
|
281
|
+
errorSource,
|
|
280
282
|
refetch
|
|
281
283
|
} = useAdminQuery(ADMIN_FUNCTIONS.getFanoutMetrics, t2, t3);
|
|
282
284
|
useAutoRefresh(refetch, true);
|
|
@@ -347,20 +349,19 @@ const FanoutPanel = (t0) => {
|
|
|
347
349
|
t7 = $[14];
|
|
348
350
|
}
|
|
349
351
|
let t8;
|
|
350
|
-
if ($[15] !== error) {
|
|
351
|
-
t8 = error !== null && /* @__PURE__ */ jsxDEV(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
role: "alert",
|
|
355
|
-
children: error
|
|
352
|
+
if ($[15] !== error || $[16] !== errorSource) {
|
|
353
|
+
t8 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
354
|
+
error: errorSource,
|
|
355
|
+
testId: "fanout-error"
|
|
356
356
|
}, void 0, false);
|
|
357
357
|
$[15] = error;
|
|
358
|
-
$[16] =
|
|
358
|
+
$[16] = errorSource;
|
|
359
|
+
$[17] = t8;
|
|
359
360
|
} else {
|
|
360
|
-
t8 = $[
|
|
361
|
+
t8 = $[17];
|
|
361
362
|
}
|
|
362
363
|
let t9;
|
|
363
|
-
if ($[
|
|
364
|
+
if ($[18] !== error || $[19] !== isIdle || $[20] !== t) {
|
|
364
365
|
t9 = error === null && isIdle && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
365
366
|
description: t("Realtime fan-out cost and per-topic subscriber counts for this shard."),
|
|
366
367
|
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
@@ -378,15 +379,15 @@ const FanoutPanel = (t0) => {
|
|
|
378
379
|
testId: "fanout-empty",
|
|
379
380
|
title: t("No fan-out activity yet.")
|
|
380
381
|
}, void 0, false);
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
382
|
+
$[18] = error;
|
|
383
|
+
$[19] = isIdle;
|
|
384
|
+
$[20] = t;
|
|
385
|
+
$[21] = t9;
|
|
385
386
|
} else {
|
|
386
|
-
t9 = $[
|
|
387
|
+
t9 = $[21];
|
|
387
388
|
}
|
|
388
389
|
let t10;
|
|
389
|
-
if ($[
|
|
390
|
+
if ($[22] !== error || $[23] !== isIdle || $[24] !== result || $[25] !== t) {
|
|
390
391
|
t10 = error === null && result !== void 0 && !isIdle && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
391
392
|
children: [result.topics.length > 0 && /* @__PURE__ */ jsxDEV("section", {
|
|
392
393
|
className: "flex flex-col gap-2",
|
|
@@ -435,28 +436,28 @@ const FanoutPanel = (t0) => {
|
|
|
435
436
|
}, void 0, false)]
|
|
436
437
|
}, void 0, true)]
|
|
437
438
|
}, void 0, true);
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
439
|
+
$[22] = error;
|
|
440
|
+
$[23] = isIdle;
|
|
441
|
+
$[24] = result;
|
|
442
|
+
$[25] = t;
|
|
443
|
+
$[26] = t10;
|
|
443
444
|
} else {
|
|
444
|
-
t10 = $[
|
|
445
|
+
t10 = $[26];
|
|
445
446
|
}
|
|
446
447
|
let t11;
|
|
447
|
-
if ($[
|
|
448
|
+
if ($[27] !== t10 || $[28] !== t7 || $[29] !== t8 || $[30] !== t9) {
|
|
448
449
|
t11 = /* @__PURE__ */ jsxDEV("div", {
|
|
449
450
|
className: "flex flex-col gap-4",
|
|
450
451
|
"data-testid": "fanout-panel",
|
|
451
452
|
children: [t7, t8, t9, t10]
|
|
452
453
|
}, void 0, true);
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
457
|
-
$[
|
|
454
|
+
$[27] = t10;
|
|
455
|
+
$[28] = t7;
|
|
456
|
+
$[29] = t8;
|
|
457
|
+
$[30] = t9;
|
|
458
|
+
$[31] = t11;
|
|
458
459
|
} else {
|
|
459
|
-
t11 = $[
|
|
460
|
+
t11 = $[31];
|
|
460
461
|
}
|
|
461
462
|
return t11;
|
|
462
463
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useState, useMemo } from 'react';
|
|
2
|
+
import { E as ErrorAlert } from '../packem_shared/error-alert-BBT6D22d.js';
|
|
2
3
|
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
3
4
|
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
4
5
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
5
6
|
import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
|
|
6
7
|
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';
|
|
7
8
|
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
8
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-
|
|
9
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-BHPKmPuj.js';
|
|
9
10
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
11
|
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
|
|
11
12
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
@@ -59,6 +60,7 @@ const FlagsPanel = ({
|
|
|
59
60
|
const {
|
|
60
61
|
data,
|
|
61
62
|
error,
|
|
63
|
+
errorSource,
|
|
62
64
|
liveError
|
|
63
65
|
} = useAdminQuery(ADMIN_FUNCTIONS.listFlags, args, {
|
|
64
66
|
live: true,
|
|
@@ -135,11 +137,9 @@ const FlagsPanel = ({
|
|
|
135
137
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
136
138
|
className: "flex flex-col gap-6",
|
|
137
139
|
"data-testid": "lunora-flags-panel",
|
|
138
|
-
children: [error !== null && /* @__PURE__ */ jsxDEV(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
role: "alert",
|
|
142
|
-
children: error
|
|
140
|
+
children: [error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
141
|
+
error: errorSource,
|
|
142
|
+
testId: "flags-error"
|
|
143
143
|
}, void 0, false), /* @__PURE__ */ jsxDEV("p", {
|
|
144
144
|
className: "text-sm text-muted-foreground",
|
|
145
145
|
children: t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')
|
|
@@ -4,11 +4,11 @@ import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
|
4
4
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
5
5
|
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';
|
|
6
6
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
7
|
-
import { f as fireAndForget, e as errorMessage,
|
|
7
|
+
import { f as fireAndForget, e as errorMessage, j as formatBytes, g as copyToClipboard } from '../packem_shared/internal-DTsYVn-g.js';
|
|
8
8
|
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
9
9
|
import { C as Checkbox } from '../packem_shared/checkbox-UNkzAxl-.js';
|
|
10
10
|
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
11
|
-
import { b as Sheet, c as SheetContent, d as SheetHeader, e as SheetTitle } from '../packem_shared/studio-
|
|
11
|
+
import { b as Sheet, c as SheetContent, d as SheetHeader, e as SheetTitle } from '../packem_shared/studio-Dg2e-dsR.js';
|
|
12
12
|
import { c } from 'react/compiler-runtime';
|
|
13
13
|
import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
|
|
14
14
|
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
@@ -5,7 +5,7 @@ import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
|
5
5
|
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
6
6
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
7
7
|
import { a as CLOUDFLARE_OBSERVABILITY_URL } from '../packem_shared/cf-links-BZfRdxSE.js';
|
|
8
|
-
import { f as fireAndForget, e as errorMessage,
|
|
8
|
+
import { f as fireAndForget, e as errorMessage, g as copyToClipboard } from '../packem_shared/internal-DTsYVn-g.js';
|
|
9
9
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
10
10
|
|
|
11
11
|
const DestinationRow = (t0) => {
|
|
@@ -5,11 +5,11 @@ import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
|
5
5
|
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
6
6
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
7
7
|
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';
|
|
8
|
-
import { a as useClientQuery } from '../packem_shared/use-admin-query-
|
|
9
|
-
import { u as useAuthCapabilities } from '../packem_shared/use-auth-capabilities-
|
|
8
|
+
import { a as useClientQuery } from '../packem_shared/use-admin-query-BHPKmPuj.js';
|
|
9
|
+
import { u as useAuthCapabilities } from '../packem_shared/use-auth-capabilities-C-VH0oJJ.js';
|
|
10
10
|
import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
11
11
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
12
|
-
import {
|
|
12
|
+
import { h as formatCell, i as formatTimestamp, f as fireAndForget } from '../packem_shared/internal-DTsYVn-g.js';
|
|
13
13
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
14
14
|
|
|
15
15
|
const OrgRowTable = (t0) => {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { E as ErrorAlert } from '../packem_shared/error-alert-BBT6D22d.js';
|
|
1
2
|
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
2
3
|
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
3
4
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
4
5
|
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';
|
|
5
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-
|
|
6
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-BHPKmPuj.js';
|
|
6
7
|
import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
7
8
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
8
9
|
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
|
|
9
|
-
import {
|
|
10
|
+
import { i as formatTimestamp } from '../packem_shared/internal-DTsYVn-g.js';
|
|
10
11
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
11
12
|
|
|
12
13
|
const ACTIVE_STATES = /* @__PURE__ */ new Set(["active", "trialing"]);
|
|
@@ -66,6 +67,7 @@ const PaymentsPanel = ({
|
|
|
66
67
|
const subscriptions = subscriptionsQuery.data?.rows ?? [];
|
|
67
68
|
const events = eventsQuery.data?.rows ?? [];
|
|
68
69
|
const error = subscriptionsQuery.error ?? eventsQuery.error;
|
|
70
|
+
const errorSource = subscriptionsQuery.error === null ? eventsQuery.errorSource : subscriptionsQuery.errorSource;
|
|
69
71
|
const activeCount = subscriptions.filter((row) => ACTIVE_STATES.has(text(readField(row, "state")))).length;
|
|
70
72
|
const recentEvents = events.toSorted((a, b) => Number(readField(b, "processedAt") ?? 0) - Number(readField(a, "processedAt") ?? 0));
|
|
71
73
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
@@ -100,9 +102,8 @@ const PaymentsPanel = ({
|
|
|
100
102
|
})
|
|
101
103
|
}, void 0, false)]
|
|
102
104
|
}, void 0, true)
|
|
103
|
-
}, void 0, false), error === null ? void 0 : /* @__PURE__ */ jsxDEV(
|
|
104
|
-
|
|
105
|
-
children: error
|
|
105
|
+
}, void 0, false), error === null ? void 0 : /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
106
|
+
error: errorSource
|
|
106
107
|
}, void 0, false), subscriptions.length === 0 && !subscriptionsQuery.isLoading ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
107
108
|
testId: "payments-empty",
|
|
108
109
|
title: t("No subscriptions yet")
|
|
@@ -2,12 +2,13 @@ import { useState, useRef, useEffect } from 'react';
|
|
|
2
2
|
import { C as Card, b as CardHeader, c as CardTitle, d as CardDescription, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
3
3
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
4
4
|
import { c } from 'react/compiler-runtime';
|
|
5
|
+
import { E as ErrorAlert } from '../packem_shared/error-alert-BBT6D22d.js';
|
|
5
6
|
import { L as LiveError } from '../packem_shared/live-status-FZ0psC1z.js';
|
|
6
7
|
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
7
8
|
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
8
9
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
9
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';
|
|
10
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-
|
|
11
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-BHPKmPuj.js';
|
|
11
12
|
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
|
|
12
13
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
13
14
|
import { useLunora } from '@lunora/react';
|
|
@@ -15,7 +16,7 @@ import { ShardInput } from '../packem_shared/ShardInput-gx_DZXXn.js';
|
|
|
15
16
|
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
16
17
|
import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
|
|
17
18
|
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
18
|
-
import { c as callOptions, a as adminRef, e as errorMessage, f as fireAndForget } from '../packem_shared/internal-
|
|
19
|
+
import { c as callOptions, a as adminRef, e as errorMessage, f as fireAndForget } from '../packem_shared/internal-DTsYVn-g.js';
|
|
19
20
|
|
|
20
21
|
const OPERATIONS = ["read", "insert", "update", "delete"];
|
|
21
22
|
const operationLabel = (t, operation) => ({
|
|
@@ -76,7 +77,7 @@ const buildRows = (policies, maskColumns, uncovered) => {
|
|
|
76
77
|
return [...byTable.values()].toSorted((a, b) => a.table.localeCompare(b.table));
|
|
77
78
|
};
|
|
78
79
|
const PermissionsMatrix = (t0) => {
|
|
79
|
-
const $ = c(
|
|
80
|
+
const $ = c(17);
|
|
80
81
|
let t1;
|
|
81
82
|
if ($[0] !== t0) {
|
|
82
83
|
t1 = t0 === void 0 ? {} : t0;
|
|
@@ -129,6 +130,7 @@ const PermissionsMatrix = (t0) => {
|
|
|
129
130
|
const advisories = advisoriesQuery.data ?? null;
|
|
130
131
|
const {
|
|
131
132
|
error,
|
|
133
|
+
errorSource,
|
|
132
134
|
liveError
|
|
133
135
|
} = policiesQuery;
|
|
134
136
|
const rows = policies === null ? [] : buildRows(policies, maskColumns, uncoveredTables(advisories));
|
|
@@ -147,17 +149,16 @@ const PermissionsMatrix = (t0) => {
|
|
|
147
149
|
t7 = $[13];
|
|
148
150
|
}
|
|
149
151
|
let t8;
|
|
150
|
-
if ($[14] !== error) {
|
|
151
|
-
t8 = error !== null && /* @__PURE__ */ jsxDEV(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
role: "alert",
|
|
155
|
-
children: error
|
|
152
|
+
if ($[14] !== error || $[15] !== errorSource) {
|
|
153
|
+
t8 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
154
|
+
error: errorSource,
|
|
155
|
+
testId: "pm-error"
|
|
156
156
|
}, void 0, false);
|
|
157
157
|
$[14] = error;
|
|
158
|
-
$[15] =
|
|
158
|
+
$[15] = errorSource;
|
|
159
|
+
$[16] = t8;
|
|
159
160
|
} else {
|
|
160
|
-
t8 = $[
|
|
161
|
+
t8 = $[16];
|
|
161
162
|
}
|
|
162
163
|
t6 = /* @__PURE__ */ jsxDEV("div", {
|
|
163
164
|
className: "flex flex-col gap-3",
|