@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.
Files changed (51) hide show
  1. package/dist/CatalogKindListing-DvUuZEpc.js +137 -0
  2. package/dist/{CodeBlock-mB_Loq7I.js → CodeBlock-B2Ecl916.js} +1 -1
  3. package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
  4. package/dist/{EnvironmentSelector-B7Bl93s2.js → EnvironmentSelector-D8S6nO9u.js} +1 -1
  5. package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
  6. package/dist/LabelChips-7rA7_yre.js +139 -0
  7. package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
  8. package/dist/{ResourceListShell-Cx6mdeqv.js → ResourceListShell-DFisKftq.js} +1 -1
  9. package/dist/{SwaggerSpecViewer-BvkhoKsi.js → SwaggerSpecViewer-DzjR6U6W.js} +1 -1
  10. package/dist/{debounce-BV83M53b.js → debounce-D17ObVdG.js} +1 -1
  11. package/dist/{format-BEZZRyE2.js → format-wlHhWjGo.js} +1 -1
  12. package/dist/{formatDistanceToNow-TErllcH8.js → formatDistanceToNow-DyjnT7l9.js} +11 -11
  13. package/dist/{gatewayScripts-D8O45W8u.js → gatewayScripts-D4ZDEDPS.js} +1 -1
  14. package/dist/{index-sr-mWz4T.js → index-3K-zqdp-.js} +32 -32
  15. package/dist/{index-KRsV2L4V.js → index-6liAPSDn.js} +160 -160
  16. package/dist/{index-B52h3RHg.js → index-B3ASENUJ.js} +109 -109
  17. package/dist/index-B7Pf4oPq.js +3069 -0
  18. package/dist/index-BNO3FhZK.js +2304 -0
  19. package/dist/index-BUZSfCl5.js +335 -0
  20. package/dist/index-BXiG1r_o.js +1409 -0
  21. package/dist/{index-_0Pj_ZtW.js → index-BYy7Iaam.js} +40 -40
  22. package/dist/{index-BfjzUWDa.js → index-BbB_yx4V.js} +103 -103
  23. package/dist/index-BjWJ95lH.js +2728 -0
  24. package/dist/{index-B_Z0MwXk.js → index-ByEInFlf.js} +10916 -9520
  25. package/dist/index-C8WIhzyz.js +123 -0
  26. package/dist/index-CnzvaT6b.js +2368 -0
  27. package/dist/index-CrnCf-hJ.js +763 -0
  28. package/dist/{index-CgCWbWzN.js → index-Cvsho9xg.js} +381 -377
  29. package/dist/{index-UqDmyMSA.js → index-CxnAo1_c.js} +21 -21
  30. package/dist/{index-BnV-PkwM.js → index-Cz7-AZwE.js} +2 -2
  31. package/dist/{index-BP5drcF2.js → index-DBdRFjxm.js} +232 -233
  32. package/dist/{index-BZ4vxviI.js → index-DFsSvmMZ.js} +5 -5
  33. package/dist/index-DslzOSGN.js +2549 -0
  34. package/dist/{index-DD4qF7gq.js → index-DvpYvchM.js} +101 -100
  35. package/dist/index.d.ts +784 -163
  36. package/dist/index.js +532 -454
  37. package/dist/js-yaml-CvhD-clg.js +1335 -0
  38. package/dist/{llmProviderPayload-CzihkdNa.js → llmProviderPayload-BPzWDy7n.js} +2 -2
  39. package/package.json +1 -1
  40. package/dist/CatalogKindListing-DtFI2YMG.js +0 -118
  41. package/dist/EnvironmentCard-09h1XRxx.js +0 -310
  42. package/dist/PolicyListSection-o4k9e8XO.js +0 -2475
  43. package/dist/index-CGDYgUCH.js +0 -711
  44. package/dist/index-COt7nJIf.js +0 -2286
  45. package/dist/index-CWZjOy1h.js +0 -2247
  46. package/dist/index-CezvogTQ.js +0 -116
  47. package/dist/index-CjCkcuuI.js +0 -322
  48. package/dist/index-CjXvuf9m.js +0 -1354
  49. package/dist/index-DeQ-9KTC.js +0 -737
  50. package/dist/index-Df6OBy4E.js +0 -3041
  51. package/dist/index-PUuASE1F.js +0 -2507
@@ -1,116 +0,0 @@
1
- import { jsx as a, jsxs as C } from "react/jsx-runtime";
2
- import { useMemo as l, useCallback as m, useState as F, useEffect as G } from "react";
3
- import { useParams as Y, useSearchParams as q } from "react-router-dom";
4
- import { aS as X, T as r, aV as Z, aW as J, P as K, O as Q, aU as $ } from "./index-B_Z0MwXk.js";
5
- import "react/compiler-runtime";
6
- import "@tanstack/react-query";
7
- import { Stack as ee, Select as se, MenuItem as ae, Checkbox as te, ListItemText as oe, InputAdornment as ne, IconButton as A, CircularProgress as re } from "@wso2/oxygen-ui";
8
- import { Filter as le, SortDesc as ce, SortAsc as ie, RefreshCcw as me, Logs as de } from "@wso2/oxygen-ui-icons-react";
9
- import { E as ge } from "./EnvironmentSelector-B7Bl93s2.js";
10
- const he = ["DEBUG", "INFO", "WARN", "ERROR"], ue = [{
11
- value: r.TEN_MINUTES,
12
- label: "10 Minutes"
13
- }, {
14
- value: r.THIRTY_MINUTES,
15
- label: "30 Minutes"
16
- }, {
17
- value: r.ONE_HOUR,
18
- label: "1 Hour"
19
- }, {
20
- value: r.SIX_HOURS,
21
- label: "6 Hours"
22
- }, {
23
- value: r.TWELVE_HOURS,
24
- label: "12 Hours"
25
- }, {
26
- value: r.ONE_DAY,
27
- label: "1 Day"
28
- }, {
29
- value: r.SEVEN_DAYS,
30
- label: "7 Days"
31
- }], pe = 300, Le = 2e3, w = () => {
32
- const {
33
- agentId: p,
34
- orgId: L,
35
- projectId: S,
36
- envId: R
37
- } = Y(), [s, n] = q(), {
38
- customStartTime: g,
39
- customEndTime: h,
40
- hasCustomRange: c,
41
- handleCustomRangeApply: D
42
- } = X(s, n), u = l(() => c ? void 0 : Object.values(r).includes(s.get("timeRange") ?? "") ? s.get("timeRange") : r.ONE_HOUR, [s, c]), o = l(() => s.get("sortOrder") || "desc", [s]), d = l(() => s.get("search") || "", [s]), i = l(() => {
43
- const e = s.get("logLevels");
44
- return e ? e.split(",").filter(Boolean) : [];
45
- }, [s]), x = m((e) => {
46
- const t = new URLSearchParams(s);
47
- e.length === 0 ? t.delete("logLevels") : t.set("logLevels", e.join(",")), n(t);
48
- }, [s, n]), [E, v] = F(d), T = l(() => Z.debounce((e) => v(e), Le), [v]);
49
- G(() => {
50
- T(d);
51
- }, [T, d]);
52
- const M = l(() => ({
53
- environmentName: R ?? "",
54
- timeRange: u,
55
- startTime: c ? g : void 0,
56
- endTime: c ? h : void 0,
57
- sortOrder: o,
58
- searchPhrase: E,
59
- logLevels: i.length > 0 ? i : void 0
60
- }), [R, u, c, g, h, o, E, i]), z = l(() => ({
61
- agentName: p,
62
- orgName: L,
63
- projName: S
64
- }), [p, L, S]), {
65
- logs: y,
66
- error: H,
67
- isLoading: j,
68
- isRefetching: O,
69
- refetch: f,
70
- isLoadingOlder: I,
71
- isLoadingNewer: N,
72
- loadOlder: P,
73
- loadNewer: _,
74
- hasMoreOlder: U,
75
- hasMoreNewer: b
76
- } = J(z, M, {
77
- refetchInterval: !1,
78
- pageSize: pe
79
- }), k = m(() => {
80
- f();
81
- }, [f]), V = m((e) => {
82
- const t = new URLSearchParams(s);
83
- t.set("search", e), n(t);
84
- }, [s, n]), W = m((e) => {
85
- const t = new URLSearchParams(s);
86
- t.set("timeRange", e), t.delete("startTime"), t.delete("endTime"), n(t);
87
- }, [s, n]), B = m((e) => {
88
- const t = new URLSearchParams(s);
89
- t.set("sortOrder", e), n(t);
90
- }, [s, n]);
91
- return /* @__PURE__ */ a(K, { title: "Runtime Logs", disableIcon: !0, actions: /* @__PURE__ */ C(ee, { direction: "row", spacing: 2, alignItems: "center", flexWrap: "wrap", children: [
92
- /* @__PURE__ */ a(ge, {}),
93
- /* @__PURE__ */ a(se, { size: "small", variant: "outlined", multiple: !0, value: i, onChange: (e) => x(e.target.value), displayEmpty: !0, renderValue: (e) => e.length === 0 ? "All Levels" : e.join(", "), startAdornment: /* @__PURE__ */ a(ne, { position: "start", children: /* @__PURE__ */ a(le, { size: 16 }) }), sx: {
94
- minWidth: 150
95
- }, children: he.map((e) => /* @__PURE__ */ C(ae, { value: e, children: [
96
- /* @__PURE__ */ a(te, { checked: i.includes(e), size: "small" }),
97
- /* @__PURE__ */ a(oe, { primary: e })
98
- ] }, e)) }),
99
- /* @__PURE__ */ a($, { preset: u, customStart: g, customEnd: h, options: ue, onPresetChange: W, onCustomRangeApply: D }),
100
- /* @__PURE__ */ a(A, { size: "small", onClick: () => B(o === "desc" ? "asc" : "desc"), "aria-label": o === "desc" ? "Sort ascending" : "Sort descending", children: o === "desc" ? /* @__PURE__ */ a(ce, { size: 16 }) : /* @__PURE__ */ a(ie, { size: 16 }) }),
101
- /* @__PURE__ */ a(A, { size: "small", disabled: O, onClick: k, "aria-label": "Refresh", children: O ? /* @__PURE__ */ a(re, { size: 16 }) : /* @__PURE__ */ a(me, { size: 16 }) })
102
- ] }), children: /* @__PURE__ */ a(Q, { logs: y, isLoading: j, error: H, isLoadingUp: o === "asc" ? N : I, isLoadingDown: o === "asc" ? I : N, hasMoreUp: o === "asc" ? b : U, hasMoreDown: o === "asc" ? U : b, onLoadUp: o === "asc" ? _ : P, onLoadDown: o === "asc" ? P : _, onSearch: V, search: d }) });
103
- }, Pe = {
104
- title: "Runtime Logs",
105
- description: "A page component for Logs",
106
- icon: de,
107
- path: "/logs",
108
- component: w,
109
- levels: {
110
- component: w
111
- }
112
- };
113
- export {
114
- w as LogsComponent,
115
- Pe as metaData
116
- };
@@ -1,322 +0,0 @@
1
- import { jsx as i, jsxs as w } from "react/jsx-runtime";
2
- import { c as Q } from "react/compiler-runtime";
3
- import { useParams as le, useSearchParams as me } from "react-router-dom";
4
- import { N as V, h as ce, aS as ue, T as v, c as de, d as he, aU as fe, P as ge } from "./index-B_Z0MwXk.js";
5
- import "@tanstack/react-query";
6
- import "react";
7
- import { useTheme as pe, Grid as F, Card as W, CardContent as Y, Skeleton as Z, Box as X, Stack as J, Typography as ee, Alert as ye, CardHeader as te, CircularProgress as ve, IconButton as be } from "@wso2/oxygen-ui";
8
- import { LineChart as se, ChartTooltip as ae } from "@wso2/oxygen-ui-charts-react";
9
- import { RefreshCcw as Re, PauseCircle as xe, BarChart3 as Se } from "@wso2/oxygen-ui-icons-react";
10
- import { E as Te } from "./EnvironmentSelector-B7Bl93s2.js";
11
- const $ = (e) => e / 1024 ** 3, ie = (e) => {
12
- const t = /* @__PURE__ */ new Map();
13
- return e.forEach(({
14
- key: s,
15
- points: n,
16
- transform: o
17
- }) => {
18
- n?.forEach((a) => {
19
- const l = t.get(a.time) ?? {
20
- time: a.time,
21
- label: ce(new Date(a.time), "MM/dd HH:mm")
22
- };
23
- t.set(a.time, {
24
- ...l,
25
- [s]: o ? o(a.value) : a.value
26
- });
27
- });
28
- }), Array.from(t.values()).sort((s, n) => new Date(s.time).getTime() - new Date(n.time).getTime());
29
- }, ne = (e) => {
30
- const t = Q(7), {
31
- active: s,
32
- payload: n,
33
- formatter: o
34
- } = e;
35
- if (!s || !n || n.length === 0)
36
- return null;
37
- let a;
38
- if (t[0] !== o || t[1] !== n) {
39
- let m;
40
- t[3] !== o ? (m = (r) => /* @__PURE__ */ w(J, { direction: "row", alignItems: "center", gap: 1, children: [
41
- /* @__PURE__ */ i(X, { sx: {
42
- width: 8,
43
- height: 8,
44
- borderRadius: "50%",
45
- bgcolor: r.color ?? "text.secondary"
46
- } }),
47
- /* @__PURE__ */ i(ee, { variant: "body2", color: "textSecondary", flex: 1, children: r.name ?? r.dataKey }),
48
- /* @__PURE__ */ i(ee, { variant: "body2", fontWeight: 600, children: typeof r.value == "number" && o ? o(r.value) : r.value ?? "--" })
49
- ] }, r.dataKey ?? r.name), t[3] = o, t[4] = m) : m = t[4], a = n.map(m), t[0] = o, t[1] = n, t[2] = a;
50
- } else
51
- a = t[2];
52
- let l;
53
- return t[5] !== a ? (l = /* @__PURE__ */ i(W, { variant: "outlined", children: /* @__PURE__ */ i(Y, { children: /* @__PURE__ */ i(J, { direction: "column", gap: 0.5, children: a }) }) }), t[5] = a, t[6] = l) : l = t[6], l;
54
- }, Ne = (e) => {
55
- const t = Q(27), {
56
- metrics: s,
57
- isLoading: n,
58
- error: o
59
- } = e, a = pe(), l = (s?.cpuUsage?.length ?? 0) > 0 || (s?.cpuRequests?.length ?? 0) > 0 || (s?.cpuLimits?.length ?? 0) > 0, m = (s?.memory?.length ?? 0) > 0 || (s?.memoryRequests?.length ?? 0) > 0 || (s?.memoryLimits?.length ?? 0) > 0;
60
- if (o) {
61
- const U = o instanceof Error ? o.message : "Failed to load metrics";
62
- let y;
63
- return t[0] !== U ? (y = /* @__PURE__ */ i(ye, { severity: "error", children: U }), t[0] = U, t[1] = y) : y = t[1], y;
64
- }
65
- let r;
66
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (r = {
67
- xs: 12,
68
- md: 6
69
- }, t[2] = r) : r = t[2];
70
- let c, b;
71
- t[3] === Symbol.for("react.memo_cache_sentinel") ? (c = {
72
- height: "100%"
73
- }, b = /* @__PURE__ */ i(te, { title: "CPU Usage" }), t[3] = c, t[4] = b) : (c = t[3], b = t[4]);
74
- let h;
75
- t[5] === Symbol.for("react.memo_cache_sentinel") ? (h = {
76
- display: "flex",
77
- flexDirection: "column",
78
- height: "100%",
79
- "& svg:focus, & svg:focus-visible, & [tabindex]:focus, & [tabindex]:focus-visible": {
80
- outline: "none"
81
- }
82
- }, t[5] = h) : h = t[5];
83
- let d;
84
- t[6] !== l || t[7] !== n || t[8] !== s?.cpuLimits || t[9] !== s?.cpuRequests || t[10] !== s?.cpuUsage || t[11] !== a ? (d = /* @__PURE__ */ i(F, { size: r, children: /* @__PURE__ */ w(W, { variant: "outlined", sx: c, children: [
85
- b,
86
- /* @__PURE__ */ i(Y, { sx: h, children: n ? /* @__PURE__ */ i(Z, { variant: "rounded", height: 260, width: "100%" }) : l ? /* @__PURE__ */ i(se, { data: ie([{
87
- key: "cpuUsage",
88
- points: s?.cpuUsage
89
- }, {
90
- key: "cpuRequests",
91
- points: s?.cpuRequests
92
- }, {
93
- key: "cpuLimits",
94
- points: s?.cpuLimits
95
- }]), xAxisDataKey: "label", tooltip: {
96
- show: !1
97
- }, xAxis: {
98
- show: !0,
99
- interval: "preserveStartEnd"
100
- }, yAxis: {
101
- show: !0,
102
- name: "Cores"
103
- }, syncId: "metricsSync", lines: [{
104
- dataKey: "cpuUsage",
105
- name: "Usage",
106
- stroke: a.palette.info.main,
107
- dot: !1,
108
- connectNulls: !0,
109
- unit: " cores"
110
- }, {
111
- dataKey: "cpuRequests",
112
- name: "Requests",
113
- stroke: a.palette.warning.main,
114
- dot: !1,
115
- connectNulls: !0,
116
- unit: " cores"
117
- }, {
118
- dataKey: "cpuLimits",
119
- name: "Limits",
120
- stroke: a.palette.error.main,
121
- dot: !1,
122
- connectNulls: !0,
123
- strokeDasharray: "0",
124
- unit: " cores"
125
- }], children: /* @__PURE__ */ i(ae, { content: /* @__PURE__ */ i(ne, { title: "CPU", formatter: _e }) }) }) : /* @__PURE__ */ i(X, { display: "flex", justifyContent: "center", alignItems: "center", height: 260, children: /* @__PURE__ */ i(V, { message: "No CPU metrics available", subtitle: "Try changing the time range", disableBackground: !0 }) }) })
126
- ] }) }), t[6] = l, t[7] = n, t[8] = s?.cpuLimits, t[9] = s?.cpuRequests, t[10] = s?.cpuUsage, t[11] = a, t[12] = d) : d = t[12];
127
- let f;
128
- t[13] === Symbol.for("react.memo_cache_sentinel") ? (f = {
129
- xs: 12,
130
- md: 6
131
- }, t[13] = f) : f = t[13];
132
- let x, g;
133
- t[14] === Symbol.for("react.memo_cache_sentinel") ? (x = {
134
- height: "100%"
135
- }, g = /* @__PURE__ */ i(te, { title: "Memory Usage" }), t[14] = x, t[15] = g) : (x = t[14], g = t[15]);
136
- let R;
137
- t[16] === Symbol.for("react.memo_cache_sentinel") ? (R = {
138
- display: "flex",
139
- flexDirection: "column",
140
- height: "100%",
141
- "& svg:focus, & svg:focus-visible, & [tabindex]:focus, & [tabindex]:focus-visible": {
142
- outline: "none"
143
- }
144
- }, t[16] = R) : R = t[16];
145
- let u;
146
- t[17] !== m || t[18] !== n || t[19] !== s?.memory || t[20] !== s?.memoryLimits || t[21] !== s?.memoryRequests || t[22] !== a ? (u = /* @__PURE__ */ i(F, { size: f, children: /* @__PURE__ */ w(W, { variant: "outlined", sx: x, children: [
147
- g,
148
- /* @__PURE__ */ i(Y, { sx: R, children: n ? /* @__PURE__ */ i(Z, { variant: "rounded", height: 260, width: "100%" }) : m ? /* @__PURE__ */ i(se, { data: ie([{
149
- key: "memoryUsage",
150
- points: s?.memory,
151
- transform: $
152
- }, {
153
- key: "memoryRequests",
154
- points: s?.memoryRequests,
155
- transform: $
156
- }, {
157
- key: "memoryLimits",
158
- points: s?.memoryLimits,
159
- transform: $
160
- }]), xAxisDataKey: "label", xAxis: {
161
- show: !0,
162
- interval: "preserveStartEnd"
163
- }, yAxis: {
164
- show: !0,
165
- name: "GiB"
166
- }, tooltip: {
167
- show: !1
168
- }, syncId: "metricsSync", lines: [{
169
- dataKey: "memoryUsage",
170
- name: "Usage",
171
- stroke: a.palette.info.main,
172
- dot: !1,
173
- connectNulls: !0,
174
- unit: " GB"
175
- }, {
176
- dataKey: "memoryRequests",
177
- name: "Requests",
178
- stroke: a.palette.warning.main,
179
- dot: !1,
180
- connectNulls: !0,
181
- unit: " GB"
182
- }, {
183
- dataKey: "memoryLimits",
184
- name: "Limits",
185
- stroke: a.palette.error.main,
186
- dot: !1,
187
- connectNulls: !0,
188
- strokeDasharray: "0",
189
- unit: " GB"
190
- }], children: /* @__PURE__ */ i(ae, { content: /* @__PURE__ */ i(ne, { title: "Memory", formatter: Ce }) }) }) : /* @__PURE__ */ i(X, { display: "flex", justifyContent: "center", alignItems: "center", height: 260, children: /* @__PURE__ */ i(V, { message: "No memory metrics available", subtitle: "Try changing the time range", disableBackground: !0 }) }) })
191
- ] }) }), t[17] = m, t[18] = n, t[19] = s?.memory, t[20] = s?.memoryLimits, t[21] = s?.memoryRequests, t[22] = a, t[23] = u) : u = t[23];
192
- let p;
193
- return t[24] !== u || t[25] !== d ? (p = /* @__PURE__ */ w(F, { container: !0, spacing: 3, children: [
194
- d,
195
- u
196
- ] }), t[24] = u, t[25] = d, t[26] = p) : p = t[26], p;
197
- };
198
- function _e(e) {
199
- return `${e.toFixed(3)} cores`;
200
- }
201
- function Ce(e) {
202
- return `${e.toFixed(2)} GB`;
203
- }
204
- const Ee = [{
205
- value: v.TEN_MINUTES,
206
- label: "10 Minutes"
207
- }, {
208
- value: v.THIRTY_MINUTES,
209
- label: "30 Minutes"
210
- }, {
211
- value: v.ONE_HOUR,
212
- label: "1 Hour"
213
- }, {
214
- value: v.SIX_HOURS,
215
- label: "6 Hours"
216
- }, {
217
- value: v.TWELVE_HOURS,
218
- label: "12 Hours"
219
- }, {
220
- value: v.ONE_DAY,
221
- label: "1 Day"
222
- }, {
223
- value: v.SEVEN_DAYS,
224
- label: "7 Days"
225
- }], re = () => {
226
- const e = Q(51), {
227
- agentId: t,
228
- orgId: s,
229
- projectId: n,
230
- envId: o
231
- } = le(), [a, l] = me(), {
232
- customStartTime: m,
233
- customEndTime: r,
234
- hasCustomRange: c,
235
- handleCustomRangeApply: b
236
- } = ue(a, l);
237
- let h;
238
- e[0] !== c || e[1] !== a ? (h = c ? void 0 : Object.values(v).includes(a.get("timeRange") ?? "") ? a.get("timeRange") : v.ONE_HOUR, e[0] = c, e[1] = a, e[2] = h) : h = e[2];
239
- const d = h;
240
- let f;
241
- e[3] !== t || e[4] !== s || e[5] !== n ? (f = {
242
- orgName: s,
243
- projName: n,
244
- agentName: t
245
- }, e[3] = t, e[4] = s, e[5] = n, e[6] = f) : f = e[6];
246
- const {
247
- data: x
248
- } = de(f), g = x === void 0 ? void 0 : x[o ?? ""]?.status === "suspended", R = o ?? "";
249
- let u;
250
- e[7] !== r || e[8] !== m || e[9] !== c ? (u = c ? {
251
- startTime: m,
252
- endTime: r
253
- } : {}, e[7] = r, e[8] = m, e[9] = c, e[10] = u) : u = e[10];
254
- let p;
255
- e[11] !== R || e[12] !== u ? (p = {
256
- environmentName: R,
257
- ...u
258
- }, e[11] = R, e[12] = u, e[13] = p) : p = e[13];
259
- const U = p;
260
- let y;
261
- e[14] !== t || e[15] !== s || e[16] !== n ? (y = {
262
- agentName: t,
263
- orgName: s,
264
- projName: n
265
- }, e[14] = t, e[15] = s, e[16] = n, e[17] = y) : y = e[17];
266
- const q = g === !1 && !!t && !!s && !!n && !!o && (c || !!d), P = !c, H = c ? void 0 : d;
267
- let L;
268
- e[18] !== q || e[19] !== P || e[20] !== H ? (L = {
269
- enabled: q,
270
- enableAutoRefresh: P,
271
- timeRange: H
272
- }, e[18] = q, e[19] = P, e[20] = H, e[21] = L) : L = e[21];
273
- const {
274
- data: B,
275
- error: K,
276
- isLoading: O,
277
- isRefetching: S,
278
- refetch: G
279
- } = he(y, U, L);
280
- let k;
281
- e[22] !== G ? (k = () => {
282
- G();
283
- }, e[22] = G, e[23] = k) : k = e[23];
284
- const j = k;
285
- let D;
286
- e[24] !== a || e[25] !== l ? (D = (oe) => {
287
- const A = new URLSearchParams(a);
288
- A.set("timeRange", oe), A.delete("startTime"), A.delete("endTime"), l(A);
289
- }, e[24] = a, e[25] = l, e[26] = D) : D = e[26];
290
- const z = D;
291
- let M;
292
- e[27] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ i(Te, {}), e[27] = M) : M = e[27];
293
- let T;
294
- e[28] !== r || e[29] !== m || e[30] !== b || e[31] !== z || e[32] !== d ? (T = /* @__PURE__ */ i(fe, { preset: d, customStart: m, customEnd: r, options: Ee, onPresetChange: z, onCustomRangeApply: b }), e[28] = r, e[29] = m, e[30] = b, e[31] = z, e[32] = d, e[33] = T) : T = e[33];
295
- let N;
296
- e[34] !== S ? (N = S ? /* @__PURE__ */ i(ve, { size: 16 }) : /* @__PURE__ */ i(Re, { size: 16 }), e[34] = S, e[35] = N) : N = e[35];
297
- let _;
298
- e[36] !== j || e[37] !== S || e[38] !== N ? (_ = /* @__PURE__ */ i(be, { size: "small", disabled: S, onClick: j, "aria-label": "Refresh", children: N }), e[36] = j, e[37] = S, e[38] = N, e[39] = _) : _ = e[39];
299
- let C;
300
- e[40] !== T || e[41] !== _ ? (C = /* @__PURE__ */ w(J, { direction: "row", spacing: 2, alignItems: "center", flexWrap: "wrap", children: [
301
- M,
302
- T,
303
- _
304
- ] }), e[40] = T, e[41] = _, e[42] = C) : C = e[42];
305
- let E;
306
- e[43] !== K || e[44] !== O || e[45] !== g || e[46] !== B ? (E = g ? /* @__PURE__ */ i(V, { iconElement: xe, message: "Environment Suspended", subtitle: "Metrics are unavailable while the environment is suspended." }) : /* @__PURE__ */ i(Ne, { metrics: B, isLoading: O, error: K }), e[43] = K, e[44] = O, e[45] = g, e[46] = B, e[47] = E) : E = e[47];
307
- let I;
308
- return e[48] !== C || e[49] !== E ? (I = /* @__PURE__ */ i(ge, { title: "System Metrics", disableIcon: !0, actions: C, children: E }), e[48] = C, e[49] = E, e[50] = I) : I = e[50], I;
309
- }, He = {
310
- title: "System Metrics",
311
- description: "A page component for System Metrics",
312
- icon: Se,
313
- path: "/metrics",
314
- component: re,
315
- levels: {
316
- component: re
317
- }
318
- };
319
- export {
320
- re as MetricsComponent,
321
- He as metaData
322
- };