@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
|
@@ -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
|
+
};
|