@wso2/am-core-ui 0.0.17 → 0.0.19
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/APIKeysManager-C0phJriD.js +241 -0
- package/dist/CatalogKindListing-DtFI2YMG.js +118 -0
- package/dist/CodeBlock-mB_Loq7I.js +21736 -0
- package/dist/EnvironmentCard-09h1XRxx.js +310 -0
- package/dist/EnvironmentSelector-B7Bl93s2.js +48 -0
- package/dist/MCPLogo-D9IJzzl7.js +30 -0
- package/dist/PolicyListSection-o4k9e8XO.js +2475 -0
- package/dist/ResourceListShell-Cx6mdeqv.js +463 -0
- package/dist/SwaggerSpecViewer-BvkhoKsi.js +106 -0
- package/dist/clipboard-YAzStmkw.js +23 -0
- package/dist/debounce-BV83M53b.js +208 -0
- package/dist/format-BEZZRyE2.js +29 -0
- package/dist/formatDistanceToNow-TErllcH8.js +100 -0
- package/dist/gatewayScripts-D8O45W8u.js +72 -0
- package/dist/highlight-BsUzxSR3.js +454 -0
- package/dist/index-B52h3RHg.js +1290 -0
- package/dist/index-BP5drcF2.js +1265 -0
- package/dist/index-BZ4vxviI.js +7981 -0
- package/dist/index-B_Z0MwXk.js +25012 -0
- package/dist/index-BfjzUWDa.js +1397 -0
- package/dist/{index-CDm_burV.js → index-BnV-PkwM.js} +22 -20
- package/dist/index-CGDYgUCH.js +711 -0
- package/dist/index-COt7nJIf.js +2286 -0
- package/dist/index-CWZjOy1h.js +2247 -0
- package/dist/index-CezvogTQ.js +116 -0
- package/dist/index-CgCWbWzN.js +2342 -0
- package/dist/index-CjCkcuuI.js +322 -0
- package/dist/index-CjXvuf9m.js +1354 -0
- package/dist/index-DD4qF7gq.js +2340 -0
- package/dist/index-DeQ-9KTC.js +737 -0
- package/dist/index-Df6OBy4E.js +3041 -0
- package/dist/index-KRsV2L4V.js +1564 -0
- package/dist/index-PUuASE1F.js +2507 -0
- package/dist/index-PWsNvJB-.js +546 -0
- package/dist/index-UqDmyMSA.js +119 -0
- package/dist/index-_0Pj_ZtW.js +459 -0
- package/dist/{index-DJABKRWO.js → index-sr-mWz4T.js} +31 -30
- package/dist/index.d.ts +496 -200
- package/dist/index.js +462 -439
- package/dist/llmProviderPayload-CzihkdNa.js +332 -0
- package/dist/schemas-DFScWdSL.js +2969 -0
- package/package.json +1 -1
- package/dist/index-B0d-vovv.js +0 -236
- package/dist/index-CCmLfbLS.js +0 -80707
- package/dist/index-qanXZe0s.js +0 -3037
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
import { c as Q } from "react/compiler-runtime";
|
|
2
|
+
import { jsx as e, jsxs as i, Fragment as se } from "react/jsx-runtime";
|
|
3
|
+
import { useNavigate as le, useParams as W, generatePath as _, Routes as ce, Route as L, Navigate as de } from "react-router-dom";
|
|
4
|
+
import { ar as Y, cb as q, z as he, g as F, P as J, ch as M } from "./index-B_Z0MwXk.js";
|
|
5
|
+
import { useState as Z, useMemo as V, Fragment as pe } from "react";
|
|
6
|
+
import { SearchBar as ue, ListingTable as r, Stack as c, Skeleton as I, Alert as B, Typography as h, Avatar as me, Tooltip as O, IconButton as ee, Grid as m, Card as w, CardContent as ve, Box as $, List as G, ListSubheader as ge, Divider as ye, Chip as fe, ListItemButton as xe, ListItemIcon as Ie, ListItemText as be } from "@wso2/oxygen-ui";
|
|
7
|
+
import { AlertTriangle as P, KeyRound as X, Search as Ce, Copy as ne, Users as te, Shield as ie, Folder as re, CheckCircle as ke, LayoutGrid as we } from "@wso2/oxygen-ui-icons-react";
|
|
8
|
+
import "@tanstack/react-query";
|
|
9
|
+
import { c as oe } from "./clipboard-YAzStmkw.js";
|
|
10
|
+
const ae = "Thunder", j = {
|
|
11
|
+
fontFamily: "monospace",
|
|
12
|
+
color: "text.secondary",
|
|
13
|
+
overflow: "hidden",
|
|
14
|
+
textOverflow: "ellipsis",
|
|
15
|
+
whiteSpace: "nowrap",
|
|
16
|
+
display: "block"
|
|
17
|
+
}, Te = (n, t) => [ae, n.title, n.instance.envName, n.instance.issuerUrl, n.instance.tokenUrl].join(" ").toLowerCase().includes(t);
|
|
18
|
+
function Ne() {
|
|
19
|
+
const n = le(), {
|
|
20
|
+
orgId: t
|
|
21
|
+
} = W(), {
|
|
22
|
+
pushSnackBar: o
|
|
23
|
+
} = Y(), [d, T] = Z(""), {
|
|
24
|
+
data: v,
|
|
25
|
+
isLoading: C,
|
|
26
|
+
error: k
|
|
27
|
+
} = q({
|
|
28
|
+
orgName: t
|
|
29
|
+
}), {
|
|
30
|
+
data: g,
|
|
31
|
+
isLoading: y
|
|
32
|
+
} = he({
|
|
33
|
+
orgName: t
|
|
34
|
+
}), b = C || y, f = k, p = V(() => v?.thunderInstances ?? [], [v]), N = V(() => {
|
|
35
|
+
const s = new Map(p.map((a) => [a.envName, a])), l = [], u = /* @__PURE__ */ new Set();
|
|
36
|
+
for (const a of g ?? []) {
|
|
37
|
+
u.add(a.name);
|
|
38
|
+
const U = s.get(a.name);
|
|
39
|
+
U && l.push({
|
|
40
|
+
key: a.name,
|
|
41
|
+
title: a.displayName || a.name,
|
|
42
|
+
instance: U
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
for (const a of p)
|
|
46
|
+
u.has(a.envName) || l.push({
|
|
47
|
+
key: a.envName,
|
|
48
|
+
title: a.displayName || a.envName,
|
|
49
|
+
instance: a
|
|
50
|
+
});
|
|
51
|
+
const S = d.trim().toLowerCase();
|
|
52
|
+
return S ? l.filter((a) => Te(a, S)) : l;
|
|
53
|
+
}, [g, p, d]), z = (s, l) => {
|
|
54
|
+
s.stopPropagation(), oe(l).then((u) => {
|
|
55
|
+
o(u ? {
|
|
56
|
+
message: "Token endpoint copied to clipboard",
|
|
57
|
+
type: "success"
|
|
58
|
+
} : {
|
|
59
|
+
message: "Failed to copy token endpoint",
|
|
60
|
+
type: "error"
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}, E = (s) => {
|
|
64
|
+
n(_(F.children.org.children.thunderInstances.children.view.path, {
|
|
65
|
+
orgId: t ?? "",
|
|
66
|
+
envName: s.envName
|
|
67
|
+
}));
|
|
68
|
+
}, x = e(ue, {
|
|
69
|
+
placeholder: "Search identity providers...",
|
|
70
|
+
size: "small",
|
|
71
|
+
fullWidth: !0,
|
|
72
|
+
value: d,
|
|
73
|
+
onChange: (s) => T(s.target.value),
|
|
74
|
+
disabled: b
|
|
75
|
+
});
|
|
76
|
+
return b ? e(r.Container, {
|
|
77
|
+
disablePaper: !0,
|
|
78
|
+
children: e(c, {
|
|
79
|
+
spacing: 1,
|
|
80
|
+
mt: 1,
|
|
81
|
+
children: Array.from({
|
|
82
|
+
length: 3
|
|
83
|
+
}).map((s, l) => i(c, {
|
|
84
|
+
direction: "row",
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
spacing: 2,
|
|
87
|
+
sx: {
|
|
88
|
+
px: 2,
|
|
89
|
+
py: 1.5,
|
|
90
|
+
borderRadius: 1,
|
|
91
|
+
border: "1px solid",
|
|
92
|
+
borderColor: "divider",
|
|
93
|
+
bgcolor: "background.paper"
|
|
94
|
+
},
|
|
95
|
+
children: [e(I, {
|
|
96
|
+
variant: "circular",
|
|
97
|
+
width: 36,
|
|
98
|
+
height: 36
|
|
99
|
+
}), e(I, {
|
|
100
|
+
variant: "text",
|
|
101
|
+
width: 160,
|
|
102
|
+
height: 20,
|
|
103
|
+
sx: {
|
|
104
|
+
flex: 1
|
|
105
|
+
}
|
|
106
|
+
}), e(I, {
|
|
107
|
+
variant: "rounded",
|
|
108
|
+
width: 96,
|
|
109
|
+
height: 24
|
|
110
|
+
}), e(I, {
|
|
111
|
+
variant: "rounded",
|
|
112
|
+
width: 24,
|
|
113
|
+
height: 24
|
|
114
|
+
})]
|
|
115
|
+
}, l))
|
|
116
|
+
})
|
|
117
|
+
}) : f ? e(B, {
|
|
118
|
+
severity: "error",
|
|
119
|
+
icon: e(P, {
|
|
120
|
+
size: 18
|
|
121
|
+
}),
|
|
122
|
+
children: "Failed to load identity providers. Please try again."
|
|
123
|
+
}) : p.length === 0 ? e(r.Container, {
|
|
124
|
+
children: e(r.EmptyState, {
|
|
125
|
+
illustration: e(X, {
|
|
126
|
+
size: 64
|
|
127
|
+
}),
|
|
128
|
+
title: "No identity providers",
|
|
129
|
+
description: "Add an environment first. Each environment automatically gets a Thunder identity provider."
|
|
130
|
+
})
|
|
131
|
+
}) : i(c, {
|
|
132
|
+
spacing: 1,
|
|
133
|
+
children: [x, N.length === 0 ? e(r.Container, {
|
|
134
|
+
children: e(r.EmptyState, {
|
|
135
|
+
illustration: e(Ce, {
|
|
136
|
+
size: 64
|
|
137
|
+
}),
|
|
138
|
+
title: "No identity providers found",
|
|
139
|
+
description: "Try a different keyword or clear the search filter."
|
|
140
|
+
})
|
|
141
|
+
}) : e(c, {
|
|
142
|
+
pt: 3,
|
|
143
|
+
children: e(r.Container, {
|
|
144
|
+
disablePaper: !0,
|
|
145
|
+
children: i(r, {
|
|
146
|
+
variant: "card",
|
|
147
|
+
children: [e(r.Head, {
|
|
148
|
+
children: i(r.Row, {
|
|
149
|
+
children: [e(r.Cell, {
|
|
150
|
+
width: "240px",
|
|
151
|
+
children: "Identity Provider"
|
|
152
|
+
}), e(r.Cell, {
|
|
153
|
+
children: "Issuer"
|
|
154
|
+
}), e(r.Cell, {
|
|
155
|
+
children: "Token Endpoint"
|
|
156
|
+
})]
|
|
157
|
+
})
|
|
158
|
+
}), e(r.Body, {
|
|
159
|
+
children: N.map(({
|
|
160
|
+
key: s,
|
|
161
|
+
title: l,
|
|
162
|
+
instance: u
|
|
163
|
+
}) => i(pe, {
|
|
164
|
+
children: [e(r.Row, {
|
|
165
|
+
children: e(r.Cell, {
|
|
166
|
+
colSpan: 3,
|
|
167
|
+
sx: {
|
|
168
|
+
"&&": {
|
|
169
|
+
border: 0,
|
|
170
|
+
p: 0
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
children: e(h, {
|
|
174
|
+
variant: "overline",
|
|
175
|
+
color: "text.secondary",
|
|
176
|
+
children: l
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
}), i(r.Row, {
|
|
180
|
+
variant: "card",
|
|
181
|
+
hover: !0,
|
|
182
|
+
clickable: !0,
|
|
183
|
+
onClick: () => E(u),
|
|
184
|
+
children: [e(r.Cell, {
|
|
185
|
+
children: e(r.CellIcon, {
|
|
186
|
+
icon: e(me, {
|
|
187
|
+
sx: {
|
|
188
|
+
width: 28,
|
|
189
|
+
height: 28,
|
|
190
|
+
bgcolor: "primary.main",
|
|
191
|
+
color: "primary.contrastText"
|
|
192
|
+
},
|
|
193
|
+
children: e(X, {
|
|
194
|
+
size: 16
|
|
195
|
+
})
|
|
196
|
+
}),
|
|
197
|
+
primary: ae,
|
|
198
|
+
secondary: "System identity provider"
|
|
199
|
+
})
|
|
200
|
+
}), e(r.Cell, {
|
|
201
|
+
children: e(h, {
|
|
202
|
+
variant: "caption",
|
|
203
|
+
sx: {
|
|
204
|
+
...j,
|
|
205
|
+
maxWidth: 280
|
|
206
|
+
},
|
|
207
|
+
children: u.issuerUrl
|
|
208
|
+
})
|
|
209
|
+
}), e(r.Cell, {
|
|
210
|
+
children: i(c, {
|
|
211
|
+
direction: "row",
|
|
212
|
+
alignItems: "center",
|
|
213
|
+
spacing: 1,
|
|
214
|
+
children: [e(h, {
|
|
215
|
+
variant: "caption",
|
|
216
|
+
sx: {
|
|
217
|
+
...j,
|
|
218
|
+
maxWidth: 320
|
|
219
|
+
},
|
|
220
|
+
children: u.tokenUrl
|
|
221
|
+
}), e(O, {
|
|
222
|
+
title: "Copy token endpoint",
|
|
223
|
+
children: e(ee, {
|
|
224
|
+
size: "small",
|
|
225
|
+
onClick: (S) => z(S, u.tokenUrl),
|
|
226
|
+
children: e(ne, {
|
|
227
|
+
size: 14
|
|
228
|
+
})
|
|
229
|
+
})
|
|
230
|
+
})]
|
|
231
|
+
})
|
|
232
|
+
})]
|
|
233
|
+
})]
|
|
234
|
+
}, s))
|
|
235
|
+
})]
|
|
236
|
+
})
|
|
237
|
+
})
|
|
238
|
+
})]
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function A({
|
|
242
|
+
illustration: n,
|
|
243
|
+
title: t
|
|
244
|
+
}) {
|
|
245
|
+
return e(r.EmptyState, {
|
|
246
|
+
illustration: n,
|
|
247
|
+
title: `${t} — Coming Soon`,
|
|
248
|
+
description: "This feature is under development.",
|
|
249
|
+
minHeight: 220,
|
|
250
|
+
// The content pane now has a real computed height (it stretches to
|
|
251
|
+
// match the sidebar nav card), so without this the empty state only
|
|
252
|
+
// takes up its 220px minHeight and sits pinned to the top instead of
|
|
253
|
+
// sitting centered in the pane.
|
|
254
|
+
sx: {
|
|
255
|
+
height: "100%"
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
function D({
|
|
260
|
+
label: n,
|
|
261
|
+
value: t,
|
|
262
|
+
monospace: o = !1
|
|
263
|
+
}) {
|
|
264
|
+
return e(w, {
|
|
265
|
+
variant: "outlined",
|
|
266
|
+
sx: {
|
|
267
|
+
p: 2,
|
|
268
|
+
height: "100%"
|
|
269
|
+
},
|
|
270
|
+
children: i(c, {
|
|
271
|
+
spacing: 0.5,
|
|
272
|
+
children: [e(h, {
|
|
273
|
+
variant: "caption",
|
|
274
|
+
color: "text.secondary",
|
|
275
|
+
sx: {
|
|
276
|
+
fontWeight: 500
|
|
277
|
+
},
|
|
278
|
+
children: n
|
|
279
|
+
}), e(h, {
|
|
280
|
+
variant: "body2",
|
|
281
|
+
sx: {
|
|
282
|
+
fontFamily: o ? "monospace" : void 0,
|
|
283
|
+
wordBreak: "break-all"
|
|
284
|
+
},
|
|
285
|
+
children: t
|
|
286
|
+
})]
|
|
287
|
+
})
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function R({
|
|
291
|
+
label: n,
|
|
292
|
+
value: t,
|
|
293
|
+
onCopy: o
|
|
294
|
+
}) {
|
|
295
|
+
return e(w, {
|
|
296
|
+
variant: "outlined",
|
|
297
|
+
sx: {
|
|
298
|
+
height: "100%"
|
|
299
|
+
},
|
|
300
|
+
children: e(ve, {
|
|
301
|
+
sx: {
|
|
302
|
+
p: 2,
|
|
303
|
+
"&:last-child": {
|
|
304
|
+
pb: 2
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
children: i(c, {
|
|
308
|
+
spacing: 0.5,
|
|
309
|
+
children: [e(h, {
|
|
310
|
+
variant: "caption",
|
|
311
|
+
color: "text.secondary",
|
|
312
|
+
sx: {
|
|
313
|
+
fontWeight: 500
|
|
314
|
+
},
|
|
315
|
+
children: n
|
|
316
|
+
}), i(c, {
|
|
317
|
+
direction: "row",
|
|
318
|
+
alignItems: "center",
|
|
319
|
+
spacing: 1,
|
|
320
|
+
children: [e(h, {
|
|
321
|
+
variant: "body2",
|
|
322
|
+
sx: {
|
|
323
|
+
fontFamily: "monospace",
|
|
324
|
+
wordBreak: "break-all",
|
|
325
|
+
flex: 1,
|
|
326
|
+
fontSize: "0.8rem"
|
|
327
|
+
},
|
|
328
|
+
children: t
|
|
329
|
+
}), e(O, {
|
|
330
|
+
title: `Copy ${n}`,
|
|
331
|
+
children: e(ee, {
|
|
332
|
+
size: "small",
|
|
333
|
+
onClick: () => o(t, n),
|
|
334
|
+
sx: {
|
|
335
|
+
flexShrink: 0
|
|
336
|
+
},
|
|
337
|
+
children: e(ne, {
|
|
338
|
+
size: 14
|
|
339
|
+
})
|
|
340
|
+
})
|
|
341
|
+
})]
|
|
342
|
+
})]
|
|
343
|
+
})
|
|
344
|
+
})
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
function Se({
|
|
348
|
+
instance: n,
|
|
349
|
+
onCopy: t
|
|
350
|
+
}) {
|
|
351
|
+
return i(c, {
|
|
352
|
+
spacing: 3,
|
|
353
|
+
children: [i(c, {
|
|
354
|
+
spacing: 1.5,
|
|
355
|
+
children: [e(h, {
|
|
356
|
+
variant: "subtitle2",
|
|
357
|
+
fontWeight: 600,
|
|
358
|
+
children: "OAuth2 Endpoints"
|
|
359
|
+
}), i(m, {
|
|
360
|
+
container: !0,
|
|
361
|
+
spacing: 2,
|
|
362
|
+
children: [e(m, {
|
|
363
|
+
size: {
|
|
364
|
+
xs: 12,
|
|
365
|
+
sm: 6,
|
|
366
|
+
md: 4
|
|
367
|
+
},
|
|
368
|
+
children: e(R, {
|
|
369
|
+
label: "Token Endpoint",
|
|
370
|
+
value: n.tokenUrl,
|
|
371
|
+
onCopy: t
|
|
372
|
+
})
|
|
373
|
+
}), e(m, {
|
|
374
|
+
size: {
|
|
375
|
+
xs: 12,
|
|
376
|
+
sm: 6,
|
|
377
|
+
md: 4
|
|
378
|
+
},
|
|
379
|
+
children: e(R, {
|
|
380
|
+
label: "JWKS Endpoint",
|
|
381
|
+
value: n.jwksUrl,
|
|
382
|
+
onCopy: t
|
|
383
|
+
})
|
|
384
|
+
}), e(m, {
|
|
385
|
+
size: {
|
|
386
|
+
xs: 12,
|
|
387
|
+
sm: 6,
|
|
388
|
+
md: 4
|
|
389
|
+
},
|
|
390
|
+
children: e(R, {
|
|
391
|
+
label: "Issuer URL",
|
|
392
|
+
value: n.issuerUrl,
|
|
393
|
+
onCopy: t
|
|
394
|
+
})
|
|
395
|
+
})]
|
|
396
|
+
})]
|
|
397
|
+
}), i(c, {
|
|
398
|
+
spacing: 1.5,
|
|
399
|
+
children: [e(h, {
|
|
400
|
+
variant: "subtitle2",
|
|
401
|
+
fontWeight: 600,
|
|
402
|
+
children: "Infrastructure"
|
|
403
|
+
}), i(m, {
|
|
404
|
+
container: !0,
|
|
405
|
+
spacing: 2,
|
|
406
|
+
children: [e(m, {
|
|
407
|
+
size: {
|
|
408
|
+
xs: 12,
|
|
409
|
+
sm: 6
|
|
410
|
+
},
|
|
411
|
+
children: e(D, {
|
|
412
|
+
label: "Kubernetes Namespace",
|
|
413
|
+
value: n.namespace,
|
|
414
|
+
monospace: !0
|
|
415
|
+
})
|
|
416
|
+
}), e(m, {
|
|
417
|
+
size: {
|
|
418
|
+
xs: 12,
|
|
419
|
+
sm: 6
|
|
420
|
+
},
|
|
421
|
+
children: e(D, {
|
|
422
|
+
label: "Environment",
|
|
423
|
+
value: n.envName,
|
|
424
|
+
monospace: !0
|
|
425
|
+
})
|
|
426
|
+
})]
|
|
427
|
+
})]
|
|
428
|
+
})]
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
const ze = {
|
|
432
|
+
label: "Overview",
|
|
433
|
+
icon: e(we, {
|
|
434
|
+
size: 18
|
|
435
|
+
})
|
|
436
|
+
}, Ee = [{
|
|
437
|
+
label: "Agents",
|
|
438
|
+
icon: e(te, {
|
|
439
|
+
size: 18
|
|
440
|
+
})
|
|
441
|
+
}, {
|
|
442
|
+
label: "Roles",
|
|
443
|
+
icon: e(ie, {
|
|
444
|
+
size: 18
|
|
445
|
+
})
|
|
446
|
+
}, {
|
|
447
|
+
label: "Groups",
|
|
448
|
+
icon: e(re, {
|
|
449
|
+
size: 18
|
|
450
|
+
})
|
|
451
|
+
}], Le = {
|
|
452
|
+
minWidth: 36,
|
|
453
|
+
color: "primary.main"
|
|
454
|
+
}, Ae = {
|
|
455
|
+
minWidth: 36,
|
|
456
|
+
color: "inherit"
|
|
457
|
+
}, Re = {
|
|
458
|
+
color: "text.secondary"
|
|
459
|
+
}, Be = {
|
|
460
|
+
color: "inherit"
|
|
461
|
+
};
|
|
462
|
+
function H({
|
|
463
|
+
tab: n,
|
|
464
|
+
isActive: t,
|
|
465
|
+
onClick: o
|
|
466
|
+
}) {
|
|
467
|
+
return i(xe, {
|
|
468
|
+
selected: t,
|
|
469
|
+
onClick: o,
|
|
470
|
+
children: [e(Ie, {
|
|
471
|
+
sx: t ? Le : Ae,
|
|
472
|
+
children: n.icon
|
|
473
|
+
}), e(be, {
|
|
474
|
+
primary: n.label,
|
|
475
|
+
sx: t ? Re : Be
|
|
476
|
+
})]
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
const Pe = () => {
|
|
480
|
+
const n = Q(12), {
|
|
481
|
+
orgId: t,
|
|
482
|
+
envName: o
|
|
483
|
+
} = W(), [d, T] = Z(0), {
|
|
484
|
+
pushSnackBar: v
|
|
485
|
+
} = Y();
|
|
486
|
+
let C;
|
|
487
|
+
n[0] !== t ? (C = {
|
|
488
|
+
orgName: t
|
|
489
|
+
}, n[0] = t, n[1] = C) : C = n[1];
|
|
490
|
+
const {
|
|
491
|
+
data: k,
|
|
492
|
+
isLoading: g,
|
|
493
|
+
error: y
|
|
494
|
+
} = q(C);
|
|
495
|
+
let b;
|
|
496
|
+
if (n[2] !== k?.thunderInstances || n[3] !== o || n[4] !== y || n[5] !== g || n[6] !== t || n[7] !== v || n[8] !== d) {
|
|
497
|
+
const f = k?.thunderInstances.find((x) => x.envName === o);
|
|
498
|
+
let p;
|
|
499
|
+
n[10] !== v ? (p = (x, s) => {
|
|
500
|
+
oe(x).then((l) => {
|
|
501
|
+
v(l ? {
|
|
502
|
+
message: `${s} copied to clipboard`,
|
|
503
|
+
type: "success"
|
|
504
|
+
} : {
|
|
505
|
+
message: `Failed to copy ${s}`,
|
|
506
|
+
type: "error"
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
}, n[10] = v, n[11] = p) : p = n[11];
|
|
510
|
+
const N = p, z = f?.displayName || f?.envName || o || "", E = _(F.children.org.children.thunderInstances.path, {
|
|
511
|
+
orgId: t ?? ""
|
|
512
|
+
});
|
|
513
|
+
b = e(se, {
|
|
514
|
+
children: i(J, {
|
|
515
|
+
title: z,
|
|
516
|
+
backHref: E,
|
|
517
|
+
backLabel: "Back to Identity Providers",
|
|
518
|
+
disableIcon: !0,
|
|
519
|
+
isLoading: g,
|
|
520
|
+
titleTail: f && !y ? e(O, {
|
|
521
|
+
title: "Thunder identity provider is active for this environment",
|
|
522
|
+
children: e(fe, {
|
|
523
|
+
icon: e(ke, {
|
|
524
|
+
size: 14
|
|
525
|
+
}),
|
|
526
|
+
label: "Active",
|
|
527
|
+
size: "small",
|
|
528
|
+
color: "success",
|
|
529
|
+
variant: "outlined"
|
|
530
|
+
})
|
|
531
|
+
}) : void 0,
|
|
532
|
+
children: [g && i(c, {
|
|
533
|
+
spacing: 3,
|
|
534
|
+
children: [e(m, {
|
|
535
|
+
container: !0,
|
|
536
|
+
spacing: 2,
|
|
537
|
+
children: [0, 1, 2, 3].map(We)
|
|
538
|
+
}), e(w, {
|
|
539
|
+
variant: "outlined",
|
|
540
|
+
sx: {
|
|
541
|
+
p: 3
|
|
542
|
+
},
|
|
543
|
+
children: i(c, {
|
|
544
|
+
spacing: 2,
|
|
545
|
+
children: [e(I, {
|
|
546
|
+
variant: "text",
|
|
547
|
+
width: 140,
|
|
548
|
+
height: 24
|
|
549
|
+
}), e(I, {
|
|
550
|
+
variant: "rounded",
|
|
551
|
+
height: 80
|
|
552
|
+
})]
|
|
553
|
+
})
|
|
554
|
+
})]
|
|
555
|
+
}), !!y && e(B, {
|
|
556
|
+
severity: "error",
|
|
557
|
+
icon: e(P, {
|
|
558
|
+
size: 18
|
|
559
|
+
}),
|
|
560
|
+
children: "Failed to load identity provider. Please try again."
|
|
561
|
+
}), !g && !y && !f && i(B, {
|
|
562
|
+
severity: "warning",
|
|
563
|
+
icon: e(P, {
|
|
564
|
+
size: 18
|
|
565
|
+
}),
|
|
566
|
+
children: ['Identity provider for environment "', o, '" was not found.']
|
|
567
|
+
}), f && !y && i(w, {
|
|
568
|
+
variant: "outlined",
|
|
569
|
+
sx: {
|
|
570
|
+
display: "flex",
|
|
571
|
+
overflow: "hidden",
|
|
572
|
+
minHeight: "calc(70vh - 64px)"
|
|
573
|
+
},
|
|
574
|
+
children: [i($, {
|
|
575
|
+
component: "nav",
|
|
576
|
+
sx: {
|
|
577
|
+
width: 200,
|
|
578
|
+
flexShrink: 0,
|
|
579
|
+
overflowY: "auto",
|
|
580
|
+
p: 2
|
|
581
|
+
},
|
|
582
|
+
children: [e(G, {
|
|
583
|
+
children: e(H, {
|
|
584
|
+
tab: ze,
|
|
585
|
+
isActive: d === 0,
|
|
586
|
+
onClick: () => T(0)
|
|
587
|
+
})
|
|
588
|
+
}), e(G, {
|
|
589
|
+
subheader: e(ge, {
|
|
590
|
+
disableGutters: !0,
|
|
591
|
+
disableSticky: !0,
|
|
592
|
+
children: e(h, {
|
|
593
|
+
variant: "overline",
|
|
594
|
+
children: "Identity Management"
|
|
595
|
+
})
|
|
596
|
+
}),
|
|
597
|
+
children: Ee.map((x, s) => {
|
|
598
|
+
const l = s + 1;
|
|
599
|
+
return e(H, {
|
|
600
|
+
tab: x,
|
|
601
|
+
isActive: d === l,
|
|
602
|
+
onClick: () => T(l)
|
|
603
|
+
}, x.label);
|
|
604
|
+
})
|
|
605
|
+
})]
|
|
606
|
+
}), e(ye, {
|
|
607
|
+
orientation: "vertical",
|
|
608
|
+
flexItem: !0
|
|
609
|
+
}), i($, {
|
|
610
|
+
sx: {
|
|
611
|
+
flex: 1,
|
|
612
|
+
minWidth: 0,
|
|
613
|
+
overflowY: "auto",
|
|
614
|
+
p: 3
|
|
615
|
+
},
|
|
616
|
+
children: [d === 0 && e(Se, {
|
|
617
|
+
instance: f,
|
|
618
|
+
onCopy: N
|
|
619
|
+
}), d === 1 && e(A, {
|
|
620
|
+
illustration: e(te, {
|
|
621
|
+
size: 48
|
|
622
|
+
}),
|
|
623
|
+
title: "Agents"
|
|
624
|
+
}), d === 2 && e(A, {
|
|
625
|
+
illustration: e(ie, {
|
|
626
|
+
size: 48
|
|
627
|
+
}),
|
|
628
|
+
title: "Roles"
|
|
629
|
+
}), d === 3 && e(A, {
|
|
630
|
+
illustration: e(re, {
|
|
631
|
+
size: 48
|
|
632
|
+
}),
|
|
633
|
+
title: "Groups"
|
|
634
|
+
})]
|
|
635
|
+
})]
|
|
636
|
+
})]
|
|
637
|
+
})
|
|
638
|
+
}), n[2] = k?.thunderInstances, n[3] = o, n[4] = y, n[5] = g, n[6] = t, n[7] = v, n[8] = d, n[9] = b;
|
|
639
|
+
} else
|
|
640
|
+
b = n[9];
|
|
641
|
+
return b;
|
|
642
|
+
};
|
|
643
|
+
function We(n) {
|
|
644
|
+
return e(m, {
|
|
645
|
+
size: {
|
|
646
|
+
xs: 12,
|
|
647
|
+
sm: 6,
|
|
648
|
+
md: 3
|
|
649
|
+
},
|
|
650
|
+
children: e(w, {
|
|
651
|
+
variant: "outlined",
|
|
652
|
+
sx: {
|
|
653
|
+
p: 2,
|
|
654
|
+
height: "100%"
|
|
655
|
+
},
|
|
656
|
+
children: i(c, {
|
|
657
|
+
spacing: 0.5,
|
|
658
|
+
children: [e(I, {
|
|
659
|
+
variant: "text",
|
|
660
|
+
width: "40%",
|
|
661
|
+
height: 14
|
|
662
|
+
}), e(I, {
|
|
663
|
+
variant: "text",
|
|
664
|
+
width: "85%",
|
|
665
|
+
height: 20
|
|
666
|
+
})]
|
|
667
|
+
})
|
|
668
|
+
})
|
|
669
|
+
}, n);
|
|
670
|
+
}
|
|
671
|
+
const K = () => {
|
|
672
|
+
const n = Q(2), {
|
|
673
|
+
orgId: t
|
|
674
|
+
} = W();
|
|
675
|
+
let o;
|
|
676
|
+
return n[0] !== t ? (o = i(ce, {
|
|
677
|
+
children: [e(L, {
|
|
678
|
+
index: !0,
|
|
679
|
+
element: e(J, {
|
|
680
|
+
title: "Identity Providers",
|
|
681
|
+
description: "Environment-scoped OAuth2 identity providers for agent authentication",
|
|
682
|
+
disableIcon: !0,
|
|
683
|
+
children: e(Ne, {})
|
|
684
|
+
})
|
|
685
|
+
}), e(L, {
|
|
686
|
+
path: "view/:envName",
|
|
687
|
+
element: e(Pe, {})
|
|
688
|
+
}), e(L, {
|
|
689
|
+
path: "*",
|
|
690
|
+
element: e(de, {
|
|
691
|
+
to: _(F.children.org.children.thunderInstances.path, {
|
|
692
|
+
orgId: t
|
|
693
|
+
})
|
|
694
|
+
})
|
|
695
|
+
})]
|
|
696
|
+
}), n[0] = t, n[1] = o) : o = n[1], o;
|
|
697
|
+
}, je = {
|
|
698
|
+
title: M.title,
|
|
699
|
+
description: "Environment-scoped agent identity providers for agent authentication",
|
|
700
|
+
icon: M.icon,
|
|
701
|
+
path: "/thunder-instances",
|
|
702
|
+
component: K,
|
|
703
|
+
levels: {
|
|
704
|
+
organization: K
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
export {
|
|
708
|
+
K as ThunderInstancesOrganization,
|
|
709
|
+
je as thunderInstancesMetaData,
|
|
710
|
+
M as thunderInstancesMetadata
|
|
711
|
+
};
|