@wso2/am-core-ui 0.0.18 → 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/APIKeysManager-C0phJriD.js +241 -0
- package/dist/CatalogKindListing-DvUuZEpc.js +137 -0
- package/dist/CodeBlock-B2Ecl916.js +21736 -0
- package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
- package/dist/EnvironmentSelector-D8S6nO9u.js +48 -0
- package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
- package/dist/LabelChips-7rA7_yre.js +139 -0
- package/dist/MCPLogo-D9IJzzl7.js +30 -0
- package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
- package/dist/ResourceListShell-DFisKftq.js +463 -0
- package/dist/SwaggerSpecViewer-DzjR6U6W.js +106 -0
- package/dist/clipboard-YAzStmkw.js +23 -0
- package/dist/debounce-D17ObVdG.js +208 -0
- package/dist/format-wlHhWjGo.js +29 -0
- package/dist/formatDistanceToNow-DyjnT7l9.js +100 -0
- package/dist/gatewayScripts-D4ZDEDPS.js +72 -0
- package/dist/highlight-BsUzxSR3.js +454 -0
- package/dist/{index-CnXsN5I3.js → index-3K-zqdp-.js} +34 -33
- package/dist/index-6liAPSDn.js +1564 -0
- package/dist/index-B3ASENUJ.js +1290 -0
- 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-BYy7Iaam.js +459 -0
- package/dist/index-BbB_yx4V.js +1397 -0
- package/dist/index-BjWJ95lH.js +2728 -0
- package/dist/index-ByEInFlf.js +26408 -0
- 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-Cvsho9xg.js +2346 -0
- package/dist/index-CxnAo1_c.js +119 -0
- package/dist/{index-DYV1jEai.js → index-Cz7-AZwE.js} +22 -20
- package/dist/index-DBdRFjxm.js +1264 -0
- package/dist/index-DFsSvmMZ.js +7981 -0
- package/dist/index-DslzOSGN.js +2549 -0
- package/dist/index-DvpYvchM.js +2341 -0
- package/dist/index-PWsNvJB-.js +546 -0
- package/dist/index.d.ts +1398 -481
- package/dist/index.js +539 -438
- package/dist/js-yaml-CvhD-clg.js +1335 -0
- package/dist/llmProviderPayload-BPzWDy7n.js +332 -0
- package/dist/schemas-DFScWdSL.js +2969 -0
- package/package.json +1 -1
- package/dist/index-B47EJCom.js +0 -236
- package/dist/index-Bl1Y7Sro.js +0 -3037
- package/dist/index-DlS9Lybj.js +0 -80691
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as i, useCallback as m, useState as W, useEffect as Y } from "react";
|
|
3
|
+
import { useParams as X, useSearchParams as Z } from "react-router-dom";
|
|
4
|
+
import { aX as q, T as n, a$ as $, b0 as J, P as U, a_ as K, V as Q, aZ as ee } from "./index-ByEInFlf.js";
|
|
5
|
+
import "react/compiler-runtime";
|
|
6
|
+
import "@tanstack/react-query";
|
|
7
|
+
import { Alert as se, Stack as te, Select as ae, MenuItem as oe, Checkbox as re, ListItemText as ne, InputAdornment as ie, IconButton as w, CircularProgress as le } from "@wso2/oxygen-ui";
|
|
8
|
+
import { Filter as ce, SortDesc as me, SortAsc as de, RefreshCcw as ge, Logs as he } from "@wso2/oxygen-ui-icons-react";
|
|
9
|
+
import { E as ue } from "./EnvironmentSelector-D8S6nO9u.js";
|
|
10
|
+
const pe = ["DEBUG", "INFO", "WARN", "ERROR"], Le = [{
|
|
11
|
+
value: n.TEN_MINUTES,
|
|
12
|
+
label: "10 Minutes"
|
|
13
|
+
}, {
|
|
14
|
+
value: n.THIRTY_MINUTES,
|
|
15
|
+
label: "30 Minutes"
|
|
16
|
+
}, {
|
|
17
|
+
value: n.ONE_HOUR,
|
|
18
|
+
label: "1 Hour"
|
|
19
|
+
}, {
|
|
20
|
+
value: n.SIX_HOURS,
|
|
21
|
+
label: "6 Hours"
|
|
22
|
+
}, {
|
|
23
|
+
value: n.TWELVE_HOURS,
|
|
24
|
+
label: "12 Hours"
|
|
25
|
+
}, {
|
|
26
|
+
value: n.ONE_DAY,
|
|
27
|
+
label: "1 Day"
|
|
28
|
+
}, {
|
|
29
|
+
value: n.SEVEN_DAYS,
|
|
30
|
+
label: "7 Days"
|
|
31
|
+
}], Re = 300, Se = 2e3, x = () => {
|
|
32
|
+
const {
|
|
33
|
+
agentId: L,
|
|
34
|
+
orgId: R,
|
|
35
|
+
projectId: S,
|
|
36
|
+
envId: E
|
|
37
|
+
} = X(), [s, r] = Z(), {
|
|
38
|
+
customStartTime: g,
|
|
39
|
+
customEndTime: h,
|
|
40
|
+
hasCustomRange: l,
|
|
41
|
+
handleCustomRangeApply: D
|
|
42
|
+
} = q(s, r), u = i(() => l ? void 0 : Object.values(n).includes(s.get("timeRange") ?? "") ? s.get("timeRange") : n.ONE_HOUR, [s, l]), o = i(() => s.get("sortOrder") || "desc", [s]), d = i(() => s.get("search") || "", [s]), c = i(() => {
|
|
43
|
+
const e = s.get("logLevels");
|
|
44
|
+
return e ? e.split(",").filter(Boolean) : [];
|
|
45
|
+
}, [s]), M = m((e) => {
|
|
46
|
+
const a = new URLSearchParams(s);
|
|
47
|
+
e.length === 0 ? a.delete("logLevels") : a.set("logLevels", e.join(",")), r(a);
|
|
48
|
+
}, [s, r]), [v, f] = W(d), O = i(() => $.debounce((e) => f(e), Se), [f]);
|
|
49
|
+
Y(() => {
|
|
50
|
+
O(d);
|
|
51
|
+
}, [O, d]);
|
|
52
|
+
const y = i(() => ({
|
|
53
|
+
environmentName: E ?? "",
|
|
54
|
+
timeRange: u,
|
|
55
|
+
startTime: l ? g : void 0,
|
|
56
|
+
endTime: l ? h : void 0,
|
|
57
|
+
sortOrder: o,
|
|
58
|
+
searchPhrase: v,
|
|
59
|
+
logLevels: c.length > 0 ? c : void 0
|
|
60
|
+
}), [E, u, l, g, h, o, v, c]), z = i(() => ({
|
|
61
|
+
agentName: L,
|
|
62
|
+
orgName: R,
|
|
63
|
+
projName: S
|
|
64
|
+
}), [L, R, S]), {
|
|
65
|
+
logs: H,
|
|
66
|
+
error: j,
|
|
67
|
+
isLoading: k,
|
|
68
|
+
isRefetching: T,
|
|
69
|
+
refetch: I,
|
|
70
|
+
isLoadingOlder: _,
|
|
71
|
+
isLoadingNewer: b,
|
|
72
|
+
loadOlder: P,
|
|
73
|
+
loadNewer: N,
|
|
74
|
+
hasMoreOlder: A,
|
|
75
|
+
hasMoreNewer: C
|
|
76
|
+
} = J(z, y, {
|
|
77
|
+
refetchInterval: !1,
|
|
78
|
+
pageSize: Re
|
|
79
|
+
}), B = m(() => {
|
|
80
|
+
I();
|
|
81
|
+
}, [I]), V = m((e) => {
|
|
82
|
+
const a = new URLSearchParams(s);
|
|
83
|
+
a.set("search", e), r(a);
|
|
84
|
+
}, [s, r]), F = m((e) => {
|
|
85
|
+
const a = new URLSearchParams(s);
|
|
86
|
+
a.set("timeRange", e), a.delete("startTime"), a.delete("endTime"), r(a);
|
|
87
|
+
}, [s, r]), G = m((e) => {
|
|
88
|
+
const a = new URLSearchParams(s);
|
|
89
|
+
a.set("sortOrder", e), r(a);
|
|
90
|
+
}, [s, r]);
|
|
91
|
+
return K() ? /* @__PURE__ */ t(U, { title: "Runtime Logs", disableIcon: !0, actions: /* @__PURE__ */ p(te, { direction: "row", spacing: 2, alignItems: "center", flexWrap: "wrap", children: [
|
|
92
|
+
/* @__PURE__ */ t(ue, {}),
|
|
93
|
+
/* @__PURE__ */ t(ae, { size: "small", variant: "outlined", multiple: !0, value: c, onChange: (e) => M(e.target.value), displayEmpty: !0, renderValue: (e) => e.length === 0 ? "All Levels" : e.join(", "), startAdornment: /* @__PURE__ */ t(ie, { position: "start", children: /* @__PURE__ */ t(ce, { size: 16 }) }), sx: {
|
|
94
|
+
minWidth: 150
|
|
95
|
+
}, children: pe.map((e) => /* @__PURE__ */ p(oe, { value: e, children: [
|
|
96
|
+
/* @__PURE__ */ t(re, { checked: c.includes(e), size: "small" }),
|
|
97
|
+
/* @__PURE__ */ t(ne, { primary: e })
|
|
98
|
+
] }, e)) }),
|
|
99
|
+
/* @__PURE__ */ t(ee, { preset: u, customStart: g, customEnd: h, options: Le, onPresetChange: F, onCustomRangeApply: D }),
|
|
100
|
+
/* @__PURE__ */ t(w, { size: "small", onClick: () => G(o === "desc" ? "asc" : "desc"), "aria-label": o === "desc" ? "Sort ascending" : "Sort descending", children: o === "desc" ? /* @__PURE__ */ t(me, { size: 16 }) : /* @__PURE__ */ t(de, { size: 16 }) }),
|
|
101
|
+
/* @__PURE__ */ t(w, { size: "small", disabled: T, onClick: B, "aria-label": "Refresh", children: T ? /* @__PURE__ */ t(le, { size: 16 }) : /* @__PURE__ */ t(ge, { size: 16 }) })
|
|
102
|
+
] }), children: /* @__PURE__ */ t(Q, { logs: H, isLoading: k, error: j, isLoadingUp: o === "asc" ? b : _, isLoadingDown: o === "asc" ? _ : b, hasMoreUp: o === "asc" ? C : A, hasMoreDown: o === "asc" ? A : C, onLoadUp: o === "asc" ? N : P, onLoadDown: o === "asc" ? P : N, onSearch: V, search: d }) }) : /* @__PURE__ */ t(U, { title: "Runtime Logs", disableIcon: !0, children: /* @__PURE__ */ p(se, { severity: "error", sx: {
|
|
103
|
+
mt: 2
|
|
104
|
+
}, children: [
|
|
105
|
+
/* @__PURE__ */ t("strong", { children: "Observer not configured." }),
|
|
106
|
+
" Ask your platform administrator to set ",
|
|
107
|
+
/* @__PURE__ */ t("code", { children: "AM_OBSERVER_PUBLIC_URL" }),
|
|
108
|
+
" on the agent-manager service."
|
|
109
|
+
] }) });
|
|
110
|
+
}, Ne = {
|
|
111
|
+
title: "Runtime Logs",
|
|
112
|
+
description: "A page component for Logs",
|
|
113
|
+
icon: he,
|
|
114
|
+
path: "/logs",
|
|
115
|
+
component: x,
|
|
116
|
+
levels: {
|
|
117
|
+
component: x
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
export {
|
|
121
|
+
x as LogsComponent,
|
|
122
|
+
Ne as metaData
|
|
123
|
+
};
|