@wso2/am-core-ui 0.0.19 → 0.0.20
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/CatalogKindListing-DvUuZEpc.js +137 -0
- package/dist/{CodeBlock-mB_Loq7I.js → CodeBlock-B2Ecl916.js} +1 -1
- package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
- package/dist/{EnvironmentSelector-B7Bl93s2.js → EnvironmentSelector-D8S6nO9u.js} +1 -1
- package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
- package/dist/LabelChips-7rA7_yre.js +139 -0
- package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
- package/dist/{ResourceListShell-Cx6mdeqv.js → ResourceListShell-DFisKftq.js} +1 -1
- package/dist/{SwaggerSpecViewer-BvkhoKsi.js → SwaggerSpecViewer-DzjR6U6W.js} +1 -1
- package/dist/{debounce-BV83M53b.js → debounce-D17ObVdG.js} +1 -1
- package/dist/{format-BEZZRyE2.js → format-wlHhWjGo.js} +1 -1
- package/dist/{formatDistanceToNow-TErllcH8.js → formatDistanceToNow-DyjnT7l9.js} +11 -11
- package/dist/{gatewayScripts-D8O45W8u.js → gatewayScripts-D4ZDEDPS.js} +1 -1
- package/dist/{index-sr-mWz4T.js → index-3K-zqdp-.js} +32 -32
- package/dist/{index-KRsV2L4V.js → index-6liAPSDn.js} +160 -160
- package/dist/{index-B52h3RHg.js → index-B3ASENUJ.js} +109 -109
- package/dist/index-B7Pf4oPq.js +3069 -0
- package/dist/index-BNO3FhZK.js +2304 -0
- package/dist/index-BUZSfCl5.js +335 -0
- package/dist/index-BXiG1r_o.js +1409 -0
- package/dist/{index-_0Pj_ZtW.js → index-BYy7Iaam.js} +40 -40
- package/dist/{index-BfjzUWDa.js → index-BbB_yx4V.js} +103 -103
- package/dist/index-BjWJ95lH.js +2728 -0
- package/dist/{index-B_Z0MwXk.js → index-ByEInFlf.js} +10916 -9520
- package/dist/index-C8WIhzyz.js +123 -0
- package/dist/index-CnzvaT6b.js +2368 -0
- package/dist/index-CrnCf-hJ.js +763 -0
- package/dist/{index-CgCWbWzN.js → index-Cvsho9xg.js} +381 -377
- package/dist/{index-UqDmyMSA.js → index-CxnAo1_c.js} +21 -21
- package/dist/{index-BnV-PkwM.js → index-Cz7-AZwE.js} +2 -2
- package/dist/{index-BP5drcF2.js → index-DBdRFjxm.js} +232 -233
- package/dist/{index-BZ4vxviI.js → index-DFsSvmMZ.js} +5 -5
- package/dist/index-DslzOSGN.js +2549 -0
- package/dist/{index-DD4qF7gq.js → index-DvpYvchM.js} +101 -100
- package/dist/index.d.ts +784 -163
- package/dist/index.js +532 -454
- package/dist/js-yaml-CvhD-clg.js +1335 -0
- package/dist/{llmProviderPayload-CzihkdNa.js → llmProviderPayload-BPzWDy7n.js} +2 -2
- package/package.json +1 -1
- package/dist/CatalogKindListing-DtFI2YMG.js +0 -118
- package/dist/EnvironmentCard-09h1XRxx.js +0 -310
- package/dist/PolicyListSection-o4k9e8XO.js +0 -2475
- package/dist/index-CGDYgUCH.js +0 -711
- package/dist/index-COt7nJIf.js +0 -2286
- package/dist/index-CWZjOy1h.js +0 -2247
- package/dist/index-CezvogTQ.js +0 -116
- package/dist/index-CjCkcuuI.js +0 -322
- package/dist/index-CjXvuf9m.js +0 -1354
- package/dist/index-DeQ-9KTC.js +0 -737
- package/dist/index-Df6OBy4E.js +0 -3041
- package/dist/index-PUuASE1F.js +0 -2507
|
@@ -3,14 +3,14 @@ import { jsxs as a, jsx as t, Fragment as de } from "react/jsx-runtime";
|
|
|
3
3
|
import { c as ve } from "react/compiler-runtime";
|
|
4
4
|
import { useState as L, useMemo as he, Fragment as Nt, useRef as Rt, useEffect as Ie, useCallback as le } from "react";
|
|
5
5
|
import { useNavigate as at, useParams as Ae, Link as He, generatePath as ge, useSearchParams as Me, Route as Ee, Routes as It, Navigate as Tt } from "react-router-dom";
|
|
6
|
-
import {
|
|
7
|
-
import { Stack as k, Box as P, SearchBar as Ot, Button as te, ListingTable as N, Alert as ne, Skeleton as U, Typography as l, Avatar as dt, Chip as Re, Tooltip as Te, IconButton as ke, useTheme as Bt, Form as oe, TextField as me, Select as Ue, MenuItem as
|
|
6
|
+
import { L as it, w as rt, G as Oe, bD as At, g as fe, y as ot, bE as Et, P as Be, bF as Gt, bG as Pt, x as zt, bH as _t, bI as Lt, t as lt, D as st, s as ct, bJ as Dt, bK as Ut, bL as Ft, bM as Wt, bN as $t, M as Vt, bO as Mt } from "./index-ByEInFlf.js";
|
|
7
|
+
import { Stack as k, Box as P, SearchBar as Ot, Button as te, ListingTable as N, Alert as ne, Skeleton as U, Typography as l, Avatar as dt, Chip as Re, Tooltip as Te, IconButton as ke, useTheme as Bt, Form as oe, TextField as me, Select as Ue, MenuItem as Fe, Collapse as mt, FormControl as ye, FormLabel as pe, FormControlLabel as Ht, Checkbox as qt, Card as ce, CardContent as ze, Tab as Se, Tabs as ht, Grid as we, Snackbar as jt } from "@wso2/oxygen-ui";
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
|
-
import { f as Kt, g as Jt } from "./format-
|
|
10
|
-
import { G as ut, g as Qt, a as Yt, b as
|
|
9
|
+
import { f as Kt, g as Jt } from "./format-wlHhWjGo.js";
|
|
10
|
+
import { G as ut, g as Qt, a as Yt, b as We, c as $e, d as yt, e as pt } from "./gatewayScripts-D4ZDEDPS.js";
|
|
11
11
|
import { o as gt, c as Xt, s as Ne, b as ft } from "./schemas-DFScWdSL.js";
|
|
12
12
|
import { u as vt } from "./clipboard-YAzStmkw.js";
|
|
13
|
-
import { f as Zt } from "./formatDistanceToNow-
|
|
13
|
+
import { f as Zt } from "./formatDistanceToNow-DyjnT7l9.js";
|
|
14
14
|
const en = {
|
|
15
15
|
width: 28,
|
|
16
16
|
height: 28,
|
|
@@ -43,7 +43,7 @@ function nn({
|
|
|
43
43
|
} = At(), S = he(() => d?.gateways ?? [], [d]), h = he(() => {
|
|
44
44
|
const w = m.trim().toLowerCase();
|
|
45
45
|
return w ? S.filter((u) => tn(u, w)) : S;
|
|
46
|
-
}, [S, m]),
|
|
46
|
+
}, [S, m]), z = he(() => {
|
|
47
47
|
const w = (v ?? []).map((p) => ({
|
|
48
48
|
key: p.name,
|
|
49
49
|
title: p.displayName || p.name,
|
|
@@ -146,7 +146,7 @@ function nn({
|
|
|
146
146
|
/* @__PURE__ */ t(N.Cell, { align: "right", width: "140px", children: "Last Updated" }),
|
|
147
147
|
/* @__PURE__ */ t(N.Cell, { align: "center", width: "96px" })
|
|
148
148
|
] }) }),
|
|
149
|
-
/* @__PURE__ */ t(N.Body, { children:
|
|
149
|
+
/* @__PURE__ */ t(N.Body, { children: z.map((w) => /* @__PURE__ */ a(Nt, { children: [
|
|
150
150
|
/* @__PURE__ */ t(N.Row, { children: /* @__PURE__ */ t(N.Cell, { colSpan: 5, sx: {
|
|
151
151
|
"&&": {
|
|
152
152
|
border: 0,
|
|
@@ -251,7 +251,7 @@ const sn = ({
|
|
|
251
251
|
f.length > 1 && !v?.id && /* @__PURE__ */ t(oe.ElementWrapper, { label: "Environment", name: "environmentIds", children: /* @__PURE__ */ t(Ue, { value: n.environmentIds?.[0] ?? "", onChange: (i) => {
|
|
252
252
|
const g = i.target.value;
|
|
253
253
|
b("environmentIds", g ? [g] : []);
|
|
254
|
-
}, fullWidth: !0, displayEmpty: !0, children: f.filter((i) => i.id).map((i) => /* @__PURE__ */ t(
|
|
254
|
+
}, fullWidth: !0, displayEmpty: !0, children: f.filter((i) => i.id).map((i) => /* @__PURE__ */ t(Fe, { value: i.id, children: i.displayName || i.name }, i.id)) }) })
|
|
255
255
|
] })
|
|
256
256
|
] }) });
|
|
257
257
|
}, cn = (n) => {
|
|
@@ -323,23 +323,23 @@ const hn = () => {
|
|
|
323
323
|
const S = g;
|
|
324
324
|
let h;
|
|
325
325
|
n[6] === Symbol.for("react.memo_cache_sentinel") ? (h = {}, n[6] = h) : h = n[6];
|
|
326
|
-
const [
|
|
326
|
+
const [z, A] = L(h);
|
|
327
327
|
let E;
|
|
328
328
|
n[7] !== v || n[8] !== c || n[9] !== r || n[10] !== e || n[11] !== R ? (E = () => {
|
|
329
|
-
const
|
|
329
|
+
const W = {
|
|
330
330
|
...c,
|
|
331
331
|
name: c.name || mn(c.displayName)
|
|
332
|
-
}, M = qe.safeParse(
|
|
332
|
+
}, M = qe.safeParse(W);
|
|
333
333
|
if (!M.success) {
|
|
334
|
-
const
|
|
335
|
-
M.error.issues.forEach((
|
|
336
|
-
|
|
337
|
-
}), A(
|
|
334
|
+
const F = {};
|
|
335
|
+
M.error.issues.forEach(($) => {
|
|
336
|
+
$.path[0] && (F[$.path[0]] = $.message);
|
|
337
|
+
}), A(F), R(W);
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
340
|
A({});
|
|
341
341
|
const ae = {
|
|
342
|
-
name:
|
|
342
|
+
name: W.name.trim(),
|
|
343
343
|
displayName: c.displayName.trim(),
|
|
344
344
|
gatewayType: "AI",
|
|
345
345
|
vhost: c.vhost.trim(),
|
|
@@ -352,12 +352,12 @@ const hn = () => {
|
|
|
352
352
|
},
|
|
353
353
|
body: ae
|
|
354
354
|
}, {
|
|
355
|
-
onSuccess: (
|
|
356
|
-
const
|
|
355
|
+
onSuccess: (F) => {
|
|
356
|
+
const $ = ge(fe.children.org.children.gateways.children.view.path, {
|
|
357
357
|
orgId: e ?? "",
|
|
358
|
-
gatewayId:
|
|
358
|
+
gatewayId: F.uuid
|
|
359
359
|
});
|
|
360
|
-
r(
|
|
360
|
+
r($);
|
|
361
361
|
},
|
|
362
362
|
onError: un
|
|
363
363
|
});
|
|
@@ -370,15 +370,15 @@ const hn = () => {
|
|
|
370
370
|
mt: 2
|
|
371
371
|
}, children: b instanceof Error ? b.message : "Failed to create gateway" }), n[18] = b, n[19] = I) : I = n[19];
|
|
372
372
|
let T;
|
|
373
|
-
n[20] !== S || n[21] !== _ || n[22] !== o || n[23] !==
|
|
374
|
-
let
|
|
375
|
-
n[25] !== p || n[26] !== I || n[27] !== T ? (
|
|
373
|
+
n[20] !== S || n[21] !== _ || n[22] !== o || n[23] !== z ? (T = /* @__PURE__ */ t(cn, { lastSubmittedValidationErrors: z, isPending: o, onCancel: S, onSubmit: _ }), n[20] = S, n[21] = _, n[22] = o, n[23] = z, n[24] = T) : T = n[24];
|
|
374
|
+
let G;
|
|
375
|
+
n[25] !== p || n[26] !== I || n[27] !== T ? (G = /* @__PURE__ */ a(oe.Stack, { spacing: 2, children: [
|
|
376
376
|
p,
|
|
377
377
|
I,
|
|
378
378
|
T
|
|
379
|
-
] }), n[25] = p, n[26] = I, n[27] = T, n[28] =
|
|
379
|
+
] }), n[25] = p, n[26] = I, n[27] = T, n[28] = G) : G = n[28];
|
|
380
380
|
let D;
|
|
381
|
-
return n[29] !== i || n[30] !==
|
|
381
|
+
return n[29] !== i || n[30] !== G ? (D = /* @__PURE__ */ t(Be, { title: "Add Gateway", backHref: i, backLabel: "Back to Gateways", disableIcon: !0, children: G }), n[29] = i, n[30] = G, n[31] = D) : D = n[31], D;
|
|
382
382
|
};
|
|
383
383
|
function un(n) {
|
|
384
384
|
console.error("Failed to create gateway:", n);
|
|
@@ -399,15 +399,15 @@ function gn({
|
|
|
399
399
|
}) {
|
|
400
400
|
const d = m === "delete", R = !!s, {
|
|
401
401
|
getToken: f
|
|
402
|
-
} =
|
|
402
|
+
} = Gt(), [x, v] = L(""), [o, b] = L(""), [y, i] = L(""), [g, S] = L(""), [h, z] = L(""), [A, E] = L(!1), [_, w] = L(""), [u, p] = L(null), I = Pt({
|
|
403
403
|
orgName: r
|
|
404
|
-
}), [T,
|
|
404
|
+
}), [T, G] = L(!1), [D, W] = L(null), [M, ae] = L(!1), F = zt.featureFlags?.enableIdentityProviderManagedMode === !0, $ = _t(), K = Lt(), H = $.isPending || K.isPending, J = d ? !!o && !!y : !!o && !!y.trim() && !!g.trim() && !!h.trim(), O = le(async () => {
|
|
405
405
|
try {
|
|
406
406
|
d ? await K.mutateAsync({
|
|
407
407
|
orgName: r,
|
|
408
408
|
gatewayId: o,
|
|
409
409
|
name: y
|
|
410
|
-
}) : await
|
|
410
|
+
}) : await $.mutateAsync({
|
|
411
411
|
params: {
|
|
412
412
|
orgName: r,
|
|
413
413
|
gatewayId: o,
|
|
@@ -421,7 +421,7 @@ function gn({
|
|
|
421
421
|
}), e();
|
|
422
422
|
} catch {
|
|
423
423
|
}
|
|
424
|
-
}, [d, K,
|
|
424
|
+
}, [d, K, $, r, o, y, g, h, A, e]), {
|
|
425
425
|
data: Q
|
|
426
426
|
} = Oe({
|
|
427
427
|
orgName: r
|
|
@@ -433,18 +433,18 @@ function gn({
|
|
|
433
433
|
environment: x
|
|
434
434
|
} : void 0), V = he(() => Y?.gateways ?? [], [Y]), X = he(() => s ? s.environments : Q ?? [], [s, Q]);
|
|
435
435
|
Ie(() => {
|
|
436
|
-
n && (
|
|
436
|
+
n && (G(!1), W(null), ae(!1), w(""), p(null), d && c ? (v(c.environmentName ?? ""), b(c.gatewayId ?? ""), i(c.name), S(c.issuer ?? ""), z(c.jwksUri ?? ""), E(c.skipTlsVerify ?? !1)) : (v(s && s.environments.length === 1 ? s.environments[0].name : ""), b(s?.uuid ?? ""), i(""), S(""), z(""), E(!1)));
|
|
437
437
|
}, [n, d, c, s]), Ie(() => {
|
|
438
438
|
d || s || b("");
|
|
439
439
|
}, [x, d, s]);
|
|
440
440
|
const ie = le(async () => {
|
|
441
441
|
if (T) {
|
|
442
|
-
|
|
442
|
+
G(!1), W(null);
|
|
443
443
|
return;
|
|
444
444
|
}
|
|
445
445
|
try {
|
|
446
446
|
const C = await f();
|
|
447
|
-
|
|
447
|
+
W(C), G(!0);
|
|
448
448
|
} catch {
|
|
449
449
|
}
|
|
450
450
|
}, [T, f]), B = le(async () => {
|
|
@@ -455,7 +455,7 @@ function gn({
|
|
|
455
455
|
const ee = await I.mutateAsync({
|
|
456
456
|
url: C
|
|
457
457
|
});
|
|
458
|
-
S(ee.issuer),
|
|
458
|
+
S(ee.issuer), z(ee.jwksUri);
|
|
459
459
|
} catch {
|
|
460
460
|
p("Could not discover OIDC configuration from that URL. Check the URL or enter the issuer and JWKS URI manually.");
|
|
461
461
|
}
|
|
@@ -482,7 +482,7 @@ function gn({
|
|
|
482
482
|
if (!C) return "Select an environment";
|
|
483
483
|
const ee = X.find((_e) => _e.name === C);
|
|
484
484
|
return ee?.displayName || ee?.name || C;
|
|
485
|
-
}, children: X.map((C) => /* @__PURE__ */ t(
|
|
485
|
+
}, children: X.map((C) => /* @__PURE__ */ t(Fe, { value: C.name, children: C.displayName || C.name }, C.name)) })
|
|
486
486
|
] }), Z = /* @__PURE__ */ a(ye, { fullWidth: !0, disabled: d || !R && !x, children: [
|
|
487
487
|
/* @__PURE__ */ t(pe, { required: !0, children: "Gateway" }),
|
|
488
488
|
R ? /* @__PURE__ */ t(me, { size: "small", fullWidth: !0, value: s?.name ?? "", slotProps: {
|
|
@@ -493,12 +493,12 @@ function gn({
|
|
|
493
493
|
if (!C) return "Select a gateway";
|
|
494
494
|
const ee = V.find((_e) => _e.uuid === C);
|
|
495
495
|
return ee?.displayName || ee?.name || C;
|
|
496
|
-
}, children: V.map((C) => /* @__PURE__ */ t(
|
|
496
|
+
}, children: V.map((C) => /* @__PURE__ */ t(Fe, { value: C.uuid, children: C.displayName || C.name }, C.uuid)) })
|
|
497
497
|
] });
|
|
498
498
|
return /* @__PURE__ */ a(lt, { open: n, onClose: e, children: [
|
|
499
499
|
/* @__PURE__ */ t(st, { icon: d ? /* @__PURE__ */ t(Pe, { size: 24 }) : /* @__PURE__ */ t(De, { size: 24 }), title: d ? "Remove Identity Provider" : "Add Identity Provider", onClose: e }),
|
|
500
500
|
/* @__PURE__ */ t(ct, { children: /* @__PURE__ */ a(k, { spacing: 3, children: [
|
|
501
|
-
/* @__PURE__ */ t(l, { variant: "body2", color: "text.secondary", children:
|
|
501
|
+
/* @__PURE__ */ t(l, { variant: "body2", color: "text.secondary", children: F ? /* @__PURE__ */ t(de, { children: "Identity providers are owned by the gateway. Agent Manager patches the gateway configuration and applies the change for you." }) : /* @__PURE__ */ a(de, { children: [
|
|
502
502
|
"Identity providers are owned by the gateway. This command patches the gateway configuration and syncs Agent Manager. Run it in a terminal with",
|
|
503
503
|
" ",
|
|
504
504
|
/* @__PURE__ */ t("code", { children: "kubectl" }),
|
|
@@ -536,12 +536,12 @@ function gn({
|
|
|
536
536
|
] }),
|
|
537
537
|
/* @__PURE__ */ a(ye, { fullWidth: !0, children: [
|
|
538
538
|
/* @__PURE__ */ t(pe, { required: !0, children: "JWKS URI" }),
|
|
539
|
-
/* @__PURE__ */ t(me, { size: "small", fullWidth: !0, value: h, onChange: (C) =>
|
|
539
|
+
/* @__PURE__ */ t(me, { size: "small", fullWidth: !0, value: h, onChange: (C) => z(C.target.value), placeholder: "https://idp.example.com/oauth2/jwks" })
|
|
540
540
|
] }),
|
|
541
541
|
/* @__PURE__ */ t(Ht, { control: /* @__PURE__ */ t(qt, { checked: A, onChange: (C) => E(C.target.checked) }), label: "Skip TLS verification when fetching JWKS (trusted internal only)" })
|
|
542
542
|
] })
|
|
543
543
|
] }),
|
|
544
|
-
!
|
|
544
|
+
!F && /* @__PURE__ */ a(k, { spacing: 1, children: [
|
|
545
545
|
/* @__PURE__ */ t(l, { variant: "body2", children: "Run this command:" }),
|
|
546
546
|
/* @__PURE__ */ a(P, { sx: {
|
|
547
547
|
position: "relative",
|
|
@@ -573,10 +573,10 @@ function gn({
|
|
|
573
573
|
] }),
|
|
574
574
|
/* @__PURE__ */ t(l, { variant: "caption", color: "text.secondary", children: "Your access token will be substituted when you copy." })
|
|
575
575
|
] }),
|
|
576
|
-
!
|
|
576
|
+
!F && /* @__PURE__ */ t(ne, { severity: "info", children: "Once the script completes, the list reflects the change. The script is idempotent — safe to re-run." }),
|
|
577
577
|
/* @__PURE__ */ a(P, { display: "flex", justifyContent: "flex-end", gap: 1, children: [
|
|
578
|
-
/* @__PURE__ */ t(te, { variant: "outlined", color: "inherit", onClick: e, children:
|
|
579
|
-
|
|
578
|
+
/* @__PURE__ */ t(te, { variant: "outlined", color: "inherit", onClick: e, children: F ? "Cancel" : "Close" }),
|
|
579
|
+
F && /* @__PURE__ */ t(te, { variant: "contained", color: d ? "error" : "primary", onClick: O, disabled: !J || H, children: H ? d ? "Removing…" : "Saving…" : d ? "Remove" : "Add" })
|
|
580
580
|
] })
|
|
581
581
|
] }) })
|
|
582
582
|
] });
|
|
@@ -597,7 +597,7 @@ function fn({
|
|
|
597
597
|
R("upsert"), x(null), o(!0);
|
|
598
598
|
}, h = (u) => {
|
|
599
599
|
R("delete"), x(u), o(!0);
|
|
600
|
-
},
|
|
600
|
+
}, z = (u) => `${u.environmentName ?? ""}:${u.name}`, A = he(() => ({
|
|
601
601
|
uuid: e,
|
|
602
602
|
name: r,
|
|
603
603
|
environments: m
|
|
@@ -628,7 +628,7 @@ function fn({
|
|
|
628
628
|
/* @__PURE__ */ t(N.Cell, { width: "160px", align: "right", children: "Environment" })
|
|
629
629
|
] }) }),
|
|
630
630
|
/* @__PURE__ */ t(N.Body, { children: g.map((u) => {
|
|
631
|
-
const p =
|
|
631
|
+
const p = z(u), I = u.type === "system";
|
|
632
632
|
return /* @__PURE__ */ a(N.Row, { variant: "card", hover: !0, onMouseEnter: () => s(p), onMouseLeave: () => s(null), onFocus: () => s(p), onBlur: () => s(null), children: [
|
|
633
633
|
/* @__PURE__ */ t(N.Cell, { children: /* @__PURE__ */ t(N.CellIcon, { icon: /* @__PURE__ */ t(dt, { sx: {
|
|
634
634
|
width: 28,
|
|
@@ -647,7 +647,7 @@ function fn({
|
|
|
647
647
|
}) })
|
|
648
648
|
] }) : /* @__PURE__ */ t(N.Container, { children: /* @__PURE__ */ t(N.EmptyState, { illustration: /* @__PURE__ */ t(De, { size: 48 }), title: "No identity providers configured", description: "Add an identity provider (token issuer) so agents on this gateway can authenticate callers with OAuth.", action: E }) });
|
|
649
649
|
return /* @__PURE__ */ a(ce, { variant: "outlined", children: [
|
|
650
|
-
/* @__PURE__ */ t(
|
|
650
|
+
/* @__PURE__ */ t(ze, { sx: {
|
|
651
651
|
p: 3
|
|
652
652
|
}, children: /* @__PURE__ */ a(k, { spacing: 2, children: [
|
|
653
653
|
/* @__PURE__ */ a(k, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [
|
|
@@ -728,7 +728,7 @@ function bn(n) {
|
|
|
728
728
|
e[9] === Symbol.for("react.memo_cache_sentinel") ? (Z = /* @__PURE__ */ t(St, { size: 16 }), e[9] = Z) : Z = e[9];
|
|
729
729
|
const C = s ? "Generating..." : "Reconfigure";
|
|
730
730
|
let ee;
|
|
731
|
-
return e[10] !== s || e[11] !== c || e[12] !== C ? (ee = /* @__PURE__ */ t(ce, { variant: "outlined", children: /* @__PURE__ */ a(
|
|
731
|
+
return e[10] !== s || e[11] !== c || e[12] !== C ? (ee = /* @__PURE__ */ t(ce, { variant: "outlined", children: /* @__PURE__ */ a(ze, { sx: ue, children: [
|
|
732
732
|
se,
|
|
733
733
|
/* @__PURE__ */ a(k, { spacing: 1.5, children: [
|
|
734
734
|
re,
|
|
@@ -737,10 +737,10 @@ function bn(n) {
|
|
|
737
737
|
] }) }), e[10] = s, e[11] = c, e[12] = C, e[13] = ee) : ee = e[13], ee;
|
|
738
738
|
}
|
|
739
739
|
let h;
|
|
740
|
-
e[14] !== r ? (h =
|
|
741
|
-
const
|
|
740
|
+
e[14] !== r ? (h = We(r), e[14] = r, e[15] = h) : h = e[15];
|
|
741
|
+
const z = h;
|
|
742
742
|
let A;
|
|
743
|
-
e[16] !== r ? (A =
|
|
743
|
+
e[16] !== r ? (A = $e(r, "upgrade"), e[16] = r, e[17] = A) : A = e[17];
|
|
744
744
|
const E = A;
|
|
745
745
|
let _;
|
|
746
746
|
e[18] !== m ? (_ = m && /* @__PURE__ */ t(ne, { severity: "success", children: "New token generated. Update your gateway configuration using the command below, then restart the gateway." }), e[18] = m, e[19] = _) : _ = e[19];
|
|
@@ -751,9 +751,9 @@ function bn(n) {
|
|
|
751
751
|
" with the new token."
|
|
752
752
|
] }), e[20] = w) : w = e[20];
|
|
753
753
|
let u;
|
|
754
|
-
e[21] !== S || e[22] !==
|
|
754
|
+
e[21] !== S || e[22] !== z ? (u = () => S(z, "Configure command"), e[21] = S, e[22] = z, e[23] = u) : u = e[23];
|
|
755
755
|
let p;
|
|
756
|
-
e[24] !== u || e[25] !==
|
|
756
|
+
e[24] !== u || e[25] !== z ? (p = /* @__PURE__ */ t(j, { value: z, multiline: !0, minRows: 4, onCopy: u, copyLabel: "Configure command" }), e[24] = u, e[25] = z, e[26] = p) : p = e[26];
|
|
757
757
|
let I;
|
|
758
758
|
e[27] !== _ || e[28] !== p ? (I = /* @__PURE__ */ a(k, { spacing: 2, children: [
|
|
759
759
|
_,
|
|
@@ -761,26 +761,26 @@ function bn(n) {
|
|
|
761
761
|
p
|
|
762
762
|
] }), e[27] = _, e[28] = p, e[29] = I) : I = e[29];
|
|
763
763
|
const T = I;
|
|
764
|
-
let
|
|
765
|
-
e[30] !== m ? (
|
|
764
|
+
let G;
|
|
765
|
+
e[30] !== m ? (G = m && /* @__PURE__ */ t(ne, { severity: "success", children: "New token generated. Run the helm upgrade command below to reconfigure your gateway." }), e[30] = m, e[31] = G) : G = e[31];
|
|
766
766
|
let D;
|
|
767
767
|
e[32] !== S || e[33] !== E ? (D = () => S(E, "Helm upgrade command"), e[32] = S, e[33] = E, e[34] = D) : D = e[34];
|
|
768
|
-
let
|
|
769
|
-
e[35] !== E || e[36] !== D ? (
|
|
768
|
+
let W;
|
|
769
|
+
e[35] !== E || e[36] !== D ? (W = /* @__PURE__ */ t(j, { value: E, multiline: !0, minRows: 4, onCopy: D, copyLabel: "Helm upgrade command" }), e[35] = E, e[36] = D, e[37] = W) : W = e[37];
|
|
770
770
|
let M;
|
|
771
|
-
e[38] !==
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
] }), e[38] =
|
|
771
|
+
e[38] !== G || e[39] !== W ? (M = /* @__PURE__ */ a(k, { spacing: 2, children: [
|
|
772
|
+
G,
|
|
773
|
+
W
|
|
774
|
+
] }), e[38] = G, e[39] = W, e[40] = M) : M = e[40];
|
|
775
775
|
const ae = M;
|
|
776
|
-
let W;
|
|
777
|
-
e[41] === Symbol.for("react.memo_cache_sentinel") ? (W = {
|
|
778
|
-
p: 3
|
|
779
|
-
}, e[41] = W) : W = e[41];
|
|
780
776
|
let F;
|
|
781
|
-
e[
|
|
777
|
+
e[41] === Symbol.for("react.memo_cache_sentinel") ? (F = {
|
|
778
|
+
p: 3
|
|
779
|
+
}, e[41] = F) : F = e[41];
|
|
780
|
+
let $;
|
|
781
|
+
e[42] === Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ t(k, { direction: "row", alignItems: "center", spacing: 1, sx: {
|
|
782
782
|
mb: 2
|
|
783
|
-
}, children: /* @__PURE__ */ t(l, { variant: "h6", children: "Reconfigure Gateway" }) }), e[42] =
|
|
783
|
+
}, children: /* @__PURE__ */ t(l, { variant: "h6", children: "Reconfigure Gateway" }) }), e[42] = $) : $ = e[42];
|
|
784
784
|
let K;
|
|
785
785
|
e[43] === Symbol.for("react.memo_cache_sentinel") ? (K = {
|
|
786
786
|
borderBottom: 1,
|
|
@@ -803,8 +803,8 @@ function bn(n) {
|
|
|
803
803
|
let B;
|
|
804
804
|
e[52] !== X || e[53] !== ie ? (B = /* @__PURE__ */ t(P, { hidden: X, children: ie }), e[52] = X, e[53] = ie, e[54] = B) : B = e[54];
|
|
805
805
|
let q;
|
|
806
|
-
return e[55] !== O || e[56] !== V || e[57] !== B ? (q = /* @__PURE__ */ t(ce, { variant: "outlined", children: /* @__PURE__ */ a(
|
|
807
|
-
|
|
806
|
+
return e[55] !== O || e[56] !== V || e[57] !== B ? (q = /* @__PURE__ */ t(ce, { variant: "outlined", children: /* @__PURE__ */ a(ze, { sx: F, children: [
|
|
807
|
+
$,
|
|
808
808
|
O,
|
|
809
809
|
V,
|
|
810
810
|
B
|
|
@@ -815,7 +815,7 @@ const be = () => {
|
|
|
815
815
|
return `curl -sLO https://github.com/wso2/api-platform/releases/download/ai-gateway/v${n}/wso2apip-ai-gateway-${n}.zip && \\
|
|
816
816
|
unzip wso2apip-ai-gateway-${n}.zip`;
|
|
817
817
|
}, xe = () => `cd wso2apip-ai-gateway-${pt()}`, Ce = () => "docker compose --env-file configs/keys.env up";
|
|
818
|
-
function
|
|
818
|
+
function Ge(n) {
|
|
819
819
|
const e = ve(4), {
|
|
820
820
|
value: r,
|
|
821
821
|
index: m,
|
|
@@ -855,8 +855,8 @@ function Cn(n) {
|
|
|
855
855
|
});
|
|
856
856
|
}, e[4] = x, e[5] = g) : g = e[5];
|
|
857
857
|
const S = g, h = vt(R);
|
|
858
|
-
let
|
|
859
|
-
e[6] !== h || e[7] !== c || e[8] !== r || e[9] !== d || e[10] !== s || e[11] !== m ? (
|
|
858
|
+
let z;
|
|
859
|
+
e[6] !== h || e[7] !== c || e[8] !== r || e[9] !== d || e[10] !== s || e[11] !== m ? (z = () => m ? /* @__PURE__ */ a(de, { children: [
|
|
860
860
|
c && /* @__PURE__ */ t(ne, { severity: "success", sx: {
|
|
861
861
|
mb: 2
|
|
862
862
|
}, children: "Successfully generated new configurations. Use the updated command below to reconfigure your gateway." }),
|
|
@@ -867,14 +867,14 @@ function Cn(n) {
|
|
|
867
867
|
yt(),
|
|
868
868
|
" with the required environment variables:"
|
|
869
869
|
] }),
|
|
870
|
-
/* @__PURE__ */ t(j, { value:
|
|
870
|
+
/* @__PURE__ */ t(j, { value: We(m), multiline: !0, minRows: 4, onCopy: () => h(We(m), "Configure command"), copyLabel: "Configure command" })
|
|
871
871
|
] }) : /* @__PURE__ */ a(de, { children: [
|
|
872
872
|
/* @__PURE__ */ t(l, { variant: "body2", color: "text.secondary", sx: {
|
|
873
873
|
mb: 2
|
|
874
874
|
}, children: r ? "Regenerate a registration token to configure your gateway." : "Generate a registration token to configure your gateway for the first time." }),
|
|
875
875
|
/* @__PURE__ */ t(te, { variant: "outlined", color: "primary", onClick: s, disabled: d, children: r ? "Reconfigure" : "Configure" })
|
|
876
|
-
] }), e[6] = h, e[7] = c, e[8] = r, e[9] = d, e[10] = s, e[11] = m, e[12] =
|
|
877
|
-
const A =
|
|
876
|
+
] }), e[6] = h, e[7] = c, e[8] = r, e[9] = d, e[10] = s, e[11] = m, e[12] = z) : z = e[12];
|
|
877
|
+
const A = z;
|
|
878
878
|
let E;
|
|
879
879
|
e[13] !== h || e[14] !== A ? (E = () => /* @__PURE__ */ a(k, { spacing: 3, children: [
|
|
880
880
|
/* @__PURE__ */ a(P, { children: [
|
|
@@ -1051,18 +1051,18 @@ docker compose version`, "Prerequisites command"), copyLabel: "Prerequisites com
|
|
|
1051
1051
|
/* @__PURE__ */ t(l, { variant: "body2", color: "text.secondary", sx: {
|
|
1052
1052
|
mb: 2
|
|
1053
1053
|
}, children: "Run this command to install the gateway chart with control plane configurations:" }),
|
|
1054
|
-
/* @__PURE__ */ t(j, { value:
|
|
1054
|
+
/* @__PURE__ */ t(j, { value: $e(m), multiline: !0, minRows: 2, onCopy: () => h($e(m), "Helm install command"), copyLabel: "Helm install command" })
|
|
1055
1055
|
] })
|
|
1056
1056
|
] }), e[22] = h, e[23] = c, e[24] = r, e[25] = d, e[26] = s, e[27] = m, e[28] = T) : T = e[28];
|
|
1057
|
-
const
|
|
1057
|
+
const G = T;
|
|
1058
1058
|
let D;
|
|
1059
1059
|
e[29] === Symbol.for("react.memo_cache_sentinel") ? (D = {
|
|
1060
1060
|
p: 3
|
|
1061
1061
|
}, e[29] = D) : D = e[29];
|
|
1062
|
-
let
|
|
1063
|
-
e[30] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1062
|
+
let W;
|
|
1063
|
+
e[30] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ t(l, { variant: "h5", sx: {
|
|
1064
1064
|
mb: 3
|
|
1065
|
-
}, children: "Get Started" }), e[30] =
|
|
1065
|
+
}, children: "Get Started" }), e[30] = W) : W = e[30];
|
|
1066
1066
|
let M;
|
|
1067
1067
|
e[31] === Symbol.for("react.memo_cache_sentinel") ? (M = {
|
|
1068
1068
|
borderBottom: 1,
|
|
@@ -1071,38 +1071,38 @@ docker compose version`, "Prerequisites command"), copyLabel: "Prerequisites com
|
|
|
1071
1071
|
}, e[31] = M) : M = e[31];
|
|
1072
1072
|
let ae;
|
|
1073
1073
|
e[32] === Symbol.for("react.memo_cache_sentinel") ? (ae = /* @__PURE__ */ t(Se, { label: "Quick Start" }), e[32] = ae) : ae = e[32];
|
|
1074
|
-
let W;
|
|
1075
|
-
e[33] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ t(Se, { label: "Virtual Machine", icon: /* @__PURE__ */ t(kt, { size: 20 }), iconPosition: "start" }), e[33] = W) : W = e[33];
|
|
1076
1074
|
let F;
|
|
1077
|
-
e[
|
|
1075
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ t(Se, { label: "Virtual Machine", icon: /* @__PURE__ */ t(kt, { size: 20 }), iconPosition: "start" }), e[33] = F) : F = e[33];
|
|
1076
|
+
let $;
|
|
1077
|
+
e[34] === Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ t(Se, { label: "Docker", icon: /* @__PURE__ */ t(tt, { size: 20 }), iconPosition: "start" }), e[34] = $) : $ = e[34];
|
|
1078
1078
|
let K;
|
|
1079
1079
|
e[35] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */ t(Se, { label: "Kubernetes", icon: /* @__PURE__ */ t(nt, { size: 20 }), iconPosition: "start" }), e[35] = K) : K = e[35];
|
|
1080
1080
|
let H;
|
|
1081
1081
|
e[36] !== S || e[37] !== i ? (H = /* @__PURE__ */ t(P, { sx: M, children: /* @__PURE__ */ a(ht, { value: i, onChange: S, children: [
|
|
1082
1082
|
ae,
|
|
1083
|
-
W,
|
|
1084
1083
|
F,
|
|
1084
|
+
$,
|
|
1085
1085
|
K
|
|
1086
1086
|
] }) }), e[36] = S, e[37] = i, e[38] = H) : H = e[38];
|
|
1087
1087
|
let J;
|
|
1088
1088
|
e[39] !== _ ? (J = _(), e[39] = _, e[40] = J) : J = e[40];
|
|
1089
1089
|
let O;
|
|
1090
|
-
e[41] !== J || e[42] !== i ? (O = /* @__PURE__ */ t(
|
|
1090
|
+
e[41] !== J || e[42] !== i ? (O = /* @__PURE__ */ t(Ge, { value: i, index: 0, children: J }), e[41] = J, e[42] = i, e[43] = O) : O = e[43];
|
|
1091
1091
|
let Q;
|
|
1092
1092
|
e[44] !== u ? (Q = u(), e[44] = u, e[45] = Q) : Q = e[45];
|
|
1093
1093
|
let Y;
|
|
1094
|
-
e[46] !== Q || e[47] !== i ? (Y = /* @__PURE__ */ t(
|
|
1094
|
+
e[46] !== Q || e[47] !== i ? (Y = /* @__PURE__ */ t(Ge, { value: i, index: 1, children: Q }), e[46] = Q, e[47] = i, e[48] = Y) : Y = e[48];
|
|
1095
1095
|
let V;
|
|
1096
1096
|
e[49] !== I ? (V = I(), e[49] = I, e[50] = V) : V = e[50];
|
|
1097
1097
|
let X;
|
|
1098
|
-
e[51] !== V || e[52] !== i ? (X = /* @__PURE__ */ t(
|
|
1098
|
+
e[51] !== V || e[52] !== i ? (X = /* @__PURE__ */ t(Ge, { value: i, index: 2, children: V }), e[51] = V, e[52] = i, e[53] = X) : X = e[53];
|
|
1099
1099
|
let ie;
|
|
1100
|
-
e[54] !==
|
|
1100
|
+
e[54] !== G ? (ie = G(), e[54] = G, e[55] = ie) : ie = e[55];
|
|
1101
1101
|
let B;
|
|
1102
|
-
e[56] !== ie || e[57] !== i ? (B = /* @__PURE__ */ t(
|
|
1102
|
+
e[56] !== ie || e[57] !== i ? (B = /* @__PURE__ */ t(Ge, { value: i, index: 3, children: ie }), e[56] = ie, e[57] = i, e[58] = B) : B = e[58];
|
|
1103
1103
|
let q;
|
|
1104
|
-
return e[59] !== H || e[60] !== O || e[61] !== Y || e[62] !== X || e[63] !== B ? (q = /* @__PURE__ */ t(ce, { variant: "outlined", children: /* @__PURE__ */ a(
|
|
1105
|
-
|
|
1104
|
+
return e[59] !== H || e[60] !== O || e[61] !== Y || e[62] !== X || e[63] !== B ? (q = /* @__PURE__ */ t(ce, { variant: "outlined", children: /* @__PURE__ */ a(ze, { sx: D, children: [
|
|
1105
|
+
W,
|
|
1106
1106
|
H,
|
|
1107
1107
|
O,
|
|
1108
1108
|
Y,
|
|
@@ -1128,21 +1128,21 @@ const Sn = () => {
|
|
|
1128
1128
|
gatewayId: n ?? ""
|
|
1129
1129
|
}, {
|
|
1130
1130
|
data: g
|
|
1131
|
-
} =
|
|
1131
|
+
} = Ft(i), {
|
|
1132
1132
|
mutateAsync: S,
|
|
1133
1133
|
isPending: h
|
|
1134
|
-
} =
|
|
1135
|
-
mutateAsync:
|
|
1136
|
-
} =
|
|
1134
|
+
} = Wt(), {
|
|
1135
|
+
mutateAsync: z
|
|
1136
|
+
} = $t(), A = le((I, T) => {
|
|
1137
1137
|
v(`${T} copied to clipboard`), f(!0);
|
|
1138
1138
|
}, []), E = (g?.count ?? 0) > 0, _ = le(async () => {
|
|
1139
1139
|
if (!(!e || !n))
|
|
1140
1140
|
try {
|
|
1141
1141
|
const I = g?.list ?? [];
|
|
1142
|
-
await Promise.all(I.filter((
|
|
1142
|
+
await Promise.all(I.filter((G) => G.status === "active").map((G) => z({
|
|
1143
1143
|
orgName: e,
|
|
1144
1144
|
gatewayId: n,
|
|
1145
|
-
tokenId:
|
|
1145
|
+
tokenId: G.id
|
|
1146
1146
|
}).catch(() => {
|
|
1147
1147
|
})));
|
|
1148
1148
|
const T = await S({
|
|
@@ -1152,7 +1152,7 @@ const Sn = () => {
|
|
|
1152
1152
|
c(T.token), d(!0);
|
|
1153
1153
|
} catch {
|
|
1154
1154
|
}
|
|
1155
|
-
}, [e, n, g?.list,
|
|
1155
|
+
}, [e, n, g?.list, z, S]), w = le(() => {
|
|
1156
1156
|
E ? r({
|
|
1157
1157
|
title: "Reconfigure gateway",
|
|
1158
1158
|
description: "Regenerating the registration token will revoke the existing token for this gateway and disconnect the gateway from the control plane. Do you want to continue?",
|
|
@@ -1288,21 +1288,21 @@ function kn({
|
|
|
1288
1288
|
isCritical: r.isCritical
|
|
1289
1289
|
}), S());
|
|
1290
1290
|
}, [r, n, S]);
|
|
1291
|
-
const
|
|
1291
|
+
const z = le((u, p) => {
|
|
1292
1292
|
d((I) => {
|
|
1293
1293
|
const T = {
|
|
1294
1294
|
...I,
|
|
1295
1295
|
[u]: p
|
|
1296
|
-
},
|
|
1297
|
-
return x(u,
|
|
1296
|
+
}, G = v(u, T[u], T);
|
|
1297
|
+
return x(u, G), T;
|
|
1298
1298
|
});
|
|
1299
1299
|
}, [x, v]), A = le(async (u) => {
|
|
1300
1300
|
u.preventDefault();
|
|
1301
1301
|
const p = je.safeParse(s);
|
|
1302
1302
|
if (!p.success) {
|
|
1303
1303
|
const T = {};
|
|
1304
|
-
p.error.issues.forEach((
|
|
1305
|
-
|
|
1304
|
+
p.error.issues.forEach((G) => {
|
|
1305
|
+
G.path[0] && (T[G.path[0]] = G.message);
|
|
1306
1306
|
}), b(T), f(s);
|
|
1307
1307
|
return;
|
|
1308
1308
|
}
|
|
@@ -1333,7 +1333,7 @@ function kn({
|
|
|
1333
1333
|
/* @__PURE__ */ t(oe.Header, { children: "Gateway Details" }),
|
|
1334
1334
|
/* @__PURE__ */ t(oe.Stack, { spacing: 2, children: /* @__PURE__ */ a(ye, { fullWidth: !0, error: !!R.displayName, children: [
|
|
1335
1335
|
/* @__PURE__ */ t(pe, { required: !0, children: "Display Name" }),
|
|
1336
|
-
/* @__PURE__ */ t(me, { fullWidth: !0, size: "small", value: s.displayName, onChange: (u) =>
|
|
1336
|
+
/* @__PURE__ */ t(me, { fullWidth: !0, size: "small", value: s.displayName, onChange: (u) => z("displayName", u.target.value), placeholder: "e.g., Production Gateway", error: !!R.displayName, helperText: R.displayName, disabled: h })
|
|
1337
1337
|
] }) })
|
|
1338
1338
|
] }),
|
|
1339
1339
|
/* @__PURE__ */ a(P, { display: "flex", justifyContent: "flex-end", gap: 1, mt: 2, children: [
|
|
@@ -1381,7 +1381,7 @@ const Ye = () => {
|
|
|
1381
1381
|
i,
|
|
1382
1382
|
g
|
|
1383
1383
|
] }), n[13] = i, n[14] = g, n[15] = S) : S = n[15], S;
|
|
1384
|
-
},
|
|
1384
|
+
}, Fn = {
|
|
1385
1385
|
title: "Gateways",
|
|
1386
1386
|
description: "A page component for Gateway management",
|
|
1387
1387
|
icon: Xe,
|
|
@@ -1393,5 +1393,5 @@ const Ye = () => {
|
|
|
1393
1393
|
};
|
|
1394
1394
|
export {
|
|
1395
1395
|
Ye as GatewaysOrganization,
|
|
1396
|
-
|
|
1396
|
+
Fn as metaData
|
|
1397
1397
|
};
|