@omniviewdev/runtime 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.cjs +1 -1
- package/dist/api.js +246 -113
- package/dist/bindings/events/index.d.ts +140 -0
- package/dist/bindings/github.com/omniviewdev/omniview/appservice.d.ts +5 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/models.d.ts +24 -26
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/servicewrapper.d.ts +0 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.d.ts +36 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graphservice.d.ts +6 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/devcontract/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/devcontract/models.d.ts +101 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models.d.ts +31 -0
- package/dist/errors/types.d.ts +2 -0
- package/dist/graphservice-Cb7rr7SB.cjs +1 -0
- package/dist/graphservice-DloOtC_7.js +739 -0
- package/dist/hooks/resource/index.d.ts +2 -0
- package/dist/hooks/resource/useDependencyTree.d.ts +2 -2
- package/dist/hooks/resource/useRefetchOnGraphChange.d.ts +11 -0
- package/dist/hooks/resource/useRelatedResources.d.ts +2 -3
- package/dist/hooks/resource/useResourceGraph.d.ts +46 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +874 -797
- package/dist/models-8-4Ny_ft.cjs +1 -0
- package/dist/{models-BoBl5Kgj.js → models-BlTzZkmp.js} +46 -60
- package/dist/models-CGYstu7u.cjs +1 -0
- package/dist/{models-BvR5jdms.js → models-D-vu7j83.js} +520 -449
- package/dist/models.cjs +1 -1
- package/dist/models.d.ts +2 -2
- package/dist/models.js +67 -64
- package/package.json +5 -5
- package/dist/graphservice-CRRwkBcy.cjs +0 -1
- package/dist/graphservice-CXr8ZCEY.js +0 -726
- package/dist/models-CHycLCM0.cjs +0 -1
- package/dist/models-DOdc96z9.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import
|
|
6
|
-
import { Link as
|
|
7
|
-
import { P as gt, G as ht, V as mt, S as St, a as Ie, U as _t, R as wt, b as Et, c as De, d as Ct, L as bt, e as vt, f as Rt, g as Ft, h as It, i as Dt, j as Pt, C as Ot, k as Tt, l as At, m as xt, n as Nt, Q as Lt, o as kt, p as Ee, q as Mt, r as Pe, F as $t, s as Ut, t as Oe, D as Te, u as qt, v as Wt, w as Gt, x as Ae, y as jt, z as Qt, A as xe, B as Kt, E as Bt, H as Ht, I as zt, J as Yt, K as Jt, M as Zt, N as Xt, O as Vt } from "./graphservice-CXr8ZCEY.js";
|
|
8
|
-
import { P as en, W as tn, S as nn, C as rn, L as sn, F as on, a as an, U as Ne, D as Le, G as cn, b as ke, c as Me, A as $e } from "./models-BvR5jdms.js";
|
|
9
|
-
import { useQueryClient as j, useMutation as P, useQuery as O, keepPreviousData as Ue, useQueries as un } from "@tanstack/react-query";
|
|
10
|
-
import { useToast as ln } from "@omniviewdev/base-ui";
|
|
1
|
+
var at = Object.defineProperty;
|
|
2
|
+
var ct = (t, e, n) => e in t ? at(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var D = (t, e, n) => ct(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsx as x, jsxs as X } from "react/jsx-runtime";
|
|
5
|
+
import w, { useContext as Y, createContext as re, useState as G, useRef as q, useCallback as k, useSyncExternalStore as ut, useEffect as $, useMemo as lt } from "react";
|
|
6
|
+
import { Link as dt, useNavigate as ft, useLocation as pt, createMemoryRouter as gt, RouterProvider as yt } from "react-router-dom";
|
|
11
7
|
import "./index-D2mKAO8s.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
8
|
+
import { P as ht, G as mt, V as St, S as _t, a as Pe, U as Et, R as wt, b as Ct, c as Oe, d as bt, L as vt, e as Rt, f as Ft, g as It, h as Pt, i as Ot, j as Tt, C as At, k as Dt, l as xt, m as Nt, n as kt, Q as Lt, o as Mt, p as Ce, q as qt, r as Te, F as Ut, s as $t, t as Ae, D as De, u as Wt, v as Gt, w as jt, x as xe, y as Qt, z as Kt, A as Ne, B as Ht, E as Bt, H as zt, I as Yt, J as Jt, K as Zt, M as Xt, N as Vt, O as en, T as tn } from "./graphservice-DloOtC_7.js";
|
|
9
|
+
import { P as nn, W as rn, S as sn, C as on, L as an, F as cn, a as un, U as ke, D as Le, G as ln, b as Me, c as qe, A as Ue } from "./models-D-vu7j83.js";
|
|
10
|
+
import { O, a as $e, b as ae } from "./events-DDTGFACO.js";
|
|
11
|
+
import { useQueryClient as j, useMutation as A, useQuery as T, keepPreviousData as We, useQueries as dn } from "@tanstack/react-query";
|
|
12
|
+
import { useToast as fn } from "@omniviewdev/base-ui";
|
|
13
|
+
import { w as pn } from "./legacyEnum-DORXlU_y.js";
|
|
14
|
+
const ge = w.createContext(void 0), U = {
|
|
15
15
|
// Plugin
|
|
16
16
|
PLUGIN_NOT_FOUND: "omniview:plugin/not-found",
|
|
17
17
|
PLUGIN_NOT_LOADED: "omniview:plugin/not-loaded",
|
|
@@ -19,6 +19,8 @@ const ye = b.createContext(void 0), $ = {
|
|
|
19
19
|
PLUGIN_INSTALL_FAILED: "omniview:plugin/install-failed",
|
|
20
20
|
PLUGIN_LOAD_FAILED: "omniview:plugin/load-failed",
|
|
21
21
|
PLUGIN_BUILD_FAILED: "omniview:plugin/build-failed",
|
|
22
|
+
PLUGIN_COMMITTED_CLEANUP_PENDING: "omniview:plugin/committed-cleanup-pending",
|
|
23
|
+
PLUGIN_COMMIT_UNCERTAIN: "omniview:plugin/commit-uncertain",
|
|
22
24
|
// Settings
|
|
23
25
|
SETTINGS_MISSING_CONFIG: "omniview:settings/missing-config",
|
|
24
26
|
SETTINGS_INVALID_CONFIG: "omniview:settings/invalid-config",
|
|
@@ -42,31 +44,31 @@ const ye = b.createContext(void 0), $ = {
|
|
|
42
44
|
VALIDATION: "omniview:validation",
|
|
43
45
|
NOT_IMPLEMENTED: "omniview:not-implemented"
|
|
44
46
|
};
|
|
45
|
-
function
|
|
47
|
+
function gn(t) {
|
|
46
48
|
switch (t) {
|
|
47
49
|
case "NOT_FOUND":
|
|
48
|
-
return { typeUri:
|
|
50
|
+
return { typeUri: U.RESOURCE_NOT_FOUND, status: 404 };
|
|
49
51
|
case "FORBIDDEN":
|
|
50
|
-
return { typeUri:
|
|
52
|
+
return { typeUri: U.RESOURCE_FORBIDDEN, status: 403 };
|
|
51
53
|
case "UNAUTHORIZED":
|
|
52
|
-
return { typeUri:
|
|
54
|
+
return { typeUri: U.RESOURCE_UNAUTHORIZED, status: 401 };
|
|
53
55
|
case "CONFLICT":
|
|
54
56
|
case "ALREADY_EXISTS":
|
|
55
|
-
return { typeUri:
|
|
57
|
+
return { typeUri: U.RESOURCE_CONFLICT, status: 409 };
|
|
56
58
|
case "TIMEOUT":
|
|
57
|
-
return { typeUri:
|
|
59
|
+
return { typeUri: U.RESOURCE_TIMEOUT, status: 408 };
|
|
58
60
|
case "CONNECTION_ERROR":
|
|
59
|
-
return { typeUri:
|
|
61
|
+
return { typeUri: U.RESOURCE_CONNECTION_ERROR, status: 503 };
|
|
60
62
|
case "CERTIFICATE_ERROR":
|
|
61
|
-
return { typeUri:
|
|
63
|
+
return { typeUri: U.RESOURCE_CERTIFICATE_ERROR, status: 502 };
|
|
62
64
|
default:
|
|
63
|
-
return { typeUri:
|
|
65
|
+
return { typeUri: U.INTERNAL, status: 500 };
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
function Q(t) {
|
|
67
69
|
if (t == null)
|
|
68
70
|
return {
|
|
69
|
-
type:
|
|
71
|
+
type: U.INTERNAL,
|
|
70
72
|
title: "Unknown error",
|
|
71
73
|
status: 500,
|
|
72
74
|
detail: "An unknown error occurred."
|
|
@@ -78,7 +80,7 @@ function Q(t) {
|
|
|
78
80
|
if (typeof n.type == "string" && typeof n.title == "string" && typeof n.status == "number" && typeof n.detail == "string")
|
|
79
81
|
return n;
|
|
80
82
|
if (typeof n.code == "string" && typeof n.title == "string" && typeof n.message == "string") {
|
|
81
|
-
const { typeUri: r, status: s } =
|
|
83
|
+
const { typeUri: r, status: s } = gn(n.code);
|
|
82
84
|
return {
|
|
83
85
|
type: r,
|
|
84
86
|
title: n.title,
|
|
@@ -90,16 +92,16 @@ function Q(t) {
|
|
|
90
92
|
} catch {
|
|
91
93
|
}
|
|
92
94
|
return {
|
|
93
|
-
type:
|
|
95
|
+
type: U.INTERNAL,
|
|
94
96
|
title: "Error",
|
|
95
97
|
status: 500,
|
|
96
98
|
detail: e
|
|
97
99
|
};
|
|
98
100
|
}
|
|
99
|
-
function
|
|
100
|
-
return t == null ? !1 : (typeof t == "string" ? t : t instanceof Error ? t.message : String(t)) === "cancelled" ? !0 : Q(t).type ===
|
|
101
|
+
function Ge(t) {
|
|
102
|
+
return t == null ? !1 : (typeof t == "string" ? t : t instanceof Error ? t.message : String(t)) === "cancelled" ? !0 : Q(t).type === U.CANCELLED;
|
|
101
103
|
}
|
|
102
|
-
function
|
|
104
|
+
function yn(t) {
|
|
103
105
|
switch (t.type) {
|
|
104
106
|
case "navigate":
|
|
105
107
|
return {
|
|
@@ -136,7 +138,7 @@ function pn(t) {
|
|
|
136
138
|
};
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
|
-
function
|
|
141
|
+
function je(t, e) {
|
|
140
142
|
var s, i;
|
|
141
143
|
const n = [
|
|
142
144
|
t.detail,
|
|
@@ -147,46 +149,67 @@ function Ge(t, e) {
|
|
|
147
149
|
message: e || (t.title !== "Error" ? t.title : "Operation failed"),
|
|
148
150
|
status: "error",
|
|
149
151
|
details: n,
|
|
150
|
-
actions: (i = t.actions) == null ? void 0 : i.map(
|
|
152
|
+
actions: (i = t.actions) == null ? void 0 : i.map(yn)
|
|
151
153
|
};
|
|
152
154
|
}
|
|
153
155
|
function z(t, e, n) {
|
|
154
|
-
if (
|
|
156
|
+
if (Ge(e)) return;
|
|
155
157
|
const r = Q(e);
|
|
156
|
-
t(
|
|
158
|
+
t(je(r, n));
|
|
157
159
|
}
|
|
158
160
|
function L(t, e) {
|
|
159
161
|
return (n) => {
|
|
160
|
-
if (
|
|
162
|
+
if (Ge(n)) return;
|
|
161
163
|
const r = Q(n);
|
|
162
|
-
t(
|
|
164
|
+
t(je(r, r.title !== "Error" ? r.title : e));
|
|
163
165
|
};
|
|
164
166
|
}
|
|
165
|
-
function
|
|
166
|
-
const { children: e, pluginId: n } = t, [r, s] =
|
|
167
|
+
function zr(t) {
|
|
168
|
+
const { children: e, pluginId: n } = t, [r, s] = w.useState({}), [i, o] = w.useState(new nn()), [a, c] = w.useState(!1), [l, u] = w.useState(null), f = w.useRef(0), d = w.useRef(0);
|
|
167
169
|
console.debug("[PluginContextProvider] render", { pluginId: n, metaLoaded: a, metaError: !!l });
|
|
168
|
-
const
|
|
169
|
-
n === void 0 || n === ""
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
console.
|
|
174
|
-
}))
|
|
175
|
-
|
|
170
|
+
const p = w.useCallback(() => {
|
|
171
|
+
if (n === void 0 || n === "")
|
|
172
|
+
return;
|
|
173
|
+
const S = ++f.current;
|
|
174
|
+
console.debug(`[PluginContextProvider] fetching settings for "${n}"`), ht(n).then((m) => {
|
|
175
|
+
S === f.current && (console.debug(`[PluginContextProvider] settings loaded for "${n}"`, Object.keys(m)), s(m));
|
|
176
|
+
}).catch((m) => {
|
|
177
|
+
if (S !== f.current) return;
|
|
178
|
+
const y = Q(m);
|
|
179
|
+
console.error(`[PluginContextProvider] error fetching settings for "${n}":`, y.detail);
|
|
180
|
+
});
|
|
181
|
+
}, [n]), g = w.useCallback(() => {
|
|
176
182
|
if (n === void 0 || n === "") {
|
|
177
183
|
console.debug("[PluginContextProvider] skipping meta fetch — empty pluginId");
|
|
178
184
|
return;
|
|
179
185
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
186
|
+
const S = ++d.current;
|
|
187
|
+
console.debug(`[PluginContextProvider] fetching meta for "${n}"`), u(null), mt(n).then((m) => {
|
|
188
|
+
S === d.current && (console.debug(`[PluginContextProvider] meta loaded for "${n}"`, { name: m == null ? void 0 : m.name, version: m == null ? void 0 : m.version }), o(m), c(!0));
|
|
189
|
+
}).catch((m) => {
|
|
190
|
+
if (S !== d.current) return;
|
|
191
|
+
const y = Q(m);
|
|
192
|
+
console.error(`[PluginContextProvider] error fetching meta for "${n}":`, y.detail), u(y.detail), c(!1);
|
|
185
193
|
});
|
|
186
|
-
};
|
|
187
|
-
return
|
|
188
|
-
|
|
189
|
-
|
|
194
|
+
}, [n]);
|
|
195
|
+
return w.useEffect(() => {
|
|
196
|
+
if (a) return;
|
|
197
|
+
const S = () => {
|
|
198
|
+
p(), g();
|
|
199
|
+
}, m = [
|
|
200
|
+
O("plugin/init_complete", S),
|
|
201
|
+
O("plugin/dev_install_complete", (y) => {
|
|
202
|
+
var _;
|
|
203
|
+
((_ = y.data) == null ? void 0 : _.id) === n && S();
|
|
204
|
+
}),
|
|
205
|
+
O("plugin/inventory_changed", S)
|
|
206
|
+
];
|
|
207
|
+
return () => {
|
|
208
|
+
for (const y of m) y();
|
|
209
|
+
};
|
|
210
|
+
}, [n, a, p, g]), w.useEffect(() => (console.debug(`[PluginContextProvider] useEffect — pluginId changed to "${n}"`), c(!1), u(null), s({}), p(), g(), () => {
|
|
211
|
+
++f.current, ++d.current;
|
|
212
|
+
}), [n, p, g]), l ? /* @__PURE__ */ x("div", { style: {
|
|
190
213
|
display: "flex",
|
|
191
214
|
flex: 1,
|
|
192
215
|
alignItems: "center",
|
|
@@ -203,17 +226,17 @@ function Br(t) {
|
|
|
203
226
|
}, children: [
|
|
204
227
|
/* @__PURE__ */ X("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }, children: [
|
|
205
228
|
/* @__PURE__ */ X("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "#EF4444", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ x("circle", { cx: "12", cy: "12", r: "10" }),
|
|
230
|
+
/* @__PURE__ */ x("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
231
|
+
/* @__PURE__ */ x("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
209
232
|
] }),
|
|
210
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ x("span", { style: { fontSize: 14, fontWeight: 600, color: "#FECACA" }, children: "Plugin failed to load" })
|
|
211
234
|
] }),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ x("p", { style: { fontSize: 13, color: "#A1A1AA", margin: "0 0 16px" }, children: l }),
|
|
236
|
+
/* @__PURE__ */ x(
|
|
214
237
|
"button",
|
|
215
238
|
{
|
|
216
|
-
onClick: () =>
|
|
239
|
+
onClick: () => g(),
|
|
217
240
|
style: {
|
|
218
241
|
background: "transparent",
|
|
219
242
|
color: "#F87171",
|
|
@@ -227,13 +250,13 @@ function Br(t) {
|
|
|
227
250
|
children: "Retry"
|
|
228
251
|
}
|
|
229
252
|
)
|
|
230
|
-
] }) }) : a ? /* @__PURE__ */
|
|
253
|
+
] }) }) : a ? /* @__PURE__ */ x(ge.Provider, { value: { pluginId: n, settings: r, meta: i }, children: e }) : /* @__PURE__ */ X("div", { style: {
|
|
231
254
|
display: "flex",
|
|
232
255
|
flex: 1,
|
|
233
256
|
alignItems: "center",
|
|
234
257
|
justifyContent: "center"
|
|
235
258
|
}, children: [
|
|
236
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ x("div", { style: {
|
|
237
260
|
width: 24,
|
|
238
261
|
height: 24,
|
|
239
262
|
border: "2px solid #3F3F46",
|
|
@@ -241,34 +264,38 @@ function Br(t) {
|
|
|
241
264
|
borderRadius: "50%",
|
|
242
265
|
animation: "plugin-spin 0.8s linear infinite"
|
|
243
266
|
} }),
|
|
244
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ x("style", { children: "@keyframes plugin-spin { to { transform: rotate(360deg); } }" })
|
|
245
268
|
] });
|
|
246
269
|
}
|
|
247
|
-
function
|
|
248
|
-
const t = Y(
|
|
270
|
+
function ye() {
|
|
271
|
+
const t = Y(ge);
|
|
249
272
|
if (!t)
|
|
250
273
|
throw new Error("usePluginContext must be used within a PluginContextProvider");
|
|
251
274
|
return t;
|
|
252
275
|
}
|
|
253
|
-
function
|
|
254
|
-
return
|
|
276
|
+
function Yr() {
|
|
277
|
+
return ye().settings;
|
|
255
278
|
}
|
|
256
|
-
const
|
|
257
|
-
const [e, n] =
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
279
|
+
const Qe = re(void 0), Jr = ({ children: t }) => {
|
|
280
|
+
const [e, n] = G({}), r = q(0), s = k(() => {
|
|
281
|
+
const o = r.current + 1;
|
|
282
|
+
r.current = o, St().then((a) => {
|
|
283
|
+
o === r.current && n(a);
|
|
284
|
+
}).catch((a) => {
|
|
285
|
+
o === r.current && console.error("Error fetching settings:", a);
|
|
262
286
|
});
|
|
263
|
-
};
|
|
264
|
-
b.useEffect(() => {
|
|
265
|
-
r();
|
|
266
287
|
}, []);
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
288
|
+
w.useEffect(() => {
|
|
289
|
+
const o = O("settings/changed", () => s());
|
|
290
|
+
return s(), () => {
|
|
291
|
+
r.current += 1, o();
|
|
292
|
+
};
|
|
293
|
+
}, [s]);
|
|
294
|
+
const i = k(() => {
|
|
295
|
+
s();
|
|
296
|
+
}, [s]);
|
|
297
|
+
return /* @__PURE__ */ x(Qe.Provider, { value: { settings: e, reload: i }, children: t });
|
|
298
|
+
}, hn = {
|
|
272
299
|
height: 32,
|
|
273
300
|
focused: 0,
|
|
274
301
|
tabs: [],
|
|
@@ -292,30 +319,30 @@ const je = re(void 0), zr = ({ children: t }) => {
|
|
|
292
319
|
},
|
|
293
320
|
fullscreenDrawer: () => {
|
|
294
321
|
}
|
|
295
|
-
},
|
|
296
|
-
const [e, n] =
|
|
322
|
+
}, mn = w.createContext(hn), Sn = re(void 0), _n = w.createContext(void 0), Ke = w.createContext(void 0), En = 3e4, Zr = ({ children: t }) => {
|
|
323
|
+
const [e, n] = w.useState([]), r = w.useCallback((a) => {
|
|
297
324
|
n((c) => [a, ...c]);
|
|
298
|
-
}, []), s =
|
|
325
|
+
}, []), s = w.useCallback((a, c) => {
|
|
299
326
|
n(
|
|
300
327
|
(l) => l.map((u) => u.id === a ? { ...u, ...c } : u)
|
|
301
328
|
);
|
|
302
|
-
}, []), i =
|
|
329
|
+
}, []), i = w.useCallback((a) => {
|
|
303
330
|
n((c) => c.filter((l) => l.id !== a));
|
|
304
331
|
}, []);
|
|
305
|
-
|
|
332
|
+
w.useEffect(() => {
|
|
306
333
|
const a = [];
|
|
307
334
|
for (const c of e)
|
|
308
335
|
if (c.status === "completed" || c.status === "error") {
|
|
309
|
-
const l = Date.now() - (c.completedAt ?? c.startedAt), u = Math.max(0,
|
|
336
|
+
const l = Date.now() - (c.completedAt ?? c.startedAt), u = Math.max(0, En - l);
|
|
310
337
|
a.push(setTimeout(() => i(c.id), u));
|
|
311
338
|
}
|
|
312
339
|
return () => a.forEach(clearTimeout);
|
|
313
340
|
}, [e, i]);
|
|
314
|
-
const o =
|
|
341
|
+
const o = w.useMemo(
|
|
315
342
|
() => ({ operations: e, addOperation: r, updateOperation: s, removeOperation: i }),
|
|
316
343
|
[e, r, s, i]
|
|
317
344
|
);
|
|
318
|
-
return /* @__PURE__ */
|
|
345
|
+
return /* @__PURE__ */ x(Ke.Provider, { value: o, children: t });
|
|
319
346
|
};
|
|
320
347
|
var de = function(t, e) {
|
|
321
348
|
return de = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
@@ -324,7 +351,7 @@ var de = function(t, e) {
|
|
|
324
351
|
for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (n[s] = r[s]);
|
|
325
352
|
}, de(t, e);
|
|
326
353
|
};
|
|
327
|
-
function
|
|
354
|
+
function wn(t, e) {
|
|
328
355
|
if (typeof e != "function" && e !== null)
|
|
329
356
|
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
|
|
330
357
|
de(t, e);
|
|
@@ -333,28 +360,28 @@ function _n(t, e) {
|
|
|
333
360
|
}
|
|
334
361
|
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
335
362
|
}
|
|
336
|
-
var ce = "Invariant Violation",
|
|
363
|
+
var ce = "Invariant Violation", be = Object.setPrototypeOf, Cn = be === void 0 ? function(t, e) {
|
|
337
364
|
return t.__proto__ = e, t;
|
|
338
|
-
} :
|
|
365
|
+
} : be, bn = (
|
|
339
366
|
/** @class */
|
|
340
367
|
function(t) {
|
|
341
|
-
|
|
368
|
+
wn(e, t);
|
|
342
369
|
function e(n) {
|
|
343
370
|
n === void 0 && (n = ce);
|
|
344
371
|
var r = t.call(this, typeof n == "number" ? ce + ": " + n + " (see https://github.com/apollographql/invariant-packages)" : n) || this;
|
|
345
|
-
return r.framesToPop = 1, r.name = ce,
|
|
372
|
+
return r.framesToPop = 1, r.name = ce, Cn(r, e.prototype), r;
|
|
346
373
|
}
|
|
347
374
|
return e;
|
|
348
375
|
}(Error)
|
|
349
376
|
);
|
|
350
377
|
function fe(t, e) {
|
|
351
378
|
if (!t)
|
|
352
|
-
throw new
|
|
379
|
+
throw new bn(e);
|
|
353
380
|
}
|
|
354
|
-
var
|
|
381
|
+
var He = ["debug", "log", "warn", "error", "silent"], vn = He.indexOf("log");
|
|
355
382
|
function V(t) {
|
|
356
383
|
return function() {
|
|
357
|
-
if (
|
|
384
|
+
if (He.indexOf(t) >= vn) {
|
|
358
385
|
var e = console[t] || console.log;
|
|
359
386
|
return e.apply(console, arguments);
|
|
360
387
|
}
|
|
@@ -363,9 +390,9 @@ function V(t) {
|
|
|
363
390
|
(function(t) {
|
|
364
391
|
t.debug = V("debug"), t.log = V("log"), t.warn = V("warn"), t.error = V("error");
|
|
365
392
|
})(fe || (fe = {}));
|
|
366
|
-
const Be = re(void 0),
|
|
367
|
-
function
|
|
368
|
-
const e =
|
|
393
|
+
const Be = re(void 0), Rn = () => Y(Be);
|
|
394
|
+
function Xr(t) {
|
|
395
|
+
const e = Rn(), n = w.useRef(null), r = e == null ? void 0 : e.getExtensionPoint(t), s = k(
|
|
369
396
|
(o) => {
|
|
370
397
|
const a = [];
|
|
371
398
|
return e && a.push(e.subscribe(o)), r && a.push(r.subscribe(o)), () => {
|
|
@@ -388,30 +415,30 @@ function Jr(t) {
|
|
|
388
415
|
const c = {};
|
|
389
416
|
return n.current = { store: o, version: o.version, sentinel: c }, c;
|
|
390
417
|
}, [e, t]);
|
|
391
|
-
return
|
|
418
|
+
return ut(s, i), e == null ? void 0 : e.getExtensionPoint(t);
|
|
392
419
|
}
|
|
393
|
-
const
|
|
394
|
-
const n =
|
|
420
|
+
const Vr = ({ registry: t, children: e }) => {
|
|
421
|
+
const n = w.useRef(t);
|
|
395
422
|
return fe(
|
|
396
423
|
n.current === t,
|
|
397
424
|
"You can't change the extension registry after it has been rendered"
|
|
398
|
-
), /* @__PURE__ */
|
|
425
|
+
), /* @__PURE__ */ x(Be.Provider, { value: n.current, children: e });
|
|
399
426
|
}, ue = (t) => {
|
|
400
427
|
if (!t || typeof t != "string")
|
|
401
428
|
throw new TypeError(`extensionName is required to be a string and can't be: "${t}" (${typeof t})`);
|
|
402
429
|
return t.trim();
|
|
403
430
|
};
|
|
404
|
-
class
|
|
431
|
+
class Fn {
|
|
405
432
|
constructor(e) {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
433
|
+
D(this, "id");
|
|
434
|
+
D(this, "mode");
|
|
435
|
+
D(this, "_pluginId");
|
|
436
|
+
D(this, "_version", 0);
|
|
437
|
+
D(this, "_contributions", /* @__PURE__ */ new Map());
|
|
438
|
+
D(this, "_lookupCache", /* @__PURE__ */ new Map());
|
|
439
|
+
D(this, "_matcher");
|
|
440
|
+
D(this, "_select");
|
|
441
|
+
D(this, "_listeners", /* @__PURE__ */ new Set());
|
|
415
442
|
this.id = e.id, this.mode = e.mode ?? "multiple", this._pluginId = e.pluginId, this._matcher = e.matcher, this._select = e.select;
|
|
416
443
|
}
|
|
417
444
|
get pluginId() {
|
|
@@ -521,11 +548,11 @@ class vn {
|
|
|
521
548
|
e();
|
|
522
549
|
}
|
|
523
550
|
}
|
|
524
|
-
class
|
|
551
|
+
class es {
|
|
525
552
|
constructor(e) {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
553
|
+
D(this, "_stores", /* @__PURE__ */ new Map());
|
|
554
|
+
D(this, "_storeUnsubs", /* @__PURE__ */ new Map());
|
|
555
|
+
D(this, "_listeners", /* @__PURE__ */ new Set());
|
|
529
556
|
if (e != null && e.initialStores)
|
|
530
557
|
for (const n of e.initialStores)
|
|
531
558
|
this.addExtensionPoint(n);
|
|
@@ -542,7 +569,7 @@ class Xr {
|
|
|
542
569
|
`Extension point "${n}" already exists (owned by "${s.pluginId ?? "unknown"}")`
|
|
543
570
|
);
|
|
544
571
|
}
|
|
545
|
-
const r = new
|
|
572
|
+
const r = new Fn({ ...e, id: n });
|
|
546
573
|
this._stores.set(n, r), this._storeUnsubs.set(n, r.subscribe(() => this._notify())), this._notify();
|
|
547
574
|
}
|
|
548
575
|
/**
|
|
@@ -597,79 +624,79 @@ class Xr {
|
|
|
597
624
|
e();
|
|
598
625
|
}
|
|
599
626
|
}
|
|
600
|
-
const
|
|
627
|
+
const ze = re(void 0), In = {
|
|
601
628
|
default: "info",
|
|
602
629
|
info: "info",
|
|
603
630
|
success: "success",
|
|
604
631
|
warning: "warning",
|
|
605
632
|
error: "danger"
|
|
606
|
-
},
|
|
607
|
-
const { toast: e } =
|
|
633
|
+
}, ts = ({ children: t }) => {
|
|
634
|
+
const { toast: e } = fn(), [n, r] = w.useState([]), s = (o) => {
|
|
608
635
|
r((a) => [...a, o]);
|
|
609
636
|
}, i = (o, a, c) => {
|
|
610
637
|
const l = typeof o == "object";
|
|
611
|
-
let u = "",
|
|
638
|
+
let u = "", f = "info", d, p = 5e3, g;
|
|
612
639
|
if (l) {
|
|
613
640
|
if (u = o.message, o.showOnce) {
|
|
614
641
|
if (n.includes(u))
|
|
615
642
|
return;
|
|
616
643
|
s(u);
|
|
617
644
|
}
|
|
618
|
-
|
|
645
|
+
f = o.status, d = o.details, p = o.autoHideDuration ?? 5e3, g = o.actions;
|
|
619
646
|
} else
|
|
620
|
-
u = o,
|
|
621
|
-
e(
|
|
622
|
-
severity:
|
|
623
|
-
title:
|
|
624
|
-
duration:
|
|
625
|
-
action:
|
|
647
|
+
u = o, f = a, d = c;
|
|
648
|
+
e(d ?? u, {
|
|
649
|
+
severity: In[f] ?? "info",
|
|
650
|
+
title: d ? u : void 0,
|
|
651
|
+
duration: p,
|
|
652
|
+
action: g == null ? void 0 : g[0]
|
|
626
653
|
});
|
|
627
654
|
};
|
|
628
|
-
return /* @__PURE__ */
|
|
629
|
-
},
|
|
630
|
-
const t = Y(
|
|
655
|
+
return /* @__PURE__ */ x(ze.Provider, { value: { showSnackbar: i }, children: t });
|
|
656
|
+
}, W = () => {
|
|
657
|
+
const t = Y(ze);
|
|
631
658
|
if (t === void 0)
|
|
632
659
|
throw new Error("useCustomSnackbar must be used within a CustomSnackbarProvider");
|
|
633
660
|
return t;
|
|
634
661
|
};
|
|
635
|
-
function
|
|
636
|
-
const e = Y(
|
|
662
|
+
function P(t) {
|
|
663
|
+
const e = Y(ge), n = (e == null ? void 0 : e.pluginId) ?? t;
|
|
637
664
|
if (!n)
|
|
638
665
|
throw new Error(
|
|
639
666
|
"pluginID must be provided either via PluginContext or as an explicit parameter"
|
|
640
667
|
);
|
|
641
668
|
return n;
|
|
642
669
|
}
|
|
643
|
-
const
|
|
644
|
-
const n =
|
|
645
|
-
mutationFn: async () =>
|
|
646
|
-
onSuccess(
|
|
647
|
-
r.setQueryData(i,
|
|
670
|
+
const ns = ({ pluginID: t, connectionID: e }) => {
|
|
671
|
+
const n = P(t), r = j(), { showSnackbar: s } = W(), i = [n, "connection", "detail", e], { mutateAsync: o } = A({
|
|
672
|
+
mutationFn: async () => _t(n, e),
|
|
673
|
+
onSuccess(f) {
|
|
674
|
+
r.setQueryData(i, f), r.invalidateQueries({
|
|
648
675
|
queryKey: ["EDITOR_SCHEMAS", n, e]
|
|
649
676
|
});
|
|
650
677
|
},
|
|
651
678
|
onError: L(s, "Failed to start connection")
|
|
652
|
-
}), { mutateAsync: a } =
|
|
653
|
-
mutationFn: async () =>
|
|
654
|
-
onSuccess(
|
|
655
|
-
r.setQueryData(i,
|
|
679
|
+
}), { mutateAsync: a } = A({
|
|
680
|
+
mutationFn: async () => Pe(n, e),
|
|
681
|
+
onSuccess(f) {
|
|
682
|
+
r.setQueryData(i, f);
|
|
656
683
|
},
|
|
657
684
|
onError: L(s, "Failed to stop connection")
|
|
658
|
-
}), { mutateAsync: c } =
|
|
659
|
-
mutationFn: async (
|
|
660
|
-
onSuccess(
|
|
661
|
-
s({ message: `Connection ${
|
|
685
|
+
}), { mutateAsync: c } = A({
|
|
686
|
+
mutationFn: async (f) => Et(n, f),
|
|
687
|
+
onSuccess(f, { name: d }) {
|
|
688
|
+
s({ message: `Connection ${d} successfully updated`, status: "success" }), r.setQueryData(i, f), r.setQueriesData(
|
|
662
689
|
{ queryKey: [n, "connection", "list"] },
|
|
663
|
-
(
|
|
690
|
+
(p) => p == null ? void 0 : p.map((g) => g.id === e ? f : g)
|
|
664
691
|
);
|
|
665
692
|
},
|
|
666
693
|
onError: L(s, "Failed to update connection")
|
|
667
|
-
}), { mutateAsync: l } =
|
|
694
|
+
}), { mutateAsync: l } = A({
|
|
668
695
|
mutationFn: async () => wt(n, e),
|
|
669
696
|
onSuccess() {
|
|
670
697
|
s({ message: "Connection successfully removed", status: "success" }), r.setQueryData(i, void 0), r.setQueriesData(
|
|
671
698
|
{ queryKey: [n, "connection", "list"] },
|
|
672
|
-
(
|
|
699
|
+
(f) => f == null ? void 0 : f.filter((d) => d.id !== e)
|
|
673
700
|
);
|
|
674
701
|
},
|
|
675
702
|
onError: L(s, "Failed to remove connection")
|
|
@@ -678,9 +705,9 @@ const es = ({ pluginID: t, connectionID: e }) => {
|
|
|
678
705
|
/**
|
|
679
706
|
* Get the connection
|
|
680
707
|
*/
|
|
681
|
-
connection:
|
|
708
|
+
connection: T({
|
|
682
709
|
queryKey: i,
|
|
683
|
-
queryFn: async () =>
|
|
710
|
+
queryFn: async () => Ct(n, e)
|
|
684
711
|
}),
|
|
685
712
|
/**
|
|
686
713
|
* Start the connection
|
|
@@ -699,51 +726,51 @@ const es = ({ pluginID: t, connectionID: e }) => {
|
|
|
699
726
|
*/
|
|
700
727
|
deleteConnection: l
|
|
701
728
|
};
|
|
702
|
-
},
|
|
703
|
-
const e =
|
|
704
|
-
mutationFn: async (l) =>
|
|
729
|
+
}, Pn = (t) => [t, "connection", "list"], rs = ({ plugin: t }) => {
|
|
730
|
+
const e = P(t), n = j(), { showSnackbar: r } = W(), s = Pn(e), { mutateAsync: i } = A({
|
|
731
|
+
mutationFn: async (l) => Oe(e, l.id),
|
|
705
732
|
onError: L(r, "Failed to start connection watch")
|
|
706
|
-
}), { mutateAsync: o } =
|
|
707
|
-
mutationFn: async (l) =>
|
|
733
|
+
}), { mutateAsync: o } = A({
|
|
734
|
+
mutationFn: async (l) => bt(e, l.id),
|
|
708
735
|
onError: L(r, "Failed to stop connection watch")
|
|
709
|
-
}), a =
|
|
736
|
+
}), a = w.useCallback((l) => {
|
|
710
737
|
const u = l.data;
|
|
711
738
|
console.log("got update to connections", u), n.setQueryData(s, u);
|
|
712
739
|
}, [n, s]);
|
|
713
|
-
return
|
|
714
|
-
const l =
|
|
740
|
+
return w.useEffect(() => {
|
|
741
|
+
const l = O(`${e}/connection/sync`, a);
|
|
715
742
|
return () => {
|
|
716
743
|
l();
|
|
717
744
|
};
|
|
718
745
|
}, [e, a]), {
|
|
719
|
-
connections:
|
|
746
|
+
connections: T({
|
|
720
747
|
queryKey: s,
|
|
721
748
|
queryFn: async () => {
|
|
722
749
|
try {
|
|
723
|
-
return await
|
|
750
|
+
return await vt(e);
|
|
724
751
|
} catch (l) {
|
|
725
752
|
console.log(l), L(r, "Failed to load connections")(l);
|
|
726
753
|
}
|
|
727
754
|
return [];
|
|
728
755
|
},
|
|
729
756
|
staleTime: 3e4,
|
|
730
|
-
placeholderData:
|
|
757
|
+
placeholderData: We
|
|
731
758
|
}),
|
|
732
759
|
startWatch: i,
|
|
733
760
|
stopWatch: o
|
|
734
761
|
};
|
|
735
|
-
},
|
|
736
|
-
const n =
|
|
762
|
+
}, ss = ({ pluginID: t, connectionID: e }) => {
|
|
763
|
+
const n = P(t);
|
|
737
764
|
return {
|
|
738
765
|
/**
|
|
739
766
|
* Get the connection
|
|
740
767
|
*/
|
|
741
|
-
namespaces:
|
|
768
|
+
namespaces: T({
|
|
742
769
|
queryKey: [n, "connection", "namespaces", e],
|
|
743
|
-
queryFn: async () =>
|
|
770
|
+
queryFn: async () => Rt(n, e)
|
|
744
771
|
})
|
|
745
772
|
};
|
|
746
|
-
}, F =
|
|
773
|
+
}, F = pn(rn, "WatchState");
|
|
747
774
|
function pe(t) {
|
|
748
775
|
const e = Object.values(t.states), n = e.length;
|
|
749
776
|
let r = 0, s = 0, i = 0, o = 0;
|
|
@@ -768,17 +795,17 @@ function pe(t) {
|
|
|
768
795
|
function ne(t) {
|
|
769
796
|
return t.watchedTotal > 0 && t.doneCount >= t.watchedTotal;
|
|
770
797
|
}
|
|
771
|
-
function
|
|
798
|
+
function Ye(t) {
|
|
772
799
|
return t.some((e) => !ne(e));
|
|
773
800
|
}
|
|
774
|
-
function
|
|
801
|
+
function Je(t) {
|
|
775
802
|
const e = t.reduce((r, s) => r + s.watchedTotal, 0);
|
|
776
803
|
return e === 0 ? 0 : t.reduce((r, s) => r + s.doneCount, 0) / e;
|
|
777
804
|
}
|
|
778
805
|
function he(t) {
|
|
779
806
|
return `${t.pluginId}/${t.connection}`;
|
|
780
807
|
}
|
|
781
|
-
function
|
|
808
|
+
function Ze(t, e) {
|
|
782
809
|
const n = he(e);
|
|
783
810
|
t.has(n) || t.set(n, {
|
|
784
811
|
states: {},
|
|
@@ -788,155 +815,155 @@ function Je(t, e) {
|
|
|
788
815
|
const r = t.get(n);
|
|
789
816
|
return r.states[e.resourceKey] = e.state, r;
|
|
790
817
|
}
|
|
791
|
-
function
|
|
792
|
-
const [t, e] =
|
|
793
|
-
|
|
794
|
-
const
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
const I = new Map(
|
|
798
|
-
return I.set(
|
|
818
|
+
function os() {
|
|
819
|
+
const [t, e] = G(/* @__PURE__ */ new Set()), [n, r] = G({}), [s, i] = G(/* @__PURE__ */ new Map()), o = q(/* @__PURE__ */ new Map()), [a, c] = G(/* @__PURE__ */ new Map());
|
|
820
|
+
$(() => {
|
|
821
|
+
const h = O("plugin/crash_recovery_failed", (R) => {
|
|
822
|
+
const C = R.data, E = C == null ? void 0 : C.pluginID;
|
|
823
|
+
E && c((b) => {
|
|
824
|
+
const I = new Map(b);
|
|
825
|
+
return I.set(E, C.error ?? "Crash recovery failed"), I;
|
|
799
826
|
});
|
|
800
|
-
}), v =
|
|
801
|
-
const
|
|
802
|
-
|
|
803
|
-
if (!
|
|
804
|
-
const I = new Map(
|
|
805
|
-
return I.delete(
|
|
827
|
+
}), v = O("plugin/recovered", (R) => {
|
|
828
|
+
const C = R.data, E = C == null ? void 0 : C.pluginID;
|
|
829
|
+
E && c((b) => {
|
|
830
|
+
if (!b.has(E)) return b;
|
|
831
|
+
const I = new Map(b);
|
|
832
|
+
return I.delete(E), I;
|
|
806
833
|
});
|
|
807
834
|
});
|
|
808
835
|
return () => {
|
|
809
|
-
|
|
836
|
+
h(), v();
|
|
810
837
|
};
|
|
811
|
-
}, []),
|
|
812
|
-
|
|
813
|
-
if (!
|
|
814
|
-
const v = {}, R = /* @__PURE__ */ new Set(),
|
|
815
|
-
for (const [
|
|
816
|
-
if (
|
|
817
|
-
v[
|
|
818
|
-
for (const I of
|
|
838
|
+
}, []), $(() => {
|
|
839
|
+
Ft().then((h) => {
|
|
840
|
+
if (!h) return;
|
|
841
|
+
const v = {}, R = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map();
|
|
842
|
+
for (const [E, b] of Object.entries(h))
|
|
843
|
+
if (b) {
|
|
844
|
+
v[E] = b.map((I) => I.connection);
|
|
845
|
+
for (const I of b) {
|
|
819
846
|
if (!I.started) continue;
|
|
820
|
-
const M = `${
|
|
847
|
+
const M = `${E}/${I.connection.id}`;
|
|
821
848
|
R.add(M);
|
|
822
849
|
const N = {
|
|
823
|
-
pluginID:
|
|
850
|
+
pluginID: E,
|
|
824
851
|
connectionID: I.connection.id,
|
|
825
852
|
states: {}
|
|
826
853
|
};
|
|
827
854
|
if (I.resources)
|
|
828
|
-
for (const [ie,
|
|
829
|
-
N.states[ie] =
|
|
830
|
-
o.current.set(M, N),
|
|
855
|
+
for (const [ie, it] of Object.entries(I.resources))
|
|
856
|
+
N.states[ie] = it;
|
|
857
|
+
o.current.set(M, N), C.set(M, pe(N));
|
|
831
858
|
}
|
|
832
859
|
}
|
|
833
|
-
r(v), e(R), i(
|
|
860
|
+
r(v), e(R), i(C);
|
|
834
861
|
}).catch(() => {
|
|
835
862
|
});
|
|
836
|
-
}, []),
|
|
837
|
-
const R = v.data,
|
|
838
|
-
R.status === "DISCONNECTED" ? (e((
|
|
839
|
-
const
|
|
840
|
-
return
|
|
841
|
-
}), i((
|
|
842
|
-
const
|
|
843
|
-
return
|
|
844
|
-
}), o.current.delete(
|
|
845
|
-
const
|
|
846
|
-
return
|
|
847
|
-
}),
|
|
848
|
-
if (!
|
|
849
|
-
const
|
|
850
|
-
for (const [I, M] of Object.entries(
|
|
851
|
-
M != null && (
|
|
852
|
-
r(
|
|
863
|
+
}, []), $(() => O("connection/status", (v) => {
|
|
864
|
+
const R = v.data, C = `${R.pluginID}/${R.connectionID}`;
|
|
865
|
+
R.status === "DISCONNECTED" ? (e((E) => {
|
|
866
|
+
const b = new Set(E);
|
|
867
|
+
return b.delete(C), b;
|
|
868
|
+
}), i((E) => {
|
|
869
|
+
const b = new Map(E);
|
|
870
|
+
return b.delete(C), b;
|
|
871
|
+
}), o.current.delete(C)) : e((E) => {
|
|
872
|
+
const b = new Set(E);
|
|
873
|
+
return b.add(C), b;
|
|
874
|
+
}), Pt().then((E) => {
|
|
875
|
+
if (!E) return;
|
|
876
|
+
const b = {};
|
|
877
|
+
for (const [I, M] of Object.entries(E))
|
|
878
|
+
M != null && (b[I] = M);
|
|
879
|
+
r(b);
|
|
853
880
|
}).catch(() => {
|
|
854
881
|
});
|
|
855
882
|
}), []);
|
|
856
|
-
const l = k((
|
|
857
|
-
const v =
|
|
858
|
-
e((
|
|
859
|
-
if (
|
|
860
|
-
const I = new Set(
|
|
883
|
+
const l = k((h) => {
|
|
884
|
+
const v = h.data, R = he(v);
|
|
885
|
+
e((b) => {
|
|
886
|
+
if (b.has(R)) return b;
|
|
887
|
+
const I = new Set(b);
|
|
861
888
|
return I.add(R), I;
|
|
862
889
|
});
|
|
863
|
-
const
|
|
864
|
-
i((
|
|
865
|
-
const I = new Map(
|
|
866
|
-
return I.set(R,
|
|
890
|
+
const C = Ze(o.current, v), E = pe(C);
|
|
891
|
+
i((b) => {
|
|
892
|
+
const I = new Map(b);
|
|
893
|
+
return I.set(R, E), I;
|
|
867
894
|
});
|
|
868
895
|
}, []);
|
|
869
|
-
|
|
870
|
-
const u = k(async (
|
|
871
|
-
await
|
|
872
|
-
}, []),
|
|
873
|
-
await
|
|
874
|
-
}, []),
|
|
875
|
-
const v = a.get(
|
|
896
|
+
$(() => O("watch/STATE", l), [l]);
|
|
897
|
+
const u = k(async (h, v) => {
|
|
898
|
+
await Pe(h, v);
|
|
899
|
+
}, []), f = k(async (h, v) => {
|
|
900
|
+
await Oe(h, v);
|
|
901
|
+
}, []), d = k(async (h) => {
|
|
902
|
+
const v = a.get(h);
|
|
876
903
|
c((R) => {
|
|
877
|
-
if (!R.has(
|
|
878
|
-
const
|
|
879
|
-
return
|
|
904
|
+
if (!R.has(h)) return R;
|
|
905
|
+
const C = new Map(R);
|
|
906
|
+
return C.delete(h), C;
|
|
880
907
|
});
|
|
881
908
|
try {
|
|
882
|
-
await
|
|
909
|
+
await It(h);
|
|
883
910
|
} catch (R) {
|
|
884
|
-
throw c((
|
|
885
|
-
const
|
|
886
|
-
return
|
|
911
|
+
throw c((C) => {
|
|
912
|
+
const E = new Map(C);
|
|
913
|
+
return E.set(h, v ?? "Reload failed"), E;
|
|
887
914
|
}), R;
|
|
888
915
|
}
|
|
889
|
-
}, [a]),
|
|
890
|
-
for (const
|
|
891
|
-
const [v, R] =
|
|
892
|
-
|
|
916
|
+
}, [a]), p = [];
|
|
917
|
+
for (const h of t) {
|
|
918
|
+
const [v, R] = h.split("/", 2), E = (n[v] ?? []).find((ie) => ie.id === R), b = s.get(h), I = b != null && !ne(b), M = b != null && b.errorCount > 0, N = a.get(v);
|
|
919
|
+
p.push({
|
|
893
920
|
pluginID: v,
|
|
894
921
|
connectionID: R,
|
|
895
|
-
name: (
|
|
896
|
-
avatar: (
|
|
922
|
+
name: (E == null ? void 0 : E.name) ?? R,
|
|
923
|
+
avatar: (E == null ? void 0 : E.avatar) ?? "",
|
|
897
924
|
isStarted: !0,
|
|
898
|
-
sync:
|
|
925
|
+
sync: b,
|
|
899
926
|
isSyncing: I,
|
|
900
927
|
hasErrors: M || N != null,
|
|
901
928
|
pluginFailed: N != null,
|
|
902
929
|
pluginError: N
|
|
903
930
|
});
|
|
904
931
|
}
|
|
905
|
-
const
|
|
906
|
-
for (const
|
|
907
|
-
const v =
|
|
908
|
-
v.push(
|
|
932
|
+
const g = /* @__PURE__ */ new Map();
|
|
933
|
+
for (const h of p) {
|
|
934
|
+
const v = g.get(h.pluginID) ?? [];
|
|
935
|
+
v.push(h), g.set(h.pluginID, v);
|
|
909
936
|
}
|
|
910
|
-
const
|
|
937
|
+
const S = Array.from(s.values()), m = p.filter((h) => h.isSyncing), y = p.filter((h) => h.hasErrors), _ = p.filter((h) => h.pluginFailed);
|
|
911
938
|
return {
|
|
912
|
-
entries:
|
|
913
|
-
grouped:
|
|
914
|
-
connectedCount:
|
|
915
|
-
syncingCount:
|
|
916
|
-
errorCount:
|
|
917
|
-
failedCount:
|
|
918
|
-
hasSyncing:
|
|
919
|
-
aggregateProgress:
|
|
939
|
+
entries: p,
|
|
940
|
+
grouped: g,
|
|
941
|
+
connectedCount: p.length,
|
|
942
|
+
syncingCount: m.length,
|
|
943
|
+
errorCount: y.length,
|
|
944
|
+
failedCount: _.length,
|
|
945
|
+
hasSyncing: Ye(S),
|
|
946
|
+
aggregateProgress: Je(S),
|
|
920
947
|
disconnect: u,
|
|
921
|
-
retryWatch:
|
|
922
|
-
retryPlugin:
|
|
948
|
+
retryWatch: f,
|
|
949
|
+
retryPlugin: d
|
|
923
950
|
};
|
|
924
951
|
}
|
|
925
|
-
function
|
|
952
|
+
function On(t, e) {
|
|
926
953
|
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;
|
|
927
954
|
}
|
|
928
|
-
function
|
|
929
|
-
const r =
|
|
955
|
+
function is(t, e, n) {
|
|
956
|
+
const r = P(t), s = j(), i = [r, "data", e], o = T({
|
|
930
957
|
queryKey: i,
|
|
931
958
|
queryFn: async () => {
|
|
932
|
-
const c = await
|
|
933
|
-
return c == null ? n :
|
|
959
|
+
const c = await Ot(r, e);
|
|
960
|
+
return c == null ? n : On(c, n) ? c : (console.warn(
|
|
934
961
|
`[usePluginData] stored value for "${e}" has unexpected type (expected ${Array.isArray(n) ? "array" : typeof n}, got ${Array.isArray(c) ? "array" : typeof c}). Using default.`
|
|
935
962
|
), n);
|
|
936
963
|
}
|
|
937
|
-
}), a =
|
|
964
|
+
}), a = A({
|
|
938
965
|
mutationFn: async (c) => {
|
|
939
|
-
await
|
|
966
|
+
await Tt(r, e, c);
|
|
940
967
|
},
|
|
941
968
|
onMutate: async (c) => {
|
|
942
969
|
await s.cancelQueries({ queryKey: i });
|
|
@@ -958,19 +985,19 @@ function ss(t, e, n) {
|
|
|
958
985
|
isLoading: o.isLoading
|
|
959
986
|
};
|
|
960
987
|
}
|
|
961
|
-
const
|
|
962
|
-
const t = Y(
|
|
988
|
+
const as = () => {
|
|
989
|
+
const t = Y(Sn);
|
|
963
990
|
if (!t) throw new Error("useRightDrawer must be used within a RightDrawerProvider");
|
|
964
991
|
return t;
|
|
965
|
-
},
|
|
966
|
-
const t = Y(
|
|
992
|
+
}, Xe = () => {
|
|
993
|
+
const t = Y(mn);
|
|
967
994
|
if (t === void 0)
|
|
968
995
|
throw new Error("useBottomDrawer must be used within a BottomDrawerProvider");
|
|
969
996
|
return t;
|
|
970
|
-
},
|
|
971
|
-
const e =
|
|
997
|
+
}, cs = ({ pluginID: t }) => {
|
|
998
|
+
const e = P(t), { showSnackbar: n } = W(), { createTab: r, updateTab: s } = Xe();
|
|
972
999
|
return {
|
|
973
|
-
createSession:
|
|
1000
|
+
createSession: A({
|
|
974
1001
|
mutationFn: async ({ connectionID: o, icon: a, label: c, opts: l }) => {
|
|
975
1002
|
const u = `pending-${crypto.randomUUID()}`;
|
|
976
1003
|
r({
|
|
@@ -985,76 +1012,76 @@ const os = () => {
|
|
|
985
1012
|
opts: { ...l }
|
|
986
1013
|
}
|
|
987
1014
|
});
|
|
988
|
-
const
|
|
1015
|
+
const f = sn.createFrom({
|
|
989
1016
|
command: ["/bin/bash"],
|
|
990
1017
|
tty: !0,
|
|
991
1018
|
...l
|
|
992
1019
|
});
|
|
993
1020
|
try {
|
|
994
|
-
const
|
|
995
|
-
if (!
|
|
1021
|
+
const d = await At(e, o, f);
|
|
1022
|
+
if (!d) throw new Error("Failed to create session: null response");
|
|
996
1023
|
s(
|
|
997
1024
|
{ id: u },
|
|
998
1025
|
{
|
|
999
|
-
id:
|
|
1000
|
-
title: c ?? `Session ${
|
|
1026
|
+
id: d.id,
|
|
1027
|
+
title: c ?? `Session ${d.id.substring(0, 8)}`,
|
|
1001
1028
|
properties: { status: "connected", pluginID: e, connectionID: o, opts: { ...l } }
|
|
1002
1029
|
}
|
|
1003
1030
|
);
|
|
1004
|
-
} catch (
|
|
1005
|
-
const
|
|
1031
|
+
} catch (d) {
|
|
1032
|
+
const p = Q(d);
|
|
1006
1033
|
s(
|
|
1007
1034
|
{ id: u },
|
|
1008
1035
|
{
|
|
1009
|
-
properties: { status: "error", error:
|
|
1036
|
+
properties: { status: "error", error: p.detail, pluginID: e, connectionID: o, opts: { ...l } }
|
|
1010
1037
|
}
|
|
1011
|
-
), z(n,
|
|
1038
|
+
), z(n, d, "Failed to start session");
|
|
1012
1039
|
}
|
|
1013
1040
|
}
|
|
1014
1041
|
}).mutateAsync
|
|
1015
1042
|
};
|
|
1016
|
-
},
|
|
1017
|
-
const e =
|
|
1043
|
+
}, us = ({ pluginID: t }) => {
|
|
1044
|
+
const e = P(t), { showSnackbar: n } = W(), { createTab: r } = Xe(), s = A({
|
|
1018
1045
|
mutationFn: async ({
|
|
1019
1046
|
connectionID: o,
|
|
1020
1047
|
resourceKey: a,
|
|
1021
1048
|
resourceID: c,
|
|
1022
1049
|
resourceData: l,
|
|
1023
1050
|
icon: u,
|
|
1024
|
-
label:
|
|
1025
|
-
target:
|
|
1026
|
-
follow:
|
|
1027
|
-
tailLines:
|
|
1028
|
-
params:
|
|
1051
|
+
label: f,
|
|
1052
|
+
target: d,
|
|
1053
|
+
follow: p = !0,
|
|
1054
|
+
tailLines: g = 1e3,
|
|
1055
|
+
params: S
|
|
1029
1056
|
}) => {
|
|
1030
|
-
const
|
|
1057
|
+
const m = on.createFrom({
|
|
1031
1058
|
resource_key: a,
|
|
1032
1059
|
resource_id: c,
|
|
1033
1060
|
resource_data: l,
|
|
1034
|
-
options:
|
|
1035
|
-
target:
|
|
1036
|
-
follow:
|
|
1061
|
+
options: an.createFrom({
|
|
1062
|
+
target: d ?? "",
|
|
1063
|
+
follow: p,
|
|
1037
1064
|
include_previous: !1,
|
|
1038
1065
|
include_timestamps: !0,
|
|
1039
|
-
tail_lines:
|
|
1066
|
+
tail_lines: g,
|
|
1040
1067
|
since_seconds: 0,
|
|
1041
1068
|
limit_bytes: 0,
|
|
1042
1069
|
include_source_events: !0,
|
|
1043
|
-
params:
|
|
1070
|
+
params: S ?? {}
|
|
1044
1071
|
})
|
|
1045
|
-
}),
|
|
1046
|
-
if (!
|
|
1072
|
+
}), y = await Dt(e, o, m);
|
|
1073
|
+
if (!y) throw new Error("Failed to create log session: null response");
|
|
1047
1074
|
return r({
|
|
1048
|
-
id:
|
|
1049
|
-
title:
|
|
1075
|
+
id: y.id,
|
|
1076
|
+
title: f ?? `Logs ${y.id.substring(0, 8)}`,
|
|
1050
1077
|
variant: "logs",
|
|
1051
1078
|
icon: u ?? "LuLogs"
|
|
1052
|
-
}),
|
|
1079
|
+
}), y;
|
|
1053
1080
|
},
|
|
1054
1081
|
onError: L(n, "Failed to start log session")
|
|
1055
|
-
}), i =
|
|
1082
|
+
}), i = A({
|
|
1056
1083
|
mutationFn: async (o) => {
|
|
1057
|
-
await
|
|
1084
|
+
await xt(o);
|
|
1058
1085
|
},
|
|
1059
1086
|
onError: L(n, "Failed to close log session")
|
|
1060
1087
|
});
|
|
@@ -1062,17 +1089,17 @@ const os = () => {
|
|
|
1062
1089
|
createLogSession: s.mutateAsync,
|
|
1063
1090
|
closeLogSession: i.mutateAsync
|
|
1064
1091
|
};
|
|
1065
|
-
},
|
|
1092
|
+
}, ls = () => T({
|
|
1066
1093
|
queryKey: ["metric", "providers"],
|
|
1067
|
-
queryFn:
|
|
1094
|
+
queryFn: Nt,
|
|
1068
1095
|
staleTime: 3e4
|
|
1069
|
-
}),
|
|
1096
|
+
}), Tn = (t) => T({
|
|
1070
1097
|
queryKey: ["metric", "providers", t],
|
|
1071
|
-
queryFn: () =>
|
|
1098
|
+
queryFn: () => kt(t),
|
|
1072
1099
|
enabled: !!t,
|
|
1073
1100
|
staleTime: 3e4
|
|
1074
|
-
}),
|
|
1075
|
-
var
|
|
1101
|
+
}), ds = (t) => {
|
|
1102
|
+
var m, y;
|
|
1076
1103
|
const {
|
|
1077
1104
|
connectionID: e,
|
|
1078
1105
|
resourceKey: n,
|
|
@@ -1086,12 +1113,12 @@ const os = () => {
|
|
|
1086
1113
|
refreshInterval: l = 0,
|
|
1087
1114
|
enabled: u = !0
|
|
1088
1115
|
} = t, {
|
|
1089
|
-
data:
|
|
1090
|
-
isLoading:
|
|
1091
|
-
} =
|
|
1116
|
+
data: f,
|
|
1117
|
+
isLoading: d
|
|
1118
|
+
} = Tn(n), p = f ?? [], g = c ? Math.max(
|
|
1092
1119
|
Math.floor((c.end.getTime() - c.start.getTime()) / 250),
|
|
1093
1120
|
15e3
|
|
1094
|
-
) * 1e6 : 0,
|
|
1121
|
+
) * 1e6 : 0, S = T({
|
|
1095
1122
|
queryKey: [
|
|
1096
1123
|
"metric",
|
|
1097
1124
|
"query",
|
|
@@ -1101,11 +1128,11 @@ const os = () => {
|
|
|
1101
1128
|
s,
|
|
1102
1129
|
o,
|
|
1103
1130
|
a,
|
|
1104
|
-
(
|
|
1105
|
-
(
|
|
1131
|
+
(m = c == null ? void 0 : c.start) == null ? void 0 : m.getTime(),
|
|
1132
|
+
(y = c == null ? void 0 : c.end) == null ? void 0 : y.getTime()
|
|
1106
1133
|
],
|
|
1107
1134
|
queryFn: async () => {
|
|
1108
|
-
const
|
|
1135
|
+
const _ = await Lt(
|
|
1109
1136
|
e,
|
|
1110
1137
|
n,
|
|
1111
1138
|
r,
|
|
@@ -1115,27 +1142,27 @@ const os = () => {
|
|
|
1115
1142
|
a,
|
|
1116
1143
|
((c == null ? void 0 : c.start) ?? /* @__PURE__ */ new Date(0)).toISOString(),
|
|
1117
1144
|
((c == null ? void 0 : c.end) ?? /* @__PURE__ */ new Date(0)).toISOString(),
|
|
1118
|
-
|
|
1119
|
-
),
|
|
1120
|
-
for (const [v, R] of Object.entries(
|
|
1121
|
-
R != null && (
|
|
1122
|
-
return
|
|
1145
|
+
g
|
|
1146
|
+
), h = {};
|
|
1147
|
+
for (const [v, R] of Object.entries(_))
|
|
1148
|
+
R != null && (h[v] = R);
|
|
1149
|
+
return h;
|
|
1123
1150
|
},
|
|
1124
|
-
enabled: u && !!e && !!n && (n.startsWith("cluster::") || !!r) &&
|
|
1151
|
+
enabled: u && !!e && !!n && (n.startsWith("cluster::") || !!r) && p.length > 0,
|
|
1125
1152
|
refetchInterval: l > 0 ? l : void 0,
|
|
1126
1153
|
staleTime: 5e3,
|
|
1127
1154
|
// Keep previous data visible while fetching new data (e.g. on time range change)
|
|
1128
1155
|
// to prevent the chart from blinking empty.
|
|
1129
|
-
placeholderData:
|
|
1156
|
+
placeholderData: We
|
|
1130
1157
|
});
|
|
1131
1158
|
return {
|
|
1132
|
-
data:
|
|
1133
|
-
providers:
|
|
1134
|
-
isLoading:
|
|
1135
|
-
error:
|
|
1136
|
-
refetch:
|
|
1159
|
+
data: S.data ?? void 0,
|
|
1160
|
+
providers: p,
|
|
1161
|
+
isLoading: d || S.isLoading,
|
|
1162
|
+
error: S.error,
|
|
1163
|
+
refetch: S.refetch
|
|
1137
1164
|
};
|
|
1138
|
-
},
|
|
1165
|
+
}, fs = (t) => {
|
|
1139
1166
|
const {
|
|
1140
1167
|
pluginID: e,
|
|
1141
1168
|
connectionID: n,
|
|
@@ -1146,10 +1173,10 @@ const os = () => {
|
|
|
1146
1173
|
metricIDs: a = [],
|
|
1147
1174
|
interval: c = 1e4,
|
|
1148
1175
|
enabled: l = !0
|
|
1149
|
-
} = t, u =
|
|
1176
|
+
} = t, u = P(e), [f, d] = G(null), [p, g] = G(null), [S, m] = G(!1), [y, _] = G(null), h = q(null), v = k(async () => {
|
|
1150
1177
|
if (!(!l || !u || !n || !r || !s))
|
|
1151
1178
|
try {
|
|
1152
|
-
const
|
|
1179
|
+
const C = await Mt(u, n, {
|
|
1153
1180
|
resource_key: r,
|
|
1154
1181
|
resource_id: s,
|
|
1155
1182
|
resource_namespace: i,
|
|
@@ -1158,97 +1185,97 @@ const os = () => {
|
|
|
1158
1185
|
interval: c * 1e6
|
|
1159
1186
|
// ms to nanoseconds for Go time.Duration
|
|
1160
1187
|
});
|
|
1161
|
-
|
|
1162
|
-
const
|
|
1188
|
+
g(C), m(!0), _(null);
|
|
1189
|
+
const E = O(`core/metrics/data/${C}`, (I) => {
|
|
1163
1190
|
const M = I.data;
|
|
1164
1191
|
try {
|
|
1165
1192
|
const N = JSON.parse(M);
|
|
1166
|
-
N.results &&
|
|
1193
|
+
N.results && d(N.results);
|
|
1167
1194
|
} catch (N) {
|
|
1168
1195
|
console.error("Failed to parse metric stream data:", N);
|
|
1169
1196
|
}
|
|
1170
|
-
}),
|
|
1197
|
+
}), b = O(`core/metrics/error/${C}`, (I) => {
|
|
1171
1198
|
const M = I.data;
|
|
1172
1199
|
try {
|
|
1173
1200
|
const N = JSON.parse(M);
|
|
1174
|
-
|
|
1201
|
+
_(N.error || "Unknown error");
|
|
1175
1202
|
} catch {
|
|
1176
|
-
|
|
1203
|
+
_("Failed to parse metric stream error");
|
|
1177
1204
|
}
|
|
1178
1205
|
});
|
|
1179
|
-
|
|
1180
|
-
|
|
1206
|
+
h.current = () => {
|
|
1207
|
+
E(), b();
|
|
1181
1208
|
};
|
|
1182
|
-
} catch (
|
|
1183
|
-
|
|
1209
|
+
} catch (C) {
|
|
1210
|
+
_(C instanceof Error ? C.message : String(C));
|
|
1184
1211
|
}
|
|
1185
1212
|
}, [u, n, r, s, i, a, c, l]), R = k(async () => {
|
|
1186
|
-
if (
|
|
1213
|
+
if (p)
|
|
1187
1214
|
try {
|
|
1188
|
-
await
|
|
1189
|
-
} catch (
|
|
1190
|
-
console.error("Failed to unsubscribe:",
|
|
1215
|
+
await Ce(p);
|
|
1216
|
+
} catch (C) {
|
|
1217
|
+
console.error("Failed to unsubscribe:", C);
|
|
1191
1218
|
}
|
|
1192
|
-
|
|
1193
|
-
}, [
|
|
1194
|
-
return
|
|
1195
|
-
|
|
1196
|
-
}, [
|
|
1197
|
-
data:
|
|
1198
|
-
subscriptionID:
|
|
1199
|
-
isStreaming:
|
|
1200
|
-
error:
|
|
1219
|
+
h.current && (h.current(), h.current = null), g(null), m(!1);
|
|
1220
|
+
}, [p]);
|
|
1221
|
+
return $(() => () => {
|
|
1222
|
+
p && Ce(p).catch(console.error), h.current && h.current();
|
|
1223
|
+
}, [p]), {
|
|
1224
|
+
data: f,
|
|
1225
|
+
subscriptionID: p,
|
|
1226
|
+
isStreaming: S,
|
|
1227
|
+
error: y,
|
|
1201
1228
|
start: v,
|
|
1202
1229
|
stop: R
|
|
1203
1230
|
};
|
|
1204
|
-
},
|
|
1205
|
-
function
|
|
1206
|
-
const { showSnackbar: t } =
|
|
1207
|
-
queryKey: [...
|
|
1208
|
-
queryFn: async () =>
|
|
1231
|
+
}, B = ["networker", "portforward", "all-sessions"];
|
|
1232
|
+
function ps() {
|
|
1233
|
+
const { showSnackbar: t } = W(), e = j(), n = T({
|
|
1234
|
+
queryKey: [...B],
|
|
1235
|
+
queryFn: async () => qt().catch((i) => {
|
|
1209
1236
|
if (Q(i).detail.includes("not found")) return [];
|
|
1210
1237
|
throw i;
|
|
1211
1238
|
}),
|
|
1212
1239
|
retry: !1
|
|
1213
1240
|
});
|
|
1214
|
-
|
|
1215
|
-
const i =
|
|
1216
|
-
e.invalidateQueries({ queryKey: [...
|
|
1217
|
-
}), o =
|
|
1218
|
-
e.invalidateQueries({ queryKey: [...
|
|
1241
|
+
$(() => {
|
|
1242
|
+
const i = O("core/networker/portforward/created", () => {
|
|
1243
|
+
e.invalidateQueries({ queryKey: [...B] });
|
|
1244
|
+
}), o = O("core/networker/portforward/closed", () => {
|
|
1245
|
+
e.invalidateQueries({ queryKey: [...B] });
|
|
1219
1246
|
});
|
|
1220
1247
|
return () => {
|
|
1221
1248
|
i(), o();
|
|
1222
1249
|
};
|
|
1223
1250
|
}, [e]);
|
|
1224
|
-
const r = n.data ?? [], s =
|
|
1225
|
-
mutationFn: async (i) =>
|
|
1251
|
+
const r = n.data ?? [], s = A({
|
|
1252
|
+
mutationFn: async (i) => Te(i),
|
|
1226
1253
|
onError: L(t, "Failed to close port forwarding session"),
|
|
1227
1254
|
onSuccess: async () => {
|
|
1228
|
-
await e.invalidateQueries({ queryKey: [...
|
|
1255
|
+
await e.invalidateQueries({ queryKey: [...B] });
|
|
1229
1256
|
}
|
|
1230
1257
|
});
|
|
1231
1258
|
return {
|
|
1232
1259
|
sessions: n,
|
|
1233
1260
|
activeSessions: r,
|
|
1234
1261
|
closeSession: s.mutateAsync,
|
|
1235
|
-
openInBrowser: (i) =>
|
|
1262
|
+
openInBrowser: (i) => $e(`http://localhost:${i}`)
|
|
1236
1263
|
};
|
|
1237
1264
|
}
|
|
1238
|
-
function
|
|
1239
|
-
const r =
|
|
1265
|
+
function gs({ pluginID: t, connectionID: e, resourceID: n }) {
|
|
1266
|
+
const r = P(t), s = ["networker", "portforward", "sessions", r, e, n], { showSnackbar: i } = W(), o = j(), a = T({
|
|
1240
1267
|
queryKey: s,
|
|
1241
|
-
queryFn: async () =>
|
|
1268
|
+
queryFn: async () => Ut(r, e, cn.createFrom({
|
|
1242
1269
|
resource_id: n,
|
|
1243
1270
|
connection_id: e
|
|
1244
1271
|
})).catch((u) => {
|
|
1245
|
-
const
|
|
1246
|
-
return
|
|
1272
|
+
const f = Q(u);
|
|
1273
|
+
return f.detail.includes("not found") ? [] : (i({ message: "Failed to fetch port forward sessions", status: "error", details: f.detail }), []);
|
|
1247
1274
|
}),
|
|
1248
1275
|
retry: !1
|
|
1249
|
-
}), c =
|
|
1276
|
+
}), c = A({
|
|
1250
1277
|
mutationFn: async ({ opts: u }) => {
|
|
1251
|
-
const
|
|
1278
|
+
const f = un.createFrom({
|
|
1252
1279
|
local_port: u.localPort || 0,
|
|
1253
1280
|
remote_port: u.remotePort,
|
|
1254
1281
|
protocol: u.protocol || "TCP",
|
|
@@ -1262,24 +1289,24 @@ function fs({ pluginID: t, connectionID: e, resourceID: n }) {
|
|
|
1262
1289
|
},
|
|
1263
1290
|
labels: u.labels ?? {},
|
|
1264
1291
|
params: u.parameters ?? {}
|
|
1265
|
-
}),
|
|
1266
|
-
if (!
|
|
1267
|
-
return u.openInBrowser &&
|
|
1292
|
+
}), d = await $t(r, e, f);
|
|
1293
|
+
if (!d) throw new Error("Failed to start port forwarding: null response");
|
|
1294
|
+
return u.openInBrowser && $e(`http://localhost:${d.local_port}`), d;
|
|
1268
1295
|
},
|
|
1269
1296
|
onError: L(i, "Failed to start port forwarding session"),
|
|
1270
1297
|
onSuccess: async () => {
|
|
1271
1298
|
await Promise.all([
|
|
1272
1299
|
o.invalidateQueries({ queryKey: s }),
|
|
1273
|
-
o.invalidateQueries({ queryKey: [...
|
|
1300
|
+
o.invalidateQueries({ queryKey: [...B] })
|
|
1274
1301
|
]);
|
|
1275
1302
|
}
|
|
1276
|
-
}), l =
|
|
1277
|
-
mutationFn: async ({ opts: u }) =>
|
|
1303
|
+
}), l = A({
|
|
1304
|
+
mutationFn: async ({ opts: u }) => Te(u.sessionID),
|
|
1278
1305
|
onError: L(i, "Failed to close port forwarding session"),
|
|
1279
1306
|
onSuccess: async () => {
|
|
1280
1307
|
await Promise.all([
|
|
1281
1308
|
o.invalidateQueries({ queryKey: s }),
|
|
1282
|
-
o.invalidateQueries({ queryKey: [...
|
|
1309
|
+
o.invalidateQueries({ queryKey: [...B] })
|
|
1283
1310
|
]);
|
|
1284
1311
|
}
|
|
1285
1312
|
});
|
|
@@ -1289,20 +1316,20 @@ function fs({ pluginID: t, connectionID: e, resourceID: n }) {
|
|
|
1289
1316
|
close: l.mutateAsync
|
|
1290
1317
|
};
|
|
1291
1318
|
}
|
|
1292
|
-
const
|
|
1293
|
-
const t =
|
|
1319
|
+
const ys = () => {
|
|
1320
|
+
const t = w.useContext(_n);
|
|
1294
1321
|
if (!t) throw new Error("useConfirmationModal must be used within a ConfirmationModalProvider");
|
|
1295
1322
|
return t;
|
|
1296
|
-
},
|
|
1323
|
+
}, hs = ({
|
|
1297
1324
|
pluginID: t,
|
|
1298
1325
|
connectionID: e,
|
|
1299
1326
|
resourceKey: n,
|
|
1300
1327
|
resourceID: r,
|
|
1301
1328
|
namespace: s = ""
|
|
1302
1329
|
}) => {
|
|
1303
|
-
const i =
|
|
1304
|
-
mutationFn: async (
|
|
1305
|
-
input:
|
|
1330
|
+
const i = P(t), o = j(), { showSnackbar: a } = W(), c = ["RESOURCE", i, e, n, r, s], { mutateAsync: l } = A({
|
|
1331
|
+
mutationFn: async (d) => Ae(i, e, n, ke.createFrom({
|
|
1332
|
+
input: d.input,
|
|
1306
1333
|
id: r,
|
|
1307
1334
|
namespace: s
|
|
1308
1335
|
})),
|
|
@@ -1310,11 +1337,11 @@ const ps = () => {
|
|
|
1310
1337
|
a(`Resource ${r} updated`, "success"), await o.invalidateQueries({ queryKey: c });
|
|
1311
1338
|
},
|
|
1312
1339
|
onError: L(a, `Failed to update resource ${r}`)
|
|
1313
|
-
}), { mutateAsync: u } =
|
|
1314
|
-
mutationFn: async (
|
|
1340
|
+
}), { mutateAsync: u } = A({
|
|
1341
|
+
mutationFn: async (d = {}) => De(i, e, n, Le.createFrom({
|
|
1315
1342
|
id: r,
|
|
1316
1343
|
namespace: s,
|
|
1317
|
-
gracePeriodSeconds:
|
|
1344
|
+
gracePeriodSeconds: d.gracePeriodSeconds
|
|
1318
1345
|
})),
|
|
1319
1346
|
onSuccess: async () => {
|
|
1320
1347
|
a(`Resource ${r} deleted`, "success"), await o.invalidateQueries({ queryKey: c });
|
|
@@ -1326,9 +1353,9 @@ const ps = () => {
|
|
|
1326
1353
|
* Fetch result for the resource. The client will automatically cache the result, and update the cache
|
|
1327
1354
|
* when the resource is updated or deleted via the returned update and remove mutation functions.
|
|
1328
1355
|
*/
|
|
1329
|
-
resource:
|
|
1356
|
+
resource: T({
|
|
1330
1357
|
queryKey: c,
|
|
1331
|
-
queryFn: async () =>
|
|
1358
|
+
queryFn: async () => Wt(i, e, n, ln.createFrom({
|
|
1332
1359
|
id: r,
|
|
1333
1360
|
namespace: s
|
|
1334
1361
|
})),
|
|
@@ -1349,40 +1376,40 @@ const ps = () => {
|
|
|
1349
1376
|
*/
|
|
1350
1377
|
remove: u
|
|
1351
1378
|
};
|
|
1352
|
-
},
|
|
1379
|
+
}, ms = (t) => {
|
|
1353
1380
|
const e = ["component", t.plugin, t.resource, t.area];
|
|
1354
1381
|
return {
|
|
1355
1382
|
/**
|
|
1356
1383
|
* Fetch result for the resource. The client will automatically cache the result, and update the cache
|
|
1357
1384
|
* when the resource is updated or deleted via the returned update and remove mutation functions.
|
|
1358
1385
|
*/
|
|
1359
|
-
component:
|
|
1386
|
+
component: T({
|
|
1360
1387
|
queryKey: e,
|
|
1361
|
-
queryFn: async () =>
|
|
1388
|
+
queryFn: async () => Gt(t)
|
|
1362
1389
|
})
|
|
1363
1390
|
};
|
|
1364
|
-
},
|
|
1365
|
-
const n =
|
|
1391
|
+
}, Ss = ({ pluginID: t, connectionID: e }) => {
|
|
1392
|
+
const n = P(t);
|
|
1366
1393
|
return {
|
|
1367
1394
|
/**
|
|
1368
1395
|
* The resource groups for the given plugin and connection.
|
|
1369
1396
|
*/
|
|
1370
|
-
groups:
|
|
1397
|
+
groups: T({
|
|
1371
1398
|
queryKey: [n, "resource_groups", "list"],
|
|
1372
|
-
queryFn: async () =>
|
|
1399
|
+
queryFn: async () => jt(n, e),
|
|
1373
1400
|
retry: !1
|
|
1374
1401
|
})
|
|
1375
1402
|
};
|
|
1376
|
-
},
|
|
1403
|
+
}, _s = ({
|
|
1377
1404
|
pluginID: t,
|
|
1378
1405
|
connectionID: e,
|
|
1379
1406
|
searches: n
|
|
1380
1407
|
}) => {
|
|
1381
|
-
const r =
|
|
1382
|
-
return
|
|
1408
|
+
const r = P(t), s = (o) => [r, e, o.key, o.namespaces, "list"];
|
|
1409
|
+
return dn({
|
|
1383
1410
|
queries: n.map((o) => ({
|
|
1384
1411
|
queryKey: s(o),
|
|
1385
|
-
queryFn: async () =>
|
|
1412
|
+
queryFn: async () => xe(r, e, o.key, Me.createFrom({
|
|
1386
1413
|
order: [{ field: "name", descending: !1 }],
|
|
1387
1414
|
pagination: { page: 1, pageSize: 200 },
|
|
1388
1415
|
namespaces: o.namespaces
|
|
@@ -1390,40 +1417,40 @@ const ps = () => {
|
|
|
1390
1417
|
retry: !1
|
|
1391
1418
|
}))
|
|
1392
1419
|
});
|
|
1393
|
-
},
|
|
1394
|
-
const n =
|
|
1420
|
+
}, Es = ({ pluginID: t, resourceKey: e }) => {
|
|
1421
|
+
const n = P(t);
|
|
1395
1422
|
return {
|
|
1396
1423
|
/**
|
|
1397
1424
|
* The current settings from the provider.
|
|
1398
1425
|
*/
|
|
1399
|
-
resourceType:
|
|
1426
|
+
resourceType: T({
|
|
1400
1427
|
queryKey: [n, "resources", e],
|
|
1401
|
-
queryFn: async () =>
|
|
1428
|
+
queryFn: async () => Qt(n, e),
|
|
1402
1429
|
retry: !1
|
|
1403
1430
|
})
|
|
1404
1431
|
};
|
|
1405
|
-
},
|
|
1406
|
-
const n =
|
|
1432
|
+
}, ws = ({ pluginID: t, connectionID: e }) => {
|
|
1433
|
+
const n = P(t);
|
|
1407
1434
|
return {
|
|
1408
1435
|
/**
|
|
1409
1436
|
* The resource types for the given plugin and connection.
|
|
1410
1437
|
*/
|
|
1411
|
-
types:
|
|
1438
|
+
types: T({
|
|
1412
1439
|
queryKey: [n, "resources", "list", e],
|
|
1413
|
-
queryFn: async () =>
|
|
1440
|
+
queryFn: async () => Kt(n, e),
|
|
1414
1441
|
retry: !1
|
|
1415
1442
|
})
|
|
1416
1443
|
};
|
|
1417
1444
|
};
|
|
1418
1445
|
var ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1419
|
-
function
|
|
1446
|
+
function An(t) {
|
|
1420
1447
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1421
1448
|
}
|
|
1422
|
-
var
|
|
1423
|
-
function
|
|
1449
|
+
var Dn = "Expected a function", Ve = "__lodash_hash_undefined__", xn = "[object Function]", Nn = "[object GeneratorFunction]", kn = "[object Symbol]", Ln = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Mn = /^\w*$/, qn = /^\./, Un = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, $n = /[\\^$.*+?()[\]{}|]/g, Wn = /\\(\\)?/g, Gn = /^\[object .+?Constructor\]$/, jn = typeof ee == "object" && ee && ee.Object === Object && ee, Qn = typeof self == "object" && self && self.Object === Object && self, me = jn || Qn || Function("return this")();
|
|
1450
|
+
function Kn(t, e) {
|
|
1424
1451
|
return t == null ? void 0 : t[e];
|
|
1425
1452
|
}
|
|
1426
|
-
function
|
|
1453
|
+
function Hn(t) {
|
|
1427
1454
|
var e = !1;
|
|
1428
1455
|
if (t != null && typeof t.toString != "function")
|
|
1429
1456
|
try {
|
|
@@ -1432,12 +1459,12 @@ function Qn(t) {
|
|
|
1432
1459
|
}
|
|
1433
1460
|
return e;
|
|
1434
1461
|
}
|
|
1435
|
-
var
|
|
1462
|
+
var Bn = Array.prototype, zn = Function.prototype, et = Object.prototype, le = me["__core-js_shared__"], ve = function() {
|
|
1436
1463
|
var t = /[^.]+$/.exec(le && le.keys && le.keys.IE_PROTO || "");
|
|
1437
1464
|
return t ? "Symbol(src)_1." + t : "";
|
|
1438
|
-
}(),
|
|
1439
|
-
"^" +
|
|
1440
|
-
),
|
|
1465
|
+
}(), tt = zn.toString, Se = et.hasOwnProperty, nt = et.toString, Yn = RegExp(
|
|
1466
|
+
"^" + tt.call(Se).replace($n, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1467
|
+
), Re = me.Symbol, Jn = Bn.splice, Zn = rt(me, "Map"), Z = rt(Object, "create"), Fe = Re ? Re.prototype : void 0, Ie = Fe ? Fe.toString : void 0;
|
|
1441
1468
|
function K(t) {
|
|
1442
1469
|
var e = -1, n = t ? t.length : 0;
|
|
1443
1470
|
for (this.clear(); ++e < n; ) {
|
|
@@ -1445,33 +1472,33 @@ function K(t) {
|
|
|
1445
1472
|
this.set(r[0], r[1]);
|
|
1446
1473
|
}
|
|
1447
1474
|
}
|
|
1448
|
-
function
|
|
1475
|
+
function Xn() {
|
|
1449
1476
|
this.__data__ = Z ? Z(null) : {};
|
|
1450
1477
|
}
|
|
1451
|
-
function
|
|
1478
|
+
function Vn(t) {
|
|
1452
1479
|
return this.has(t) && delete this.__data__[t];
|
|
1453
1480
|
}
|
|
1454
|
-
function
|
|
1481
|
+
function er(t) {
|
|
1455
1482
|
var e = this.__data__;
|
|
1456
1483
|
if (Z) {
|
|
1457
1484
|
var n = e[t];
|
|
1458
|
-
return n ===
|
|
1485
|
+
return n === Ve ? void 0 : n;
|
|
1459
1486
|
}
|
|
1460
1487
|
return Se.call(e, t) ? e[t] : void 0;
|
|
1461
1488
|
}
|
|
1462
|
-
function
|
|
1489
|
+
function tr(t) {
|
|
1463
1490
|
var e = this.__data__;
|
|
1464
1491
|
return Z ? e[t] !== void 0 : Se.call(e, t);
|
|
1465
1492
|
}
|
|
1466
|
-
function
|
|
1493
|
+
function nr(t, e) {
|
|
1467
1494
|
var n = this.__data__;
|
|
1468
|
-
return n[t] = Z && e === void 0 ?
|
|
1495
|
+
return n[t] = Z && e === void 0 ? Ve : e, this;
|
|
1469
1496
|
}
|
|
1470
|
-
K.prototype.clear =
|
|
1471
|
-
K.prototype.delete =
|
|
1472
|
-
K.prototype.get =
|
|
1473
|
-
K.prototype.has =
|
|
1474
|
-
K.prototype.set =
|
|
1497
|
+
K.prototype.clear = Xn;
|
|
1498
|
+
K.prototype.delete = Vn;
|
|
1499
|
+
K.prototype.get = er;
|
|
1500
|
+
K.prototype.has = tr;
|
|
1501
|
+
K.prototype.set = nr;
|
|
1475
1502
|
function J(t) {
|
|
1476
1503
|
var e = -1, n = t ? t.length : 0;
|
|
1477
1504
|
for (this.clear(); ++e < n; ) {
|
|
@@ -1479,130 +1506,130 @@ function J(t) {
|
|
|
1479
1506
|
this.set(r[0], r[1]);
|
|
1480
1507
|
}
|
|
1481
1508
|
}
|
|
1482
|
-
function
|
|
1509
|
+
function rr() {
|
|
1483
1510
|
this.__data__ = [];
|
|
1484
1511
|
}
|
|
1485
|
-
function
|
|
1512
|
+
function sr(t) {
|
|
1486
1513
|
var e = this.__data__, n = se(e, t);
|
|
1487
1514
|
if (n < 0)
|
|
1488
1515
|
return !1;
|
|
1489
1516
|
var r = e.length - 1;
|
|
1490
|
-
return n == r ? e.pop() :
|
|
1517
|
+
return n == r ? e.pop() : Jn.call(e, n, 1), !0;
|
|
1491
1518
|
}
|
|
1492
|
-
function
|
|
1519
|
+
function or(t) {
|
|
1493
1520
|
var e = this.__data__, n = se(e, t);
|
|
1494
1521
|
return n < 0 ? void 0 : e[n][1];
|
|
1495
1522
|
}
|
|
1496
|
-
function
|
|
1523
|
+
function ir(t) {
|
|
1497
1524
|
return se(this.__data__, t) > -1;
|
|
1498
1525
|
}
|
|
1499
|
-
function
|
|
1526
|
+
function ar(t, e) {
|
|
1500
1527
|
var n = this.__data__, r = se(n, t);
|
|
1501
1528
|
return r < 0 ? n.push([t, e]) : n[r][1] = e, this;
|
|
1502
1529
|
}
|
|
1503
|
-
J.prototype.clear =
|
|
1504
|
-
J.prototype.delete =
|
|
1505
|
-
J.prototype.get =
|
|
1506
|
-
J.prototype.has =
|
|
1507
|
-
J.prototype.set =
|
|
1508
|
-
function
|
|
1530
|
+
J.prototype.clear = rr;
|
|
1531
|
+
J.prototype.delete = sr;
|
|
1532
|
+
J.prototype.get = or;
|
|
1533
|
+
J.prototype.has = ir;
|
|
1534
|
+
J.prototype.set = ar;
|
|
1535
|
+
function H(t) {
|
|
1509
1536
|
var e = -1, n = t ? t.length : 0;
|
|
1510
1537
|
for (this.clear(); ++e < n; ) {
|
|
1511
1538
|
var r = t[e];
|
|
1512
1539
|
this.set(r[0], r[1]);
|
|
1513
1540
|
}
|
|
1514
1541
|
}
|
|
1515
|
-
function
|
|
1542
|
+
function cr() {
|
|
1516
1543
|
this.__data__ = {
|
|
1517
1544
|
hash: new K(),
|
|
1518
|
-
map: new (
|
|
1545
|
+
map: new (Zn || J)(),
|
|
1519
1546
|
string: new K()
|
|
1520
1547
|
};
|
|
1521
1548
|
}
|
|
1522
|
-
function
|
|
1549
|
+
function ur(t) {
|
|
1523
1550
|
return oe(this, t).delete(t);
|
|
1524
1551
|
}
|
|
1525
|
-
function
|
|
1552
|
+
function lr(t) {
|
|
1526
1553
|
return oe(this, t).get(t);
|
|
1527
1554
|
}
|
|
1528
|
-
function
|
|
1555
|
+
function dr(t) {
|
|
1529
1556
|
return oe(this, t).has(t);
|
|
1530
1557
|
}
|
|
1531
|
-
function
|
|
1558
|
+
function fr(t, e) {
|
|
1532
1559
|
return oe(this, t).set(t, e), this;
|
|
1533
1560
|
}
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1561
|
+
H.prototype.clear = cr;
|
|
1562
|
+
H.prototype.delete = ur;
|
|
1563
|
+
H.prototype.get = lr;
|
|
1564
|
+
H.prototype.has = dr;
|
|
1565
|
+
H.prototype.set = fr;
|
|
1539
1566
|
function se(t, e) {
|
|
1540
1567
|
for (var n = t.length; n--; )
|
|
1541
|
-
if (
|
|
1568
|
+
if (br(t[n][0], e))
|
|
1542
1569
|
return n;
|
|
1543
1570
|
return -1;
|
|
1544
1571
|
}
|
|
1545
|
-
function
|
|
1546
|
-
e =
|
|
1572
|
+
function pr(t, e) {
|
|
1573
|
+
e = mr(e, t) ? [e] : hr(e);
|
|
1547
1574
|
for (var n = 0, r = e.length; t != null && n < r; )
|
|
1548
|
-
t = t[
|
|
1575
|
+
t = t[wr(e[n++])];
|
|
1549
1576
|
return n && n == r ? t : void 0;
|
|
1550
1577
|
}
|
|
1551
|
-
function
|
|
1552
|
-
if (!
|
|
1578
|
+
function gr(t) {
|
|
1579
|
+
if (!ot(t) || _r(t))
|
|
1553
1580
|
return !1;
|
|
1554
|
-
var e =
|
|
1555
|
-
return e.test(
|
|
1581
|
+
var e = vr(t) || Hn(t) ? Yn : Gn;
|
|
1582
|
+
return e.test(Cr(t));
|
|
1556
1583
|
}
|
|
1557
|
-
function
|
|
1584
|
+
function yr(t) {
|
|
1558
1585
|
if (typeof t == "string")
|
|
1559
1586
|
return t;
|
|
1560
|
-
if (
|
|
1561
|
-
return
|
|
1587
|
+
if (Ee(t))
|
|
1588
|
+
return Ie ? Ie.call(t) : "";
|
|
1562
1589
|
var e = t + "";
|
|
1563
1590
|
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
1564
1591
|
}
|
|
1565
|
-
function
|
|
1566
|
-
return
|
|
1592
|
+
function hr(t) {
|
|
1593
|
+
return st(t) ? t : Er(t);
|
|
1567
1594
|
}
|
|
1568
1595
|
function oe(t, e) {
|
|
1569
1596
|
var n = t.__data__;
|
|
1570
|
-
return
|
|
1597
|
+
return Sr(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
1571
1598
|
}
|
|
1572
|
-
function
|
|
1573
|
-
var n =
|
|
1574
|
-
return
|
|
1599
|
+
function rt(t, e) {
|
|
1600
|
+
var n = Kn(t, e);
|
|
1601
|
+
return gr(n) ? n : void 0;
|
|
1575
1602
|
}
|
|
1576
|
-
function
|
|
1577
|
-
if (
|
|
1603
|
+
function mr(t, e) {
|
|
1604
|
+
if (st(t))
|
|
1578
1605
|
return !1;
|
|
1579
1606
|
var n = typeof t;
|
|
1580
|
-
return n == "number" || n == "symbol" || n == "boolean" || t == null ||
|
|
1607
|
+
return n == "number" || n == "symbol" || n == "boolean" || t == null || Ee(t) ? !0 : Mn.test(t) || !Ln.test(t) || e != null && t in Object(e);
|
|
1581
1608
|
}
|
|
1582
|
-
function
|
|
1609
|
+
function Sr(t) {
|
|
1583
1610
|
var e = typeof t;
|
|
1584
1611
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
1585
1612
|
}
|
|
1586
|
-
function
|
|
1587
|
-
return !!
|
|
1613
|
+
function _r(t) {
|
|
1614
|
+
return !!ve && ve in t;
|
|
1588
1615
|
}
|
|
1589
|
-
var
|
|
1590
|
-
t =
|
|
1616
|
+
var Er = _e(function(t) {
|
|
1617
|
+
t = Fr(t);
|
|
1591
1618
|
var e = [];
|
|
1592
|
-
return
|
|
1593
|
-
e.push(s ? i.replace(
|
|
1619
|
+
return qn.test(t) && e.push(""), t.replace(Un, function(n, r, s, i) {
|
|
1620
|
+
e.push(s ? i.replace(Wn, "$1") : r || n);
|
|
1594
1621
|
}), e;
|
|
1595
1622
|
});
|
|
1596
|
-
function
|
|
1597
|
-
if (typeof t == "string" ||
|
|
1623
|
+
function wr(t) {
|
|
1624
|
+
if (typeof t == "string" || Ee(t))
|
|
1598
1625
|
return t;
|
|
1599
1626
|
var e = t + "";
|
|
1600
1627
|
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
1601
1628
|
}
|
|
1602
|
-
function
|
|
1629
|
+
function Cr(t) {
|
|
1603
1630
|
if (t != null) {
|
|
1604
1631
|
try {
|
|
1605
|
-
return
|
|
1632
|
+
return tt.call(t);
|
|
1606
1633
|
} catch {
|
|
1607
1634
|
}
|
|
1608
1635
|
try {
|
|
@@ -1614,7 +1641,7 @@ function wr(t) {
|
|
|
1614
1641
|
}
|
|
1615
1642
|
function _e(t, e) {
|
|
1616
1643
|
if (typeof t != "function" || e && typeof e != "function")
|
|
1617
|
-
throw new TypeError(
|
|
1644
|
+
throw new TypeError(Dn);
|
|
1618
1645
|
var n = function() {
|
|
1619
1646
|
var r = arguments, s = e ? e.apply(this, r) : r[0], i = n.cache;
|
|
1620
1647
|
if (i.has(s))
|
|
@@ -1622,37 +1649,37 @@ function _e(t, e) {
|
|
|
1622
1649
|
var o = t.apply(this, r);
|
|
1623
1650
|
return n.cache = i.set(s, o), o;
|
|
1624
1651
|
};
|
|
1625
|
-
return n.cache = new (_e.Cache ||
|
|
1652
|
+
return n.cache = new (_e.Cache || H)(), n;
|
|
1626
1653
|
}
|
|
1627
|
-
_e.Cache =
|
|
1628
|
-
function
|
|
1654
|
+
_e.Cache = H;
|
|
1655
|
+
function br(t, e) {
|
|
1629
1656
|
return t === e || t !== t && e !== e;
|
|
1630
1657
|
}
|
|
1631
|
-
var
|
|
1632
|
-
function
|
|
1633
|
-
var e =
|
|
1634
|
-
return e ==
|
|
1658
|
+
var st = Array.isArray;
|
|
1659
|
+
function vr(t) {
|
|
1660
|
+
var e = ot(t) ? nt.call(t) : "";
|
|
1661
|
+
return e == xn || e == Nn;
|
|
1635
1662
|
}
|
|
1636
|
-
function
|
|
1663
|
+
function ot(t) {
|
|
1637
1664
|
var e = typeof t;
|
|
1638
1665
|
return !!t && (e == "object" || e == "function");
|
|
1639
1666
|
}
|
|
1640
|
-
function
|
|
1667
|
+
function Rr(t) {
|
|
1641
1668
|
return !!t && typeof t == "object";
|
|
1642
1669
|
}
|
|
1643
|
-
function
|
|
1644
|
-
return typeof t == "symbol" ||
|
|
1670
|
+
function Ee(t) {
|
|
1671
|
+
return typeof t == "symbol" || Rr(t) && nt.call(t) == kn;
|
|
1645
1672
|
}
|
|
1646
|
-
function
|
|
1647
|
-
return t == null ? "" :
|
|
1673
|
+
function Fr(t) {
|
|
1674
|
+
return t == null ? "" : yr(t);
|
|
1648
1675
|
}
|
|
1649
|
-
function
|
|
1650
|
-
var r = t == null ? void 0 :
|
|
1676
|
+
function Ir(t, e, n) {
|
|
1677
|
+
var r = t == null ? void 0 : pr(t, e);
|
|
1651
1678
|
return r === void 0 ? n : r;
|
|
1652
1679
|
}
|
|
1653
|
-
var
|
|
1654
|
-
const te = /* @__PURE__ */
|
|
1655
|
-
function
|
|
1680
|
+
var Pr = Ir;
|
|
1681
|
+
const te = /* @__PURE__ */ An(Pr);
|
|
1682
|
+
function Or(t, e, n) {
|
|
1656
1683
|
const r = t ?? { result: [], success: !0, totalCount: 0 }, s = [...r.result ?? []];
|
|
1657
1684
|
for (const i of e) {
|
|
1658
1685
|
const o = te(i.payload.data, n);
|
|
@@ -1675,126 +1702,126 @@ function Ir(t, e, n) {
|
|
|
1675
1702
|
}
|
|
1676
1703
|
return { ...r, result: s };
|
|
1677
1704
|
}
|
|
1678
|
-
function
|
|
1679
|
-
const o = (i == null ? void 0 : i.syncWindowMs) ?? 500, a =
|
|
1705
|
+
function Tr(t, e, n, r, s, i) {
|
|
1706
|
+
const o = (i == null ? void 0 : i.syncWindowMs) ?? 500, a = q([]), c = q(null), l = q(null), u = q(s);
|
|
1680
1707
|
u.current = s;
|
|
1681
|
-
const
|
|
1682
|
-
const
|
|
1683
|
-
if (a.current = [], c.current = null, l.current = null, !(
|
|
1708
|
+
const f = k(() => {
|
|
1709
|
+
const p = a.current;
|
|
1710
|
+
if (a.current = [], c.current = null, l.current = null, !(p.length === 0 || !r)) {
|
|
1684
1711
|
t.setQueryData(
|
|
1685
1712
|
e,
|
|
1686
|
-
(
|
|
1713
|
+
(g) => Or(g, p, r)
|
|
1687
1714
|
);
|
|
1688
|
-
for (const
|
|
1689
|
-
(
|
|
1690
|
-
n(
|
|
1691
|
-
{ result:
|
|
1715
|
+
for (const g of p)
|
|
1716
|
+
(g.type === "ADD" || g.type === "UPDATE") && t.setQueryData(
|
|
1717
|
+
n(g.payload.id, g.payload.namespace),
|
|
1718
|
+
{ result: g.payload.data }
|
|
1692
1719
|
);
|
|
1693
1720
|
}
|
|
1694
|
-
}, [t, e, n, r]),
|
|
1695
|
-
(
|
|
1696
|
-
a.current.push(
|
|
1721
|
+
}, [t, e, n, r]), d = k(
|
|
1722
|
+
(p) => {
|
|
1723
|
+
a.current.push(p), !(c.current !== null || l.current !== null) && (u.current === 1 ? c.current = setTimeout(f, o) : l.current = requestAnimationFrame(f));
|
|
1697
1724
|
},
|
|
1698
|
-
[
|
|
1725
|
+
[f, o]
|
|
1699
1726
|
);
|
|
1700
|
-
return
|
|
1727
|
+
return $(() => () => {
|
|
1701
1728
|
c.current !== null && (clearTimeout(c.current), c.current = null), l.current !== null && (cancelAnimationFrame(l.current), l.current = null);
|
|
1702
|
-
}, []),
|
|
1729
|
+
}, []), d;
|
|
1703
1730
|
}
|
|
1704
|
-
const
|
|
1731
|
+
const Cs = ({
|
|
1705
1732
|
pluginID: t,
|
|
1706
1733
|
connectionID: e,
|
|
1707
1734
|
resourceKey: n,
|
|
1708
1735
|
idAccessor: r,
|
|
1709
1736
|
namespaces: s
|
|
1710
1737
|
}) => {
|
|
1711
|
-
const i =
|
|
1738
|
+
const i = P(t), o = j(), { showSnackbar: a } = W(), c = w.useMemo(() => s ?? [], [s]), l = w.useMemo(
|
|
1712
1739
|
() => [i, e, n, c, "list"],
|
|
1713
1740
|
[i, e, n, c]
|
|
1714
|
-
), u =
|
|
1715
|
-
(
|
|
1741
|
+
), u = w.useCallback(
|
|
1742
|
+
(m, y) => [i, e, n, y, m],
|
|
1716
1743
|
[i, e, n]
|
|
1717
|
-
), { mutateAsync:
|
|
1718
|
-
mutationFn: async (
|
|
1719
|
-
input:
|
|
1720
|
-
namespace:
|
|
1744
|
+
), { mutateAsync: f } = A({
|
|
1745
|
+
mutationFn: async (m) => Ne(i, e, n, qe.createFrom({
|
|
1746
|
+
input: m.input,
|
|
1747
|
+
namespace: m.namespace ?? (c.length === 1 ? c[0] : "")
|
|
1721
1748
|
})),
|
|
1722
|
-
onSuccess: async (
|
|
1749
|
+
onSuccess: async (m) => {
|
|
1723
1750
|
var v;
|
|
1724
|
-
const
|
|
1725
|
-
let
|
|
1726
|
-
(v =
|
|
1727
|
-
const
|
|
1728
|
-
a(
|
|
1751
|
+
const y = m == null ? void 0 : m.result;
|
|
1752
|
+
let _ = "";
|
|
1753
|
+
(v = y == null ? void 0 : y.metadata) != null && v.name ? _ = y.metadata.name : y != null && y.id ? _ = y.id : y != null && y.name ? _ = y.name : y != null && y.ID ? _ = y.ID : y != null && y.Name && (_ = y.Name);
|
|
1754
|
+
const h = _ ? `Resource ${_} created` : "Resource created";
|
|
1755
|
+
a(h, "success"), await o.invalidateQueries({ queryKey: l });
|
|
1729
1756
|
},
|
|
1730
1757
|
onError: L(a, "Failed to create resource")
|
|
1731
|
-
}),
|
|
1758
|
+
}), d = T({
|
|
1732
1759
|
queryKey: l,
|
|
1733
|
-
queryFn: async () =>
|
|
1760
|
+
queryFn: async () => xe(i, e, n, Me.createFrom({
|
|
1734
1761
|
order: [{ field: "name", descending: !1 }],
|
|
1735
1762
|
pagination: { page: 1, pageSize: 200 },
|
|
1736
1763
|
namespaces: c
|
|
1737
1764
|
})),
|
|
1738
|
-
placeholderData: (
|
|
1765
|
+
placeholderData: (m, y) => m,
|
|
1739
1766
|
retry: !1
|
|
1740
|
-
}), [
|
|
1767
|
+
}), [p, g] = w.useState(
|
|
1741
1768
|
F.WatchStateIdle
|
|
1742
1769
|
);
|
|
1743
|
-
|
|
1770
|
+
w.useEffect(() => O(
|
|
1744
1771
|
`${i}/${e}/watch/STATE`,
|
|
1745
|
-
(
|
|
1746
|
-
const
|
|
1747
|
-
|
|
1772
|
+
(y) => {
|
|
1773
|
+
const _ = y.data;
|
|
1774
|
+
_.resourceKey === n && g(_.state);
|
|
1748
1775
|
}
|
|
1749
1776
|
), [i, e, n]);
|
|
1750
|
-
const
|
|
1751
|
-
return
|
|
1777
|
+
const S = Tr(o, l, u, r, p);
|
|
1778
|
+
return w.useEffect(() => {
|
|
1752
1779
|
if (!r)
|
|
1753
1780
|
return;
|
|
1754
|
-
|
|
1755
|
-
const
|
|
1781
|
+
Ht(i, e, n);
|
|
1782
|
+
const m = O(
|
|
1756
1783
|
`${i}/${e}/${n}/ADD`,
|
|
1757
|
-
(
|
|
1758
|
-
),
|
|
1784
|
+
(h) => S({ type: "ADD", payload: h.data })
|
|
1785
|
+
), y = O(
|
|
1759
1786
|
`${i}/${e}/${n}/UPDATE`,
|
|
1760
|
-
(
|
|
1761
|
-
),
|
|
1787
|
+
(h) => S({ type: "UPDATE", payload: h.data })
|
|
1788
|
+
), _ = O(
|
|
1762
1789
|
`${i}/${e}/${n}/DELETE`,
|
|
1763
|
-
(
|
|
1790
|
+
(h) => S({ type: "DELETE", payload: h.data })
|
|
1764
1791
|
);
|
|
1765
1792
|
return () => {
|
|
1766
|
-
|
|
1793
|
+
m(), y(), _(), Bt(i, e, n);
|
|
1767
1794
|
};
|
|
1768
|
-
}, [i, e, n,
|
|
1795
|
+
}, [i, e, n, S]), {
|
|
1769
1796
|
/**
|
|
1770
1797
|
* Fetch result for the resource. The client will automatically cache the result, and update the cache
|
|
1771
1798
|
* when the resources are updated or deleted via the returned create and remove mutation functions, or
|
|
1772
1799
|
* the per-resource hook mutation functions.
|
|
1773
1800
|
*/
|
|
1774
|
-
resources:
|
|
1801
|
+
resources: d,
|
|
1775
1802
|
/**
|
|
1776
1803
|
* Create a new resource. A set of optional parameters can be passed to customize the create behavior,
|
|
1777
1804
|
* which if specified, will add additional default behavior set via the hook options.
|
|
1778
1805
|
*
|
|
1779
1806
|
* @params opts Optional parameters to pass to the resource create operation
|
|
1780
1807
|
*/
|
|
1781
|
-
create:
|
|
1808
|
+
create: f,
|
|
1782
1809
|
/** Current watch state for this resource type */
|
|
1783
|
-
watchState:
|
|
1810
|
+
watchState: p,
|
|
1784
1811
|
/** Whether the watch is currently syncing */
|
|
1785
|
-
isSyncing:
|
|
1812
|
+
isSyncing: p === F.WatchStateSyncing,
|
|
1786
1813
|
/** Whether the watch has fully synced */
|
|
1787
|
-
isSynced:
|
|
1814
|
+
isSynced: p === F.WatchStateSynced,
|
|
1788
1815
|
/** Whether the watch encountered an error */
|
|
1789
|
-
watchError:
|
|
1816
|
+
watchError: p === F.WatchStateError
|
|
1790
1817
|
};
|
|
1791
|
-
},
|
|
1792
|
-
const e =
|
|
1793
|
-
mutationFn: async ({ opts: o, input: a }) =>
|
|
1818
|
+
}, bs = ({ pluginID: t }) => {
|
|
1819
|
+
const e = P(t), { showSnackbar: n } = W(), r = A({
|
|
1820
|
+
mutationFn: async ({ opts: o, input: a }) => Ne(
|
|
1794
1821
|
e,
|
|
1795
1822
|
o.connectionID,
|
|
1796
1823
|
o.resourceKey,
|
|
1797
|
-
|
|
1824
|
+
qe.createFrom({
|
|
1798
1825
|
input: a.input,
|
|
1799
1826
|
namespace: a.namespace ?? o.namespace ?? ""
|
|
1800
1827
|
})
|
|
@@ -1805,12 +1832,12 @@ const ws = ({
|
|
|
1805
1832
|
onError(o, { opts: a }) {
|
|
1806
1833
|
z(n, o, `Failed to create resource ${a.resourceID}`);
|
|
1807
1834
|
}
|
|
1808
|
-
}), s =
|
|
1809
|
-
mutationFn: async ({ opts: o, input: a }) =>
|
|
1835
|
+
}), s = A({
|
|
1836
|
+
mutationFn: async ({ opts: o, input: a }) => Ae(
|
|
1810
1837
|
e,
|
|
1811
1838
|
o.connectionID,
|
|
1812
1839
|
o.resourceKey,
|
|
1813
|
-
|
|
1840
|
+
ke.createFrom({
|
|
1814
1841
|
input: a.input,
|
|
1815
1842
|
id: o.resourceID,
|
|
1816
1843
|
namespace: o.namespace ?? ""
|
|
@@ -1822,8 +1849,8 @@ const ws = ({
|
|
|
1822
1849
|
onError(o, { opts: a }) {
|
|
1823
1850
|
z(n, o, `Failed to update resource ${a.resourceID}`);
|
|
1824
1851
|
}
|
|
1825
|
-
}), i =
|
|
1826
|
-
mutationFn: async ({ opts: o, input: a }) =>
|
|
1852
|
+
}), i = A({
|
|
1853
|
+
mutationFn: async ({ opts: o, input: a }) => De(
|
|
1827
1854
|
e,
|
|
1828
1855
|
o.connectionID,
|
|
1829
1856
|
o.resourceKey,
|
|
@@ -1845,15 +1872,15 @@ const ws = ({
|
|
|
1845
1872
|
update: s.mutateAsync,
|
|
1846
1873
|
remove: i.mutateAsync
|
|
1847
1874
|
};
|
|
1848
|
-
},
|
|
1875
|
+
}, vs = ({
|
|
1849
1876
|
pluginID: t,
|
|
1850
1877
|
connectionID: e,
|
|
1851
1878
|
resourceKey: n,
|
|
1852
1879
|
enabled: r = !0
|
|
1853
1880
|
}) => {
|
|
1854
|
-
const s =
|
|
1881
|
+
const s = P(t), i = T({
|
|
1855
1882
|
queryKey: ["RESOURCE_ACTIONS", s, e, n],
|
|
1856
|
-
queryFn: () =>
|
|
1883
|
+
queryFn: () => zt(s, e, n),
|
|
1857
1884
|
enabled: r && !!s && !!e && !!n,
|
|
1858
1885
|
staleTime: 5 * 60 * 1e3
|
|
1859
1886
|
// actions don't change often
|
|
@@ -1863,18 +1890,18 @@ const ws = ({
|
|
|
1863
1890
|
isLoading: i.isLoading,
|
|
1864
1891
|
error: i.error
|
|
1865
1892
|
};
|
|
1866
|
-
},
|
|
1893
|
+
}, Rs = ({
|
|
1867
1894
|
pluginID: t,
|
|
1868
1895
|
connectionID: e,
|
|
1869
1896
|
resourceKey: n
|
|
1870
1897
|
}) => {
|
|
1871
|
-
const r =
|
|
1872
|
-
mutationFn: async ({ actionID: a, id: c = "", namespace: l = "", params: u = {} }) =>
|
|
1898
|
+
const r = P(t), s = j(), { showSnackbar: i } = W(), o = A({
|
|
1899
|
+
mutationFn: async ({ actionID: a, id: c = "", namespace: l = "", params: u = {} }) => Yt(
|
|
1873
1900
|
r,
|
|
1874
1901
|
e,
|
|
1875
1902
|
n,
|
|
1876
1903
|
a,
|
|
1877
|
-
|
|
1904
|
+
Ue.createFrom({ id: c, namespace: l, params: u })
|
|
1878
1905
|
),
|
|
1879
1906
|
onSuccess: (a) => {
|
|
1880
1907
|
a != null && a.message && i(a.message, "success"), s.invalidateQueries({
|
|
@@ -1890,14 +1917,14 @@ const ws = ({
|
|
|
1890
1917
|
isExecuting: o.isPending,
|
|
1891
1918
|
error: o.error
|
|
1892
1919
|
};
|
|
1893
|
-
},
|
|
1920
|
+
}, Fs = ({
|
|
1894
1921
|
pluginID: t,
|
|
1895
1922
|
connectionID: e,
|
|
1896
1923
|
enabled: n = !0
|
|
1897
1924
|
}) => {
|
|
1898
|
-
const r =
|
|
1925
|
+
const r = P(t), s = T({
|
|
1899
1926
|
queryKey: ["EDITOR_SCHEMAS", r, e],
|
|
1900
|
-
queryFn: () =>
|
|
1927
|
+
queryFn: () => Jt(r, e),
|
|
1901
1928
|
enabled: n && !!r && !!e,
|
|
1902
1929
|
staleTime: 10 * 60 * 1e3,
|
|
1903
1930
|
// schemas are fairly stable per connection
|
|
@@ -1909,115 +1936,115 @@ const ws = ({
|
|
|
1909
1936
|
error: s.error,
|
|
1910
1937
|
refetch: s.refetch
|
|
1911
1938
|
};
|
|
1912
|
-
},
|
|
1939
|
+
}, Is = ({
|
|
1913
1940
|
pluginID: t,
|
|
1914
1941
|
connectionID: e,
|
|
1915
1942
|
enabled: n = !0
|
|
1916
1943
|
}) => {
|
|
1917
|
-
const r =
|
|
1918
|
-
s.setQueryData(i, (
|
|
1919
|
-
if (!
|
|
1920
|
-
const
|
|
1921
|
-
let
|
|
1922
|
-
for (const
|
|
1923
|
-
|
|
1924
|
-
return { ...
|
|
1944
|
+
const r = P(t), s = j(), i = [r, e, "watch-state"], o = q([]), a = q(!1), c = k((d) => {
|
|
1945
|
+
s.setQueryData(i, (p) => {
|
|
1946
|
+
if (!p) return p;
|
|
1947
|
+
const g = { ...p.resources, [d.resourceKey]: d.state }, S = { ...p.resourceCounts, [d.resourceKey]: d.resourceCount };
|
|
1948
|
+
let m = 0, y = 0;
|
|
1949
|
+
for (const _ of Object.values(g))
|
|
1950
|
+
_ === F.WatchStateSynced && m++, (_ === F.WatchStateError || _ === F.WatchStateFailed) && y++;
|
|
1951
|
+
return { ...p, resources: g, resourceCounts: S, totalResources: Object.keys(g).length, syncedCount: m, errorCount: y };
|
|
1925
1952
|
});
|
|
1926
|
-
}, [s, r, e]), l =
|
|
1953
|
+
}, [s, r, e]), l = T({
|
|
1927
1954
|
queryKey: i,
|
|
1928
1955
|
queryFn: async () => {
|
|
1929
|
-
const
|
|
1930
|
-
if (!
|
|
1931
|
-
const
|
|
1932
|
-
let
|
|
1933
|
-
for (const [
|
|
1934
|
-
|
|
1935
|
-
const
|
|
1936
|
-
for (const [
|
|
1937
|
-
|
|
1956
|
+
const d = await Zt(r, e);
|
|
1957
|
+
if (!d) throw new Error("Failed to get watch state: null response");
|
|
1958
|
+
const p = {};
|
|
1959
|
+
let g = 0, S = 0;
|
|
1960
|
+
for (const [y, _] of Object.entries(d.resources ?? {}))
|
|
1961
|
+
_ != null && (p[y] = _, _ === F.WatchStateSynced && g++, _ === F.WatchStateError && S++);
|
|
1962
|
+
const m = {};
|
|
1963
|
+
for (const [y, _] of Object.entries(d.resourceCounts ?? {}))
|
|
1964
|
+
_ != null && (m[y] = _);
|
|
1938
1965
|
return {
|
|
1939
|
-
connection:
|
|
1940
|
-
resources:
|
|
1941
|
-
resourceCounts:
|
|
1942
|
-
totalResources: Object.keys(
|
|
1943
|
-
syncedCount:
|
|
1944
|
-
errorCount:
|
|
1966
|
+
connection: d.connectionId,
|
|
1967
|
+
resources: p,
|
|
1968
|
+
resourceCounts: m,
|
|
1969
|
+
totalResources: Object.keys(p).length,
|
|
1970
|
+
syncedCount: g,
|
|
1971
|
+
errorCount: S
|
|
1945
1972
|
};
|
|
1946
1973
|
},
|
|
1947
1974
|
enabled: n && !!r && !!e,
|
|
1948
|
-
refetchInterval: (
|
|
1949
|
-
const
|
|
1950
|
-
if (!
|
|
1951
|
-
let
|
|
1952
|
-
for (const
|
|
1953
|
-
(
|
|
1954
|
-
return
|
|
1975
|
+
refetchInterval: (d) => {
|
|
1976
|
+
const p = d.state.data;
|
|
1977
|
+
if (!p || p.totalResources === 0) return 3e3;
|
|
1978
|
+
let g = 0;
|
|
1979
|
+
for (const S of Object.values(p.resources))
|
|
1980
|
+
(S === F.WatchStateSynced || S === F.WatchStateError || S === F.WatchStateStopped || S === F.WatchStateFailed || S === F.WatchStateForbidden || S === F.WatchStateSkipped) && g++;
|
|
1981
|
+
return g >= p.totalResources ? !1 : 3e3;
|
|
1955
1982
|
}
|
|
1956
1983
|
});
|
|
1957
|
-
|
|
1984
|
+
$(() => {
|
|
1958
1985
|
if (!l.data || a.current) return;
|
|
1959
1986
|
a.current = !0;
|
|
1960
|
-
const
|
|
1987
|
+
const d = o.current;
|
|
1961
1988
|
o.current = [];
|
|
1962
|
-
for (const
|
|
1963
|
-
c(
|
|
1964
|
-
}, [l.data, c]),
|
|
1989
|
+
for (const p of d)
|
|
1990
|
+
c(p);
|
|
1991
|
+
}, [l.data, c]), $(() => {
|
|
1965
1992
|
if (!n || !r || !e)
|
|
1966
1993
|
return;
|
|
1967
1994
|
a.current = !1, o.current = [];
|
|
1968
|
-
const
|
|
1995
|
+
const d = O(
|
|
1969
1996
|
`${r}/${e}/watch/STATE`,
|
|
1970
|
-
(
|
|
1971
|
-
const
|
|
1972
|
-
a.current ? c(
|
|
1997
|
+
(p) => {
|
|
1998
|
+
const g = p.data;
|
|
1999
|
+
a.current ? c(g) : o.current.push(g);
|
|
1973
2000
|
}
|
|
1974
2001
|
);
|
|
1975
2002
|
return () => {
|
|
1976
|
-
|
|
2003
|
+
d(), a.current = !1, o.current = [];
|
|
1977
2004
|
};
|
|
1978
2005
|
}, [r, e, n, c]);
|
|
1979
2006
|
const u = l.data;
|
|
1980
|
-
let
|
|
2007
|
+
let f = 0;
|
|
1981
2008
|
if (u != null && u.resources)
|
|
1982
|
-
for (const
|
|
1983
|
-
(
|
|
2009
|
+
for (const d of Object.values(u.resources))
|
|
2010
|
+
(d === F.WatchStateSynced || d === F.WatchStateError || d === F.WatchStateStopped || d === F.WatchStateFailed || d === F.WatchStateForbidden || d === F.WatchStateSkipped) && f++;
|
|
1984
2011
|
return {
|
|
1985
2012
|
/** Full summary query result */
|
|
1986
2013
|
summary: l,
|
|
1987
2014
|
/** Get the state of a specific resource type's watch */
|
|
1988
|
-
getResourceState: (
|
|
2015
|
+
getResourceState: (d) => u == null ? void 0 : u.resources[d],
|
|
1989
2016
|
/** Whether all registered watches have reached a terminal state */
|
|
1990
|
-
isFullySynced: u ? u.totalResources > 0 &&
|
|
2017
|
+
isFullySynced: u ? u.totalResources > 0 && f === u.totalResources : !1,
|
|
1991
2018
|
/** Sync progress as a 0-1 fraction (terminal states / total) */
|
|
1992
|
-
syncProgress: u && u.totalResources > 0 ?
|
|
2019
|
+
syncProgress: u && u.totalResources > 0 ? f / u.totalResources : 0,
|
|
1993
2020
|
/** Number of watches that encountered errors */
|
|
1994
2021
|
errorCount: (u == null ? void 0 : u.errorCount) ?? 0
|
|
1995
2022
|
};
|
|
1996
|
-
},
|
|
1997
|
-
const [t, e] =
|
|
1998
|
-
const u = l.data,
|
|
1999
|
-
if (e((
|
|
2000
|
-
const
|
|
2001
|
-
return
|
|
2002
|
-
}), r.current.has(
|
|
2003
|
-
const
|
|
2004
|
-
e((
|
|
2005
|
-
const
|
|
2006
|
-
return
|
|
2007
|
-
}), n.current.delete(
|
|
2023
|
+
}, Ps = () => {
|
|
2024
|
+
const [t, e] = G(/* @__PURE__ */ new Map()), n = q(/* @__PURE__ */ new Map()), r = q(/* @__PURE__ */ new Map()), s = k((l) => {
|
|
2025
|
+
const u = l.data, f = he(u), d = Ze(n.current, u), p = pe(d);
|
|
2026
|
+
if (e((g) => {
|
|
2027
|
+
const S = new Map(g);
|
|
2028
|
+
return S.set(f, p), S;
|
|
2029
|
+
}), r.current.has(f) && (clearTimeout(r.current.get(f)), r.current.delete(f)), ne(p)) {
|
|
2030
|
+
const g = setTimeout(() => {
|
|
2031
|
+
e((S) => {
|
|
2032
|
+
const m = new Map(S);
|
|
2033
|
+
return m.delete(f), m;
|
|
2034
|
+
}), n.current.delete(f), r.current.delete(f);
|
|
2008
2035
|
}, 5e3);
|
|
2009
|
-
r.current.set(
|
|
2036
|
+
r.current.set(f, g);
|
|
2010
2037
|
}
|
|
2011
2038
|
}, []);
|
|
2012
|
-
|
|
2013
|
-
const l =
|
|
2039
|
+
$(() => {
|
|
2040
|
+
const l = O("watch/STATE", s);
|
|
2014
2041
|
return () => {
|
|
2015
2042
|
l();
|
|
2016
2043
|
for (const u of r.current.values())
|
|
2017
2044
|
clearTimeout(u);
|
|
2018
2045
|
};
|
|
2019
2046
|
}, [s]);
|
|
2020
|
-
const i = Array.from(t.values()), o =
|
|
2047
|
+
const i = Array.from(t.values()), o = Ye(i), a = i.find((l) => !ne(l)) ?? i[0] ?? null, c = Je(i);
|
|
2021
2048
|
return {
|
|
2022
2049
|
/** All tracked syncs */
|
|
2023
2050
|
syncs: i,
|
|
@@ -2028,76 +2055,95 @@ const ws = ({
|
|
|
2028
2055
|
/** Aggregate progress across all connections (0-1) */
|
|
2029
2056
|
aggregateProgress: c
|
|
2030
2057
|
};
|
|
2031
|
-
},
|
|
2032
|
-
const t =
|
|
2058
|
+
}, Ar = () => {
|
|
2059
|
+
const t = w.useContext(Ke);
|
|
2033
2060
|
if (!t) throw new Error("useOperations must be used within an OperationsProvider");
|
|
2034
2061
|
return t;
|
|
2035
|
-
},
|
|
2062
|
+
}, Os = ({
|
|
2036
2063
|
pluginID: t,
|
|
2037
2064
|
connectionID: e,
|
|
2038
2065
|
resourceKey: n
|
|
2039
2066
|
}) => {
|
|
2040
|
-
const r =
|
|
2041
|
-
return
|
|
2067
|
+
const r = P(t), { showSnackbar: s } = W(), { addOperation: i, updateOperation: o } = Ar(), a = w.useRef([]);
|
|
2068
|
+
return w.useEffect(() => () => {
|
|
2042
2069
|
a.current.forEach((l) => l());
|
|
2043
|
-
}, []), { startStreamAction:
|
|
2044
|
-
async ({ actionID: l, id: u, namespace:
|
|
2070
|
+
}, []), { startStreamAction: w.useCallback(
|
|
2071
|
+
async ({ actionID: l, id: u, namespace: f, label: d, params: p = {} }) => {
|
|
2045
2072
|
try {
|
|
2046
|
-
const
|
|
2073
|
+
const g = await Xt(
|
|
2047
2074
|
r,
|
|
2048
2075
|
e,
|
|
2049
2076
|
n,
|
|
2050
2077
|
l,
|
|
2051
|
-
|
|
2078
|
+
Ue.createFrom({ id: u, namespace: f, params: p })
|
|
2052
2079
|
);
|
|
2053
2080
|
i({
|
|
2054
|
-
id:
|
|
2055
|
-
label:
|
|
2081
|
+
id: g,
|
|
2082
|
+
label: d,
|
|
2056
2083
|
resourceKey: n,
|
|
2057
2084
|
resourceName: u,
|
|
2058
|
-
namespace:
|
|
2085
|
+
namespace: f,
|
|
2059
2086
|
connectionID: e,
|
|
2060
2087
|
status: "running",
|
|
2061
2088
|
startedAt: Date.now()
|
|
2062
2089
|
});
|
|
2063
|
-
const
|
|
2064
|
-
var
|
|
2065
|
-
const
|
|
2066
|
-
switch (
|
|
2090
|
+
const S = `action/stream/${g}`, m = O(S, (y) => {
|
|
2091
|
+
var h, v, R, C;
|
|
2092
|
+
const _ = y.data;
|
|
2093
|
+
switch (_.type) {
|
|
2067
2094
|
case "progress": {
|
|
2068
|
-
const
|
|
2069
|
-
o(
|
|
2070
|
-
message:
|
|
2071
|
-
progress:
|
|
2095
|
+
const E = _.data ?? {};
|
|
2096
|
+
o(g, {
|
|
2097
|
+
message: E.message,
|
|
2098
|
+
progress: E.ready !== void 0 && E.desired !== void 0 ? { ready: E.ready, desired: E.desired } : void 0
|
|
2072
2099
|
});
|
|
2073
2100
|
break;
|
|
2074
2101
|
}
|
|
2075
2102
|
case "complete":
|
|
2076
|
-
o(
|
|
2103
|
+
o(g, {
|
|
2077
2104
|
status: "completed",
|
|
2078
|
-
message: ((
|
|
2105
|
+
message: ((h = _.data) == null ? void 0 : h.message) ?? "Completed",
|
|
2079
2106
|
completedAt: Date.now()
|
|
2080
|
-
}), s(((v =
|
|
2107
|
+
}), s(((v = _.data) == null ? void 0 : v.message) ?? d + " completed", "success"), ae(S);
|
|
2081
2108
|
break;
|
|
2082
2109
|
case "error":
|
|
2083
|
-
o(
|
|
2110
|
+
o(g, {
|
|
2084
2111
|
status: "error",
|
|
2085
|
-
message: ((R =
|
|
2112
|
+
message: ((R = _.data) == null ? void 0 : R.message) ?? "Failed",
|
|
2086
2113
|
completedAt: Date.now()
|
|
2087
|
-
}), s(((
|
|
2114
|
+
}), s(((C = _.data) == null ? void 0 : C.message) ?? d + " failed", "error"), ae(S);
|
|
2088
2115
|
break;
|
|
2089
2116
|
}
|
|
2090
2117
|
});
|
|
2091
2118
|
return a.current.push(() => {
|
|
2092
|
-
|
|
2093
|
-
}),
|
|
2094
|
-
} catch (
|
|
2095
|
-
throw z(s,
|
|
2119
|
+
m(), ae(S);
|
|
2120
|
+
}), g;
|
|
2121
|
+
} catch (g) {
|
|
2122
|
+
throw z(s, g, `Failed to start "${l}"`), g;
|
|
2096
2123
|
}
|
|
2097
2124
|
},
|
|
2098
2125
|
[r, e, n, i, o, s]
|
|
2099
2126
|
) };
|
|
2100
|
-
}
|
|
2127
|
+
};
|
|
2128
|
+
function Dr(t, e) {
|
|
2129
|
+
return `${t}/${e}/graph/CHANGED`;
|
|
2130
|
+
}
|
|
2131
|
+
function we(t, e, n, r) {
|
|
2132
|
+
const s = j(), i = q(n);
|
|
2133
|
+
i.current = n;
|
|
2134
|
+
const o = JSON.stringify(n);
|
|
2135
|
+
$(() => {
|
|
2136
|
+
if (!r || !t || !e)
|
|
2137
|
+
return;
|
|
2138
|
+
const a = O(Dr(t, e), () => {
|
|
2139
|
+
s.invalidateQueries({ queryKey: i.current, exact: !0 });
|
|
2140
|
+
});
|
|
2141
|
+
return () => {
|
|
2142
|
+
a();
|
|
2143
|
+
};
|
|
2144
|
+
}, [s, t, e, o, r]);
|
|
2145
|
+
}
|
|
2146
|
+
const xr = {
|
|
2101
2147
|
owns: { outgoing: "Owns", incoming: "Owned by" },
|
|
2102
2148
|
runs_on: { outgoing: "Runs on", incoming: "Running here" },
|
|
2103
2149
|
uses: { outgoing: "Uses", incoming: "Used by" },
|
|
@@ -2106,19 +2152,19 @@ const ws = ({
|
|
|
2106
2152
|
member_of: { outgoing: "Member of", incoming: "Members" },
|
|
2107
2153
|
selects: { outgoing: "Selects", incoming: "Selected by" }
|
|
2108
2154
|
};
|
|
2109
|
-
function
|
|
2110
|
-
const n =
|
|
2155
|
+
function Ts(t, e) {
|
|
2156
|
+
const n = xr[t];
|
|
2111
2157
|
if (n)
|
|
2112
2158
|
return n[e];
|
|
2113
2159
|
const r = t.replace(/_/g, " ");
|
|
2114
2160
|
return e === "outgoing" ? r : `${r} (incoming)`;
|
|
2115
2161
|
}
|
|
2116
|
-
function
|
|
2162
|
+
function Nr(t, e) {
|
|
2117
2163
|
return t.pluginId === e.pluginId && t.connectionId === e.connectionId && t.resourceKey === e.resourceKey && t.id === e.id && (t.namespace ?? "") === (e.namespace ?? "");
|
|
2118
2164
|
}
|
|
2119
|
-
function
|
|
2165
|
+
function kr(t, e) {
|
|
2120
2166
|
return e.map((n) => {
|
|
2121
|
-
const r =
|
|
2167
|
+
const r = Nr(n.source, t);
|
|
2122
2168
|
return {
|
|
2123
2169
|
resource: r ? n.target : n.source,
|
|
2124
2170
|
type: n.type,
|
|
@@ -2127,7 +2173,7 @@ function xr(t, e) {
|
|
|
2127
2173
|
};
|
|
2128
2174
|
});
|
|
2129
2175
|
}
|
|
2130
|
-
const
|
|
2176
|
+
const As = ({
|
|
2131
2177
|
pluginID: t,
|
|
2132
2178
|
connectionID: e,
|
|
2133
2179
|
resourceKey: n,
|
|
@@ -2136,31 +2182,33 @@ const Ps = ({
|
|
|
2136
2182
|
direction: i = "both",
|
|
2137
2183
|
relationshipType: o,
|
|
2138
2184
|
enabled: a = !0,
|
|
2139
|
-
refetchInterval: c =
|
|
2185
|
+
refetchInterval: c = !1
|
|
2140
2186
|
}) => {
|
|
2141
|
-
const l =
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2187
|
+
const l = P(t), u = ["RESOURCE_RELATED", l, e, n, s, r, i, o ?? null], f = a && !!l && !!e && !!n && !!r;
|
|
2188
|
+
we(l, e, u, f);
|
|
2189
|
+
const d = T({
|
|
2190
|
+
queryKey: u,
|
|
2191
|
+
queryFn: async () => Vt(l, e, n, s, r, i, o ?? null),
|
|
2192
|
+
enabled: f,
|
|
2145
2193
|
refetchInterval: c
|
|
2146
|
-
}),
|
|
2194
|
+
}), p = {
|
|
2147
2195
|
pluginId: l,
|
|
2148
2196
|
connectionId: e,
|
|
2149
2197
|
resourceKey: n,
|
|
2150
2198
|
id: r,
|
|
2151
2199
|
namespace: s
|
|
2152
|
-
},
|
|
2200
|
+
}, g = d.data ?? [];
|
|
2153
2201
|
return {
|
|
2154
2202
|
/** One entry per edge, from the viewed resource's side. */
|
|
2155
|
-
related:
|
|
2203
|
+
related: kr(p, g),
|
|
2156
2204
|
/** The raw graph edges. */
|
|
2157
|
-
edges:
|
|
2158
|
-
isLoading:
|
|
2159
|
-
isFetching:
|
|
2160
|
-
error:
|
|
2161
|
-
refetch:
|
|
2205
|
+
edges: g,
|
|
2206
|
+
isLoading: d.isLoading,
|
|
2207
|
+
isFetching: d.isFetching,
|
|
2208
|
+
error: d.error,
|
|
2209
|
+
refetch: d.refetch
|
|
2162
2210
|
};
|
|
2163
|
-
},
|
|
2211
|
+
}, Ds = ({
|
|
2164
2212
|
pluginID: t,
|
|
2165
2213
|
connectionID: e,
|
|
2166
2214
|
resourceKey: n,
|
|
@@ -2168,54 +2216,80 @@ const Ps = ({
|
|
|
2168
2216
|
namespace: s = "",
|
|
2169
2217
|
maxDepth: i = 3,
|
|
2170
2218
|
enabled: o = !0,
|
|
2171
|
-
refetchInterval: a =
|
|
2219
|
+
refetchInterval: a = !1
|
|
2172
2220
|
}) => {
|
|
2173
|
-
const c =
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2221
|
+
const c = P(t), l = ["RESOURCE_DEPENDENCY_TREE", c, e, n, s, r, i], u = o && !!c && !!e && !!n && !!r;
|
|
2222
|
+
we(c, e, l, u);
|
|
2223
|
+
const f = T({
|
|
2224
|
+
queryKey: l,
|
|
2225
|
+
queryFn: async () => en(c, e, n, s, r, i),
|
|
2226
|
+
enabled: u,
|
|
2177
2227
|
refetchInterval: a
|
|
2178
2228
|
});
|
|
2179
2229
|
return {
|
|
2180
|
-
tree:
|
|
2181
|
-
isLoading:
|
|
2182
|
-
isFetching:
|
|
2183
|
-
error:
|
|
2184
|
-
refetch:
|
|
2230
|
+
tree: f.data ?? null,
|
|
2231
|
+
isLoading: f.isLoading,
|
|
2232
|
+
isFetching: f.isFetching,
|
|
2233
|
+
error: f.error,
|
|
2234
|
+
refetch: f.refetch
|
|
2235
|
+
};
|
|
2236
|
+
}, xs = ({
|
|
2237
|
+
pluginID: t,
|
|
2238
|
+
connectionID: e,
|
|
2239
|
+
resourceKey: n,
|
|
2240
|
+
resourceID: r,
|
|
2241
|
+
namespace: s = "",
|
|
2242
|
+
upDepth: i = 2,
|
|
2243
|
+
downDepth: o = 3,
|
|
2244
|
+
enabled: a = !0
|
|
2245
|
+
}) => {
|
|
2246
|
+
const c = P(t), l = ["RESOURCE_GRAPH", c, e, n, s, r, i, o], u = a && !!c && !!e && !!n && !!r;
|
|
2247
|
+
we(c, e, l, u);
|
|
2248
|
+
const f = T({
|
|
2249
|
+
queryKey: l,
|
|
2250
|
+
queryFn: async () => tn(c, e, n, s, r, i, o),
|
|
2251
|
+
enabled: u
|
|
2252
|
+
});
|
|
2253
|
+
return {
|
|
2254
|
+
graph: f.data ?? null,
|
|
2255
|
+
isLoading: f.isLoading,
|
|
2256
|
+
isFetching: f.isFetching,
|
|
2257
|
+
error: f.error,
|
|
2258
|
+
refetch: f.refetch
|
|
2185
2259
|
};
|
|
2186
|
-
},
|
|
2187
|
-
const t =
|
|
2260
|
+
}, Ns = () => {
|
|
2261
|
+
const t = w.useContext(Qe);
|
|
2188
2262
|
if (!t)
|
|
2189
2263
|
throw new Error("useSettings must be used within a SettingsProvider");
|
|
2190
2264
|
return t;
|
|
2191
|
-
},
|
|
2192
|
-
const { pluginId: r } =
|
|
2265
|
+
}, ks = ({ to: t, withinContext: e, ...n }) => {
|
|
2266
|
+
const { pluginId: r } = ye();
|
|
2193
2267
|
r || console.error("Link used outside of a plugin context");
|
|
2194
2268
|
const s = `/_plugin/${r}${t.startsWith("/") ? "" : "/"}${t}`;
|
|
2195
|
-
return
|
|
2269
|
+
return w.useMemo(() => /* @__PURE__ */ x(dt, { style: { textDecoration: "none", color: "inherit" }, ...n, to: s }), [n, s]);
|
|
2196
2270
|
};
|
|
2197
|
-
function
|
|
2198
|
-
const t =
|
|
2271
|
+
function Ls() {
|
|
2272
|
+
const t = ft(), e = pt(), { pluginId: n } = ye();
|
|
2199
2273
|
n || console.error("usePluginRouter used outside of a plugin context");
|
|
2200
2274
|
const r = `/_plugin/${n}`, s = e.pathname.startsWith(r) ? e.pathname.slice(r.length) || "/" : e.pathname, i = k((o, a) => {
|
|
2201
2275
|
const { ...c } = a ?? {};
|
|
2202
2276
|
o.startsWith("/") ? t(`${r}${o}`, c) : t(o, c);
|
|
2203
2277
|
}, [t, r]);
|
|
2204
|
-
return
|
|
2278
|
+
return lt(() => ({
|
|
2205
2279
|
location: e,
|
|
2206
2280
|
navigate: i,
|
|
2207
2281
|
pluginPath: s
|
|
2208
2282
|
}), [e, i, s]);
|
|
2209
2283
|
}
|
|
2210
|
-
class
|
|
2284
|
+
class Ms {
|
|
2211
2285
|
}
|
|
2212
|
-
class
|
|
2286
|
+
class qs {
|
|
2213
2287
|
constructor() {
|
|
2214
|
-
|
|
2288
|
+
D(this, "_extensions");
|
|
2215
2289
|
/**
|
|
2216
2290
|
* The root component to render for the application window.
|
|
2217
2291
|
*/
|
|
2218
|
-
|
|
2292
|
+
D(this, "root");
|
|
2219
2293
|
/**
|
|
2220
2294
|
* Various pages to render under the root component. These can be navigated to using
|
|
2221
2295
|
* the built-in navigation system both programatically and through Links.
|
|
@@ -2245,8 +2319,8 @@ class Ls {
|
|
|
2245
2319
|
* ```
|
|
2246
2320
|
*
|
|
2247
2321
|
*/
|
|
2248
|
-
|
|
2249
|
-
|
|
2322
|
+
D(this, "pages");
|
|
2323
|
+
D(this, "_routes");
|
|
2250
2324
|
}
|
|
2251
2325
|
get extensions() {
|
|
2252
2326
|
return this._extensions || [];
|
|
@@ -2268,9 +2342,9 @@ class Ls {
|
|
|
2268
2342
|
*/
|
|
2269
2343
|
get Window() {
|
|
2270
2344
|
if (!this._routes && this.root)
|
|
2271
|
-
return /* @__PURE__ */
|
|
2272
|
-
const e =
|
|
2273
|
-
return /* @__PURE__ */
|
|
2345
|
+
return /* @__PURE__ */ x(this.root, {});
|
|
2346
|
+
const e = gt(this._routes || []);
|
|
2347
|
+
return /* @__PURE__ */ x(yt, { router: e });
|
|
2274
2348
|
}
|
|
2275
2349
|
/**
|
|
2276
2350
|
* Register extension points for other plugins to extend the functionality
|
|
@@ -2302,88 +2376,91 @@ class Ls {
|
|
|
2302
2376
|
return this._routes = e, this;
|
|
2303
2377
|
}
|
|
2304
2378
|
}
|
|
2305
|
-
var
|
|
2306
|
-
const
|
|
2379
|
+
var Lr = /* @__PURE__ */ ((t) => (t.MISSING_MANIFEST = "MISSING_MANIFEST", t.MISSING_PLUGIN = "MISSING_PLUGIN", t.MISSING_ENTRYPOINT = "MISSING_ENTRYPOINT", t))(Lr || {});
|
|
2380
|
+
const Us = (t) => {
|
|
2307
2381
|
const e = t.split("::");
|
|
2308
2382
|
return e.length === 1 ? { group: "core", version: "", kind: e[0] } : {
|
|
2309
2383
|
group: e[0] || "core",
|
|
2310
2384
|
version: e[1] || "",
|
|
2311
2385
|
kind: e[2] || e[0]
|
|
2312
2386
|
};
|
|
2313
|
-
},
|
|
2387
|
+
}, $s = (t) => !t || t === "core" ? "Core" : t.charAt(0).toUpperCase() + t.slice(1);
|
|
2314
2388
|
export {
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2389
|
+
B as ALL_SESSIONS_KEY,
|
|
2390
|
+
mn as BottomDrawerContext,
|
|
2391
|
+
_n as ConfirmationModalContext,
|
|
2392
|
+
U as ErrorTypes,
|
|
2393
|
+
es as ExtensionPointRegistry,
|
|
2394
|
+
Fn as ExtensionPointStore,
|
|
2395
|
+
Vr as ExtensionProvider,
|
|
2396
|
+
ks as Link,
|
|
2397
|
+
Ke as OperationsContext,
|
|
2398
|
+
Zr as OperationsProvider,
|
|
2399
|
+
ge as PluginContext,
|
|
2400
|
+
zr as PluginContextProvider,
|
|
2401
|
+
Lr as PluginErrorCode,
|
|
2402
|
+
qs as PluginWindow,
|
|
2403
|
+
Ms as PluginWindowRootProps,
|
|
2404
|
+
Sn as RightDrawerContext,
|
|
2405
|
+
Qe as SettingsContext,
|
|
2406
|
+
Jr as SettingsProvider,
|
|
2407
|
+
ts as SnackbarProvider,
|
|
2334
2408
|
F as WatchState,
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2409
|
+
yn as actionToSnackbar,
|
|
2410
|
+
Or as applyBatch,
|
|
2411
|
+
Pn as connectionListQueryKey,
|
|
2338
2412
|
L as createErrorHandler,
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2413
|
+
hn as defaultState,
|
|
2414
|
+
$s as formatGroup,
|
|
2415
|
+
Dr as graphChangedEvent,
|
|
2416
|
+
Ge as isCancelledError,
|
|
2342
2417
|
Q as parseAppError,
|
|
2343
|
-
|
|
2344
|
-
|
|
2418
|
+
Us as parseResourceKey,
|
|
2419
|
+
Ts as relationshipLabel,
|
|
2345
2420
|
z as showAppError,
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
_s as
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2421
|
+
kr as toRelatedResources,
|
|
2422
|
+
Ps as useActiveSyncs,
|
|
2423
|
+
Xe as useBottomDrawer,
|
|
2424
|
+
ys as useConfirmationModal,
|
|
2425
|
+
ns as useConnection,
|
|
2426
|
+
ss as useConnectionNamespaces,
|
|
2427
|
+
os as useConnectionStatus,
|
|
2428
|
+
rs as useConnections,
|
|
2429
|
+
Ds as useDependencyTree,
|
|
2430
|
+
Fs as useEditorSchemas,
|
|
2431
|
+
Tr as useEventBatcher,
|
|
2432
|
+
cs as useExec,
|
|
2433
|
+
Rs as useExecuteAction,
|
|
2434
|
+
Xr as useExtensionPoint,
|
|
2435
|
+
Rn as useExtensionRegistry,
|
|
2436
|
+
us as useLogs,
|
|
2437
|
+
ls as useMetricProviders,
|
|
2438
|
+
Tn as useMetricProvidersForResource,
|
|
2439
|
+
fs as useMetricStream,
|
|
2440
|
+
Ar as useOperations,
|
|
2441
|
+
ye as usePluginContext,
|
|
2442
|
+
is as usePluginData,
|
|
2443
|
+
Ls as usePluginRouter,
|
|
2444
|
+
Yr as usePluginSettings,
|
|
2445
|
+
ps as usePortForwardSessions,
|
|
2446
|
+
we as useRefetchOnGraphChange,
|
|
2447
|
+
As as useRelatedResources,
|
|
2448
|
+
P as useResolvedPluginId,
|
|
2449
|
+
hs as useResource,
|
|
2450
|
+
vs as useResourceActions,
|
|
2451
|
+
ms as useResourceAreaComponent,
|
|
2452
|
+
xs as useResourceGraph,
|
|
2453
|
+
Ss as useResourceGroups,
|
|
2454
|
+
ds as useResourceMetrics,
|
|
2455
|
+
bs as useResourceMutations,
|
|
2456
|
+
gs as useResourcePortForwarder,
|
|
2457
|
+
_s as useResourceSearch,
|
|
2458
|
+
Es as useResourceType,
|
|
2459
|
+
ws as useResourceTypes,
|
|
2460
|
+
Cs as useResources,
|
|
2461
|
+
as as useRightDrawer,
|
|
2462
|
+
Ns as useSettings,
|
|
2463
|
+
W as useSnackbar,
|
|
2464
|
+
Os as useStreamAction,
|
|
2465
|
+
Is as useWatchState
|
|
2389
2466
|
};
|