@omniviewdev/runtime 0.7.2 → 0.7.4
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/context/drawer/RightDrawerContext.d.ts +3 -1
- package/dist/context/plugins/PluginContextProvider.d.ts +3 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +942 -896
- package/dist/resourceIcons.d.ts +19 -0
- package/dist/resourceQueryKeys.d.ts +6 -0
- package/dist/search.d.ts +159 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import C, { useContext as X, createContext as ue, useState as
|
|
6
|
-
import { Link as
|
|
1
|
+
var St = Object.defineProperty;
|
|
2
|
+
var vt = (t, e, n) => e in t ? St(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var P = (t, e, n) => vt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsx as _, jsxs as q, Fragment as $e } from "react/jsx-runtime";
|
|
5
|
+
import C, { useContext as X, createContext as ue, useState as B, useRef as W, useCallback as M, useSyncExternalStore as Ct, useEffect as j, useMemo as _t, Component as wt } from "react";
|
|
6
|
+
import { Link as bt, useNavigate as Rt, useLocation as It, createMemoryRouter as Tt, RouterProvider as Ot } from "react-router-dom";
|
|
7
7
|
import "./index-D2mKAO8s.js";
|
|
8
|
-
import { P as
|
|
9
|
-
import { P as
|
|
10
|
-
import { O as
|
|
11
|
-
import { useQueryClient as
|
|
12
|
-
import { useToast as
|
|
13
|
-
import { w as
|
|
14
|
-
const
|
|
8
|
+
import { P as At, G as Nt, V as Dt, S as Ft, a as We, U as xt, R as Pt, b as Lt, c as Ge, d as kt, L as Mt, e as Ut, f as qt, g as $t, h as Wt, i as Gt, j as jt, C as Qt, k as Bt, l as Ht, m as Kt, n as zt, Q as Vt, o as Yt, p as De, q as Jt, r as je, F as Xt, s as Zt, t as Qe, D as Be, u as en, v as tn, w as nn, x as He, y as rn, z as sn, A as Ke, B as on, E as an, H as cn, I as un, J as ln, K as dn, M as Fe, N as fn, O as pn, T as hn, W as gn, X as yn } from "./graphservice-CUg1PUsC.js";
|
|
9
|
+
import { P as mn, W as En, S as Sn, C as vn, L as Cn, F as _n, a as wn, U as ze, D as Ve, G as bn, b as Ye, c as Je, A as Xe } from "./models-4EtitZnM.js";
|
|
10
|
+
import { O as D, a as Ze } from "./events-Bcx6NsMp.js";
|
|
11
|
+
import { useQueryClient as K, useMutation as x, useQuery as F, keepPreviousData as et, useQueries as Rn } from "@tanstack/react-query";
|
|
12
|
+
import { useToast as In, Card as Tn, Toolbar as xe, Text as ee, IconButton as ne, EmptyState as On, Button as pe, Code as An } from "@omniviewdev/base-ui";
|
|
13
|
+
import { w as Nn } from "./legacyEnum-DORXlU_y.js";
|
|
14
|
+
const we = C.createContext(void 0), N = {
|
|
15
15
|
// Plugin
|
|
16
16
|
PLUGIN_NOT_FOUND: "omniview:plugin/not-found",
|
|
17
17
|
PLUGIN_NOT_LOADED: "omniview:plugin/not-loaded",
|
|
@@ -46,25 +46,25 @@ const _e = C.createContext(void 0), D = {
|
|
|
46
46
|
INTERNAL: "omniview:internal",
|
|
47
47
|
VALIDATION: "omniview:validation",
|
|
48
48
|
NOT_IMPLEMENTED: "omniview:not-implemented"
|
|
49
|
-
},
|
|
50
|
-
INVALID_REQUEST: [
|
|
51
|
-
UNSUPPORTED: [
|
|
52
|
-
FORBIDDEN: [
|
|
53
|
-
UNAUTHORIZED: [
|
|
54
|
-
NOT_FOUND: [
|
|
55
|
-
CONFLICT: [
|
|
56
|
-
ALREADY_EXISTS: [
|
|
57
|
-
CANCELLED: [
|
|
58
|
-
TIMEOUT: [
|
|
59
|
-
UNAVAILABLE: [
|
|
60
|
-
CONNECTION_ERROR: [
|
|
61
|
-
CERTIFICATE_ERROR: [
|
|
62
|
-
RESOURCE_LIMIT: [
|
|
63
|
-
CONTINUATION_EXPIRED: [
|
|
64
|
-
RESET_REQUIRED: [
|
|
65
|
-
PARTIAL_RESULT: [
|
|
66
|
-
PROVIDER_ERROR: [
|
|
67
|
-
INTERNAL: [
|
|
49
|
+
}, Pe = {
|
|
50
|
+
INVALID_REQUEST: [N.VALIDATION, 400, "correctRequest"],
|
|
51
|
+
UNSUPPORTED: [N.NOT_IMPLEMENTED, 501, "refreshContract"],
|
|
52
|
+
FORBIDDEN: [N.RESOURCE_FORBIDDEN, 403, "none"],
|
|
53
|
+
UNAUTHORIZED: [N.RESOURCE_UNAUTHORIZED, 401, "none"],
|
|
54
|
+
NOT_FOUND: [N.RESOURCE_NOT_FOUND, 404, "none"],
|
|
55
|
+
CONFLICT: [N.RESOURCE_CONFLICT, 409, "refreshContract"],
|
|
56
|
+
ALREADY_EXISTS: [N.RESOURCE_CONFLICT, 409, "refreshContract"],
|
|
57
|
+
CANCELLED: [N.CANCELLED, 499, "none"],
|
|
58
|
+
TIMEOUT: [N.RESOURCE_TIMEOUT, 408, "none"],
|
|
59
|
+
UNAVAILABLE: [N.CONNECTION_FAILED, 503, "reconnect"],
|
|
60
|
+
CONNECTION_ERROR: [N.CONNECTION_FAILED, 503, "reconnect"],
|
|
61
|
+
CERTIFICATE_ERROR: [N.CONNECTION_FAILED, 502, "reconnect"],
|
|
62
|
+
RESOURCE_LIMIT: [N.RESOURCE_LIMIT, 429, "correctRequest"],
|
|
63
|
+
CONTINUATION_EXPIRED: [N.RESOURCE_CONTINUATION_EXPIRED, 410, "restartQuery"],
|
|
64
|
+
RESET_REQUIRED: [N.RESOURCE_RESET_REQUIRED, 409, "restartQuery"],
|
|
65
|
+
PARTIAL_RESULT: [N.RESOURCE_PARTIAL, 422, "none"],
|
|
66
|
+
PROVIDER_ERROR: [N.RESOURCE_PROVIDER_ERROR, 502, "none"],
|
|
67
|
+
INTERNAL: [N.INTERNAL, 500, "none"]
|
|
68
68
|
};
|
|
69
69
|
function he(t) {
|
|
70
70
|
return typeof t == "object" && t !== null ? t : void 0;
|
|
@@ -73,7 +73,7 @@ function G(t, e) {
|
|
|
73
73
|
return typeof t == "string" && t.length > 0 && t.length <= e;
|
|
74
74
|
}
|
|
75
75
|
function ge() {
|
|
76
|
-
return { type:
|
|
76
|
+
return { type: N.CANCELLED, code: "CANCELLED", title: "Cancelled", status: 499, detail: "The operation was cancelled.", recovery: "none" };
|
|
77
77
|
}
|
|
78
78
|
function ie(t, e) {
|
|
79
79
|
if (e > 4) return;
|
|
@@ -101,8 +101,8 @@ function ie(t, e) {
|
|
|
101
101
|
}
|
|
102
102
|
if (typeof n.code == "string" && typeof n.title == "string" && typeof n.message == "string") {
|
|
103
103
|
let r = n.code;
|
|
104
|
-
if (r === "PERMISSION_DENIED" && (r = "FORBIDDEN"), ["INVALID_INPUT", "FILTER_UNKNOWN_FIELD", "FILTER_INVALID_OPERATOR"].includes(r) && (r = "INVALID_REQUEST"), Object.prototype.hasOwnProperty.call(
|
|
105
|
-
const [s, i, o] =
|
|
104
|
+
if (r === "PERMISSION_DENIED" && (r = "FORBIDDEN"), ["INVALID_INPUT", "FILTER_UNKNOWN_FIELD", "FILTER_INVALID_OPERATOR"].includes(r) && (r = "INVALID_REQUEST"), Object.prototype.hasOwnProperty.call(Pe, r) || (r = "INTERNAL"), r === "CANCELLED") return ge();
|
|
105
|
+
const [s, i, o] = Pe[r], a = r === "FORBIDDEN" || r === "UNAUTHORIZED" || r === "INTERNAL" || r === "PROVIDER_ERROR";
|
|
106
106
|
return {
|
|
107
107
|
type: s,
|
|
108
108
|
status: i,
|
|
@@ -118,16 +118,16 @@ function ie(t, e) {
|
|
|
118
118
|
}
|
|
119
119
|
function H(t) {
|
|
120
120
|
return ie(t, 0) ?? {
|
|
121
|
-
type:
|
|
121
|
+
type: N.INTERNAL,
|
|
122
122
|
title: t == null ? "Unknown error" : "Error",
|
|
123
123
|
status: 500,
|
|
124
124
|
detail: t == null ? "An unknown error occurred." : "The operation could not be completed."
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
function ae(t) {
|
|
128
|
-
return H(t).type ===
|
|
128
|
+
return H(t).type === N.CANCELLED;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Dn(t) {
|
|
131
131
|
switch (t.type) {
|
|
132
132
|
case "navigate":
|
|
133
133
|
return {
|
|
@@ -164,7 +164,7 @@ function Tn(t) {
|
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function tt(t, e) {
|
|
168
168
|
var s, i;
|
|
169
169
|
const n = [
|
|
170
170
|
t.detail,
|
|
@@ -175,114 +175,118 @@ function Ze(t, e) {
|
|
|
175
175
|
message: e || (t.title !== "Error" ? t.title : "Operation failed"),
|
|
176
176
|
status: "error",
|
|
177
177
|
details: n,
|
|
178
|
-
actions: (i = t.actions) == null ? void 0 : i.map(
|
|
178
|
+
actions: (i = t.actions) == null ? void 0 : i.map(Dn)
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
181
|
function z(t, e, n) {
|
|
182
182
|
if (ae(e)) return;
|
|
183
183
|
const r = H(e);
|
|
184
|
-
t(
|
|
184
|
+
t(tt(r, n));
|
|
185
185
|
}
|
|
186
186
|
function U(t, e) {
|
|
187
187
|
return (n) => {
|
|
188
188
|
if (ae(n)) return;
|
|
189
189
|
const r = H(n);
|
|
190
|
-
t(
|
|
190
|
+
t(tt(r, r.title !== "Error" ? r.title : e));
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
const { children: e, pluginId: n } = t, [
|
|
195
|
-
console.debug("[PluginContextProvider] render", { pluginId: n, metaLoaded:
|
|
196
|
-
const
|
|
193
|
+
function hs(t) {
|
|
194
|
+
const { children: e, pluginId: n, headless: r = !1 } = t, [s, i] = C.useState({}), [o, a] = C.useState(new mn()), [c, f] = C.useState(!1), [u, p] = C.useState(null), h = C.useRef(0), g = C.useRef(0);
|
|
195
|
+
console.debug("[PluginContextProvider] render", { pluginId: n, metaLoaded: c, metaError: !!u });
|
|
196
|
+
const m = C.useCallback(() => {
|
|
197
197
|
if (n === void 0 || n === "")
|
|
198
198
|
return;
|
|
199
|
-
const
|
|
200
|
-
console.debug(`[PluginContextProvider] fetching settings for "${n}"`),
|
|
201
|
-
|
|
202
|
-
}).catch((
|
|
203
|
-
if (
|
|
204
|
-
const
|
|
205
|
-
console.error(`[PluginContextProvider] error fetching settings for "${n}":`,
|
|
199
|
+
const l = ++h.current;
|
|
200
|
+
console.debug(`[PluginContextProvider] fetching settings for "${n}"`), At(n).then((d) => {
|
|
201
|
+
l === h.current && (console.debug(`[PluginContextProvider] settings loaded for "${n}"`, Object.keys(d)), i(d));
|
|
202
|
+
}).catch((d) => {
|
|
203
|
+
if (l !== h.current) return;
|
|
204
|
+
const E = H(d);
|
|
205
|
+
console.error(`[PluginContextProvider] error fetching settings for "${n}":`, E.detail);
|
|
206
206
|
});
|
|
207
|
-
}, [n]),
|
|
207
|
+
}, [n]), w = C.useCallback(() => {
|
|
208
208
|
if (n === void 0 || n === "") {
|
|
209
209
|
console.debug("[PluginContextProvider] skipping meta fetch — empty pluginId");
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
console.debug(`[PluginContextProvider] fetching meta for "${n}"`),
|
|
214
|
-
|
|
215
|
-
}).catch((
|
|
216
|
-
if (
|
|
217
|
-
const
|
|
218
|
-
console.error(`[PluginContextProvider] error fetching meta for "${n}":`,
|
|
212
|
+
const l = ++g.current;
|
|
213
|
+
console.debug(`[PluginContextProvider] fetching meta for "${n}"`), p(null), Nt(n).then((d) => {
|
|
214
|
+
l === g.current && (console.debug(`[PluginContextProvider] meta loaded for "${n}"`, { name: d == null ? void 0 : d.name, version: d == null ? void 0 : d.version }), a(d), f(!0));
|
|
215
|
+
}).catch((d) => {
|
|
216
|
+
if (l !== g.current) return;
|
|
217
|
+
const E = H(d);
|
|
218
|
+
console.error(`[PluginContextProvider] error fetching meta for "${n}":`, E.detail), p(E.detail), f(!1);
|
|
219
219
|
});
|
|
220
220
|
}, [n]);
|
|
221
|
-
|
|
222
|
-
if (
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
var
|
|
229
|
-
((
|
|
221
|
+
if (C.useEffect(() => {
|
|
222
|
+
if (c) return;
|
|
223
|
+
const l = () => {
|
|
224
|
+
m(), w();
|
|
225
|
+
}, d = [
|
|
226
|
+
D("plugin/init_complete", l),
|
|
227
|
+
D("plugin/dev_install_complete", (E) => {
|
|
228
|
+
var y;
|
|
229
|
+
((y = E.data) == null ? void 0 : y.id) === n && l();
|
|
230
230
|
}),
|
|
231
|
-
|
|
231
|
+
D("plugin/inventory_changed", l)
|
|
232
232
|
];
|
|
233
233
|
return () => {
|
|
234
|
-
for (const
|
|
234
|
+
for (const E of d) E();
|
|
235
235
|
};
|
|
236
|
-
}, [n,
|
|
237
|
-
++
|
|
238
|
-
}), [n,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
|
|
236
|
+
}, [n, c, m, w]), C.useEffect(() => (console.debug(`[PluginContextProvider] useEffect — pluginId changed to "${n}"`), f(!1), p(null), i({}), m(), w(), () => {
|
|
237
|
+
++h.current, ++g.current;
|
|
238
|
+
}), [n, m, w]), u) {
|
|
239
|
+
if (r) throw new Error(u);
|
|
240
|
+
return /* @__PURE__ */ _("div", { style: {
|
|
241
|
+
display: "flex",
|
|
242
|
+
flex: 1,
|
|
243
|
+
alignItems: "center",
|
|
244
|
+
justifyContent: "center",
|
|
245
|
+
padding: 24
|
|
246
|
+
}, children: /* @__PURE__ */ q("div", { style: {
|
|
247
|
+
maxWidth: 480,
|
|
248
|
+
width: "100%",
|
|
249
|
+
border: "1px solid #7F1D1D",
|
|
250
|
+
borderRadius: 8,
|
|
251
|
+
backgroundColor: "#1C1917",
|
|
252
|
+
padding: 20,
|
|
253
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
254
|
+
}, children: [
|
|
255
|
+
/* @__PURE__ */ q("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }, children: [
|
|
256
|
+
/* @__PURE__ */ q("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "#EF4444", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
257
|
+
/* @__PURE__ */ _("circle", { cx: "12", cy: "12", r: "10" }),
|
|
258
|
+
/* @__PURE__ */ _("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
259
|
+
/* @__PURE__ */ _("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
260
|
+
] }),
|
|
261
|
+
/* @__PURE__ */ _("span", { style: { fontSize: 14, fontWeight: 600, color: "#FECACA" }, children: "Plugin failed to load" })
|
|
258
262
|
] }),
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
263
|
+
/* @__PURE__ */ _("p", { style: { fontSize: 13, color: "#A1A1AA", margin: "0 0 16px" }, children: u }),
|
|
264
|
+
/* @__PURE__ */ _(
|
|
265
|
+
"button",
|
|
266
|
+
{
|
|
267
|
+
onClick: () => w(),
|
|
268
|
+
style: {
|
|
269
|
+
background: "transparent",
|
|
270
|
+
color: "#F87171",
|
|
271
|
+
border: "1px solid #7F1D1D",
|
|
272
|
+
borderRadius: 6,
|
|
273
|
+
padding: "6px 14px",
|
|
274
|
+
fontSize: 13,
|
|
275
|
+
fontWeight: 500,
|
|
276
|
+
cursor: "pointer"
|
|
277
|
+
},
|
|
278
|
+
children: "Retry"
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
] }) });
|
|
282
|
+
}
|
|
283
|
+
return c ? /* @__PURE__ */ _(we.Provider, { value: { pluginId: n, settings: s, meta: o }, children: e }) : r ? null : /* @__PURE__ */ q("div", { style: {
|
|
280
284
|
display: "flex",
|
|
281
285
|
flex: 1,
|
|
282
286
|
alignItems: "center",
|
|
283
287
|
justifyContent: "center"
|
|
284
288
|
}, children: [
|
|
285
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ _("div", { style: {
|
|
286
290
|
width: 24,
|
|
287
291
|
height: 24,
|
|
288
292
|
border: "2px solid #3F3F46",
|
|
@@ -290,29 +294,29 @@ function cs(t) {
|
|
|
290
294
|
borderRadius: "50%",
|
|
291
295
|
animation: "plugin-spin 0.8s linear infinite"
|
|
292
296
|
} }),
|
|
293
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ _("style", { children: "@keyframes plugin-spin { to { transform: rotate(360deg); } }" })
|
|
294
298
|
] });
|
|
295
299
|
}
|
|
296
|
-
function
|
|
297
|
-
const t = X(
|
|
300
|
+
function be() {
|
|
301
|
+
const t = X(we);
|
|
298
302
|
if (!t)
|
|
299
303
|
throw new Error("usePluginContext must be used within a PluginContextProvider");
|
|
300
304
|
return t;
|
|
301
305
|
}
|
|
302
|
-
function
|
|
303
|
-
return
|
|
306
|
+
function gs() {
|
|
307
|
+
return be().settings;
|
|
304
308
|
}
|
|
305
|
-
const
|
|
306
|
-
const [e, n] =
|
|
309
|
+
const nt = ue(void 0), ys = ({ children: t }) => {
|
|
310
|
+
const [e, n] = B({}), r = W(0), s = M(() => {
|
|
307
311
|
const o = r.current + 1;
|
|
308
|
-
r.current = o,
|
|
312
|
+
r.current = o, Dt().then((a) => {
|
|
309
313
|
o === r.current && n(a);
|
|
310
314
|
}).catch((a) => {
|
|
311
315
|
o === r.current && console.error("Error fetching settings:", a);
|
|
312
316
|
});
|
|
313
317
|
}, []);
|
|
314
318
|
C.useEffect(() => {
|
|
315
|
-
const o =
|
|
319
|
+
const o = D("settings/changed", () => s());
|
|
316
320
|
return s(), () => {
|
|
317
321
|
r.current += 1, o();
|
|
318
322
|
};
|
|
@@ -320,8 +324,8 @@ const et = ue(void 0), ls = ({ children: t }) => {
|
|
|
320
324
|
const i = M(() => {
|
|
321
325
|
s();
|
|
322
326
|
}, [s]);
|
|
323
|
-
return /* @__PURE__ */
|
|
324
|
-
},
|
|
327
|
+
return /* @__PURE__ */ _(nt.Provider, { value: { settings: e, reload: i }, children: t });
|
|
328
|
+
}, Fn = {
|
|
325
329
|
height: 32,
|
|
326
330
|
focused: 0,
|
|
327
331
|
tabs: [],
|
|
@@ -345,22 +349,22 @@ const et = ue(void 0), ls = ({ children: t }) => {
|
|
|
345
349
|
},
|
|
346
350
|
fullscreenDrawer: () => {
|
|
347
351
|
}
|
|
348
|
-
}, xn = C.createContext(
|
|
352
|
+
}, xn = C.createContext(Fn), Pn = ue(void 0), Ln = C.createContext(void 0), rt = C.createContext(void 0), kn = 3e4, ms = ({ children: t }) => {
|
|
349
353
|
const [e, n] = C.useState([]), r = C.useCallback((a) => {
|
|
350
354
|
n((c) => [a, ...c]);
|
|
351
355
|
}, []), s = C.useCallback((a, c) => {
|
|
352
356
|
n(
|
|
353
|
-
(
|
|
357
|
+
(f) => f.map((u) => u.id === a ? { ...u, ...c } : u)
|
|
354
358
|
);
|
|
355
359
|
}, []), i = C.useCallback((a) => {
|
|
356
|
-
n((c) => c.filter((
|
|
360
|
+
n((c) => c.filter((f) => f.id !== a));
|
|
357
361
|
}, []);
|
|
358
362
|
C.useEffect(() => {
|
|
359
363
|
const a = [];
|
|
360
364
|
for (const c of e)
|
|
361
365
|
if (c.status !== "running") {
|
|
362
|
-
const
|
|
363
|
-
a.push(setTimeout(() => i(c.id),
|
|
366
|
+
const f = Date.now() - (c.completedAt ?? c.startedAt), u = Math.max(0, kn - f);
|
|
367
|
+
a.push(setTimeout(() => i(c.id), u));
|
|
364
368
|
}
|
|
365
369
|
return () => a.forEach(clearTimeout);
|
|
366
370
|
}, [e, i]);
|
|
@@ -368,7 +372,7 @@ const et = ue(void 0), ls = ({ children: t }) => {
|
|
|
368
372
|
() => ({ operations: e, addOperation: r, updateOperation: s, removeOperation: i }),
|
|
369
373
|
[e, r, s, i]
|
|
370
374
|
);
|
|
371
|
-
return /* @__PURE__ */
|
|
375
|
+
return /* @__PURE__ */ _(rt.Provider, { value: o, children: t });
|
|
372
376
|
};
|
|
373
377
|
var Se = function(t, e) {
|
|
374
378
|
return Se = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
@@ -377,7 +381,7 @@ var Se = function(t, e) {
|
|
|
377
381
|
for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (n[s] = r[s]);
|
|
378
382
|
}, Se(t, e);
|
|
379
383
|
};
|
|
380
|
-
function
|
|
384
|
+
function Mn(t, e) {
|
|
381
385
|
if (typeof e != "function" && e !== null)
|
|
382
386
|
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
|
|
383
387
|
Se(t, e);
|
|
@@ -386,28 +390,28 @@ function Ln(t, e) {
|
|
|
386
390
|
}
|
|
387
391
|
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
388
392
|
}
|
|
389
|
-
var ye = "Invariant Violation",
|
|
393
|
+
var ye = "Invariant Violation", Le = Object.setPrototypeOf, Un = Le === void 0 ? function(t, e) {
|
|
390
394
|
return t.__proto__ = e, t;
|
|
391
|
-
} :
|
|
395
|
+
} : Le, qn = (
|
|
392
396
|
/** @class */
|
|
393
397
|
function(t) {
|
|
394
|
-
|
|
398
|
+
Mn(e, t);
|
|
395
399
|
function e(n) {
|
|
396
400
|
n === void 0 && (n = ye);
|
|
397
401
|
var r = t.call(this, typeof n == "number" ? ye + ": " + n + " (see https://github.com/apollographql/invariant-packages)" : n) || this;
|
|
398
|
-
return r.framesToPop = 1, r.name = ye,
|
|
402
|
+
return r.framesToPop = 1, r.name = ye, Un(r, e.prototype), r;
|
|
399
403
|
}
|
|
400
404
|
return e;
|
|
401
405
|
}(Error)
|
|
402
406
|
);
|
|
403
407
|
function ve(t, e) {
|
|
404
408
|
if (!t)
|
|
405
|
-
throw new
|
|
409
|
+
throw new qn(e);
|
|
406
410
|
}
|
|
407
|
-
var
|
|
411
|
+
var st = ["debug", "log", "warn", "error", "silent"], $n = st.indexOf("log");
|
|
408
412
|
function re(t) {
|
|
409
413
|
return function() {
|
|
410
|
-
if (
|
|
414
|
+
if (st.indexOf(t) >= $n) {
|
|
411
415
|
var e = console[t] || console.log;
|
|
412
416
|
return e.apply(console, arguments);
|
|
413
417
|
}
|
|
@@ -416,9 +420,9 @@ function re(t) {
|
|
|
416
420
|
(function(t) {
|
|
417
421
|
t.debug = re("debug"), t.log = re("log"), t.warn = re("warn"), t.error = re("error");
|
|
418
422
|
})(ve || (ve = {}));
|
|
419
|
-
const
|
|
420
|
-
function
|
|
421
|
-
const e =
|
|
423
|
+
const ot = ue(void 0), Wn = () => X(ot);
|
|
424
|
+
function Gn(t) {
|
|
425
|
+
const e = Wn(), n = C.useRef(null), r = e == null ? void 0 : e.getExtensionPoint(t), s = M(
|
|
422
426
|
(o) => {
|
|
423
427
|
const a = [];
|
|
424
428
|
return e && a.push(e.subscribe(o)), r && a.push(r.subscribe(o)), () => {
|
|
@@ -432,8 +436,8 @@ function fs(t) {
|
|
|
432
436
|
if (!o) {
|
|
433
437
|
if (n.current && n.current.store === void 0)
|
|
434
438
|
return n.current.sentinel;
|
|
435
|
-
const
|
|
436
|
-
return n.current = { store: void 0, version: -1, sentinel:
|
|
439
|
+
const f = {};
|
|
440
|
+
return n.current = { store: void 0, version: -1, sentinel: f }, f;
|
|
437
441
|
}
|
|
438
442
|
const a = n.current;
|
|
439
443
|
if (a && a.store === o && a.version === o.version)
|
|
@@ -441,30 +445,30 @@ function fs(t) {
|
|
|
441
445
|
const c = {};
|
|
442
446
|
return n.current = { store: o, version: o.version, sentinel: c }, c;
|
|
443
447
|
}, [e, t]);
|
|
444
|
-
return
|
|
448
|
+
return Ct(s, i), e == null ? void 0 : e.getExtensionPoint(t);
|
|
445
449
|
}
|
|
446
|
-
const
|
|
450
|
+
const Es = ({ registry: t, children: e }) => {
|
|
447
451
|
const n = C.useRef(t);
|
|
448
452
|
return ve(
|
|
449
453
|
n.current === t,
|
|
450
454
|
"You can't change the extension registry after it has been rendered"
|
|
451
|
-
), /* @__PURE__ */
|
|
455
|
+
), /* @__PURE__ */ _(ot.Provider, { value: n.current, children: e });
|
|
452
456
|
}, me = (t) => {
|
|
453
457
|
if (!t || typeof t != "string")
|
|
454
458
|
throw new TypeError(`extensionName is required to be a string and can't be: "${t}" (${typeof t})`);
|
|
455
459
|
return t.trim();
|
|
456
460
|
};
|
|
457
|
-
class
|
|
461
|
+
class jn {
|
|
458
462
|
constructor(e) {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
463
|
+
P(this, "id");
|
|
464
|
+
P(this, "mode");
|
|
465
|
+
P(this, "_pluginId");
|
|
466
|
+
P(this, "_version", 0);
|
|
467
|
+
P(this, "_contributions", /* @__PURE__ */ new Map());
|
|
468
|
+
P(this, "_lookupCache", /* @__PURE__ */ new Map());
|
|
469
|
+
P(this, "_matcher");
|
|
470
|
+
P(this, "_select");
|
|
471
|
+
P(this, "_listeners", /* @__PURE__ */ new Set());
|
|
468
472
|
this.id = e.id, this.mode = e.mode ?? "multiple", this._pluginId = e.pluginId, this._matcher = e.matcher, this._select = e.select;
|
|
469
473
|
}
|
|
470
474
|
get pluginId() {
|
|
@@ -574,11 +578,11 @@ class $n {
|
|
|
574
578
|
e();
|
|
575
579
|
}
|
|
576
580
|
}
|
|
577
|
-
class
|
|
581
|
+
class Ss {
|
|
578
582
|
constructor(e) {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
583
|
+
P(this, "_stores", /* @__PURE__ */ new Map());
|
|
584
|
+
P(this, "_storeUnsubs", /* @__PURE__ */ new Map());
|
|
585
|
+
P(this, "_listeners", /* @__PURE__ */ new Set());
|
|
582
586
|
if (e != null && e.initialStores)
|
|
583
587
|
for (const n of e.initialStores)
|
|
584
588
|
this.addExtensionPoint(n);
|
|
@@ -595,7 +599,7 @@ class hs {
|
|
|
595
599
|
`Extension point "${n}" already exists (owned by "${s.pluginId ?? "unknown"}")`
|
|
596
600
|
);
|
|
597
601
|
}
|
|
598
|
-
const r = new
|
|
602
|
+
const r = new jn({ ...e, id: n });
|
|
599
603
|
this._stores.set(n, r), this._storeUnsubs.set(n, r.subscribe(() => this._notify())), this._notify();
|
|
600
604
|
}
|
|
601
605
|
/**
|
|
@@ -701,67 +705,67 @@ const $ = {
|
|
|
701
705
|
padding: "var(--ov-space-3)",
|
|
702
706
|
borderTop: "1px solid var(--ov-color-border-muted)"
|
|
703
707
|
}
|
|
704
|
-
},
|
|
708
|
+
}, it = ue(void 0), Qn = {
|
|
705
709
|
default: "info",
|
|
706
710
|
info: "info",
|
|
707
711
|
success: "success",
|
|
708
712
|
warning: "warning",
|
|
709
713
|
error: "danger"
|
|
710
|
-
},
|
|
711
|
-
const { toast: e } =
|
|
714
|
+
}, vs = ({ children: t }) => {
|
|
715
|
+
const { toast: e } = In(), [n, r] = C.useState([]), [s, i] = C.useState([]), [o, a] = C.useState(!1), [c, f] = C.useState(), [u, p] = C.useState(""), h = C.useRef(Date.now()), g = C.useRef(null);
|
|
712
716
|
C.useEffect(() => {
|
|
713
|
-
var
|
|
717
|
+
var E;
|
|
714
718
|
if (!o)
|
|
715
719
|
return;
|
|
716
|
-
const
|
|
717
|
-
(
|
|
718
|
-
const
|
|
720
|
+
const l = document.activeElement;
|
|
721
|
+
(E = g.current) == null || E.focus();
|
|
722
|
+
const d = (y) => {
|
|
719
723
|
y.key === "Escape" && (y.stopPropagation(), a(!1));
|
|
720
724
|
};
|
|
721
|
-
return document.addEventListener("keydown",
|
|
722
|
-
document.removeEventListener("keydown",
|
|
725
|
+
return document.addEventListener("keydown", d), () => {
|
|
726
|
+
document.removeEventListener("keydown", d), l instanceof HTMLElement && l.isConnected && l.focus();
|
|
723
727
|
};
|
|
724
728
|
}, [o]);
|
|
725
|
-
const m = (
|
|
726
|
-
r((
|
|
727
|
-
},
|
|
728
|
-
const y = typeof
|
|
729
|
-
let
|
|
729
|
+
const m = (l) => {
|
|
730
|
+
r((d) => [...d, l]);
|
|
731
|
+
}, w = (l, d, E) => {
|
|
732
|
+
const y = typeof l == "object";
|
|
733
|
+
let S = "", b = "info", v, R = 5e3, I;
|
|
730
734
|
if (y) {
|
|
731
|
-
if (
|
|
732
|
-
if (n.includes(
|
|
735
|
+
if (S = l.message, l.showOnce) {
|
|
736
|
+
if (n.includes(S))
|
|
733
737
|
return;
|
|
734
|
-
m(
|
|
738
|
+
m(S);
|
|
735
739
|
}
|
|
736
|
-
|
|
740
|
+
b = l.status, v = l.details, R = l.autoHideDuration ?? 5e3, I = l.actions;
|
|
737
741
|
} else
|
|
738
|
-
|
|
739
|
-
let
|
|
740
|
-
if (
|
|
742
|
+
S = l, b = d, v = E;
|
|
743
|
+
let O;
|
|
744
|
+
if (b === "error") {
|
|
741
745
|
const k = {
|
|
742
746
|
id: ++h.current,
|
|
743
|
-
message:
|
|
747
|
+
message: S,
|
|
744
748
|
details: v,
|
|
745
749
|
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
746
750
|
actions: I
|
|
747
751
|
};
|
|
748
|
-
i((
|
|
749
|
-
|
|
752
|
+
i((L) => [...L, k].slice(-20)), O = { label: "Details", onClick: () => {
|
|
753
|
+
f(k.id), a(!0);
|
|
750
754
|
} };
|
|
751
755
|
}
|
|
752
|
-
e(
|
|
753
|
-
severity:
|
|
754
|
-
title:
|
|
755
|
-
duration:
|
|
756
|
-
action:
|
|
756
|
+
e(b === "error" ? S : v ?? S, {
|
|
757
|
+
severity: Qn[b] ?? "info",
|
|
758
|
+
title: b !== "error" && v ? S : void 0,
|
|
759
|
+
duration: R,
|
|
760
|
+
action: O ?? (I == null ? void 0 : I[0])
|
|
757
761
|
});
|
|
758
762
|
};
|
|
759
|
-
return /* @__PURE__ */ q(
|
|
763
|
+
return /* @__PURE__ */ q(it.Provider, { value: { showSnackbar: w, openNotifications: () => {
|
|
760
764
|
a(!0);
|
|
761
765
|
}, notificationCount: s.length }, children: [
|
|
762
766
|
t,
|
|
763
767
|
o && /* @__PURE__ */ q(
|
|
764
|
-
|
|
768
|
+
Tn,
|
|
765
769
|
{
|
|
766
770
|
ref: g,
|
|
767
771
|
style: $.Panel,
|
|
@@ -772,11 +776,11 @@ const $ = {
|
|
|
772
776
|
"aria-label": "Notifications",
|
|
773
777
|
tabIndex: -1,
|
|
774
778
|
children: [
|
|
775
|
-
/* @__PURE__ */ q(
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */ q(
|
|
779
|
-
/* @__PURE__ */
|
|
779
|
+
/* @__PURE__ */ q(xe, { size: "sm", style: $.Header, children: [
|
|
780
|
+
/* @__PURE__ */ _(ee, { size: "sm", weight: "semibold", children: "Notifications" }),
|
|
781
|
+
/* @__PURE__ */ _(ee, { size: "xs", tone: "muted", children: s.length }),
|
|
782
|
+
/* @__PURE__ */ q(xe.Group, { style: $.HeaderActions, children: [
|
|
783
|
+
/* @__PURE__ */ _(
|
|
780
784
|
ne,
|
|
781
785
|
{
|
|
782
786
|
size: "sm",
|
|
@@ -785,12 +789,12 @@ const $ = {
|
|
|
785
789
|
title: "Clear history",
|
|
786
790
|
disabled: s.length === 0,
|
|
787
791
|
onClick: () => {
|
|
788
|
-
i([]),
|
|
792
|
+
i([]), f(void 0), p("");
|
|
789
793
|
},
|
|
790
|
-
children: /* @__PURE__ */
|
|
794
|
+
children: /* @__PURE__ */ _("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ _("path", { d: "m3 3 6 6m0-6L3 9M13 6h8M3 14h18M3 20h18" }) })
|
|
791
795
|
}
|
|
792
796
|
),
|
|
793
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ _(
|
|
794
798
|
ne,
|
|
795
799
|
{
|
|
796
800
|
size: "sm",
|
|
@@ -800,135 +804,135 @@ const $ = {
|
|
|
800
804
|
onClick: () => {
|
|
801
805
|
a(!1);
|
|
802
806
|
},
|
|
803
|
-
children: /* @__PURE__ */
|
|
807
|
+
children: /* @__PURE__ */ _("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ _("path", { d: "m6 9 6 6 6-6" }) })
|
|
804
808
|
}
|
|
805
809
|
)
|
|
806
810
|
] })
|
|
807
811
|
] }),
|
|
808
812
|
/* @__PURE__ */ q("div", { style: $.List, children: [
|
|
809
|
-
s.length === 0 && /* @__PURE__ */
|
|
810
|
-
s.slice().reverse().map((
|
|
811
|
-
var
|
|
812
|
-
const
|
|
813
|
+
s.length === 0 && /* @__PURE__ */ _(On, { size: "sm", title: "No recent errors", description: "Error details will appear here." }),
|
|
814
|
+
s.slice().reverse().map((l) => {
|
|
815
|
+
var E, y;
|
|
816
|
+
const d = c === l.id;
|
|
813
817
|
return /* @__PURE__ */ q("div", { style: $.Notice, children: [
|
|
814
818
|
/* @__PURE__ */ q("div", { style: $.Row, children: [
|
|
815
819
|
/* @__PURE__ */ q("svg", { style: $.ErrorIcon, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-label": "Error", role: "img", children: [
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
820
|
+
/* @__PURE__ */ _("circle", { cx: "12", cy: "12", r: "9" }),
|
|
821
|
+
/* @__PURE__ */ _("path", { d: "m9 9 6 6m0-6-6 6" })
|
|
818
822
|
] }),
|
|
819
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ _(
|
|
820
824
|
pe,
|
|
821
825
|
{
|
|
822
826
|
size: "sm",
|
|
823
827
|
variant: "ghost",
|
|
824
828
|
style: $.Message,
|
|
825
|
-
"aria-expanded":
|
|
826
|
-
"aria-controls": `notification-${
|
|
827
|
-
title:
|
|
829
|
+
"aria-expanded": d,
|
|
830
|
+
"aria-controls": `notification-${l.id}`,
|
|
831
|
+
title: l.message,
|
|
828
832
|
onClick: () => {
|
|
829
|
-
d
|
|
833
|
+
f(d ? void 0 : l.id), p("");
|
|
830
834
|
},
|
|
831
|
-
children: /* @__PURE__ */
|
|
835
|
+
children: /* @__PURE__ */ _(ee, { size: "sm", style: $.MessageText, truncate: !d, children: l.message })
|
|
832
836
|
}
|
|
833
837
|
),
|
|
834
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ _(
|
|
835
839
|
ne,
|
|
836
840
|
{
|
|
837
841
|
size: "sm",
|
|
838
842
|
variant: "ghost",
|
|
839
|
-
"aria-label":
|
|
840
|
-
title:
|
|
841
|
-
"aria-expanded":
|
|
842
|
-
"aria-controls": `notification-${
|
|
843
|
+
"aria-label": d ? "Collapse details" : "Expand details",
|
|
844
|
+
title: d ? "Collapse details" : "Expand details",
|
|
845
|
+
"aria-expanded": d,
|
|
846
|
+
"aria-controls": `notification-${l.id}`,
|
|
843
847
|
onClick: () => {
|
|
844
|
-
d
|
|
848
|
+
f(d ? void 0 : l.id), p("");
|
|
845
849
|
},
|
|
846
|
-
children: /* @__PURE__ */
|
|
850
|
+
children: /* @__PURE__ */ _("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ _("path", { d: d ? "m6 15 6-6 6 6" : "m6 9 6 6 6-6" }) })
|
|
847
851
|
}
|
|
848
852
|
),
|
|
849
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ _(
|
|
850
854
|
ne,
|
|
851
855
|
{
|
|
852
856
|
size: "sm",
|
|
853
857
|
variant: "ghost",
|
|
854
|
-
"aria-label": `Dismiss ${
|
|
858
|
+
"aria-label": `Dismiss ${l.message}`,
|
|
855
859
|
title: "Dismiss notification",
|
|
856
860
|
onClick: () => {
|
|
857
|
-
i((
|
|
861
|
+
i((S) => S.filter((b) => b.id !== l.id)), d && (f(void 0), p(""));
|
|
858
862
|
},
|
|
859
|
-
children: /* @__PURE__ */
|
|
863
|
+
children: /* @__PURE__ */ _("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ _("path", { d: "m6 6 12 12m0-12L6 18" }) })
|
|
860
864
|
}
|
|
861
865
|
)
|
|
862
866
|
] }),
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ _("div", { id: `notification-${l.id}`, hidden: !d, style: $.Details, children: d && /* @__PURE__ */ q($e, { children: [
|
|
868
|
+
/* @__PURE__ */ _(ee, { size: "xs", tone: "muted", children: /* @__PURE__ */ _("time", { dateTime: l.created, children: new Date(l.created).toLocaleString() }) }),
|
|
869
|
+
/* @__PURE__ */ _(An, { size: "sm", style: $.Code, children: (E = l.details) != null && E.length ? l.details : l.message }),
|
|
866
870
|
/* @__PURE__ */ q("div", { style: $.Actions, children: [
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
|
|
871
|
+
/* @__PURE__ */ _(pe, { size: "sm", variant: "ghost", onClick: async () => {
|
|
872
|
+
p("");
|
|
869
873
|
try {
|
|
870
|
-
await navigator.clipboard.writeText(`${
|
|
871
|
-
${
|
|
872
|
-
${
|
|
874
|
+
await navigator.clipboard.writeText(`${l.message}
|
|
875
|
+
${l.created}
|
|
876
|
+
${l.details ?? ""}`);
|
|
873
877
|
} catch {
|
|
874
|
-
|
|
878
|
+
p("Copy failed. Select the diagnostic text and copy it manually.");
|
|
875
879
|
}
|
|
876
880
|
}, children: "Copy details" }),
|
|
877
|
-
(y =
|
|
881
|
+
(y = l.actions) == null ? void 0 : y.map((S, b) => /* @__PURE__ */ _(pe, { size: "sm", variant: "outline", onClick: S.onClick, children: S.label }, `${S.label}-${b}`))
|
|
878
882
|
] })
|
|
879
883
|
] }) })
|
|
880
|
-
] },
|
|
884
|
+
] }, l.id);
|
|
881
885
|
})
|
|
882
886
|
] }),
|
|
883
|
-
|
|
887
|
+
u && /* @__PURE__ */ _(ee, { as: "p", size: "sm", role: "status", style: $.CopyError, children: u })
|
|
884
888
|
]
|
|
885
889
|
}
|
|
886
890
|
)
|
|
887
891
|
] });
|
|
888
892
|
}, Q = () => {
|
|
889
|
-
const t = X(
|
|
893
|
+
const t = X(it);
|
|
890
894
|
if (t === void 0)
|
|
891
895
|
throw new Error("useCustomSnackbar must be used within a CustomSnackbarProvider");
|
|
892
896
|
return t;
|
|
893
897
|
};
|
|
894
|
-
function
|
|
895
|
-
const e = X(
|
|
898
|
+
function A(t) {
|
|
899
|
+
const e = X(we), n = (e == null ? void 0 : e.pluginId) ?? t;
|
|
896
900
|
if (!n)
|
|
897
901
|
throw new Error(
|
|
898
902
|
"pluginID must be provided either via PluginContext or as an explicit parameter"
|
|
899
903
|
);
|
|
900
904
|
return n;
|
|
901
905
|
}
|
|
902
|
-
const
|
|
903
|
-
const n =
|
|
904
|
-
mutationFn: async () =>
|
|
905
|
-
onSuccess(
|
|
906
|
-
r.setQueryData(i,
|
|
906
|
+
const Cs = ({ pluginID: t, connectionID: e }) => {
|
|
907
|
+
const n = A(t), r = K(), { showSnackbar: s } = Q(), i = [n, "connection", "detail", e], { mutateAsync: o } = x({
|
|
908
|
+
mutationFn: async () => Ft(n, e),
|
|
909
|
+
onSuccess(p) {
|
|
910
|
+
r.setQueryData(i, p), r.invalidateQueries({
|
|
907
911
|
queryKey: ["EDITOR_SCHEMAS", n, e]
|
|
908
912
|
});
|
|
909
913
|
},
|
|
910
914
|
onError: U(s, "Failed to start connection")
|
|
911
|
-
}), { mutateAsync: a } =
|
|
912
|
-
mutationFn: async () =>
|
|
913
|
-
onSuccess(
|
|
914
|
-
r.setQueryData(i,
|
|
915
|
+
}), { mutateAsync: a } = x({
|
|
916
|
+
mutationFn: async () => We(n, e),
|
|
917
|
+
onSuccess(p) {
|
|
918
|
+
r.setQueryData(i, p);
|
|
915
919
|
},
|
|
916
920
|
onError: U(s, "Failed to stop connection")
|
|
917
|
-
}), { mutateAsync: c } =
|
|
918
|
-
mutationFn: async (
|
|
919
|
-
onSuccess(
|
|
920
|
-
s({ message: `Connection ${h} successfully updated`, status: "success" }), r.setQueryData(i,
|
|
921
|
+
}), { mutateAsync: c } = x({
|
|
922
|
+
mutationFn: async (p) => xt(n, p),
|
|
923
|
+
onSuccess(p, { name: h }) {
|
|
924
|
+
s({ message: `Connection ${h} successfully updated`, status: "success" }), r.setQueryData(i, p), r.setQueriesData(
|
|
921
925
|
{ queryKey: [n, "connection", "list"] },
|
|
922
|
-
(g) => g == null ? void 0 : g.map((m) => m.id === e ?
|
|
926
|
+
(g) => g == null ? void 0 : g.map((m) => m.id === e ? p : m)
|
|
923
927
|
);
|
|
924
928
|
},
|
|
925
929
|
onError: U(s, "Failed to update connection")
|
|
926
|
-
}), { mutateAsync:
|
|
927
|
-
mutationFn: async () =>
|
|
930
|
+
}), { mutateAsync: f } = x({
|
|
931
|
+
mutationFn: async () => Pt(n, e),
|
|
928
932
|
onSuccess() {
|
|
929
933
|
s({ message: "Connection successfully removed", status: "success" }), r.setQueryData(i, void 0), r.setQueriesData(
|
|
930
934
|
{ queryKey: [n, "connection", "list"] },
|
|
931
|
-
(
|
|
935
|
+
(p) => p == null ? void 0 : p.filter((h) => h.id !== e)
|
|
932
936
|
);
|
|
933
937
|
},
|
|
934
938
|
onError: U(s, "Failed to remove connection")
|
|
@@ -939,7 +943,7 @@ const ys = ({ pluginID: t, connectionID: e }) => {
|
|
|
939
943
|
*/
|
|
940
944
|
connection: F({
|
|
941
945
|
queryKey: i,
|
|
942
|
-
queryFn: async () =>
|
|
946
|
+
queryFn: async () => Lt(n, e)
|
|
943
947
|
}),
|
|
944
948
|
/**
|
|
945
949
|
* Start the connection
|
|
@@ -956,61 +960,61 @@ const ys = ({ pluginID: t, connectionID: e }) => {
|
|
|
956
960
|
/**
|
|
957
961
|
* Delete the connection
|
|
958
962
|
*/
|
|
959
|
-
deleteConnection:
|
|
963
|
+
deleteConnection: f
|
|
960
964
|
};
|
|
961
|
-
},
|
|
962
|
-
const e =
|
|
963
|
-
mutationFn: async (
|
|
965
|
+
}, Bn = (t) => [t, "connection", "list"], _s = ({ plugin: t }) => {
|
|
966
|
+
const e = A(t), n = K(), { showSnackbar: r } = Q(), s = Bn(e), { mutateAsync: i } = x({
|
|
967
|
+
mutationFn: async (f) => Ge(e, f.id),
|
|
964
968
|
onError: U(r, "Failed to start connection watch")
|
|
965
|
-
}), { mutateAsync: o } =
|
|
966
|
-
mutationFn: async (
|
|
969
|
+
}), { mutateAsync: o } = x({
|
|
970
|
+
mutationFn: async (f) => kt(e, f.id),
|
|
967
971
|
onError: U(r, "Failed to stop connection watch")
|
|
968
|
-
}), a = C.useCallback((
|
|
969
|
-
const
|
|
970
|
-
console.log("got update to connections",
|
|
972
|
+
}), a = C.useCallback((f) => {
|
|
973
|
+
const u = f.data;
|
|
974
|
+
console.log("got update to connections", u), n.setQueryData(s, u);
|
|
971
975
|
}, [n, s]);
|
|
972
976
|
return C.useEffect(() => {
|
|
973
|
-
const
|
|
977
|
+
const f = D(`${e}/connection/sync`, a);
|
|
974
978
|
return () => {
|
|
975
|
-
|
|
979
|
+
f();
|
|
976
980
|
};
|
|
977
981
|
}, [e, a]), {
|
|
978
982
|
connections: F({
|
|
979
983
|
queryKey: s,
|
|
980
984
|
queryFn: async () => {
|
|
981
985
|
try {
|
|
982
|
-
return await
|
|
983
|
-
} catch (
|
|
984
|
-
console.log(
|
|
986
|
+
return await Mt(e);
|
|
987
|
+
} catch (f) {
|
|
988
|
+
console.log(f), U(r, "Failed to load connections")(f);
|
|
985
989
|
}
|
|
986
990
|
return [];
|
|
987
991
|
},
|
|
988
992
|
staleTime: 3e4,
|
|
989
|
-
placeholderData:
|
|
993
|
+
placeholderData: et
|
|
990
994
|
}),
|
|
991
995
|
startWatch: i,
|
|
992
996
|
stopWatch: o
|
|
993
997
|
};
|
|
994
|
-
},
|
|
995
|
-
const n =
|
|
998
|
+
}, ws = ({ pluginID: t, connectionID: e }) => {
|
|
999
|
+
const n = A(t);
|
|
996
1000
|
return {
|
|
997
1001
|
/**
|
|
998
1002
|
* Get the connection
|
|
999
1003
|
*/
|
|
1000
1004
|
namespaces: F({
|
|
1001
1005
|
queryKey: [n, "connection", "namespaces", e],
|
|
1002
|
-
queryFn: async () =>
|
|
1006
|
+
queryFn: async () => Ut(n, e)
|
|
1003
1007
|
})
|
|
1004
1008
|
};
|
|
1005
|
-
},
|
|
1009
|
+
}, T = Nn(En, "WatchState");
|
|
1006
1010
|
function Ce(t) {
|
|
1007
1011
|
const e = Object.values(t.states), n = e.length;
|
|
1008
1012
|
let r = 0, s = 0, i = 0, o = 0;
|
|
1009
|
-
for (const
|
|
1010
|
-
|
|
1013
|
+
for (const u of e)
|
|
1014
|
+
u === T.WatchStateSynced && r++, (u === T.WatchStateError || u === T.WatchStateFailed) && s++, u === T.WatchStateForbidden && i++, u === T.WatchStateSkipped && o++;
|
|
1011
1015
|
const a = n - o, c = e.filter(
|
|
1012
|
-
(
|
|
1013
|
-
).length,
|
|
1016
|
+
(u) => u === T.WatchStateSynced || u === T.WatchStateError || u === T.WatchStateStopped || u === T.WatchStateFailed || u === T.WatchStateForbidden
|
|
1017
|
+
).length, f = a > 0 ? c / a : 0;
|
|
1014
1018
|
return {
|
|
1015
1019
|
pluginID: t.pluginID,
|
|
1016
1020
|
connectionID: t.connectionID,
|
|
@@ -1021,24 +1025,24 @@ function Ce(t) {
|
|
|
1021
1025
|
forbiddenCount: i,
|
|
1022
1026
|
skippedCount: o,
|
|
1023
1027
|
doneCount: c,
|
|
1024
|
-
progress:
|
|
1028
|
+
progress: f
|
|
1025
1029
|
};
|
|
1026
1030
|
}
|
|
1027
1031
|
function ce(t) {
|
|
1028
1032
|
return t.watchedTotal > 0 && t.doneCount >= t.watchedTotal;
|
|
1029
1033
|
}
|
|
1030
|
-
function
|
|
1034
|
+
function at(t) {
|
|
1031
1035
|
return t.some((e) => !ce(e));
|
|
1032
1036
|
}
|
|
1033
|
-
function
|
|
1037
|
+
function ct(t) {
|
|
1034
1038
|
const e = t.reduce((r, s) => r + s.watchedTotal, 0);
|
|
1035
1039
|
return e === 0 ? 0 : t.reduce((r, s) => r + s.doneCount, 0) / e;
|
|
1036
1040
|
}
|
|
1037
|
-
function
|
|
1041
|
+
function Re(t) {
|
|
1038
1042
|
return `${t.pluginId}/${t.connection}`;
|
|
1039
1043
|
}
|
|
1040
|
-
function
|
|
1041
|
-
const n =
|
|
1044
|
+
function ut(t, e) {
|
|
1045
|
+
const n = Re(e);
|
|
1042
1046
|
t.has(n) || t.set(n, {
|
|
1043
1047
|
states: {},
|
|
1044
1048
|
pluginID: e.pluginId,
|
|
@@ -1047,163 +1051,163 @@ function at(t, e) {
|
|
|
1047
1051
|
const r = t.get(n);
|
|
1048
1052
|
return r.states[e.resourceKey] = e.state, r;
|
|
1049
1053
|
}
|
|
1050
|
-
function
|
|
1051
|
-
const [t, e] =
|
|
1054
|
+
function bs() {
|
|
1055
|
+
const [t, e] = B(/* @__PURE__ */ new Set()), [n, r] = B({}), [s, i] = B(/* @__PURE__ */ new Map()), o = W(/* @__PURE__ */ new Map()), [a, c] = B(/* @__PURE__ */ new Map());
|
|
1052
1056
|
j(() => {
|
|
1053
|
-
const y =
|
|
1054
|
-
const v =
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1057
|
+
const y = D("plugin/crash_recovery_failed", (b) => {
|
|
1058
|
+
const v = b.data, R = v == null ? void 0 : v.pluginID;
|
|
1059
|
+
R && c((I) => {
|
|
1060
|
+
const O = new Map(I);
|
|
1061
|
+
return O.set(R, v.error ?? "Crash recovery failed"), O;
|
|
1058
1062
|
});
|
|
1059
|
-
}),
|
|
1060
|
-
const v =
|
|
1061
|
-
|
|
1062
|
-
if (!I.has(
|
|
1063
|
-
const
|
|
1064
|
-
return
|
|
1063
|
+
}), S = D("plugin/recovered", (b) => {
|
|
1064
|
+
const v = b.data, R = v == null ? void 0 : v.pluginID;
|
|
1065
|
+
R && c((I) => {
|
|
1066
|
+
if (!I.has(R)) return I;
|
|
1067
|
+
const O = new Map(I);
|
|
1068
|
+
return O.delete(R), O;
|
|
1065
1069
|
});
|
|
1066
1070
|
});
|
|
1067
1071
|
return () => {
|
|
1068
|
-
y(),
|
|
1072
|
+
y(), S();
|
|
1069
1073
|
};
|
|
1070
1074
|
}, []), j(() => {
|
|
1071
|
-
|
|
1075
|
+
qt().then((y) => {
|
|
1072
1076
|
if (!y) return;
|
|
1073
|
-
const
|
|
1074
|
-
for (const [
|
|
1077
|
+
const S = {}, b = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Map();
|
|
1078
|
+
for (const [R, I] of Object.entries(y))
|
|
1075
1079
|
if (I) {
|
|
1076
|
-
|
|
1077
|
-
for (const
|
|
1078
|
-
if (!
|
|
1079
|
-
const k = `${
|
|
1080
|
-
|
|
1081
|
-
const
|
|
1082
|
-
pluginID:
|
|
1083
|
-
connectionID:
|
|
1080
|
+
S[R] = I.map((O) => O.connection);
|
|
1081
|
+
for (const O of I) {
|
|
1082
|
+
if (!O.started) continue;
|
|
1083
|
+
const k = `${R}/${O.connection.id}`;
|
|
1084
|
+
b.add(k);
|
|
1085
|
+
const L = {
|
|
1086
|
+
pluginID: R,
|
|
1087
|
+
connectionID: O.connection.id,
|
|
1084
1088
|
states: {}
|
|
1085
1089
|
};
|
|
1086
|
-
if (
|
|
1087
|
-
for (const [fe,
|
|
1088
|
-
|
|
1089
|
-
o.current.set(k,
|
|
1090
|
+
if (O.resources)
|
|
1091
|
+
for (const [fe, Et] of Object.entries(O.resources))
|
|
1092
|
+
L.states[fe] = Et;
|
|
1093
|
+
o.current.set(k, L), v.set(k, Ce(L));
|
|
1090
1094
|
}
|
|
1091
1095
|
}
|
|
1092
|
-
r(
|
|
1096
|
+
r(S), e(b), i(v);
|
|
1093
1097
|
}).catch(() => {
|
|
1094
1098
|
});
|
|
1095
|
-
}, []), j(() =>
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1098
|
-
const I = new Set(
|
|
1099
|
+
}, []), j(() => D("connection/status", (S) => {
|
|
1100
|
+
const b = S.data, v = `${b.pluginID}/${b.connectionID}`;
|
|
1101
|
+
b.status === "DISCONNECTED" ? (e((R) => {
|
|
1102
|
+
const I = new Set(R);
|
|
1099
1103
|
return I.delete(v), I;
|
|
1100
|
-
}), i((
|
|
1101
|
-
const I = new Map(
|
|
1104
|
+
}), i((R) => {
|
|
1105
|
+
const I = new Map(R);
|
|
1102
1106
|
return I.delete(v), I;
|
|
1103
|
-
}), o.current.delete(v)) : e((
|
|
1104
|
-
const I = new Set(
|
|
1107
|
+
}), o.current.delete(v)) : e((R) => {
|
|
1108
|
+
const I = new Set(R);
|
|
1105
1109
|
return I.add(v), I;
|
|
1106
|
-
}),
|
|
1107
|
-
if (!
|
|
1110
|
+
}), Wt().then((R) => {
|
|
1111
|
+
if (!R) return;
|
|
1108
1112
|
const I = {};
|
|
1109
|
-
for (const [
|
|
1110
|
-
k != null && (I[
|
|
1113
|
+
for (const [O, k] of Object.entries(R))
|
|
1114
|
+
k != null && (I[O] = k);
|
|
1111
1115
|
r(I);
|
|
1112
1116
|
}).catch(() => {
|
|
1113
1117
|
});
|
|
1114
1118
|
}), []);
|
|
1115
|
-
const
|
|
1116
|
-
const
|
|
1119
|
+
const f = M((y) => {
|
|
1120
|
+
const S = y.data, b = Re(S);
|
|
1117
1121
|
e((I) => {
|
|
1118
|
-
if (I.has(
|
|
1119
|
-
const
|
|
1120
|
-
return
|
|
1122
|
+
if (I.has(b)) return I;
|
|
1123
|
+
const O = new Set(I);
|
|
1124
|
+
return O.add(b), O;
|
|
1121
1125
|
});
|
|
1122
|
-
const v =
|
|
1126
|
+
const v = ut(o.current, S), R = Ce(v);
|
|
1123
1127
|
i((I) => {
|
|
1124
|
-
const
|
|
1125
|
-
return
|
|
1128
|
+
const O = new Map(I);
|
|
1129
|
+
return O.set(b, R), O;
|
|
1126
1130
|
});
|
|
1127
1131
|
}, []);
|
|
1128
|
-
j(() =>
|
|
1129
|
-
const
|
|
1130
|
-
await
|
|
1131
|
-
}, []),
|
|
1132
|
-
await
|
|
1132
|
+
j(() => D("watch/STATE", f), [f]);
|
|
1133
|
+
const u = M(async (y, S) => {
|
|
1134
|
+
await We(y, S);
|
|
1135
|
+
}, []), p = M(async (y, S) => {
|
|
1136
|
+
await Ge(y, S);
|
|
1133
1137
|
}, []), h = M(async (y) => {
|
|
1134
|
-
const
|
|
1135
|
-
c((
|
|
1136
|
-
if (!
|
|
1137
|
-
const v = new Map(
|
|
1138
|
+
const S = a.get(y);
|
|
1139
|
+
c((b) => {
|
|
1140
|
+
if (!b.has(y)) return b;
|
|
1141
|
+
const v = new Map(b);
|
|
1138
1142
|
return v.delete(y), v;
|
|
1139
1143
|
});
|
|
1140
1144
|
try {
|
|
1141
|
-
await
|
|
1142
|
-
} catch (
|
|
1145
|
+
await $t(y);
|
|
1146
|
+
} catch (b) {
|
|
1143
1147
|
throw c((v) => {
|
|
1144
|
-
const
|
|
1145
|
-
return
|
|
1146
|
-
}),
|
|
1148
|
+
const R = new Map(v);
|
|
1149
|
+
return R.set(y, S ?? "Reload failed"), R;
|
|
1150
|
+
}), b;
|
|
1147
1151
|
}
|
|
1148
1152
|
}, [a]), g = [];
|
|
1149
1153
|
for (const y of t) {
|
|
1150
|
-
const [
|
|
1154
|
+
const [S, b] = y.split("/", 2), R = (n[S] ?? []).find((fe) => fe.id === b), I = s.get(y), O = I != null && !ce(I), k = I != null && I.errorCount > 0, L = a.get(S);
|
|
1151
1155
|
g.push({
|
|
1152
|
-
pluginID:
|
|
1153
|
-
connectionID:
|
|
1154
|
-
name: (
|
|
1155
|
-
avatar: (
|
|
1156
|
+
pluginID: S,
|
|
1157
|
+
connectionID: b,
|
|
1158
|
+
name: (R == null ? void 0 : R.name) ?? b,
|
|
1159
|
+
avatar: (R == null ? void 0 : R.avatar) ?? "",
|
|
1156
1160
|
isStarted: !0,
|
|
1157
1161
|
sync: I,
|
|
1158
|
-
isSyncing:
|
|
1159
|
-
hasErrors: k ||
|
|
1160
|
-
pluginFailed:
|
|
1161
|
-
pluginError:
|
|
1162
|
+
isSyncing: O,
|
|
1163
|
+
hasErrors: k || L != null,
|
|
1164
|
+
pluginFailed: L != null,
|
|
1165
|
+
pluginError: L
|
|
1162
1166
|
});
|
|
1163
1167
|
}
|
|
1164
1168
|
const m = /* @__PURE__ */ new Map();
|
|
1165
1169
|
for (const y of g) {
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1170
|
+
const S = m.get(y.pluginID) ?? [];
|
|
1171
|
+
S.push(y), m.set(y.pluginID, S);
|
|
1168
1172
|
}
|
|
1169
|
-
const
|
|
1173
|
+
const w = Array.from(s.values()), l = g.filter((y) => y.isSyncing), d = g.filter((y) => y.hasErrors), E = g.filter((y) => y.pluginFailed);
|
|
1170
1174
|
return {
|
|
1171
1175
|
entries: g,
|
|
1172
1176
|
grouped: m,
|
|
1173
1177
|
connectedCount: g.length,
|
|
1174
|
-
syncingCount:
|
|
1175
|
-
errorCount:
|
|
1176
|
-
failedCount:
|
|
1177
|
-
hasSyncing:
|
|
1178
|
-
aggregateProgress:
|
|
1179
|
-
disconnect:
|
|
1180
|
-
retryWatch:
|
|
1178
|
+
syncingCount: l.length,
|
|
1179
|
+
errorCount: d.length,
|
|
1180
|
+
failedCount: E.length,
|
|
1181
|
+
hasSyncing: at(w),
|
|
1182
|
+
aggregateProgress: ct(w),
|
|
1183
|
+
disconnect: u,
|
|
1184
|
+
retryWatch: p,
|
|
1181
1185
|
retryPlugin: h
|
|
1182
1186
|
};
|
|
1183
1187
|
}
|
|
1184
|
-
function
|
|
1188
|
+
function Hn(t, e) {
|
|
1185
1189
|
return e === null ? t === null : Array.isArray(e) ? Array.isArray(t) : typeof e == "object" ? typeof t == "object" && t !== null && !Array.isArray(t) : typeof t == typeof e;
|
|
1186
1190
|
}
|
|
1187
|
-
function
|
|
1188
|
-
const r =
|
|
1191
|
+
function Rs(t, e, n) {
|
|
1192
|
+
const r = A(t), s = K(), i = [r, "data", e], o = F({
|
|
1189
1193
|
queryKey: i,
|
|
1190
1194
|
queryFn: async () => {
|
|
1191
|
-
const c = await
|
|
1192
|
-
return c == null ? n :
|
|
1195
|
+
const c = await Gt(r, e);
|
|
1196
|
+
return c == null ? n : Hn(c, n) ? c : (console.warn(
|
|
1193
1197
|
`[usePluginData] stored value for "${e}" has unexpected type (expected ${Array.isArray(n) ? "array" : typeof n}, got ${Array.isArray(c) ? "array" : typeof c}). Using default.`
|
|
1194
1198
|
), n);
|
|
1195
1199
|
}
|
|
1196
|
-
}), a =
|
|
1200
|
+
}), a = x({
|
|
1197
1201
|
mutationFn: async (c) => {
|
|
1198
|
-
await
|
|
1202
|
+
await jt(r, e, c);
|
|
1199
1203
|
},
|
|
1200
1204
|
onMutate: async (c) => {
|
|
1201
1205
|
await s.cancelQueries({ queryKey: i });
|
|
1202
|
-
const
|
|
1203
|
-
return s.setQueryData(i, c), { previous:
|
|
1206
|
+
const f = s.getQueryData(i);
|
|
1207
|
+
return s.setQueryData(i, c), { previous: f };
|
|
1204
1208
|
},
|
|
1205
|
-
onError: (c,
|
|
1206
|
-
(
|
|
1209
|
+
onError: (c, f, u) => {
|
|
1210
|
+
(u == null ? void 0 : u.previous) !== void 0 && s.setQueryData(i, u.previous);
|
|
1207
1211
|
},
|
|
1208
1212
|
onSettled: () => {
|
|
1209
1213
|
s.invalidateQueries({ queryKey: i });
|
|
@@ -1217,23 +1221,23 @@ function vs(t, e, n) {
|
|
|
1217
1221
|
isLoading: o.isLoading
|
|
1218
1222
|
};
|
|
1219
1223
|
}
|
|
1220
|
-
const
|
|
1221
|
-
const t = X(
|
|
1224
|
+
const Is = () => {
|
|
1225
|
+
const t = X(Pn);
|
|
1222
1226
|
if (!t) throw new Error("useRightDrawer must be used within a RightDrawerProvider");
|
|
1223
1227
|
return t;
|
|
1224
|
-
},
|
|
1228
|
+
}, lt = () => {
|
|
1225
1229
|
const t = X(xn);
|
|
1226
1230
|
if (t === void 0)
|
|
1227
1231
|
throw new Error("useBottomDrawer must be used within a BottomDrawerProvider");
|
|
1228
1232
|
return t;
|
|
1229
|
-
},
|
|
1230
|
-
const e =
|
|
1233
|
+
}, Ts = ({ pluginID: t }) => {
|
|
1234
|
+
const e = A(t), { showSnackbar: n } = Q(), { createTab: r, updateTab: s } = lt();
|
|
1231
1235
|
return {
|
|
1232
|
-
createSession:
|
|
1233
|
-
mutationFn: async ({ connectionID: o, icon: a, label: c, opts:
|
|
1234
|
-
const
|
|
1236
|
+
createSession: x({
|
|
1237
|
+
mutationFn: async ({ connectionID: o, icon: a, label: c, opts: f }) => {
|
|
1238
|
+
const u = `pending-${crypto.randomUUID()}`;
|
|
1235
1239
|
r({
|
|
1236
|
-
id:
|
|
1240
|
+
id: u,
|
|
1237
1241
|
title: c ?? "Connecting...",
|
|
1238
1242
|
variant: "terminal",
|
|
1239
1243
|
icon: a ?? "LuSquareTerminal",
|
|
@@ -1241,56 +1245,56 @@ const Cs = () => {
|
|
|
1241
1245
|
status: "connecting",
|
|
1242
1246
|
pluginID: e,
|
|
1243
1247
|
connectionID: o,
|
|
1244
|
-
opts: { ...
|
|
1248
|
+
opts: { ...f }
|
|
1245
1249
|
}
|
|
1246
1250
|
});
|
|
1247
|
-
const
|
|
1251
|
+
const p = Sn.createFrom({
|
|
1248
1252
|
command: ["/bin/bash"],
|
|
1249
1253
|
tty: !0,
|
|
1250
|
-
...
|
|
1254
|
+
...f
|
|
1251
1255
|
});
|
|
1252
1256
|
try {
|
|
1253
|
-
const h = await
|
|
1257
|
+
const h = await Qt(e, o, p);
|
|
1254
1258
|
if (!h) throw new Error("Failed to create session: null response");
|
|
1255
1259
|
s(
|
|
1256
|
-
{ id:
|
|
1260
|
+
{ id: u },
|
|
1257
1261
|
{
|
|
1258
1262
|
id: h.id,
|
|
1259
1263
|
title: c ?? `Session ${h.id.substring(0, 8)}`,
|
|
1260
|
-
properties: { status: "connected", pluginID: e, connectionID: o, opts: { ...
|
|
1264
|
+
properties: { status: "connected", pluginID: e, connectionID: o, opts: { ...f } }
|
|
1261
1265
|
}
|
|
1262
1266
|
);
|
|
1263
1267
|
} catch (h) {
|
|
1264
1268
|
const g = H(h);
|
|
1265
1269
|
s(
|
|
1266
|
-
{ id:
|
|
1270
|
+
{ id: u },
|
|
1267
1271
|
{
|
|
1268
|
-
properties: { status: "error", error: g.detail, pluginID: e, connectionID: o, opts: { ...
|
|
1272
|
+
properties: { status: "error", error: g.detail, pluginID: e, connectionID: o, opts: { ...f } }
|
|
1269
1273
|
}
|
|
1270
1274
|
), z(n, h, "Failed to start session");
|
|
1271
1275
|
}
|
|
1272
1276
|
}
|
|
1273
1277
|
}).mutateAsync
|
|
1274
1278
|
};
|
|
1275
|
-
},
|
|
1276
|
-
const e =
|
|
1279
|
+
}, Os = ({ pluginID: t }) => {
|
|
1280
|
+
const e = A(t), { showSnackbar: n } = Q(), { createTab: r } = lt(), s = x({
|
|
1277
1281
|
mutationFn: async ({
|
|
1278
1282
|
connectionID: o,
|
|
1279
1283
|
resourceKey: a,
|
|
1280
1284
|
resourceID: c,
|
|
1281
|
-
resourceData:
|
|
1282
|
-
icon:
|
|
1283
|
-
label:
|
|
1285
|
+
resourceData: f,
|
|
1286
|
+
icon: u,
|
|
1287
|
+
label: p,
|
|
1284
1288
|
target: h,
|
|
1285
1289
|
follow: g = !0,
|
|
1286
1290
|
tailLines: m = 1e3,
|
|
1287
|
-
params:
|
|
1291
|
+
params: w
|
|
1288
1292
|
}) => {
|
|
1289
|
-
const
|
|
1293
|
+
const l = vn.createFrom({
|
|
1290
1294
|
resource_key: a,
|
|
1291
1295
|
resource_id: c,
|
|
1292
|
-
resource_data:
|
|
1293
|
-
options:
|
|
1296
|
+
resource_data: f,
|
|
1297
|
+
options: Cn.createFrom({
|
|
1294
1298
|
target: h ?? "",
|
|
1295
1299
|
follow: g,
|
|
1296
1300
|
include_previous: !1,
|
|
@@ -1299,21 +1303,21 @@ const Cs = () => {
|
|
|
1299
1303
|
since_seconds: 0,
|
|
1300
1304
|
limit_bytes: 0,
|
|
1301
1305
|
include_source_events: !0,
|
|
1302
|
-
params:
|
|
1306
|
+
params: w ?? {}
|
|
1303
1307
|
})
|
|
1304
|
-
}),
|
|
1305
|
-
if (!
|
|
1308
|
+
}), d = await Bt(e, o, l);
|
|
1309
|
+
if (!d) throw new Error("Failed to create log session: null response");
|
|
1306
1310
|
return r({
|
|
1307
|
-
id:
|
|
1308
|
-
title:
|
|
1311
|
+
id: d.id,
|
|
1312
|
+
title: p ?? `Logs ${d.id.substring(0, 8)}`,
|
|
1309
1313
|
variant: "logs",
|
|
1310
|
-
icon:
|
|
1311
|
-
}),
|
|
1314
|
+
icon: u ?? "LuLogs"
|
|
1315
|
+
}), d;
|
|
1312
1316
|
},
|
|
1313
1317
|
onError: U(n, "Failed to start log session")
|
|
1314
|
-
}), i =
|
|
1318
|
+
}), i = x({
|
|
1315
1319
|
mutationFn: async (o) => {
|
|
1316
|
-
await
|
|
1320
|
+
await Ht(o);
|
|
1317
1321
|
},
|
|
1318
1322
|
onError: U(n, "Failed to close log session")
|
|
1319
1323
|
});
|
|
@@ -1321,17 +1325,17 @@ const Cs = () => {
|
|
|
1321
1325
|
createLogSession: s.mutateAsync,
|
|
1322
1326
|
closeLogSession: i.mutateAsync
|
|
1323
1327
|
};
|
|
1324
|
-
},
|
|
1328
|
+
}, As = () => F({
|
|
1325
1329
|
queryKey: ["metric", "providers"],
|
|
1326
1330
|
queryFn: Kt,
|
|
1327
1331
|
staleTime: 3e4
|
|
1328
|
-
}),
|
|
1332
|
+
}), Kn = (t) => F({
|
|
1329
1333
|
queryKey: ["metric", "providers", t],
|
|
1330
|
-
queryFn: () =>
|
|
1334
|
+
queryFn: () => zt(t),
|
|
1331
1335
|
enabled: !!t,
|
|
1332
1336
|
staleTime: 3e4
|
|
1333
|
-
}),
|
|
1334
|
-
var
|
|
1337
|
+
}), Ns = (t) => {
|
|
1338
|
+
var l, d;
|
|
1335
1339
|
const {
|
|
1336
1340
|
connectionID: e,
|
|
1337
1341
|
resourceKey: n,
|
|
@@ -1342,15 +1346,15 @@ const Cs = () => {
|
|
|
1342
1346
|
shape: a = 0,
|
|
1343
1347
|
// CURRENT
|
|
1344
1348
|
timeRange: c,
|
|
1345
|
-
refreshInterval:
|
|
1346
|
-
enabled:
|
|
1349
|
+
refreshInterval: f = 0,
|
|
1350
|
+
enabled: u = !0
|
|
1347
1351
|
} = t, {
|
|
1348
|
-
data:
|
|
1352
|
+
data: p,
|
|
1349
1353
|
isLoading: h
|
|
1350
|
-
} =
|
|
1354
|
+
} = Kn(n), g = p ?? [], m = c ? Math.max(
|
|
1351
1355
|
Math.floor((c.end.getTime() - c.start.getTime()) / 250),
|
|
1352
1356
|
15e3
|
|
1353
|
-
) * 1e6 : 0,
|
|
1357
|
+
) * 1e6 : 0, w = F({
|
|
1354
1358
|
queryKey: [
|
|
1355
1359
|
"metric",
|
|
1356
1360
|
"query",
|
|
@@ -1360,11 +1364,11 @@ const Cs = () => {
|
|
|
1360
1364
|
s,
|
|
1361
1365
|
o,
|
|
1362
1366
|
a,
|
|
1363
|
-
(
|
|
1364
|
-
(
|
|
1367
|
+
(l = c == null ? void 0 : c.start) == null ? void 0 : l.getTime(),
|
|
1368
|
+
(d = c == null ? void 0 : c.end) == null ? void 0 : d.getTime()
|
|
1365
1369
|
],
|
|
1366
1370
|
queryFn: async () => {
|
|
1367
|
-
const
|
|
1371
|
+
const E = await Vt(
|
|
1368
1372
|
e,
|
|
1369
1373
|
n,
|
|
1370
1374
|
r,
|
|
@@ -1376,25 +1380,25 @@ const Cs = () => {
|
|
|
1376
1380
|
((c == null ? void 0 : c.end) ?? /* @__PURE__ */ new Date(0)).toISOString(),
|
|
1377
1381
|
m
|
|
1378
1382
|
), y = {};
|
|
1379
|
-
for (const [
|
|
1380
|
-
|
|
1383
|
+
for (const [S, b] of Object.entries(E))
|
|
1384
|
+
b != null && (y[S] = b);
|
|
1381
1385
|
return y;
|
|
1382
1386
|
},
|
|
1383
|
-
enabled:
|
|
1384
|
-
refetchInterval:
|
|
1387
|
+
enabled: u && !!e && !!n && (n.startsWith("cluster::") || !!r) && g.length > 0,
|
|
1388
|
+
refetchInterval: f > 0 ? f : void 0,
|
|
1385
1389
|
staleTime: 5e3,
|
|
1386
1390
|
// Keep previous data visible while fetching new data (e.g. on time range change)
|
|
1387
1391
|
// to prevent the chart from blinking empty.
|
|
1388
|
-
placeholderData:
|
|
1392
|
+
placeholderData: et
|
|
1389
1393
|
});
|
|
1390
1394
|
return {
|
|
1391
|
-
data:
|
|
1395
|
+
data: w.data ?? void 0,
|
|
1392
1396
|
providers: g,
|
|
1393
|
-
isLoading: h ||
|
|
1394
|
-
error:
|
|
1395
|
-
refetch:
|
|
1397
|
+
isLoading: h || w.isLoading,
|
|
1398
|
+
error: w.error,
|
|
1399
|
+
refetch: w.refetch
|
|
1396
1400
|
};
|
|
1397
|
-
},
|
|
1401
|
+
}, Ds = (t) => {
|
|
1398
1402
|
const {
|
|
1399
1403
|
pluginID: e,
|
|
1400
1404
|
connectionID: n,
|
|
@@ -1404,11 +1408,11 @@ const Cs = () => {
|
|
|
1404
1408
|
resourceData: o = {},
|
|
1405
1409
|
metricIDs: a = [],
|
|
1406
1410
|
interval: c = 1e4,
|
|
1407
|
-
enabled:
|
|
1408
|
-
} = t,
|
|
1409
|
-
if (!(!
|
|
1411
|
+
enabled: f = !0
|
|
1412
|
+
} = t, u = A(e), [p, h] = B(null), [g, m] = B(null), [w, l] = B(!1), [d, E] = B(null), y = W(null), S = M(async () => {
|
|
1413
|
+
if (!(!f || !u || !n || !r || !s))
|
|
1410
1414
|
try {
|
|
1411
|
-
const v = await
|
|
1415
|
+
const v = await Yt(u, n, {
|
|
1412
1416
|
resource_key: r,
|
|
1413
1417
|
resource_id: s,
|
|
1414
1418
|
resource_namespace: i,
|
|
@@ -1417,71 +1421,71 @@ const Cs = () => {
|
|
|
1417
1421
|
interval: c * 1e6
|
|
1418
1422
|
// ms to nanoseconds for Go time.Duration
|
|
1419
1423
|
});
|
|
1420
|
-
m(v),
|
|
1421
|
-
const
|
|
1422
|
-
const k =
|
|
1424
|
+
m(v), l(!0), E(null);
|
|
1425
|
+
const R = D(`core/metrics/data/${v}`, (O) => {
|
|
1426
|
+
const k = O.data;
|
|
1423
1427
|
try {
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1426
|
-
} catch (
|
|
1427
|
-
console.error("Failed to parse metric stream data:",
|
|
1428
|
+
const L = JSON.parse(k);
|
|
1429
|
+
L.results && h(L.results);
|
|
1430
|
+
} catch (L) {
|
|
1431
|
+
console.error("Failed to parse metric stream data:", L);
|
|
1428
1432
|
}
|
|
1429
|
-
}), I =
|
|
1430
|
-
const k =
|
|
1433
|
+
}), I = D(`core/metrics/error/${v}`, (O) => {
|
|
1434
|
+
const k = O.data;
|
|
1431
1435
|
try {
|
|
1432
|
-
const
|
|
1433
|
-
|
|
1436
|
+
const L = JSON.parse(k);
|
|
1437
|
+
E(L.error || "Unknown error");
|
|
1434
1438
|
} catch {
|
|
1435
|
-
|
|
1439
|
+
E("Failed to parse metric stream error");
|
|
1436
1440
|
}
|
|
1437
1441
|
});
|
|
1438
1442
|
y.current = () => {
|
|
1439
|
-
|
|
1443
|
+
R(), I();
|
|
1440
1444
|
};
|
|
1441
1445
|
} catch (v) {
|
|
1442
|
-
|
|
1446
|
+
E(v instanceof Error ? v.message : String(v));
|
|
1443
1447
|
}
|
|
1444
|
-
}, [
|
|
1448
|
+
}, [u, n, r, s, i, a, c, f]), b = M(async () => {
|
|
1445
1449
|
if (g)
|
|
1446
1450
|
try {
|
|
1447
1451
|
await De(g);
|
|
1448
1452
|
} catch (v) {
|
|
1449
1453
|
console.error("Failed to unsubscribe:", v);
|
|
1450
1454
|
}
|
|
1451
|
-
y.current && (y.current(), y.current = null), m(null),
|
|
1455
|
+
y.current && (y.current(), y.current = null), m(null), l(!1);
|
|
1452
1456
|
}, [g]);
|
|
1453
1457
|
return j(() => () => {
|
|
1454
1458
|
g && De(g).catch(console.error), y.current && y.current();
|
|
1455
1459
|
}, [g]), {
|
|
1456
|
-
data:
|
|
1460
|
+
data: p,
|
|
1457
1461
|
subscriptionID: g,
|
|
1458
|
-
isStreaming:
|
|
1459
|
-
error:
|
|
1460
|
-
start:
|
|
1461
|
-
stop:
|
|
1462
|
+
isStreaming: w,
|
|
1463
|
+
error: d,
|
|
1464
|
+
start: S,
|
|
1465
|
+
stop: b
|
|
1462
1466
|
};
|
|
1463
1467
|
}, J = ["networker", "portforward", "all-sessions"];
|
|
1464
|
-
function
|
|
1465
|
-
const { showSnackbar: t } = Q(), e =
|
|
1468
|
+
function Fs() {
|
|
1469
|
+
const { showSnackbar: t } = Q(), e = K(), n = F({
|
|
1466
1470
|
queryKey: [...J],
|
|
1467
|
-
queryFn: async () =>
|
|
1471
|
+
queryFn: async () => Jt().catch((i) => {
|
|
1468
1472
|
if (H(i).detail.includes("not found")) return [];
|
|
1469
1473
|
throw i;
|
|
1470
1474
|
}),
|
|
1471
1475
|
retry: !1
|
|
1472
1476
|
});
|
|
1473
1477
|
j(() => {
|
|
1474
|
-
const i =
|
|
1478
|
+
const i = D("core/networker/portforward/created", () => {
|
|
1475
1479
|
e.invalidateQueries({ queryKey: [...J] });
|
|
1476
|
-
}), o =
|
|
1480
|
+
}), o = D("core/networker/portforward/closed", () => {
|
|
1477
1481
|
e.invalidateQueries({ queryKey: [...J] });
|
|
1478
1482
|
});
|
|
1479
1483
|
return () => {
|
|
1480
1484
|
i(), o();
|
|
1481
1485
|
};
|
|
1482
1486
|
}, [e]);
|
|
1483
|
-
const r = n.data ?? [], s =
|
|
1484
|
-
mutationFn: async (i) =>
|
|
1487
|
+
const r = n.data ?? [], s = x({
|
|
1488
|
+
mutationFn: async (i) => je(i),
|
|
1485
1489
|
onError: U(t, "Failed to close port forwarding session"),
|
|
1486
1490
|
onSuccess: async () => {
|
|
1487
1491
|
await e.invalidateQueries({ queryKey: [...J] });
|
|
@@ -1491,39 +1495,39 @@ function Os() {
|
|
|
1491
1495
|
sessions: n,
|
|
1492
1496
|
activeSessions: r,
|
|
1493
1497
|
closeSession: s.mutateAsync,
|
|
1494
|
-
openInBrowser: (i) =>
|
|
1498
|
+
openInBrowser: (i) => Ze(`http://localhost:${i}`)
|
|
1495
1499
|
};
|
|
1496
1500
|
}
|
|
1497
|
-
function
|
|
1498
|
-
const r =
|
|
1501
|
+
function xs({ pluginID: t, connectionID: e, resourceID: n }) {
|
|
1502
|
+
const r = A(t), s = ["networker", "portforward", "sessions", r, e, n], { showSnackbar: i } = Q(), o = K(), a = F({
|
|
1499
1503
|
queryKey: s,
|
|
1500
|
-
queryFn: async () =>
|
|
1504
|
+
queryFn: async () => Xt(r, e, _n.createFrom({
|
|
1501
1505
|
resource_id: n,
|
|
1502
1506
|
connection_id: e
|
|
1503
|
-
})).catch((
|
|
1504
|
-
const
|
|
1505
|
-
return
|
|
1507
|
+
})).catch((u) => {
|
|
1508
|
+
const p = H(u);
|
|
1509
|
+
return p.detail.includes("not found") ? [] : (i({ message: "Failed to fetch port forward sessions", status: "error", details: p.detail }), []);
|
|
1506
1510
|
}),
|
|
1507
1511
|
retry: !1
|
|
1508
|
-
}), c =
|
|
1509
|
-
mutationFn: async ({ opts:
|
|
1510
|
-
const
|
|
1511
|
-
local_port:
|
|
1512
|
-
remote_port:
|
|
1513
|
-
protocol:
|
|
1512
|
+
}), c = x({
|
|
1513
|
+
mutationFn: async ({ opts: u }) => {
|
|
1514
|
+
const p = wn.createFrom({
|
|
1515
|
+
local_port: u.localPort || 0,
|
|
1516
|
+
remote_port: u.remotePort,
|
|
1517
|
+
protocol: u.protocol || "TCP",
|
|
1514
1518
|
connection_type: "RESOURCE",
|
|
1515
1519
|
connection: {
|
|
1516
|
-
resource_data:
|
|
1520
|
+
resource_data: u.resource,
|
|
1517
1521
|
connection_id: e,
|
|
1518
1522
|
plugin_id: r,
|
|
1519
|
-
resource_id:
|
|
1520
|
-
resource_key:
|
|
1523
|
+
resource_id: u.resourceId,
|
|
1524
|
+
resource_key: u.resourceKey
|
|
1521
1525
|
},
|
|
1522
|
-
labels:
|
|
1523
|
-
params:
|
|
1524
|
-
}), h = await
|
|
1526
|
+
labels: u.labels ?? {},
|
|
1527
|
+
params: u.parameters ?? {}
|
|
1528
|
+
}), h = await Zt(r, e, p);
|
|
1525
1529
|
if (!h) throw new Error("Failed to start port forwarding: null response");
|
|
1526
|
-
return
|
|
1530
|
+
return u.openInBrowser && Ze(`http://localhost:${h.local_port}`), h;
|
|
1527
1531
|
},
|
|
1528
1532
|
onError: U(i, "Failed to start port forwarding session"),
|
|
1529
1533
|
onSuccess: async () => {
|
|
@@ -1532,8 +1536,8 @@ function As({ pluginID: t, connectionID: e, resourceID: n }) {
|
|
|
1532
1536
|
o.invalidateQueries({ queryKey: [...J] })
|
|
1533
1537
|
]);
|
|
1534
1538
|
}
|
|
1535
|
-
}),
|
|
1536
|
-
mutationFn: async ({ opts:
|
|
1539
|
+
}), f = x({
|
|
1540
|
+
mutationFn: async ({ opts: u }) => je(u.sessionID),
|
|
1537
1541
|
onError: U(i, "Failed to close port forwarding session"),
|
|
1538
1542
|
onSuccess: async () => {
|
|
1539
1543
|
await Promise.all([
|
|
@@ -1545,22 +1549,26 @@ function As({ pluginID: t, connectionID: e, resourceID: n }) {
|
|
|
1545
1549
|
return {
|
|
1546
1550
|
sessions: a,
|
|
1547
1551
|
forward: c.mutateAsync,
|
|
1548
|
-
close:
|
|
1552
|
+
close: f.mutateAsync
|
|
1549
1553
|
};
|
|
1550
1554
|
}
|
|
1551
|
-
const
|
|
1552
|
-
const t = C.useContext(
|
|
1555
|
+
const Ps = () => {
|
|
1556
|
+
const t = C.useContext(Ln);
|
|
1553
1557
|
if (!t) throw new Error("useConfirmationModal must be used within a ConfirmationModalProvider");
|
|
1554
1558
|
return t;
|
|
1555
|
-
},
|
|
1559
|
+
}, _e = {
|
|
1560
|
+
scope: (t, e, n) => [t, e, n],
|
|
1561
|
+
list: (t, e, n, r = []) => [t, e, n, r, "list"],
|
|
1562
|
+
resource: (t, e, n, r, s = "") => [t, e, n, s, r]
|
|
1563
|
+
}, Ls = ({
|
|
1556
1564
|
pluginID: t,
|
|
1557
1565
|
connectionID: e,
|
|
1558
1566
|
resourceKey: n,
|
|
1559
1567
|
resourceID: r,
|
|
1560
1568
|
namespace: s = ""
|
|
1561
1569
|
}) => {
|
|
1562
|
-
const i =
|
|
1563
|
-
mutationFn: async (h) =>
|
|
1570
|
+
const i = A(t), o = K(), { showSnackbar: a } = Q(), c = _e.resource(i, e, n, r, s), { mutateAsync: f } = x({
|
|
1571
|
+
mutationFn: async (h) => Qe(i, e, n, ze.createFrom({
|
|
1564
1572
|
input: h.input,
|
|
1565
1573
|
id: r,
|
|
1566
1574
|
namespace: s
|
|
@@ -1569,8 +1577,8 @@ const Ts = () => {
|
|
|
1569
1577
|
a(`Resource ${r} updated`, "success"), await o.invalidateQueries({ queryKey: c });
|
|
1570
1578
|
},
|
|
1571
1579
|
onError: U(a, `Failed to update resource ${r}`)
|
|
1572
|
-
}), { mutateAsync:
|
|
1573
|
-
mutationFn: async (h = {}) =>
|
|
1580
|
+
}), { mutateAsync: u } = x({
|
|
1581
|
+
mutationFn: async (h = {}) => Be(i, e, n, Ve.createFrom({
|
|
1574
1582
|
id: r,
|
|
1575
1583
|
namespace: s,
|
|
1576
1584
|
gracePeriodSeconds: h.gracePeriodSeconds
|
|
@@ -1587,7 +1595,7 @@ const Ts = () => {
|
|
|
1587
1595
|
*/
|
|
1588
1596
|
resource: F({
|
|
1589
1597
|
queryKey: c,
|
|
1590
|
-
queryFn: async () =>
|
|
1598
|
+
queryFn: async () => en(i, e, n, bn.createFrom({
|
|
1591
1599
|
id: r,
|
|
1592
1600
|
namespace: s
|
|
1593
1601
|
})),
|
|
@@ -1599,16 +1607,16 @@ const Ts = () => {
|
|
|
1599
1607
|
*
|
|
1600
1608
|
* @params opts Optional parameters to pass to the resource update
|
|
1601
1609
|
*/
|
|
1602
|
-
update:
|
|
1610
|
+
update: f,
|
|
1603
1611
|
/**
|
|
1604
1612
|
* Delete an existing resource. A set of optional parameters can be passed to customize the delete behavior,
|
|
1605
1613
|
* which if specified, will add additional default behavior set via the hook options.
|
|
1606
1614
|
*
|
|
1607
1615
|
* @params {object} opts Optional parameters to pass to the resource delete
|
|
1608
1616
|
*/
|
|
1609
|
-
remove:
|
|
1617
|
+
remove: u
|
|
1610
1618
|
};
|
|
1611
|
-
},
|
|
1619
|
+
}, ks = (t) => {
|
|
1612
1620
|
const e = ["component", t.plugin, t.resource, t.area];
|
|
1613
1621
|
return {
|
|
1614
1622
|
/**
|
|
@@ -1617,31 +1625,31 @@ const Ts = () => {
|
|
|
1617
1625
|
*/
|
|
1618
1626
|
component: F({
|
|
1619
1627
|
queryKey: e,
|
|
1620
|
-
queryFn: async () =>
|
|
1628
|
+
queryFn: async () => tn(t)
|
|
1621
1629
|
})
|
|
1622
1630
|
};
|
|
1623
|
-
},
|
|
1624
|
-
const n =
|
|
1631
|
+
}, Ms = ({ pluginID: t, connectionID: e }) => {
|
|
1632
|
+
const n = A(t);
|
|
1625
1633
|
return {
|
|
1626
1634
|
/**
|
|
1627
1635
|
* The resource groups for the given plugin and connection.
|
|
1628
1636
|
*/
|
|
1629
1637
|
groups: F({
|
|
1630
1638
|
queryKey: [n, "resource_groups", "list"],
|
|
1631
|
-
queryFn: async () =>
|
|
1639
|
+
queryFn: async () => nn(n, e),
|
|
1632
1640
|
retry: !1
|
|
1633
1641
|
})
|
|
1634
1642
|
};
|
|
1635
|
-
},
|
|
1643
|
+
}, Us = ({
|
|
1636
1644
|
pluginID: t,
|
|
1637
1645
|
connectionID: e,
|
|
1638
1646
|
searches: n
|
|
1639
1647
|
}) => {
|
|
1640
|
-
const r =
|
|
1641
|
-
return
|
|
1648
|
+
const r = A(t), s = (o) => [r, e, o.key, o.namespaces, "list"];
|
|
1649
|
+
return Rn({
|
|
1642
1650
|
queries: n.map((o) => ({
|
|
1643
1651
|
queryKey: s(o),
|
|
1644
|
-
queryFn: async () =>
|
|
1652
|
+
queryFn: async () => He(r, e, o.key, Ye.createFrom({
|
|
1645
1653
|
order: [{ field: "name", descending: !1 }],
|
|
1646
1654
|
pagination: { page: 1, pageSize: 200 },
|
|
1647
1655
|
namespaces: o.namespaces
|
|
@@ -1649,40 +1657,40 @@ const Ts = () => {
|
|
|
1649
1657
|
retry: !1
|
|
1650
1658
|
}))
|
|
1651
1659
|
});
|
|
1652
|
-
},
|
|
1653
|
-
const n =
|
|
1660
|
+
}, qs = ({ pluginID: t, resourceKey: e }) => {
|
|
1661
|
+
const n = A(t);
|
|
1654
1662
|
return {
|
|
1655
1663
|
/**
|
|
1656
1664
|
* The current settings from the provider.
|
|
1657
1665
|
*/
|
|
1658
1666
|
resourceType: F({
|
|
1659
1667
|
queryKey: [n, "resources", e],
|
|
1660
|
-
queryFn: async () =>
|
|
1668
|
+
queryFn: async () => rn(n, e),
|
|
1661
1669
|
retry: !1
|
|
1662
1670
|
})
|
|
1663
1671
|
};
|
|
1664
|
-
},
|
|
1665
|
-
const n =
|
|
1672
|
+
}, $s = ({ pluginID: t, connectionID: e }) => {
|
|
1673
|
+
const n = A(t);
|
|
1666
1674
|
return {
|
|
1667
1675
|
/**
|
|
1668
1676
|
* The resource types for the given plugin and connection.
|
|
1669
1677
|
*/
|
|
1670
1678
|
types: F({
|
|
1671
1679
|
queryKey: [n, "resources", "list", e],
|
|
1672
|
-
queryFn: async () =>
|
|
1680
|
+
queryFn: async () => sn(n, e),
|
|
1673
1681
|
retry: !1
|
|
1674
1682
|
})
|
|
1675
1683
|
};
|
|
1676
1684
|
};
|
|
1677
1685
|
var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1678
|
-
function
|
|
1686
|
+
function zn(t) {
|
|
1679
1687
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1680
1688
|
}
|
|
1681
|
-
var
|
|
1682
|
-
function
|
|
1689
|
+
var Vn = "Expected a function", dt = "__lodash_hash_undefined__", Yn = "[object Function]", Jn = "[object GeneratorFunction]", Xn = "[object Symbol]", Zn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, er = /^\w*$/, tr = /^\./, nr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, rr = /[\\^$.*+?()[\]{}|]/g, sr = /\\(\\)?/g, or = /^\[object .+?Constructor\]$/, ir = typeof se == "object" && se && se.Object === Object && se, ar = typeof self == "object" && self && self.Object === Object && self, Ie = ir || ar || Function("return this")();
|
|
1690
|
+
function cr(t, e) {
|
|
1683
1691
|
return t == null ? void 0 : t[e];
|
|
1684
1692
|
}
|
|
1685
|
-
function
|
|
1693
|
+
function ur(t) {
|
|
1686
1694
|
var e = !1;
|
|
1687
1695
|
if (t != null && typeof t.toString != "function")
|
|
1688
1696
|
try {
|
|
@@ -1691,12 +1699,12 @@ function ir(t) {
|
|
|
1691
1699
|
}
|
|
1692
1700
|
return e;
|
|
1693
1701
|
}
|
|
1694
|
-
var
|
|
1702
|
+
var lr = Array.prototype, dr = Function.prototype, ft = Object.prototype, Ee = Ie["__core-js_shared__"], ke = function() {
|
|
1695
1703
|
var t = /[^.]+$/.exec(Ee && Ee.keys && Ee.keys.IE_PROTO || "");
|
|
1696
1704
|
return t ? "Symbol(src)_1." + t : "";
|
|
1697
|
-
}(),
|
|
1698
|
-
"^" +
|
|
1699
|
-
),
|
|
1705
|
+
}(), pt = dr.toString, Te = ft.hasOwnProperty, ht = ft.toString, fr = RegExp(
|
|
1706
|
+
"^" + pt.call(Te).replace(rr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1707
|
+
), Me = Ie.Symbol, pr = lr.splice, hr = gt(Ie, "Map"), te = gt(Object, "create"), Ue = Me ? Me.prototype : void 0, qe = Ue ? Ue.toString : void 0;
|
|
1700
1708
|
function V(t) {
|
|
1701
1709
|
var e = -1, n = t ? t.length : 0;
|
|
1702
1710
|
for (this.clear(); ++e < n; ) {
|
|
@@ -1704,33 +1712,33 @@ function V(t) {
|
|
|
1704
1712
|
this.set(r[0], r[1]);
|
|
1705
1713
|
}
|
|
1706
1714
|
}
|
|
1707
|
-
function
|
|
1715
|
+
function gr() {
|
|
1708
1716
|
this.__data__ = te ? te(null) : {};
|
|
1709
1717
|
}
|
|
1710
|
-
function
|
|
1718
|
+
function yr(t) {
|
|
1711
1719
|
return this.has(t) && delete this.__data__[t];
|
|
1712
1720
|
}
|
|
1713
|
-
function
|
|
1721
|
+
function mr(t) {
|
|
1714
1722
|
var e = this.__data__;
|
|
1715
1723
|
if (te) {
|
|
1716
1724
|
var n = e[t];
|
|
1717
|
-
return n ===
|
|
1725
|
+
return n === dt ? void 0 : n;
|
|
1718
1726
|
}
|
|
1719
|
-
return
|
|
1727
|
+
return Te.call(e, t) ? e[t] : void 0;
|
|
1720
1728
|
}
|
|
1721
|
-
function
|
|
1729
|
+
function Er(t) {
|
|
1722
1730
|
var e = this.__data__;
|
|
1723
|
-
return te ? e[t] !== void 0 :
|
|
1731
|
+
return te ? e[t] !== void 0 : Te.call(e, t);
|
|
1724
1732
|
}
|
|
1725
|
-
function
|
|
1733
|
+
function Sr(t, e) {
|
|
1726
1734
|
var n = this.__data__;
|
|
1727
|
-
return n[t] = te && e === void 0 ?
|
|
1735
|
+
return n[t] = te && e === void 0 ? dt : e, this;
|
|
1728
1736
|
}
|
|
1729
|
-
V.prototype.clear =
|
|
1730
|
-
V.prototype.delete =
|
|
1731
|
-
V.prototype.get =
|
|
1732
|
-
V.prototype.has =
|
|
1733
|
-
V.prototype.set =
|
|
1737
|
+
V.prototype.clear = gr;
|
|
1738
|
+
V.prototype.delete = yr;
|
|
1739
|
+
V.prototype.get = mr;
|
|
1740
|
+
V.prototype.has = Er;
|
|
1741
|
+
V.prototype.set = Sr;
|
|
1734
1742
|
function Z(t) {
|
|
1735
1743
|
var e = -1, n = t ? t.length : 0;
|
|
1736
1744
|
for (this.clear(); ++e < n; ) {
|
|
@@ -1738,32 +1746,32 @@ function Z(t) {
|
|
|
1738
1746
|
this.set(r[0], r[1]);
|
|
1739
1747
|
}
|
|
1740
1748
|
}
|
|
1741
|
-
function
|
|
1749
|
+
function vr() {
|
|
1742
1750
|
this.__data__ = [];
|
|
1743
1751
|
}
|
|
1744
|
-
function
|
|
1752
|
+
function Cr(t) {
|
|
1745
1753
|
var e = this.__data__, n = le(e, t);
|
|
1746
1754
|
if (n < 0)
|
|
1747
1755
|
return !1;
|
|
1748
1756
|
var r = e.length - 1;
|
|
1749
|
-
return n == r ? e.pop() :
|
|
1757
|
+
return n == r ? e.pop() : pr.call(e, n, 1), !0;
|
|
1750
1758
|
}
|
|
1751
|
-
function
|
|
1759
|
+
function _r(t) {
|
|
1752
1760
|
var e = this.__data__, n = le(e, t);
|
|
1753
1761
|
return n < 0 ? void 0 : e[n][1];
|
|
1754
1762
|
}
|
|
1755
|
-
function
|
|
1763
|
+
function wr(t) {
|
|
1756
1764
|
return le(this.__data__, t) > -1;
|
|
1757
1765
|
}
|
|
1758
|
-
function
|
|
1766
|
+
function br(t, e) {
|
|
1759
1767
|
var n = this.__data__, r = le(n, t);
|
|
1760
1768
|
return r < 0 ? n.push([t, e]) : n[r][1] = e, this;
|
|
1761
1769
|
}
|
|
1762
|
-
Z.prototype.clear =
|
|
1763
|
-
Z.prototype.delete =
|
|
1764
|
-
Z.prototype.get =
|
|
1765
|
-
Z.prototype.has =
|
|
1766
|
-
Z.prototype.set =
|
|
1770
|
+
Z.prototype.clear = vr;
|
|
1771
|
+
Z.prototype.delete = Cr;
|
|
1772
|
+
Z.prototype.get = _r;
|
|
1773
|
+
Z.prototype.has = wr;
|
|
1774
|
+
Z.prototype.set = br;
|
|
1767
1775
|
function Y(t) {
|
|
1768
1776
|
var e = -1, n = t ? t.length : 0;
|
|
1769
1777
|
for (this.clear(); ++e < n; ) {
|
|
@@ -1771,97 +1779,97 @@ function Y(t) {
|
|
|
1771
1779
|
this.set(r[0], r[1]);
|
|
1772
1780
|
}
|
|
1773
1781
|
}
|
|
1774
|
-
function
|
|
1782
|
+
function Rr() {
|
|
1775
1783
|
this.__data__ = {
|
|
1776
1784
|
hash: new V(),
|
|
1777
|
-
map: new (
|
|
1785
|
+
map: new (hr || Z)(),
|
|
1778
1786
|
string: new V()
|
|
1779
1787
|
};
|
|
1780
1788
|
}
|
|
1781
|
-
function
|
|
1789
|
+
function Ir(t) {
|
|
1782
1790
|
return de(this, t).delete(t);
|
|
1783
1791
|
}
|
|
1784
|
-
function
|
|
1792
|
+
function Tr(t) {
|
|
1785
1793
|
return de(this, t).get(t);
|
|
1786
1794
|
}
|
|
1787
|
-
function
|
|
1795
|
+
function Or(t) {
|
|
1788
1796
|
return de(this, t).has(t);
|
|
1789
1797
|
}
|
|
1790
|
-
function
|
|
1798
|
+
function Ar(t, e) {
|
|
1791
1799
|
return de(this, t).set(t, e), this;
|
|
1792
1800
|
}
|
|
1793
|
-
Y.prototype.clear =
|
|
1794
|
-
Y.prototype.delete =
|
|
1795
|
-
Y.prototype.get =
|
|
1796
|
-
Y.prototype.has =
|
|
1797
|
-
Y.prototype.set =
|
|
1801
|
+
Y.prototype.clear = Rr;
|
|
1802
|
+
Y.prototype.delete = Ir;
|
|
1803
|
+
Y.prototype.get = Tr;
|
|
1804
|
+
Y.prototype.has = Or;
|
|
1805
|
+
Y.prototype.set = Ar;
|
|
1798
1806
|
function le(t, e) {
|
|
1799
1807
|
for (var n = t.length; n--; )
|
|
1800
|
-
if (
|
|
1808
|
+
if ($r(t[n][0], e))
|
|
1801
1809
|
return n;
|
|
1802
1810
|
return -1;
|
|
1803
1811
|
}
|
|
1804
|
-
function
|
|
1805
|
-
e =
|
|
1812
|
+
function Nr(t, e) {
|
|
1813
|
+
e = Pr(e, t) ? [e] : xr(e);
|
|
1806
1814
|
for (var n = 0, r = e.length; t != null && n < r; )
|
|
1807
|
-
t = t[
|
|
1815
|
+
t = t[Ur(e[n++])];
|
|
1808
1816
|
return n && n == r ? t : void 0;
|
|
1809
1817
|
}
|
|
1810
|
-
function
|
|
1811
|
-
if (!
|
|
1818
|
+
function Dr(t) {
|
|
1819
|
+
if (!mt(t) || kr(t))
|
|
1812
1820
|
return !1;
|
|
1813
|
-
var e =
|
|
1814
|
-
return e.test(
|
|
1821
|
+
var e = Wr(t) || ur(t) ? fr : or;
|
|
1822
|
+
return e.test(qr(t));
|
|
1815
1823
|
}
|
|
1816
|
-
function
|
|
1824
|
+
function Fr(t) {
|
|
1817
1825
|
if (typeof t == "string")
|
|
1818
1826
|
return t;
|
|
1819
1827
|
if (Ae(t))
|
|
1820
|
-
return
|
|
1828
|
+
return qe ? qe.call(t) : "";
|
|
1821
1829
|
var e = t + "";
|
|
1822
1830
|
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
1823
1831
|
}
|
|
1824
|
-
function
|
|
1825
|
-
return
|
|
1832
|
+
function xr(t) {
|
|
1833
|
+
return yt(t) ? t : Mr(t);
|
|
1826
1834
|
}
|
|
1827
1835
|
function de(t, e) {
|
|
1828
1836
|
var n = t.__data__;
|
|
1829
|
-
return
|
|
1837
|
+
return Lr(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
1830
1838
|
}
|
|
1831
|
-
function
|
|
1832
|
-
var n =
|
|
1833
|
-
return
|
|
1839
|
+
function gt(t, e) {
|
|
1840
|
+
var n = cr(t, e);
|
|
1841
|
+
return Dr(n) ? n : void 0;
|
|
1834
1842
|
}
|
|
1835
|
-
function
|
|
1836
|
-
if (
|
|
1843
|
+
function Pr(t, e) {
|
|
1844
|
+
if (yt(t))
|
|
1837
1845
|
return !1;
|
|
1838
1846
|
var n = typeof t;
|
|
1839
|
-
return n == "number" || n == "symbol" || n == "boolean" || t == null || Ae(t) ? !0 :
|
|
1847
|
+
return n == "number" || n == "symbol" || n == "boolean" || t == null || Ae(t) ? !0 : er.test(t) || !Zn.test(t) || e != null && t in Object(e);
|
|
1840
1848
|
}
|
|
1841
|
-
function
|
|
1849
|
+
function Lr(t) {
|
|
1842
1850
|
var e = typeof t;
|
|
1843
1851
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
1844
1852
|
}
|
|
1845
|
-
function
|
|
1846
|
-
return !!
|
|
1853
|
+
function kr(t) {
|
|
1854
|
+
return !!ke && ke in t;
|
|
1847
1855
|
}
|
|
1848
|
-
var
|
|
1849
|
-
t =
|
|
1856
|
+
var Mr = Oe(function(t) {
|
|
1857
|
+
t = jr(t);
|
|
1850
1858
|
var e = [];
|
|
1851
|
-
return
|
|
1852
|
-
e.push(s ? i.replace(
|
|
1859
|
+
return tr.test(t) && e.push(""), t.replace(nr, function(n, r, s, i) {
|
|
1860
|
+
e.push(s ? i.replace(sr, "$1") : r || n);
|
|
1853
1861
|
}), e;
|
|
1854
1862
|
});
|
|
1855
|
-
function
|
|
1863
|
+
function Ur(t) {
|
|
1856
1864
|
if (typeof t == "string" || Ae(t))
|
|
1857
1865
|
return t;
|
|
1858
1866
|
var e = t + "";
|
|
1859
1867
|
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
1860
1868
|
}
|
|
1861
|
-
function
|
|
1869
|
+
function qr(t) {
|
|
1862
1870
|
if (t != null) {
|
|
1863
1871
|
try {
|
|
1864
|
-
return
|
|
1872
|
+
return pt.call(t);
|
|
1865
1873
|
} catch {
|
|
1866
1874
|
}
|
|
1867
1875
|
try {
|
|
@@ -1873,7 +1881,7 @@ function kr(t) {
|
|
|
1873
1881
|
}
|
|
1874
1882
|
function Oe(t, e) {
|
|
1875
1883
|
if (typeof t != "function" || e && typeof e != "function")
|
|
1876
|
-
throw new TypeError(
|
|
1884
|
+
throw new TypeError(Vn);
|
|
1877
1885
|
var n = function() {
|
|
1878
1886
|
var r = arguments, s = e ? e.apply(this, r) : r[0], i = n.cache;
|
|
1879
1887
|
if (i.has(s))
|
|
@@ -1884,34 +1892,34 @@ function Oe(t, e) {
|
|
|
1884
1892
|
return n.cache = new (Oe.Cache || Y)(), n;
|
|
1885
1893
|
}
|
|
1886
1894
|
Oe.Cache = Y;
|
|
1887
|
-
function
|
|
1895
|
+
function $r(t, e) {
|
|
1888
1896
|
return t === e || t !== t && e !== e;
|
|
1889
1897
|
}
|
|
1890
|
-
var
|
|
1891
|
-
function
|
|
1892
|
-
var e =
|
|
1893
|
-
return e ==
|
|
1898
|
+
var yt = Array.isArray;
|
|
1899
|
+
function Wr(t) {
|
|
1900
|
+
var e = mt(t) ? ht.call(t) : "";
|
|
1901
|
+
return e == Yn || e == Jn;
|
|
1894
1902
|
}
|
|
1895
|
-
function
|
|
1903
|
+
function mt(t) {
|
|
1896
1904
|
var e = typeof t;
|
|
1897
1905
|
return !!t && (e == "object" || e == "function");
|
|
1898
1906
|
}
|
|
1899
|
-
function
|
|
1907
|
+
function Gr(t) {
|
|
1900
1908
|
return !!t && typeof t == "object";
|
|
1901
1909
|
}
|
|
1902
1910
|
function Ae(t) {
|
|
1903
|
-
return typeof t == "symbol" ||
|
|
1911
|
+
return typeof t == "symbol" || Gr(t) && ht.call(t) == Xn;
|
|
1904
1912
|
}
|
|
1905
|
-
function
|
|
1906
|
-
return t == null ? "" :
|
|
1913
|
+
function jr(t) {
|
|
1914
|
+
return t == null ? "" : Fr(t);
|
|
1907
1915
|
}
|
|
1908
|
-
function
|
|
1909
|
-
var r = t == null ? void 0 :
|
|
1916
|
+
function Qr(t, e, n) {
|
|
1917
|
+
var r = t == null ? void 0 : Nr(t, e);
|
|
1910
1918
|
return r === void 0 ? n : r;
|
|
1911
1919
|
}
|
|
1912
|
-
var
|
|
1913
|
-
const oe = /* @__PURE__ */
|
|
1914
|
-
function
|
|
1920
|
+
var Br = Qr;
|
|
1921
|
+
const oe = /* @__PURE__ */ zn(Br);
|
|
1922
|
+
function Hr(t, e, n) {
|
|
1915
1923
|
const r = t ?? { result: [], success: !0, totalCount: 0 }, s = [...r.result ?? []];
|
|
1916
1924
|
for (const i of e) {
|
|
1917
1925
|
const o = oe(i.payload.data, n);
|
|
@@ -1934,97 +1942,97 @@ function jr(t, e, n) {
|
|
|
1934
1942
|
}
|
|
1935
1943
|
return { ...r, result: s };
|
|
1936
1944
|
}
|
|
1937
|
-
function
|
|
1938
|
-
const o = (i == null ? void 0 : i.syncWindowMs) ?? 500, a = W([]), c = W(null),
|
|
1939
|
-
|
|
1940
|
-
const
|
|
1945
|
+
function Kr(t, e, n, r, s, i) {
|
|
1946
|
+
const o = (i == null ? void 0 : i.syncWindowMs) ?? 500, a = W([]), c = W(null), f = W(null), u = W(s);
|
|
1947
|
+
u.current = s;
|
|
1948
|
+
const p = M(() => {
|
|
1941
1949
|
const g = a.current;
|
|
1942
|
-
if (a.current = [], c.current !== null && (clearTimeout(c.current), c.current = null),
|
|
1950
|
+
if (a.current = [], c.current !== null && (clearTimeout(c.current), c.current = null), f.current !== null && (cancelAnimationFrame(f.current), f.current = null), !(g.length === 0 || !r)) {
|
|
1943
1951
|
t.setQueryData(
|
|
1944
1952
|
e,
|
|
1945
|
-
(m) =>
|
|
1953
|
+
(m) => Hr(m, g, r)
|
|
1946
1954
|
);
|
|
1947
1955
|
for (const m of g)
|
|
1948
1956
|
(m.type === "ADD" || m.type === "UPDATE") && t.setQueryData(
|
|
1949
1957
|
n(m.payload.id, m.payload.namespace),
|
|
1950
|
-
{ result: m.payload.data }
|
|
1958
|
+
{ success: !0, result: m.payload.data }
|
|
1951
1959
|
);
|
|
1952
1960
|
}
|
|
1953
1961
|
}, [t, e, n, r]), h = M(
|
|
1954
1962
|
(g) => {
|
|
1955
|
-
a.current.push(g), !(c.current !== null ||
|
|
1963
|
+
a.current.push(g), !(c.current !== null || f.current !== null) && (c.current = setTimeout(p, o), u.current !== 1 && (f.current = requestAnimationFrame(p)));
|
|
1956
1964
|
},
|
|
1957
|
-
[
|
|
1965
|
+
[p, o]
|
|
1958
1966
|
);
|
|
1959
1967
|
return j(() => () => {
|
|
1960
|
-
c.current !== null && (clearTimeout(c.current), c.current = null),
|
|
1968
|
+
c.current !== null && (clearTimeout(c.current), c.current = null), f.current !== null && (cancelAnimationFrame(f.current), f.current = null);
|
|
1961
1969
|
}, []), h;
|
|
1962
1970
|
}
|
|
1963
|
-
const
|
|
1971
|
+
const Ws = ({
|
|
1964
1972
|
pluginID: t,
|
|
1965
1973
|
connectionID: e,
|
|
1966
1974
|
resourceKey: n,
|
|
1967
1975
|
idAccessor: r,
|
|
1968
1976
|
namespaces: s
|
|
1969
1977
|
}) => {
|
|
1970
|
-
const i =
|
|
1971
|
-
() =>
|
|
1978
|
+
const i = A(t), o = K(), { showSnackbar: a } = Q(), c = C.useMemo(() => s ?? [], [s]), f = C.useMemo(
|
|
1979
|
+
() => _e.list(i, e, n, c),
|
|
1972
1980
|
[i, e, n, c]
|
|
1973
|
-
),
|
|
1974
|
-
(
|
|
1981
|
+
), u = C.useCallback(
|
|
1982
|
+
(l, d) => _e.resource(i, e, n, l, d),
|
|
1975
1983
|
[i, e, n]
|
|
1976
|
-
), { mutateAsync:
|
|
1977
|
-
mutationFn: async (
|
|
1978
|
-
input:
|
|
1979
|
-
namespace:
|
|
1984
|
+
), { mutateAsync: p } = x({
|
|
1985
|
+
mutationFn: async (l) => Ke(i, e, n, Je.createFrom({
|
|
1986
|
+
input: l.input,
|
|
1987
|
+
namespace: l.namespace ?? (c.length === 1 ? c[0] : "")
|
|
1980
1988
|
})),
|
|
1981
|
-
onSuccess: async (
|
|
1982
|
-
var
|
|
1983
|
-
const
|
|
1984
|
-
let
|
|
1985
|
-
(
|
|
1986
|
-
const y =
|
|
1987
|
-
a(y, "success"), await o.invalidateQueries({ queryKey:
|
|
1989
|
+
onSuccess: async (l) => {
|
|
1990
|
+
var S;
|
|
1991
|
+
const d = l == null ? void 0 : l.result;
|
|
1992
|
+
let E = "";
|
|
1993
|
+
(S = d == null ? void 0 : d.metadata) != null && S.name ? E = d.metadata.name : d != null && d.id ? E = d.id : d != null && d.name ? E = d.name : d != null && d.ID ? E = d.ID : d != null && d.Name && (E = d.Name);
|
|
1994
|
+
const y = E ? `Resource ${E} created` : "Resource created";
|
|
1995
|
+
a(y, "success"), await o.invalidateQueries({ queryKey: f });
|
|
1988
1996
|
},
|
|
1989
1997
|
onError: U(a, "Failed to create resource")
|
|
1990
1998
|
}), h = F({
|
|
1991
|
-
queryKey:
|
|
1992
|
-
queryFn: async () =>
|
|
1999
|
+
queryKey: f,
|
|
2000
|
+
queryFn: async () => He(i, e, n, Ye.createFrom({
|
|
1993
2001
|
order: [{ field: "name", descending: !1 }],
|
|
1994
2002
|
pagination: { page: 1, pageSize: 200 },
|
|
1995
2003
|
namespaces: c
|
|
1996
2004
|
})),
|
|
1997
|
-
placeholderData: (
|
|
2005
|
+
placeholderData: (l, d) => l,
|
|
1998
2006
|
retry: !1
|
|
1999
2007
|
}), [g, m] = C.useState(
|
|
2000
|
-
|
|
2008
|
+
T.WatchStateIdle
|
|
2001
2009
|
);
|
|
2002
|
-
C.useEffect(() =>
|
|
2010
|
+
C.useEffect(() => D(
|
|
2003
2011
|
`${i}/${e}/watch/STATE`,
|
|
2004
|
-
(
|
|
2005
|
-
const
|
|
2006
|
-
|
|
2012
|
+
(d) => {
|
|
2013
|
+
const E = d.data;
|
|
2014
|
+
E.resourceKey === n && m(E.state);
|
|
2007
2015
|
}
|
|
2008
2016
|
), [i, e, n]);
|
|
2009
|
-
const
|
|
2017
|
+
const w = Kr(o, f, u, r, g);
|
|
2010
2018
|
return C.useEffect(() => {
|
|
2011
2019
|
if (!r)
|
|
2012
2020
|
return;
|
|
2013
|
-
|
|
2014
|
-
const
|
|
2021
|
+
on(i, e, n);
|
|
2022
|
+
const l = D(
|
|
2015
2023
|
`${i}/${e}/${n}/ADD`,
|
|
2016
|
-
(y) =>
|
|
2017
|
-
),
|
|
2024
|
+
(y) => w({ type: "ADD", payload: y.data })
|
|
2025
|
+
), d = D(
|
|
2018
2026
|
`${i}/${e}/${n}/UPDATE`,
|
|
2019
|
-
(y) =>
|
|
2020
|
-
),
|
|
2027
|
+
(y) => w({ type: "UPDATE", payload: y.data })
|
|
2028
|
+
), E = D(
|
|
2021
2029
|
`${i}/${e}/${n}/DELETE`,
|
|
2022
|
-
(y) =>
|
|
2030
|
+
(y) => w({ type: "DELETE", payload: y.data })
|
|
2023
2031
|
);
|
|
2024
2032
|
return () => {
|
|
2025
|
-
|
|
2033
|
+
l(), d(), E(), an(i, e, n);
|
|
2026
2034
|
};
|
|
2027
|
-
}, [i, e, n,
|
|
2035
|
+
}, [i, e, n, w]), {
|
|
2028
2036
|
/**
|
|
2029
2037
|
* Fetch result for the resource. The client will automatically cache the result, and update the cache
|
|
2030
2038
|
* when the resources are updated or deleted via the returned create and remove mutation functions, or
|
|
@@ -2037,23 +2045,23 @@ const ks = ({
|
|
|
2037
2045
|
*
|
|
2038
2046
|
* @params opts Optional parameters to pass to the resource create operation
|
|
2039
2047
|
*/
|
|
2040
|
-
create:
|
|
2048
|
+
create: p,
|
|
2041
2049
|
/** Current watch state for this resource type */
|
|
2042
2050
|
watchState: g,
|
|
2043
2051
|
/** Whether the watch is currently syncing */
|
|
2044
|
-
isSyncing: g ===
|
|
2052
|
+
isSyncing: g === T.WatchStateSyncing,
|
|
2045
2053
|
/** Whether the watch has fully synced */
|
|
2046
|
-
isSynced: g ===
|
|
2054
|
+
isSynced: g === T.WatchStateSynced,
|
|
2047
2055
|
/** Whether the watch encountered an error */
|
|
2048
|
-
watchError: g ===
|
|
2056
|
+
watchError: g === T.WatchStateError
|
|
2049
2057
|
};
|
|
2050
|
-
},
|
|
2051
|
-
const e =
|
|
2058
|
+
}, Gs = ({ pluginID: t }) => {
|
|
2059
|
+
const e = A(t), { showSnackbar: n } = Q(), r = x({
|
|
2052
2060
|
mutationFn: async ({ opts: o, input: a }) => Ke(
|
|
2053
2061
|
e,
|
|
2054
2062
|
o.connectionID,
|
|
2055
2063
|
o.resourceKey,
|
|
2056
|
-
|
|
2064
|
+
Je.createFrom({
|
|
2057
2065
|
input: a.input,
|
|
2058
2066
|
namespace: a.namespace ?? o.namespace ?? ""
|
|
2059
2067
|
})
|
|
@@ -2064,12 +2072,12 @@ const ks = ({
|
|
|
2064
2072
|
onError(o, { opts: a }) {
|
|
2065
2073
|
z(n, o, `Failed to create resource ${a.resourceID}`);
|
|
2066
2074
|
}
|
|
2067
|
-
}), s =
|
|
2068
|
-
mutationFn: async ({ opts: o, input: a }) =>
|
|
2075
|
+
}), s = x({
|
|
2076
|
+
mutationFn: async ({ opts: o, input: a }) => Qe(
|
|
2069
2077
|
e,
|
|
2070
2078
|
o.connectionID,
|
|
2071
2079
|
o.resourceKey,
|
|
2072
|
-
|
|
2080
|
+
ze.createFrom({
|
|
2073
2081
|
input: a.input,
|
|
2074
2082
|
id: o.resourceID,
|
|
2075
2083
|
namespace: o.namespace ?? ""
|
|
@@ -2081,12 +2089,12 @@ const ks = ({
|
|
|
2081
2089
|
onError(o, { opts: a }) {
|
|
2082
2090
|
z(n, o, `Failed to update resource ${a.resourceID}`);
|
|
2083
2091
|
}
|
|
2084
|
-
}), i =
|
|
2085
|
-
mutationFn: async ({ opts: o, input: a }) =>
|
|
2092
|
+
}), i = x({
|
|
2093
|
+
mutationFn: async ({ opts: o, input: a }) => Be(
|
|
2086
2094
|
e,
|
|
2087
2095
|
o.connectionID,
|
|
2088
2096
|
o.resourceKey,
|
|
2089
|
-
|
|
2097
|
+
Ve.createFrom({
|
|
2090
2098
|
id: o.resourceID,
|
|
2091
2099
|
namespace: o.namespace ?? "",
|
|
2092
2100
|
gracePeriodSeconds: a.gracePeriodSeconds
|
|
@@ -2104,15 +2112,15 @@ const ks = ({
|
|
|
2104
2112
|
update: s.mutateAsync,
|
|
2105
2113
|
remove: i.mutateAsync
|
|
2106
2114
|
};
|
|
2107
|
-
},
|
|
2115
|
+
}, js = ({
|
|
2108
2116
|
pluginID: t,
|
|
2109
2117
|
connectionID: e,
|
|
2110
2118
|
resourceKey: n,
|
|
2111
2119
|
enabled: r = !0
|
|
2112
2120
|
}) => {
|
|
2113
|
-
const s =
|
|
2121
|
+
const s = A(t), i = F({
|
|
2114
2122
|
queryKey: ["RESOURCE_ACTIONS", s, e, n],
|
|
2115
|
-
queryFn: () =>
|
|
2123
|
+
queryFn: () => cn(s, e, n),
|
|
2116
2124
|
enabled: r && !!s && !!e && !!n,
|
|
2117
2125
|
staleTime: 5 * 60 * 1e3
|
|
2118
2126
|
// actions don't change often
|
|
@@ -2122,18 +2130,18 @@ const ks = ({
|
|
|
2122
2130
|
isLoading: i.isLoading,
|
|
2123
2131
|
error: i.error
|
|
2124
2132
|
};
|
|
2125
|
-
},
|
|
2133
|
+
}, Qs = ({
|
|
2126
2134
|
pluginID: t,
|
|
2127
2135
|
connectionID: e,
|
|
2128
2136
|
resourceKey: n
|
|
2129
2137
|
}) => {
|
|
2130
|
-
const r =
|
|
2131
|
-
mutationFn: async ({ actionID: a, id: c = "", namespace:
|
|
2138
|
+
const r = A(t), s = K(), { showSnackbar: i } = Q(), o = x({
|
|
2139
|
+
mutationFn: async ({ actionID: a, id: c = "", namespace: f = "", params: u = {} }) => un(
|
|
2132
2140
|
r,
|
|
2133
2141
|
e,
|
|
2134
2142
|
n,
|
|
2135
2143
|
a,
|
|
2136
|
-
|
|
2144
|
+
Xe.createFrom({ id: c, namespace: f, params: u })
|
|
2137
2145
|
),
|
|
2138
2146
|
onSuccess: (a) => {
|
|
2139
2147
|
a != null && a.message && i(a.message, "success"), s.invalidateQueries({
|
|
@@ -2149,14 +2157,14 @@ const ks = ({
|
|
|
2149
2157
|
isExecuting: o.isPending,
|
|
2150
2158
|
error: o.error
|
|
2151
2159
|
};
|
|
2152
|
-
},
|
|
2160
|
+
}, Bs = ({
|
|
2153
2161
|
pluginID: t,
|
|
2154
2162
|
connectionID: e,
|
|
2155
2163
|
enabled: n = !0
|
|
2156
2164
|
}) => {
|
|
2157
|
-
const r =
|
|
2165
|
+
const r = A(t), s = F({
|
|
2158
2166
|
queryKey: ["EDITOR_SCHEMAS", r, e],
|
|
2159
|
-
queryFn: () =>
|
|
2167
|
+
queryFn: () => ln(r, e),
|
|
2160
2168
|
enabled: n && !!r && !!e,
|
|
2161
2169
|
staleTime: 10 * 60 * 1e3,
|
|
2162
2170
|
// schemas are fairly stable per connection
|
|
@@ -2168,39 +2176,39 @@ const ks = ({
|
|
|
2168
2176
|
error: s.error,
|
|
2169
2177
|
refetch: s.refetch
|
|
2170
2178
|
};
|
|
2171
|
-
},
|
|
2179
|
+
}, Hs = ({
|
|
2172
2180
|
pluginID: t,
|
|
2173
2181
|
connectionID: e,
|
|
2174
2182
|
enabled: n = !0
|
|
2175
2183
|
}) => {
|
|
2176
|
-
const r =
|
|
2184
|
+
const r = A(t), s = K(), i = [r, e, "watch-state"], o = W([]), a = W(!1), c = M((h) => {
|
|
2177
2185
|
s.setQueryData(i, (g) => {
|
|
2178
2186
|
if (!g) return g;
|
|
2179
|
-
const m = { ...g.resources, [h.resourceKey]: h.state },
|
|
2180
|
-
let
|
|
2181
|
-
for (const
|
|
2182
|
-
|
|
2183
|
-
return { ...g, resources: m, resourceCounts:
|
|
2187
|
+
const m = { ...g.resources, [h.resourceKey]: h.state }, w = { ...g.resourceCounts, [h.resourceKey]: h.resourceCount };
|
|
2188
|
+
let l = 0, d = 0;
|
|
2189
|
+
for (const E of Object.values(m))
|
|
2190
|
+
E === T.WatchStateSynced && l++, (E === T.WatchStateError || E === T.WatchStateFailed) && d++;
|
|
2191
|
+
return { ...g, resources: m, resourceCounts: w, totalResources: Object.keys(m).length, syncedCount: l, errorCount: d };
|
|
2184
2192
|
});
|
|
2185
|
-
}, [s, r, e]),
|
|
2193
|
+
}, [s, r, e]), f = F({
|
|
2186
2194
|
queryKey: i,
|
|
2187
2195
|
queryFn: async () => {
|
|
2188
|
-
const h = await
|
|
2196
|
+
const h = await dn(r, e);
|
|
2189
2197
|
if (!h) throw new Error("Failed to get watch state: null response");
|
|
2190
2198
|
const g = {};
|
|
2191
|
-
let m = 0,
|
|
2192
|
-
for (const [
|
|
2193
|
-
|
|
2194
|
-
const
|
|
2195
|
-
for (const [
|
|
2196
|
-
|
|
2199
|
+
let m = 0, w = 0;
|
|
2200
|
+
for (const [d, E] of Object.entries(h.resources ?? {}))
|
|
2201
|
+
E != null && (g[d] = E, E === T.WatchStateSynced && m++, E === T.WatchStateError && w++);
|
|
2202
|
+
const l = {};
|
|
2203
|
+
for (const [d, E] of Object.entries(h.resourceCounts ?? {}))
|
|
2204
|
+
E != null && (l[d] = E);
|
|
2197
2205
|
return {
|
|
2198
2206
|
connection: h.connectionId,
|
|
2199
2207
|
resources: g,
|
|
2200
|
-
resourceCounts:
|
|
2208
|
+
resourceCounts: l,
|
|
2201
2209
|
totalResources: Object.keys(g).length,
|
|
2202
2210
|
syncedCount: m,
|
|
2203
|
-
errorCount:
|
|
2211
|
+
errorCount: w
|
|
2204
2212
|
};
|
|
2205
2213
|
},
|
|
2206
2214
|
enabled: n && !!r && !!e,
|
|
@@ -2208,23 +2216,23 @@ const ks = ({
|
|
|
2208
2216
|
const g = h.state.data;
|
|
2209
2217
|
if (!g || g.totalResources === 0) return 3e3;
|
|
2210
2218
|
let m = 0;
|
|
2211
|
-
for (const
|
|
2212
|
-
(
|
|
2219
|
+
for (const w of Object.values(g.resources))
|
|
2220
|
+
(w === T.WatchStateSynced || w === T.WatchStateError || w === T.WatchStateStopped || w === T.WatchStateFailed || w === T.WatchStateForbidden || w === T.WatchStateSkipped) && m++;
|
|
2213
2221
|
return m >= g.totalResources ? !1 : 3e3;
|
|
2214
2222
|
}
|
|
2215
2223
|
});
|
|
2216
2224
|
j(() => {
|
|
2217
|
-
if (!
|
|
2225
|
+
if (!f.data || a.current) return;
|
|
2218
2226
|
a.current = !0;
|
|
2219
2227
|
const h = o.current;
|
|
2220
2228
|
o.current = [];
|
|
2221
2229
|
for (const g of h)
|
|
2222
2230
|
c(g);
|
|
2223
|
-
}, [
|
|
2231
|
+
}, [f.data, c]), j(() => {
|
|
2224
2232
|
if (!n || !r || !e)
|
|
2225
2233
|
return;
|
|
2226
2234
|
a.current = !1, o.current = [];
|
|
2227
|
-
const h =
|
|
2235
|
+
const h = D(
|
|
2228
2236
|
`${r}/${e}/watch/STATE`,
|
|
2229
2237
|
(g) => {
|
|
2230
2238
|
const m = g.data;
|
|
@@ -2235,48 +2243,48 @@ const ks = ({
|
|
|
2235
2243
|
h(), a.current = !1, o.current = [];
|
|
2236
2244
|
};
|
|
2237
2245
|
}, [r, e, n, c]);
|
|
2238
|
-
const
|
|
2239
|
-
let
|
|
2240
|
-
if (
|
|
2241
|
-
for (const h of Object.values(
|
|
2242
|
-
(h ===
|
|
2246
|
+
const u = f.data;
|
|
2247
|
+
let p = 0;
|
|
2248
|
+
if (u != null && u.resources)
|
|
2249
|
+
for (const h of Object.values(u.resources))
|
|
2250
|
+
(h === T.WatchStateSynced || h === T.WatchStateError || h === T.WatchStateStopped || h === T.WatchStateFailed || h === T.WatchStateForbidden || h === T.WatchStateSkipped) && p++;
|
|
2243
2251
|
return {
|
|
2244
2252
|
/** Full summary query result */
|
|
2245
|
-
summary:
|
|
2253
|
+
summary: f,
|
|
2246
2254
|
/** Get the state of a specific resource type's watch */
|
|
2247
|
-
getResourceState: (h) =>
|
|
2255
|
+
getResourceState: (h) => u == null ? void 0 : u.resources[h],
|
|
2248
2256
|
/** Whether all registered watches have reached a terminal state */
|
|
2249
|
-
isFullySynced:
|
|
2257
|
+
isFullySynced: u ? u.totalResources > 0 && p === u.totalResources : !1,
|
|
2250
2258
|
/** Sync progress as a 0-1 fraction (terminal states / total) */
|
|
2251
|
-
syncProgress:
|
|
2259
|
+
syncProgress: u && u.totalResources > 0 ? p / u.totalResources : 0,
|
|
2252
2260
|
/** Number of watches that encountered errors */
|
|
2253
|
-
errorCount: (
|
|
2261
|
+
errorCount: (u == null ? void 0 : u.errorCount) ?? 0
|
|
2254
2262
|
};
|
|
2255
|
-
},
|
|
2256
|
-
const [t, e] =
|
|
2257
|
-
const
|
|
2263
|
+
}, Ks = () => {
|
|
2264
|
+
const [t, e] = B(/* @__PURE__ */ new Map()), n = W(/* @__PURE__ */ new Map()), r = W(/* @__PURE__ */ new Map()), s = M((f) => {
|
|
2265
|
+
const u = f.data, p = Re(u), h = ut(n.current, u), g = Ce(h);
|
|
2258
2266
|
if (e((m) => {
|
|
2259
|
-
const
|
|
2260
|
-
return
|
|
2261
|
-
}), r.current.has(
|
|
2267
|
+
const w = new Map(m);
|
|
2268
|
+
return w.set(p, g), w;
|
|
2269
|
+
}), r.current.has(p) && (clearTimeout(r.current.get(p)), r.current.delete(p)), ce(g)) {
|
|
2262
2270
|
const m = setTimeout(() => {
|
|
2263
|
-
e((
|
|
2264
|
-
const
|
|
2265
|
-
return
|
|
2266
|
-
}), n.current.delete(
|
|
2271
|
+
e((w) => {
|
|
2272
|
+
const l = new Map(w);
|
|
2273
|
+
return l.delete(p), l;
|
|
2274
|
+
}), n.current.delete(p), r.current.delete(p);
|
|
2267
2275
|
}, 5e3);
|
|
2268
|
-
r.current.set(
|
|
2276
|
+
r.current.set(p, m);
|
|
2269
2277
|
}
|
|
2270
2278
|
}, []);
|
|
2271
2279
|
j(() => {
|
|
2272
|
-
const
|
|
2280
|
+
const f = D("watch/STATE", s);
|
|
2273
2281
|
return () => {
|
|
2274
|
-
|
|
2275
|
-
for (const
|
|
2276
|
-
clearTimeout(
|
|
2282
|
+
f();
|
|
2283
|
+
for (const u of r.current.values())
|
|
2284
|
+
clearTimeout(u);
|
|
2277
2285
|
};
|
|
2278
2286
|
}, [s]);
|
|
2279
|
-
const i = Array.from(t.values()), o =
|
|
2287
|
+
const i = Array.from(t.values()), o = at(i), a = i.find((f) => !ce(f)) ?? i[0] ?? null, c = ct(i);
|
|
2280
2288
|
return {
|
|
2281
2289
|
/** All tracked syncs */
|
|
2282
2290
|
syncs: i,
|
|
@@ -2287,73 +2295,73 @@ const ks = ({
|
|
|
2287
2295
|
/** Aggregate progress across all connections (0-1) */
|
|
2288
2296
|
aggregateProgress: c
|
|
2289
2297
|
};
|
|
2290
|
-
},
|
|
2291
|
-
const t = C.useContext(
|
|
2298
|
+
}, zr = () => {
|
|
2299
|
+
const t = C.useContext(rt);
|
|
2292
2300
|
if (!t) throw new Error("useOperations must be used within an OperationsProvider");
|
|
2293
2301
|
return t;
|
|
2294
|
-
},
|
|
2295
|
-
const r =
|
|
2296
|
-
var g, m,
|
|
2297
|
-
|
|
2298
|
-
}), h && o(
|
|
2302
|
+
}, zs = ({ pluginID: t, connectionID: e, resourceKey: n }) => {
|
|
2303
|
+
const r = A(t), { showSnackbar: s } = Q(), { addOperation: i, updateOperation: o } = zr(), a = C.useRef(/* @__PURE__ */ new Set()), c = C.useCallback((p, h = !1) => {
|
|
2304
|
+
var g, m, w;
|
|
2305
|
+
p.disposed || (p.disposed = !0, (g = p.unsubscribe) == null || g.call(p), (m = p.open) == null || m.cancel(), (w = p.attach) == null || w.cancel(), p.handle && (Fe(p.handle).catch(() => {
|
|
2306
|
+
}), h && o(p.handle, { status: "cancelled", message: "Cancelled", completedAt: Date.now() })), a.current.delete(p));
|
|
2299
2307
|
}, [o]);
|
|
2300
2308
|
C.useEffect(() => () => {
|
|
2301
|
-
for (const
|
|
2309
|
+
for (const p of a.current) c(p, !0);
|
|
2302
2310
|
}, [r, e, n, c]);
|
|
2303
|
-
const
|
|
2304
|
-
const
|
|
2305
|
-
a.current.add(
|
|
2311
|
+
const f = C.useCallback(async ({ actionID: p, id: h, namespace: g, label: m, params: w = {} }) => {
|
|
2312
|
+
const l = { disposed: !1, terminal: !1, sequence: 0 };
|
|
2313
|
+
a.current.add(l);
|
|
2306
2314
|
try {
|
|
2307
|
-
|
|
2308
|
-
const
|
|
2309
|
-
if (
|
|
2310
|
-
return
|
|
2311
|
-
}),
|
|
2312
|
-
|
|
2313
|
-
const
|
|
2314
|
-
if (
|
|
2315
|
-
|
|
2316
|
-
const
|
|
2317
|
-
if (
|
|
2318
|
-
|
|
2319
|
-
const
|
|
2320
|
-
o(
|
|
2321
|
-
} else if (
|
|
2322
|
-
|
|
2323
|
-
const
|
|
2324
|
-
o(
|
|
2315
|
+
l.open = fn(r, e, n, p, Xe.createFrom({ id: h, namespace: g, params: w }));
|
|
2316
|
+
const d = await l.open;
|
|
2317
|
+
if (l.open = void 0, l.disposed)
|
|
2318
|
+
return Fe(d).catch(() => {
|
|
2319
|
+
}), d;
|
|
2320
|
+
l.handle = d, i({ id: d, label: m, resourceKey: n, resourceName: h, namespace: g, connectionID: e, status: "running", startedAt: Date.now() });
|
|
2321
|
+
const E = (S) => {
|
|
2322
|
+
if (l.disposed || !Number.isSafeInteger(S.sequence) || S.sequence <= l.sequence) return;
|
|
2323
|
+
l.sequence = S.sequence;
|
|
2324
|
+
const b = S.event, v = b.data ?? {};
|
|
2325
|
+
if (b.type === "error") {
|
|
2326
|
+
l.terminal = !0;
|
|
2327
|
+
const R = H(b.error);
|
|
2328
|
+
o(d, { status: ae(R) ? "cancelled" : "error", message: R.title, completedAt: Date.now() }), z(s, R, m), c(l);
|
|
2329
|
+
} else if (b.type === "complete") {
|
|
2330
|
+
l.terminal = !0;
|
|
2331
|
+
const R = typeof v.message == "string" ? v.message : `${m} completed`;
|
|
2332
|
+
o(d, { status: "completed", message: R, completedAt: Date.now() }), s(R, "success"), c(l);
|
|
2325
2333
|
} else
|
|
2326
|
-
o(
|
|
2334
|
+
o(d, {
|
|
2327
2335
|
message: typeof v.message == "string" ? v.message : void 0,
|
|
2328
2336
|
progress: typeof v.ready == "number" && typeof v.desired == "number" ? { ready: v.ready, desired: v.desired } : void 0
|
|
2329
2337
|
});
|
|
2330
2338
|
};
|
|
2331
|
-
|
|
2332
|
-
const y = await
|
|
2333
|
-
return
|
|
2334
|
-
} catch (
|
|
2335
|
-
if (
|
|
2336
|
-
throw
|
|
2339
|
+
l.unsubscribe = D(`action/stream/${d}`, (S) => E(S.data)), l.attach = pn(d);
|
|
2340
|
+
const y = await l.attach;
|
|
2341
|
+
return l.attach = void 0, E(y), d;
|
|
2342
|
+
} catch (d) {
|
|
2343
|
+
if (l.terminal && l.handle) return l.handle;
|
|
2344
|
+
throw l.disposed || (l.handle && o(l.handle, { status: ae(d) ? "cancelled" : "error", message: H(d).title, completedAt: Date.now() }), z(s, d, `Failed to start "${p}"`)), c(l), d;
|
|
2337
2345
|
}
|
|
2338
|
-
}, [r, e, n, i, o, s, c]),
|
|
2339
|
-
for (const h of a.current) if (h.handle ===
|
|
2346
|
+
}, [r, e, n, i, o, s, c]), u = C.useCallback((p) => {
|
|
2347
|
+
for (const h of a.current) if (h.handle === p) {
|
|
2340
2348
|
c(h, !0);
|
|
2341
2349
|
return;
|
|
2342
2350
|
}
|
|
2343
2351
|
}, [c]);
|
|
2344
|
-
return { startStreamAction:
|
|
2352
|
+
return { startStreamAction: f, cancelStreamAction: u };
|
|
2345
2353
|
};
|
|
2346
|
-
function
|
|
2354
|
+
function Vr(t, e) {
|
|
2347
2355
|
return `${t}/${e}/graph/CHANGED`;
|
|
2348
2356
|
}
|
|
2349
|
-
function
|
|
2350
|
-
const s =
|
|
2357
|
+
function Ne(t, e, n, r) {
|
|
2358
|
+
const s = K(), i = W(n);
|
|
2351
2359
|
i.current = n;
|
|
2352
2360
|
const o = JSON.stringify(n);
|
|
2353
2361
|
j(() => {
|
|
2354
2362
|
if (!r || !t || !e)
|
|
2355
2363
|
return;
|
|
2356
|
-
const a =
|
|
2364
|
+
const a = D(Vr(t, e), () => {
|
|
2357
2365
|
s.invalidateQueries({ queryKey: i.current, exact: !0 });
|
|
2358
2366
|
});
|
|
2359
2367
|
return () => {
|
|
@@ -2361,7 +2369,7 @@ function Te(t, e, n, r) {
|
|
|
2361
2369
|
};
|
|
2362
2370
|
}, [s, t, e, o, r]);
|
|
2363
2371
|
}
|
|
2364
|
-
const
|
|
2372
|
+
const Yr = {
|
|
2365
2373
|
owns: { outgoing: "Owns", incoming: "Owned by" },
|
|
2366
2374
|
runs_on: { outgoing: "Runs on", incoming: "Running here" },
|
|
2367
2375
|
uses: { outgoing: "Uses", incoming: "Used by" },
|
|
@@ -2370,19 +2378,19 @@ const Br = {
|
|
|
2370
2378
|
member_of: { outgoing: "Member of", incoming: "Members" },
|
|
2371
2379
|
selects: { outgoing: "Selects", incoming: "Selected by" }
|
|
2372
2380
|
};
|
|
2373
|
-
function
|
|
2374
|
-
const n =
|
|
2381
|
+
function Vs(t, e) {
|
|
2382
|
+
const n = Yr[t];
|
|
2375
2383
|
if (n)
|
|
2376
2384
|
return n[e];
|
|
2377
2385
|
const r = t.replace(/_/g, " ");
|
|
2378
2386
|
return e === "outgoing" ? r : `${r} (incoming)`;
|
|
2379
2387
|
}
|
|
2380
|
-
function
|
|
2388
|
+
function Jr(t, e) {
|
|
2381
2389
|
return t.pluginId === e.pluginId && t.connectionId === e.connectionId && t.resourceKey === e.resourceKey && t.id === e.id && (t.namespace ?? "") === (e.namespace ?? "");
|
|
2382
2390
|
}
|
|
2383
|
-
function
|
|
2391
|
+
function Xr(t, e) {
|
|
2384
2392
|
return e.map((n) => {
|
|
2385
|
-
const r =
|
|
2393
|
+
const r = Jr(n.source, t);
|
|
2386
2394
|
return {
|
|
2387
2395
|
resource: r ? n.target : n.source,
|
|
2388
2396
|
type: n.type,
|
|
@@ -2391,7 +2399,7 @@ function Vr(t, e) {
|
|
|
2391
2399
|
};
|
|
2392
2400
|
});
|
|
2393
2401
|
}
|
|
2394
|
-
const
|
|
2402
|
+
const Ys = ({
|
|
2395
2403
|
pluginID: t,
|
|
2396
2404
|
connectionID: e,
|
|
2397
2405
|
resourceKey: n,
|
|
@@ -2402,15 +2410,15 @@ const Ks = ({
|
|
|
2402
2410
|
enabled: a = !0,
|
|
2403
2411
|
refetchInterval: c = !1
|
|
2404
2412
|
}) => {
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2413
|
+
const f = A(t), u = ["RESOURCE_RELATED", f, e, n, s, r, i, o ?? null], p = a && !!f && !!e && !!n && !!r;
|
|
2414
|
+
Ne(f, e, u, p);
|
|
2407
2415
|
const h = F({
|
|
2408
|
-
queryKey:
|
|
2409
|
-
queryFn: async () =>
|
|
2410
|
-
enabled:
|
|
2416
|
+
queryKey: u,
|
|
2417
|
+
queryFn: async () => hn(f, e, n, s, r, i, o ?? null),
|
|
2418
|
+
enabled: p,
|
|
2411
2419
|
refetchInterval: c
|
|
2412
2420
|
}), g = {
|
|
2413
|
-
pluginId:
|
|
2421
|
+
pluginId: f,
|
|
2414
2422
|
connectionId: e,
|
|
2415
2423
|
resourceKey: n,
|
|
2416
2424
|
id: r,
|
|
@@ -2418,7 +2426,7 @@ const Ks = ({
|
|
|
2418
2426
|
}, m = h.data ?? [];
|
|
2419
2427
|
return {
|
|
2420
2428
|
/** One entry per edge, from the viewed resource's side. */
|
|
2421
|
-
related:
|
|
2429
|
+
related: Xr(g, m),
|
|
2422
2430
|
/** The raw graph edges. */
|
|
2423
2431
|
edges: m,
|
|
2424
2432
|
isLoading: h.isLoading,
|
|
@@ -2426,7 +2434,7 @@ const Ks = ({
|
|
|
2426
2434
|
error: h.error,
|
|
2427
2435
|
refetch: h.refetch
|
|
2428
2436
|
};
|
|
2429
|
-
},
|
|
2437
|
+
}, Js = ({
|
|
2430
2438
|
pluginID: t,
|
|
2431
2439
|
connectionID: e,
|
|
2432
2440
|
resourceKey: n,
|
|
@@ -2436,22 +2444,22 @@ const Ks = ({
|
|
|
2436
2444
|
enabled: o = !0,
|
|
2437
2445
|
refetchInterval: a = !1
|
|
2438
2446
|
}) => {
|
|
2439
|
-
const c =
|
|
2440
|
-
|
|
2441
|
-
const
|
|
2442
|
-
queryKey:
|
|
2443
|
-
queryFn: async () =>
|
|
2444
|
-
enabled:
|
|
2447
|
+
const c = A(t), f = ["RESOURCE_DEPENDENCY_TREE", c, e, n, s, r, i], u = o && !!c && !!e && !!n && !!r;
|
|
2448
|
+
Ne(c, e, f, u);
|
|
2449
|
+
const p = F({
|
|
2450
|
+
queryKey: f,
|
|
2451
|
+
queryFn: async () => gn(c, e, n, s, r, i),
|
|
2452
|
+
enabled: u,
|
|
2445
2453
|
refetchInterval: a
|
|
2446
2454
|
});
|
|
2447
2455
|
return {
|
|
2448
|
-
tree:
|
|
2449
|
-
isLoading:
|
|
2450
|
-
isFetching:
|
|
2451
|
-
error:
|
|
2452
|
-
refetch:
|
|
2456
|
+
tree: p.data ?? null,
|
|
2457
|
+
isLoading: p.isLoading,
|
|
2458
|
+
isFetching: p.isFetching,
|
|
2459
|
+
error: p.error,
|
|
2460
|
+
refetch: p.refetch
|
|
2453
2461
|
};
|
|
2454
|
-
},
|
|
2462
|
+
}, Xs = ({
|
|
2455
2463
|
pluginID: t,
|
|
2456
2464
|
connectionID: e,
|
|
2457
2465
|
resourceKey: n,
|
|
@@ -2461,53 +2469,53 @@ const Ks = ({
|
|
|
2461
2469
|
downDepth: o = 3,
|
|
2462
2470
|
enabled: a = !0
|
|
2463
2471
|
}) => {
|
|
2464
|
-
const c =
|
|
2465
|
-
|
|
2466
|
-
const
|
|
2467
|
-
queryKey:
|
|
2468
|
-
queryFn: async () =>
|
|
2469
|
-
enabled:
|
|
2472
|
+
const c = A(t), f = ["RESOURCE_GRAPH", c, e, n, s, r, i, o], u = a && !!c && !!e && !!n && !!r;
|
|
2473
|
+
Ne(c, e, f, u);
|
|
2474
|
+
const p = F({
|
|
2475
|
+
queryKey: f,
|
|
2476
|
+
queryFn: async () => yn(c, e, n, s, r, i, o),
|
|
2477
|
+
enabled: u
|
|
2470
2478
|
});
|
|
2471
2479
|
return {
|
|
2472
|
-
graph:
|
|
2473
|
-
isLoading:
|
|
2474
|
-
isFetching:
|
|
2475
|
-
error:
|
|
2476
|
-
refetch:
|
|
2480
|
+
graph: p.data ?? null,
|
|
2481
|
+
isLoading: p.isLoading,
|
|
2482
|
+
isFetching: p.isFetching,
|
|
2483
|
+
error: p.error,
|
|
2484
|
+
refetch: p.refetch
|
|
2477
2485
|
};
|
|
2478
|
-
},
|
|
2479
|
-
const t = C.useContext(
|
|
2486
|
+
}, Zs = () => {
|
|
2487
|
+
const t = C.useContext(nt);
|
|
2480
2488
|
if (!t)
|
|
2481
2489
|
throw new Error("useSettings must be used within a SettingsProvider");
|
|
2482
2490
|
return t;
|
|
2483
|
-
},
|
|
2484
|
-
const { pluginId: r } =
|
|
2491
|
+
}, eo = ({ to: t, withinContext: e, ...n }) => {
|
|
2492
|
+
const { pluginId: r } = be();
|
|
2485
2493
|
r || console.error("Link used outside of a plugin context");
|
|
2486
2494
|
const s = `/_plugin/${r}${t.startsWith("/") ? "" : "/"}${t}`;
|
|
2487
|
-
return C.useMemo(() => /* @__PURE__ */
|
|
2495
|
+
return C.useMemo(() => /* @__PURE__ */ _(bt, { style: { textDecoration: "none", color: "inherit" }, ...n, to: s }), [n, s]);
|
|
2488
2496
|
};
|
|
2489
|
-
function
|
|
2490
|
-
const t =
|
|
2497
|
+
function to() {
|
|
2498
|
+
const t = Rt(), e = It(), { pluginId: n } = be();
|
|
2491
2499
|
n || console.error("usePluginRouter used outside of a plugin context");
|
|
2492
2500
|
const r = `/_plugin/${n}`, s = e.pathname.startsWith(r) ? e.pathname.slice(r.length) || "/" : e.pathname, i = M((o, a) => {
|
|
2493
2501
|
const { ...c } = a ?? {};
|
|
2494
2502
|
o.startsWith("/") ? t(`${r}${o}`, c) : t(o, c);
|
|
2495
2503
|
}, [t, r]);
|
|
2496
|
-
return
|
|
2504
|
+
return _t(() => ({
|
|
2497
2505
|
location: e,
|
|
2498
2506
|
navigate: i,
|
|
2499
2507
|
pluginPath: s
|
|
2500
2508
|
}), [e, i, s]);
|
|
2501
2509
|
}
|
|
2502
|
-
class
|
|
2510
|
+
class no {
|
|
2503
2511
|
}
|
|
2504
|
-
class
|
|
2512
|
+
class ro {
|
|
2505
2513
|
constructor() {
|
|
2506
|
-
|
|
2514
|
+
P(this, "_extensions");
|
|
2507
2515
|
/**
|
|
2508
2516
|
* The root component to render for the application window.
|
|
2509
2517
|
*/
|
|
2510
|
-
|
|
2518
|
+
P(this, "root");
|
|
2511
2519
|
/**
|
|
2512
2520
|
* Various pages to render under the root component. These can be navigated to using
|
|
2513
2521
|
* the built-in navigation system both programatically and through Links.
|
|
@@ -2537,8 +2545,8 @@ class Xs {
|
|
|
2537
2545
|
* ```
|
|
2538
2546
|
*
|
|
2539
2547
|
*/
|
|
2540
|
-
|
|
2541
|
-
|
|
2548
|
+
P(this, "pages");
|
|
2549
|
+
P(this, "_routes");
|
|
2542
2550
|
}
|
|
2543
2551
|
get extensions() {
|
|
2544
2552
|
return this._extensions || [];
|
|
@@ -2560,9 +2568,9 @@ class Xs {
|
|
|
2560
2568
|
*/
|
|
2561
2569
|
get Window() {
|
|
2562
2570
|
if (!this._routes && this.root)
|
|
2563
|
-
return /* @__PURE__ */
|
|
2564
|
-
const e =
|
|
2565
|
-
return /* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ _(this.root, {});
|
|
2572
|
+
const e = Tt(this._routes || []);
|
|
2573
|
+
return /* @__PURE__ */ _(Ot, { router: e });
|
|
2566
2574
|
}
|
|
2567
2575
|
/**
|
|
2568
2576
|
* Register extension points for other plugins to extend the functionality
|
|
@@ -2594,91 +2602,129 @@ class Xs {
|
|
|
2594
2602
|
return this._routes = e, this;
|
|
2595
2603
|
}
|
|
2596
2604
|
}
|
|
2597
|
-
var
|
|
2598
|
-
const
|
|
2605
|
+
var Zr = /* @__PURE__ */ ((t) => (t.MISSING_MANIFEST = "MISSING_MANIFEST", t.MISSING_PLUGIN = "MISSING_PLUGIN", t.MISSING_ENTRYPOINT = "MISSING_ENTRYPOINT", t))(Zr || {});
|
|
2606
|
+
const so = (t) => {
|
|
2599
2607
|
const e = t.split("::");
|
|
2600
2608
|
return e.length === 1 ? { group: "core", version: "", kind: e[0] } : {
|
|
2601
2609
|
group: e[0] || "core",
|
|
2602
2610
|
version: e[1] || "",
|
|
2603
2611
|
kind: e[2] || e[0]
|
|
2604
2612
|
};
|
|
2605
|
-
},
|
|
2613
|
+
}, oo = (t) => !t || t === "core" ? "Core" : t.charAt(0).toUpperCase() + t.slice(1), es = "omniview/global-search/open";
|
|
2614
|
+
function io(t = {}) {
|
|
2615
|
+
window.dispatchEvent(new CustomEvent(es, { detail: t }));
|
|
2616
|
+
}
|
|
2617
|
+
const ts = "omniview/resource/icons";
|
|
2618
|
+
class ns extends wt {
|
|
2619
|
+
constructor() {
|
|
2620
|
+
super(...arguments);
|
|
2621
|
+
P(this, "state", { failed: !1, resetToken: this.props.resetToken });
|
|
2622
|
+
}
|
|
2623
|
+
static getDerivedStateFromProps(n, r) {
|
|
2624
|
+
return n.resetToken !== r.resetToken ? { failed: !1, resetToken: n.resetToken } : null;
|
|
2625
|
+
}
|
|
2626
|
+
static getDerivedStateFromError() {
|
|
2627
|
+
return { failed: !0 };
|
|
2628
|
+
}
|
|
2629
|
+
render() {
|
|
2630
|
+
return this.state.failed ? this.props.fallback : this.props.children;
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
function ao({ pluginId: t, resourceKey: e, fallback: n, ...r }) {
|
|
2634
|
+
const s = Gn(ts), i = n === void 0 ? /* @__PURE__ */ _("svg", { width: r.size ?? 16, height: r.size ?? 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", className: r.className, "aria-hidden": r["aria-hidden"] ?? !0, children: /* @__PURE__ */ _("path", { d: "m12 3 9 5v8l-9 5-9-5V8l9-5Zm0 9 9-4M12 12 3 8m9 4v9" }) }) : n;
|
|
2635
|
+
for (const o of (s == null ? void 0 : s.listAll()) ?? [])
|
|
2636
|
+
if (o.plugin === t)
|
|
2637
|
+
try {
|
|
2638
|
+
const a = o.value;
|
|
2639
|
+
if ((a == null ? void 0 : a.schemaVersion) !== 1 || typeof a.resolve != "function") continue;
|
|
2640
|
+
const c = a.resolve(e);
|
|
2641
|
+
if (!c) continue;
|
|
2642
|
+
return /* @__PURE__ */ _(ns, { resetToken: o, fallback: i, children: /* @__PURE__ */ _(C.Suspense, { fallback: i, children: /* @__PURE__ */ _(c, { ...r, "aria-hidden": r["aria-hidden"] ?? !0 }) }) }, JSON.stringify([t, e, s == null ? void 0 : s.version, o.id]));
|
|
2643
|
+
} catch {
|
|
2644
|
+
}
|
|
2645
|
+
return /* @__PURE__ */ _($e, { children: i });
|
|
2646
|
+
}
|
|
2606
2647
|
export {
|
|
2607
2648
|
J as ALL_SESSIONS_KEY,
|
|
2608
2649
|
xn as BottomDrawerContext,
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2650
|
+
Ln as ConfirmationModalContext,
|
|
2651
|
+
N as ErrorTypes,
|
|
2652
|
+
Ss as ExtensionPointRegistry,
|
|
2653
|
+
jn as ExtensionPointStore,
|
|
2654
|
+
Es as ExtensionProvider,
|
|
2655
|
+
es as GLOBAL_SEARCH_OPEN_EVENT,
|
|
2656
|
+
eo as Link,
|
|
2657
|
+
rt as OperationsContext,
|
|
2658
|
+
ms as OperationsProvider,
|
|
2659
|
+
we as PluginContext,
|
|
2660
|
+
hs as PluginContextProvider,
|
|
2661
|
+
Zr as PluginErrorCode,
|
|
2662
|
+
ro as PluginWindow,
|
|
2663
|
+
no as PluginWindowRootProps,
|
|
2664
|
+
ts as RESOURCE_ICON_EXTENSION_POINT_ID,
|
|
2665
|
+
ao as ResourceIcon,
|
|
2666
|
+
Pn as RightDrawerContext,
|
|
2667
|
+
nt as SettingsContext,
|
|
2668
|
+
ys as SettingsProvider,
|
|
2669
|
+
vs as SnackbarProvider,
|
|
2670
|
+
T as WatchState,
|
|
2671
|
+
Dn as actionToSnackbar,
|
|
2672
|
+
Hr as applyBatch,
|
|
2673
|
+
Bn as connectionListQueryKey,
|
|
2630
2674
|
U as createErrorHandler,
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2675
|
+
Fn as defaultState,
|
|
2676
|
+
oo as formatGroup,
|
|
2677
|
+
Vr as graphChangedEvent,
|
|
2634
2678
|
ae as isCancelledError,
|
|
2679
|
+
io as openGlobalSearch,
|
|
2635
2680
|
H as parseAppError,
|
|
2636
|
-
|
|
2637
|
-
|
|
2681
|
+
so as parseResourceKey,
|
|
2682
|
+
Vs as relationshipLabel,
|
|
2683
|
+
_e as resourceQueryKeys,
|
|
2638
2684
|
z as showAppError,
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2685
|
+
Xr as toRelatedResources,
|
|
2686
|
+
Ks as useActiveSyncs,
|
|
2687
|
+
lt as useBottomDrawer,
|
|
2688
|
+
Ps as useConfirmationModal,
|
|
2689
|
+
Cs as useConnection,
|
|
2690
|
+
ws as useConnectionNamespaces,
|
|
2691
|
+
bs as useConnectionStatus,
|
|
2692
|
+
_s as useConnections,
|
|
2693
|
+
Js as useDependencyTree,
|
|
2694
|
+
Bs as useEditorSchemas,
|
|
2695
|
+
Kr as useEventBatcher,
|
|
2696
|
+
Ts as useExec,
|
|
2697
|
+
Qs as useExecuteAction,
|
|
2698
|
+
Gn as useExtensionPoint,
|
|
2699
|
+
Wn as useExtensionRegistry,
|
|
2700
|
+
Os as useLogs,
|
|
2701
|
+
As as useMetricProviders,
|
|
2702
|
+
Kn as useMetricProvidersForResource,
|
|
2703
|
+
Ds as useMetricStream,
|
|
2704
|
+
zr as useOperations,
|
|
2705
|
+
be as usePluginContext,
|
|
2706
|
+
Rs as usePluginData,
|
|
2707
|
+
to as usePluginRouter,
|
|
2708
|
+
gs as usePluginSettings,
|
|
2709
|
+
Fs as usePortForwardSessions,
|
|
2710
|
+
Ne as useRefetchOnGraphChange,
|
|
2711
|
+
Ys as useRelatedResources,
|
|
2712
|
+
A as useResolvedPluginId,
|
|
2713
|
+
Ls as useResource,
|
|
2714
|
+
js as useResourceActions,
|
|
2715
|
+
ks as useResourceAreaComponent,
|
|
2716
|
+
Xs as useResourceGraph,
|
|
2717
|
+
Ms as useResourceGroups,
|
|
2718
|
+
Ns as useResourceMetrics,
|
|
2719
|
+
Gs as useResourceMutations,
|
|
2720
|
+
xs as useResourcePortForwarder,
|
|
2721
|
+
Us as useResourceSearch,
|
|
2722
|
+
qs as useResourceType,
|
|
2723
|
+
$s as useResourceTypes,
|
|
2724
|
+
Ws as useResources,
|
|
2725
|
+
Is as useRightDrawer,
|
|
2726
|
+
Zs as useSettings,
|
|
2681
2727
|
Q as useSnackbar,
|
|
2682
|
-
|
|
2683
|
-
|
|
2728
|
+
zs as useStreamAction,
|
|
2729
|
+
Hs as useWatchState
|
|
2684
2730
|
};
|