@cagatayfdn/flora-components 0.0.165 → 0.0.166
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/ErrorLogModal-DJd2j2Qz.js +611 -0
- package/dist/components/ErrorLogModal/ErrorLogModal.js +1 -1
- package/dist/components/RealtimeLogModal/RealtimeLogModal.js +3 -2
- package/dist/components/Table/Table.js +273 -210
- package/dist/components/index.js +1 -1
- package/dist/index-Bkqwn3Ht.js +3311 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1 -1
- package/dist/main.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/table.js +1 -1
- package/package.json +1 -1
- package/dist/ErrorLogModal-CQFdcFKP.js +0 -3700
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { useRef as z, useState as E, useEffect as ee } from "react";
|
|
3
|
+
import { c as F } from "./index-BHf7G3IG.js";
|
|
4
|
+
import "./hooks/useAauth.js";
|
|
5
|
+
import le from "./hooks/useNiceModal.js";
|
|
6
|
+
import "./components/Drawer/Provider.js";
|
|
7
|
+
import h from "./components/Icon/index.js";
|
|
8
|
+
import { N as ce } from "./index-H7XbDVmH.js";
|
|
9
|
+
import "./assets/images/500_error_2x.gif";
|
|
10
|
+
import S, { t as A } from "./locales/i18n.js";
|
|
11
|
+
import "./components/Tooltip/Tooltip.js";
|
|
12
|
+
import "./react-toastify.esm-BUWNP7Nm.js";
|
|
13
|
+
import oe from "./utils/date.js";
|
|
14
|
+
import Ne from "./components/Input/Input.js";
|
|
15
|
+
import Ee from "./components/ScrollContainer/ScrollContainer.js";
|
|
16
|
+
import "./components/Charts/index.js";
|
|
17
|
+
import "./components/Checkbox/Checkbox.js";
|
|
18
|
+
import "./components/Confirm/Confirm.js";
|
|
19
|
+
import "./components/Datepicker/Datepicker.js";
|
|
20
|
+
import te from "./components/Divider/Divider.js";
|
|
21
|
+
import "./components/FileUpload/FileUpload.js";
|
|
22
|
+
import de from "./components/Modal/Modal.js";
|
|
23
|
+
import ne from "./components/Grid/Column.js";
|
|
24
|
+
import Se from "./components/Grid/Row.js";
|
|
25
|
+
import Q from "./components/InfoDate/InfoDate.js";
|
|
26
|
+
import { q as Re } from "./index-Bkqwn3Ht.js";
|
|
27
|
+
import { d as J } from "./helper-1SQ9SI45.js";
|
|
28
|
+
import { startFetcher as Be } from "./utils/fetcher.js";
|
|
29
|
+
import "./utils/yup.js";
|
|
30
|
+
import { FloraIcons as R } from "./assets/icons/flora-icons.js";
|
|
31
|
+
import P from "./components/IconBox/IconBox.js";
|
|
32
|
+
import { S as Me } from "./Select-nhp2PiJK.js";
|
|
33
|
+
import $e from "./components/StatusTag/StatusTag.js";
|
|
34
|
+
import "./components/Switch/Switch.js";
|
|
35
|
+
import "./components/Textarea/Textarea.js";
|
|
36
|
+
import "./utils/test.js";
|
|
37
|
+
import { AppearanceButton as se, NotificationAppearanceType as He } from "./enums/appearance.js";
|
|
38
|
+
import re from "./components/Button/Button.js";
|
|
39
|
+
import { Notification as We } from "./components/Notification/Notification.js";
|
|
40
|
+
import './ReactToastify.css';import './ErrorLogModal.css';/* empty css */
|
|
41
|
+
import { u as Ge } from "./useTranslation-CnCPcxVj.js";
|
|
42
|
+
import { T as qe } from "./Trans-B4ILpbwK.js";
|
|
43
|
+
const Ae = "_realTimeLogModalStyle_ew0yg_1", Pe = "_modalLeft_ew0yg_30", Fe = "_buttonGroup_ew0yg_37", De = "_iosIcon_ew0yg_48", H = {
|
|
44
|
+
realTimeLogModalStyle: Ae,
|
|
45
|
+
modalLeft: Pe,
|
|
46
|
+
buttonGroup: Fe,
|
|
47
|
+
iosIcon: De
|
|
48
|
+
}, Ke = "_realTimeLogModalStyle_1f0fd_2", Ue = "_customHeader_1f0fd_10", Ye = "_modalHeader_1f0fd_18", ze = "_modalLeft_1f0fd_38", Je = "_buttonGroup_1f0fd_45", Qe = "_iosIcon_1f0fd_56", Ve = "_modalLoader_1f0fd_86", Xe = "_dash_1f0fd_90", Ze = "_searchWrapper_1f0fd_95", Oe = "_chevronIcons_1f0fd_101", eo = "_logInput_1f0fd_123", oo = "_searchResult_1f0fd_130", to = "_loadingWrap_1f0fd_140", no = "_modalRight_1f0fd_151", so = "_inputsWrapper_1f0fd_155", ro = "_search_1f0fd_95", ao = "_cliCommand_1f0fd_172", lo = "_buttonsWrapper_1f0fd_198", co = "_downloadIconBtn_1f0fd_204", io = "_downloadIconBtn__disabled_1f0fd_228", mo = "_copyIconBtn_1f0fd_238", uo = "_copyIconBtn__disabled_1f0fd_262", po = "_iconGroup_1f0fd_272", fo = "_activeIcon_1f0fd_284", l = {
|
|
49
|
+
realTimeLogModalStyle: Ke,
|
|
50
|
+
customHeader: Ue,
|
|
51
|
+
modalHeader: Ye,
|
|
52
|
+
modalLeft: ze,
|
|
53
|
+
buttonGroup: Je,
|
|
54
|
+
iosIcon: Qe,
|
|
55
|
+
modalLoader: Ve,
|
|
56
|
+
dash: Xe,
|
|
57
|
+
searchWrapper: Ze,
|
|
58
|
+
chevronIcons: Oe,
|
|
59
|
+
logInput: eo,
|
|
60
|
+
searchResult: oo,
|
|
61
|
+
loadingWrap: to,
|
|
62
|
+
modalRight: no,
|
|
63
|
+
inputsWrapper: so,
|
|
64
|
+
search: ro,
|
|
65
|
+
cliCommand: ao,
|
|
66
|
+
buttonsWrapper: lo,
|
|
67
|
+
downloadIconBtn: co,
|
|
68
|
+
downloadIconBtn__disabled: io,
|
|
69
|
+
copyIconBtn: mo,
|
|
70
|
+
copyIconBtn__disabled: uo,
|
|
71
|
+
iconGroup: po,
|
|
72
|
+
activeIcon: fo
|
|
73
|
+
}, at = {
|
|
74
|
+
status: (d) => ({
|
|
75
|
+
title: S.t("label.status"),
|
|
76
|
+
dataIndex: "status",
|
|
77
|
+
className: "capitalize",
|
|
78
|
+
render: (i) => /* @__PURE__ */ o.jsx($e, { status: d[i], text: i })
|
|
79
|
+
}),
|
|
80
|
+
dateCreated: {
|
|
81
|
+
title: S.t("label.date_created"),
|
|
82
|
+
dataIndex: "created_date",
|
|
83
|
+
render: (d) => /* @__PURE__ */ o.jsx(Q, { date: d })
|
|
84
|
+
}
|
|
85
|
+
}, lt = {
|
|
86
|
+
edit: (d, i) => ({
|
|
87
|
+
title: S.t("label.edit"),
|
|
88
|
+
dataIndex: d,
|
|
89
|
+
render: (f, g) => /* @__PURE__ */ o.jsx(P, { icon: R.Edit, onClick: () => i(f, g) })
|
|
90
|
+
}),
|
|
91
|
+
delete: (d, i) => ({
|
|
92
|
+
title: S.t("label.delete"),
|
|
93
|
+
dataIndex: d,
|
|
94
|
+
render: (f, g) => /* @__PURE__ */ o.jsx(P, { icon: R.Trash, onClick: () => i(f, g) })
|
|
95
|
+
}),
|
|
96
|
+
download: (d, i) => ({
|
|
97
|
+
title: S.t("label.export"),
|
|
98
|
+
dataIndex: d,
|
|
99
|
+
render: (f, g) => /* @__PURE__ */ o.jsx(P, { icon: R.Download, onClick: () => i(f, g) })
|
|
100
|
+
}),
|
|
101
|
+
detail: (d, i) => ({
|
|
102
|
+
title: S.t("label.detail"),
|
|
103
|
+
dataIndex: d,
|
|
104
|
+
render: (f, g) => /* @__PURE__ */ o.jsx(P, { icon: R.Link, onClick: () => i(f, g) })
|
|
105
|
+
})
|
|
106
|
+
}, ae = 200, go = 100, xo = (d) => {
|
|
107
|
+
const {
|
|
108
|
+
onClose: i,
|
|
109
|
+
projectPk: f,
|
|
110
|
+
interval: g,
|
|
111
|
+
appPk: B,
|
|
112
|
+
logTypes: N,
|
|
113
|
+
logs: W,
|
|
114
|
+
minLineLimit: k,
|
|
115
|
+
responseCount: b,
|
|
116
|
+
lastLogIndex: m = 0,
|
|
117
|
+
download: ie,
|
|
118
|
+
onFetchLogs: me,
|
|
119
|
+
onClearLogs: ue,
|
|
120
|
+
withoutPermission: pe
|
|
121
|
+
} = d, j = z(null), [, fe] = le(d.id), [G, ge] = E(!1), [I, xe] = E(), [y, V] = E(""), [x, he] = E(), [M, D] = E(0), C = W || [], K = b === void 0, _e = (e, t, r, n) => {
|
|
122
|
+
const s = {
|
|
123
|
+
applications: [t || N[0].value],
|
|
124
|
+
scroll_mode: e || void 0
|
|
125
|
+
};
|
|
126
|
+
console.group("getLogs called with params:"), console.log("direction", e), console.log("selectedApp", t), console.log("onSuccess", r), console.log("onError", n), console.log("body", s), console.groupEnd(), me({ projectPk: f, appPk: B, applications: s.applications, scroll_mode: s.scroll_mode, withoutPermission: pe }).then(
|
|
127
|
+
(c) => {
|
|
128
|
+
var a, p, L;
|
|
129
|
+
if (c && ((L = (p = (a = Object == null ? void 0 : Object.prototype) == null ? void 0 : a.hasOwnProperty) == null ? void 0 : p.call) != null && L.call(p, c, "error"))) {
|
|
130
|
+
console.log("onError", c, n), n && n();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
r && r();
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
function Ie(e) {
|
|
138
|
+
let t = 0;
|
|
139
|
+
const r = {};
|
|
140
|
+
return e.forEach((n, s) => {
|
|
141
|
+
const c = n.message.match(/<mark\b[^>]*>/g);
|
|
142
|
+
t += c ? c.length : 0, c && (r[s] = c);
|
|
143
|
+
}), { total: t, filteredLogs: r };
|
|
144
|
+
}
|
|
145
|
+
const ve = Be(_e, g * 1e3), X = z(), u = z(ve), we = (e, t, r, n) => {
|
|
146
|
+
if (!t || t.length < 1)
|
|
147
|
+
return e;
|
|
148
|
+
let s = e;
|
|
149
|
+
if (n.group)
|
|
150
|
+
if (n.regex) {
|
|
151
|
+
let a;
|
|
152
|
+
try {
|
|
153
|
+
a = new RegExp(
|
|
154
|
+
t,
|
|
155
|
+
n.caseSensitive ? "g" : "gi"
|
|
156
|
+
);
|
|
157
|
+
} catch {
|
|
158
|
+
return e;
|
|
159
|
+
}
|
|
160
|
+
s = e.filter((p) => a.test(p.message));
|
|
161
|
+
} else
|
|
162
|
+
n.caseSensitive ? s = e.filter(
|
|
163
|
+
(a) => a.message.includes(t)
|
|
164
|
+
) : s = e.filter(
|
|
165
|
+
(a) => a.message.toLocaleLowerCase().includes(t.toLocaleLowerCase())
|
|
166
|
+
);
|
|
167
|
+
return s.map((a, p) => ({
|
|
168
|
+
...a,
|
|
169
|
+
message: je(a.message, t, n, p) + `
|
|
170
|
+
`
|
|
171
|
+
}));
|
|
172
|
+
}, je = (e, t, r, n) => {
|
|
173
|
+
if (!t)
|
|
174
|
+
return e;
|
|
175
|
+
try {
|
|
176
|
+
if (r.regex) {
|
|
177
|
+
let s;
|
|
178
|
+
const c = t.match(/^\/(.+)\/([gimsuy]*)$/);
|
|
179
|
+
return c ? s = new RegExp(c[1], c[2]) : s = new RegExp(
|
|
180
|
+
t,
|
|
181
|
+
r.caseSensitive ? "g" : "gi"
|
|
182
|
+
), e.replace(
|
|
183
|
+
s,
|
|
184
|
+
(a) => `<mark data-mark-index="${n}">${a}</mark>`
|
|
185
|
+
);
|
|
186
|
+
} else {
|
|
187
|
+
if (r.caseSensitive)
|
|
188
|
+
return e.split(t).join(`<mark data-mark-index="${n}">${t}</mark>`);
|
|
189
|
+
{
|
|
190
|
+
const s = new RegExp(t, "gi");
|
|
191
|
+
return e.replace(
|
|
192
|
+
s,
|
|
193
|
+
(c) => `<mark data-mark-index="${n}">${c}</mark>`
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
} catch {
|
|
198
|
+
return e;
|
|
199
|
+
}
|
|
200
|
+
}, Le = () => {
|
|
201
|
+
V("");
|
|
202
|
+
}, ke = () => {
|
|
203
|
+
ge(!G);
|
|
204
|
+
}, be = () => {
|
|
205
|
+
let e = "";
|
|
206
|
+
C.forEach((t) => {
|
|
207
|
+
e += t.message;
|
|
208
|
+
}), We({
|
|
209
|
+
type: He.SUCCESS,
|
|
210
|
+
message: A("text.copied"),
|
|
211
|
+
closeTime: 3e3
|
|
212
|
+
}), navigator.clipboard.writeText(e);
|
|
213
|
+
}, U = (e, t) => {
|
|
214
|
+
e.currentTarget.classList.toggle(l.activeIcon), he({
|
|
215
|
+
...x,
|
|
216
|
+
[t]: !(x != null && x[t])
|
|
217
|
+
});
|
|
218
|
+
}, ye = (e) => {
|
|
219
|
+
var t, r;
|
|
220
|
+
xe(e), clearTimeout(X.current), (t = u.current) == null || t.stopInterval(), (r = u.current) == null || r.fetch(void 0, e), J(() => {
|
|
221
|
+
var n;
|
|
222
|
+
(n = j.current) == null || n.scrollToIndex({ index: "LAST" });
|
|
223
|
+
}, 300)();
|
|
224
|
+
}, Z = (e) => {
|
|
225
|
+
e.classList.add(l.selectedMark);
|
|
226
|
+
}, q = (e) => {
|
|
227
|
+
Array.from(e).forEach(
|
|
228
|
+
(t) => t.classList.remove(l.selectedMark)
|
|
229
|
+
);
|
|
230
|
+
}, Ce = (e, t, r) => {
|
|
231
|
+
var c;
|
|
232
|
+
let n = e - 1;
|
|
233
|
+
n < 1 && (n = t), D(n);
|
|
234
|
+
let s = 0;
|
|
235
|
+
for (const a in r) {
|
|
236
|
+
const p = r[a];
|
|
237
|
+
if (s + p.length >= n) {
|
|
238
|
+
const L = n - s - 1;
|
|
239
|
+
(c = j.current) == null || c.scrollToIndex({ index: Number(a) });
|
|
240
|
+
const $ = document.querySelector(
|
|
241
|
+
`[data-index="${Number(a) + 1}"]`
|
|
242
|
+
);
|
|
243
|
+
if ($) {
|
|
244
|
+
const w = $.getElementsByTagName("mark");
|
|
245
|
+
q(w);
|
|
246
|
+
}
|
|
247
|
+
J(() => {
|
|
248
|
+
const w = document.querySelector(
|
|
249
|
+
`[data-index="${a}"]`
|
|
250
|
+
);
|
|
251
|
+
if (w) {
|
|
252
|
+
const T = w.getElementsByTagName("mark");
|
|
253
|
+
T[L] && (q(T), Z(T[L]));
|
|
254
|
+
}
|
|
255
|
+
}, 300)();
|
|
256
|
+
break;
|
|
257
|
+
} else
|
|
258
|
+
s += p.length;
|
|
259
|
+
}
|
|
260
|
+
}, O = (e, t, r) => {
|
|
261
|
+
var c;
|
|
262
|
+
let n = e + 1;
|
|
263
|
+
n > t && (n = 1), D(n);
|
|
264
|
+
let s = 0;
|
|
265
|
+
for (const a in r) {
|
|
266
|
+
const p = r[a];
|
|
267
|
+
if (s + p.length >= n) {
|
|
268
|
+
const L = n - s - 1;
|
|
269
|
+
(c = j.current) == null || c.scrollToIndex({ index: Number(a) });
|
|
270
|
+
const $ = document.querySelector(
|
|
271
|
+
`[data-index="${Number(a) - 1}"]`
|
|
272
|
+
);
|
|
273
|
+
if ($) {
|
|
274
|
+
const w = $.getElementsByTagName("mark");
|
|
275
|
+
q(w);
|
|
276
|
+
}
|
|
277
|
+
J(() => {
|
|
278
|
+
const w = document.querySelector(
|
|
279
|
+
`[data-index="${a}"]`
|
|
280
|
+
);
|
|
281
|
+
if (w) {
|
|
282
|
+
const T = w.getElementsByTagName("mark");
|
|
283
|
+
T[L] && (q(T), Z(T[L]));
|
|
284
|
+
}
|
|
285
|
+
}, 300)();
|
|
286
|
+
break;
|
|
287
|
+
} else
|
|
288
|
+
s += p.length;
|
|
289
|
+
}
|
|
290
|
+
}, _ = we(C, y, u, {
|
|
291
|
+
regex: x == null ? void 0 : x.regex,
|
|
292
|
+
caseSensitive: x == null ? void 0 : x.caseSensitive,
|
|
293
|
+
group: x == null ? void 0 : x.group
|
|
294
|
+
}), v = Ie(_), Y = (e) => {
|
|
295
|
+
e.key === "Enter" && O(
|
|
296
|
+
M,
|
|
297
|
+
v.total,
|
|
298
|
+
v.filteredLogs
|
|
299
|
+
);
|
|
300
|
+
}, Te = (e, t) => /* @__PURE__ */ o.jsx(
|
|
301
|
+
"div",
|
|
302
|
+
{
|
|
303
|
+
"data-index": e,
|
|
304
|
+
dangerouslySetInnerHTML: { __html: t.message }
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
return ee(() => {
|
|
308
|
+
var r;
|
|
309
|
+
const e = () => {
|
|
310
|
+
var n;
|
|
311
|
+
console.log("onSuccessFirstRequest"), (n = u.current) == null || n.startInterval("newer", I);
|
|
312
|
+
}, t = () => {
|
|
313
|
+
var n;
|
|
314
|
+
console.log("onErrorFirstRequest"), (n = u.current) == null || n.startInterval(void 0, I);
|
|
315
|
+
};
|
|
316
|
+
return (r = u.current) == null || r.fetch(void 0, I, e, t), () => {
|
|
317
|
+
clearTimeout(X.current), u.current.stopInterval(), ue();
|
|
318
|
+
};
|
|
319
|
+
}, []), ee(() => (window.removeEventListener("keydown", Y), window.addEventListener("keydown", Y), () => {
|
|
320
|
+
window.removeEventListener("keydown", Y);
|
|
321
|
+
}), [M, v.total, v.filteredLogs]), /* @__PURE__ */ o.jsx(
|
|
322
|
+
de,
|
|
323
|
+
{
|
|
324
|
+
visible: !0,
|
|
325
|
+
showClose: !1,
|
|
326
|
+
onClose: () => {
|
|
327
|
+
},
|
|
328
|
+
className: F(l.realTimeLogModalStyle, {
|
|
329
|
+
"w-[90%]!": !G,
|
|
330
|
+
"w-full! h-full!": G
|
|
331
|
+
}),
|
|
332
|
+
headerClass: l.customHeader,
|
|
333
|
+
header: /* @__PURE__ */ o.jsxs("div", { className: l.modalHeader, children: [
|
|
334
|
+
/* @__PURE__ */ o.jsxs("div", { className: l.modalLeft, children: [
|
|
335
|
+
/* @__PURE__ */ o.jsxs("div", { className: l.buttonGroup, children: [
|
|
336
|
+
/* @__PURE__ */ o.jsx(
|
|
337
|
+
"div",
|
|
338
|
+
{
|
|
339
|
+
className: l.iosIcon,
|
|
340
|
+
onClick: () => {
|
|
341
|
+
i && i(), fe();
|
|
342
|
+
},
|
|
343
|
+
children: /* @__PURE__ */ o.jsx(h, { name: "close-window" })
|
|
344
|
+
}
|
|
345
|
+
),
|
|
346
|
+
/* @__PURE__ */ o.jsx("div", { className: l.iosIcon, onClick: ke, children: /* @__PURE__ */ o.jsx(h, { name: "expand-window" }) })
|
|
347
|
+
] }),
|
|
348
|
+
/* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsx(
|
|
349
|
+
Me,
|
|
350
|
+
{
|
|
351
|
+
name: "logTypeSelect",
|
|
352
|
+
style: { height: 39 },
|
|
353
|
+
wrapperClassName: l.logSelect,
|
|
354
|
+
value: I,
|
|
355
|
+
items: N,
|
|
356
|
+
searchable: !1,
|
|
357
|
+
placeholder: `${A("placeholder.selected_log_type")}: ${N[0].label}`,
|
|
358
|
+
itemPrefix: `${A("placeholder.selected_log_type")}: `,
|
|
359
|
+
onChange: (e) => {
|
|
360
|
+
ye(e);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
) }),
|
|
364
|
+
/* @__PURE__ */ o.jsxs("div", { className: l.searchWrapper, children: [
|
|
365
|
+
/* @__PURE__ */ o.jsx(
|
|
366
|
+
Ne,
|
|
367
|
+
{
|
|
368
|
+
name: "logSearch",
|
|
369
|
+
type: "text",
|
|
370
|
+
placeholder: A("placeholder.search"),
|
|
371
|
+
isFormGroup: !1,
|
|
372
|
+
value: y,
|
|
373
|
+
className: l.logInput,
|
|
374
|
+
prefixClickable: !0,
|
|
375
|
+
suffixClickable: !0,
|
|
376
|
+
onChange: (e) => {
|
|
377
|
+
var t;
|
|
378
|
+
V(e.target.value), e.target.value.length > 1 && ((t = u.current) == null || t.stopInterval()), D(0);
|
|
379
|
+
},
|
|
380
|
+
prefix: /* @__PURE__ */ o.jsxs("div", { className: l.iconGroup, children: [
|
|
381
|
+
/* @__PURE__ */ o.jsx(
|
|
382
|
+
h,
|
|
383
|
+
{
|
|
384
|
+
name: "group",
|
|
385
|
+
onClick: (e) => {
|
|
386
|
+
U(e, "group");
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
),
|
|
390
|
+
/* @__PURE__ */ o.jsx(
|
|
391
|
+
h,
|
|
392
|
+
{
|
|
393
|
+
name: "case-sensitive",
|
|
394
|
+
onClick: (e) => {
|
|
395
|
+
U(e, "caseSensitive");
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
),
|
|
399
|
+
/* @__PURE__ */ o.jsx(
|
|
400
|
+
h,
|
|
401
|
+
{
|
|
402
|
+
name: "regex",
|
|
403
|
+
onClick: (e) => {
|
|
404
|
+
U(e, "regex");
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
] }),
|
|
409
|
+
suffix: y.length > 0 ? /* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsx(h, { onClick: Le, name: "close" }) }) : /* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsx(h, { name: "search" }) })
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
/* @__PURE__ */ o.jsxs("div", { className: l.searchResult, children: [
|
|
413
|
+
y.length > 0 ? M : 0,
|
|
414
|
+
/* @__PURE__ */ o.jsxs("span", { children: [
|
|
415
|
+
"/",
|
|
416
|
+
y.length > 0 ? v.total : 0
|
|
417
|
+
] })
|
|
418
|
+
] }),
|
|
419
|
+
/* @__PURE__ */ o.jsxs("div", { className: l.chevronIcons, children: [
|
|
420
|
+
/* @__PURE__ */ o.jsx(
|
|
421
|
+
h,
|
|
422
|
+
{
|
|
423
|
+
name: "chevron-left",
|
|
424
|
+
onClick: () => {
|
|
425
|
+
O(
|
|
426
|
+
M,
|
|
427
|
+
v.total,
|
|
428
|
+
v.filteredLogs
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
),
|
|
433
|
+
/* @__PURE__ */ o.jsx(
|
|
434
|
+
h,
|
|
435
|
+
{
|
|
436
|
+
name: "chevron-left",
|
|
437
|
+
onClick: () => {
|
|
438
|
+
Ce(
|
|
439
|
+
M,
|
|
440
|
+
v.total,
|
|
441
|
+
v.filteredLogs
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
)
|
|
446
|
+
] })
|
|
447
|
+
] })
|
|
448
|
+
] }),
|
|
449
|
+
/* @__PURE__ */ o.jsx("div", { className: l.modalRight, children: /* @__PURE__ */ o.jsxs("div", { className: l.buttonsWrapper, children: [
|
|
450
|
+
/* @__PURE__ */ o.jsx(
|
|
451
|
+
re,
|
|
452
|
+
{
|
|
453
|
+
appearance: se.PRIMARY,
|
|
454
|
+
className: F(l.downloadIconBtn, {
|
|
455
|
+
[l.downloadIconBtn__disabled]: C.length === 0
|
|
456
|
+
}),
|
|
457
|
+
onClick: () => {
|
|
458
|
+
var e;
|
|
459
|
+
return ie(
|
|
460
|
+
{
|
|
461
|
+
applications: [
|
|
462
|
+
I || N[0].value
|
|
463
|
+
],
|
|
464
|
+
start_datetime: oe(
|
|
465
|
+
(e = C == null ? void 0 : C[0]) == null ? void 0 : e.log_timestamp
|
|
466
|
+
).format(),
|
|
467
|
+
end_datetime: oe().format()
|
|
468
|
+
},
|
|
469
|
+
!0
|
|
470
|
+
);
|
|
471
|
+
},
|
|
472
|
+
children: /* @__PURE__ */ o.jsx(h, { name: R.Download })
|
|
473
|
+
}
|
|
474
|
+
),
|
|
475
|
+
/* @__PURE__ */ o.jsx(
|
|
476
|
+
re,
|
|
477
|
+
{
|
|
478
|
+
appearance: se.PRIMARY,
|
|
479
|
+
className: F(l.copyIconBtn, {
|
|
480
|
+
[l.copyIconBtn__disabled]: C.length === 0
|
|
481
|
+
}),
|
|
482
|
+
onClick: be,
|
|
483
|
+
children: /* @__PURE__ */ o.jsx(h, { name: R.Copy })
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
] }) })
|
|
487
|
+
] }),
|
|
488
|
+
children: /* @__PURE__ */ o.jsx(
|
|
489
|
+
Re,
|
|
490
|
+
{
|
|
491
|
+
ref: j,
|
|
492
|
+
style: {
|
|
493
|
+
overflow: "auto",
|
|
494
|
+
height: G ? "100%" : "500px"
|
|
495
|
+
},
|
|
496
|
+
data: _,
|
|
497
|
+
initialTopMostItemIndex: _.length - 1 || 0,
|
|
498
|
+
totalCount: _.length,
|
|
499
|
+
itemContent: Te,
|
|
500
|
+
onScroll: (e) => {
|
|
501
|
+
e.currentTarget.scrollHeight - e.currentTarget.scrollTop <= e.currentTarget.clientHeight + ae || u.current.stopInterval();
|
|
502
|
+
},
|
|
503
|
+
atTopThreshold: go,
|
|
504
|
+
atTopStateChange: (e) => {
|
|
505
|
+
var n;
|
|
506
|
+
if (console.log("atTop, filteredLogs.length, responseCount, minLineLimit, atTop", _.length, b, k, e), y.length > 0 || K)
|
|
507
|
+
return;
|
|
508
|
+
const t = () => _.length - m < 30 || m === 0 ? 10 : m, r = () => {
|
|
509
|
+
var s;
|
|
510
|
+
(s = j.current) == null || s.scrollToIndex({
|
|
511
|
+
index: t()
|
|
512
|
+
});
|
|
513
|
+
};
|
|
514
|
+
e && !K && ((n = u.current) == null || n.fetch(
|
|
515
|
+
"older",
|
|
516
|
+
I,
|
|
517
|
+
r
|
|
518
|
+
));
|
|
519
|
+
},
|
|
520
|
+
atBottomThreshold: ae,
|
|
521
|
+
atBottomStateChange: (e) => {
|
|
522
|
+
if (console.log("atBottom, filteredLogs.length, responseCount, minLineLimit, atBottom", _.length, b, k, e), _.length <= 0 || y.length > 0 || K)
|
|
523
|
+
return;
|
|
524
|
+
const t = () => {
|
|
525
|
+
var n, s;
|
|
526
|
+
if (console.log("onNewerSuccess ,first", _.length), (n = j.current) == null || n.scrollToIndex({
|
|
527
|
+
index: _.length - 50
|
|
528
|
+
}), b < k) {
|
|
529
|
+
u.current.stopInterval(), console.log(
|
|
530
|
+
"onNewerSuccess minLineLimit",
|
|
531
|
+
b,
|
|
532
|
+
k
|
|
533
|
+
), (s = j.current) == null || s.scrollToIndex({
|
|
534
|
+
index: _.length - 1
|
|
535
|
+
}), u.current.startInterval("newer", I);
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
}, r = () => {
|
|
539
|
+
var n;
|
|
540
|
+
console.log("Error fetching newer logs"), u.current.stopInterval(), (n = j.current) == null || n.scrollToIndex({
|
|
541
|
+
index: _.length - 10
|
|
542
|
+
}), u.current.startInterval("newer", I);
|
|
543
|
+
};
|
|
544
|
+
e && u.current.fetch(
|
|
545
|
+
"newer",
|
|
546
|
+
I,
|
|
547
|
+
t,
|
|
548
|
+
r
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
)
|
|
553
|
+
}
|
|
554
|
+
);
|
|
555
|
+
}, ct = ce.create(xo), ho = ({ id: d, onClose: i, errors: f }) => {
|
|
556
|
+
const { t: g } = Ge(), [B, N] = E(!1), [, W] = le(d), k = () => {
|
|
557
|
+
W(), i && i();
|
|
558
|
+
}, b = () => {
|
|
559
|
+
N(!B);
|
|
560
|
+
};
|
|
561
|
+
return /* @__PURE__ */ o.jsx(
|
|
562
|
+
de,
|
|
563
|
+
{
|
|
564
|
+
onClose: () => {
|
|
565
|
+
},
|
|
566
|
+
showClose: !1,
|
|
567
|
+
headerClass: "bg-gray-57 p-0! border-b border-b-dark-47! h-[90px] w-full",
|
|
568
|
+
className: F(H.realTimeLogModalStyle, {
|
|
569
|
+
"w-[90%]!": !B,
|
|
570
|
+
"w-full! h-full!": B
|
|
571
|
+
}),
|
|
572
|
+
header: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center pr-[30px] w-full h-full", children: [
|
|
573
|
+
/* @__PURE__ */ o.jsx("div", { className: H.modalLeft, children: /* @__PURE__ */ o.jsxs("div", { className: H.buttonGroup, children: [
|
|
574
|
+
/* @__PURE__ */ o.jsx(
|
|
575
|
+
"div",
|
|
576
|
+
{
|
|
577
|
+
className: H.iosIcon,
|
|
578
|
+
onClick: () => {
|
|
579
|
+
k && k(), W();
|
|
580
|
+
},
|
|
581
|
+
children: /* @__PURE__ */ o.jsx(h, { name: "close-window" })
|
|
582
|
+
}
|
|
583
|
+
),
|
|
584
|
+
/* @__PURE__ */ o.jsx("div", { className: H.iosIcon, onClick: b, children: /* @__PURE__ */ o.jsx(h, { name: "expand-window" }) })
|
|
585
|
+
] }) }),
|
|
586
|
+
/* @__PURE__ */ o.jsx("div", { children: g("title.error_log") })
|
|
587
|
+
] }),
|
|
588
|
+
children: /* @__PURE__ */ o.jsx(Ee, { children: f && f.length > 0 ? f.map((m) => /* @__PURE__ */ o.jsxs("div", { className: "container-fluid", children: [
|
|
589
|
+
/* @__PURE__ */ o.jsxs(Se, { children: [
|
|
590
|
+
/* @__PURE__ */ o.jsxs(ne, { children: [
|
|
591
|
+
/* @__PURE__ */ o.jsx("b", { children: `${g("label.created_date")}:` }),
|
|
592
|
+
/* @__PURE__ */ o.jsx(Q, { date: m == null ? void 0 : m.created_date })
|
|
593
|
+
] }),
|
|
594
|
+
/* @__PURE__ */ o.jsxs(ne, { children: [
|
|
595
|
+
/* @__PURE__ */ o.jsx("b", { children: `${g("label.date_updated")}:` }),
|
|
596
|
+
/* @__PURE__ */ o.jsx(Q, { date: m == null ? void 0 : m.update_date })
|
|
597
|
+
] })
|
|
598
|
+
] }),
|
|
599
|
+
/* @__PURE__ */ o.jsx(te, { className: "mt-4 mb-4" }),
|
|
600
|
+
/* @__PURE__ */ o.jsx("p", { className: "whitespace-pre-line", children: m == null ? void 0 : m.log_data }),
|
|
601
|
+
/* @__PURE__ */ o.jsx(te, { className: "mt-4 mb-4" })
|
|
602
|
+
] }, m == null ? void 0 : m.id)) : /* @__PURE__ */ o.jsx(qe, { i18nKey: "text.not_found", values: { dataname: "Log" } }) })
|
|
603
|
+
}
|
|
604
|
+
);
|
|
605
|
+
}, dt = ce.create(ho);
|
|
606
|
+
export {
|
|
607
|
+
dt as E,
|
|
608
|
+
ct as R,
|
|
609
|
+
lt as T,
|
|
610
|
+
at as a
|
|
611
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../jsx-runtime-BcAkpsdy.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../index-BHf7G3IG.js";
|
|
4
|
-
import { E as K } from "../../ErrorLogModal-
|
|
4
|
+
import { E as K } from "../../ErrorLogModal-DJd2j2Qz.js";
|
|
5
5
|
import "../../hooks/useAauth.js";
|
|
6
6
|
import "../../hooks/useNiceModal.js";
|
|
7
7
|
import "../Drawer/Provider.js";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "../../jsx-runtime-BcAkpsdy.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import
|
|
3
|
+
import "../../index-Bkqwn3Ht.js";
|
|
4
4
|
import "../../helper-1SQ9SI45.js";
|
|
5
5
|
import "../../index-BHf7G3IG.js";
|
|
6
|
+
import { R as J } from "../../ErrorLogModal-DJd2j2Qz.js";
|
|
6
7
|
import "../../utils/date.js";
|
|
7
8
|
import "../../utils/fetcher.js";
|
|
8
9
|
import "../../locales/i18n.js";
|
|
@@ -33,5 +34,5 @@ import "../Textarea/Textarea.js";
|
|
|
33
34
|
import "../../react-toastify.esm-BUWNP7Nm.js";
|
|
34
35
|
import '../../ReactToastify.css';/* empty css */
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
J as default
|
|
37
38
|
};
|