@ssgc/alert-console 2.6.5 → 2.6.6
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +197 -184
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useContext as pa, useMemo as Se, createContext as Sa, useState as N, us
|
|
|
3
3
|
import { Select as Oe, Table as Js, Row as Ee, Col as j, Input as va, Tag as Nt, Space as Je, Tooltip as hn, Button as De, Progress as Aa, Dropdown as Ta, Typography as Pt, Spin as us, Checkbox as wt, Divider as Dt, TimePicker as yn, Tabs as Ks, Card as bs, Steps as Na, Modal as ba, Carousel as ka } from "antd";
|
|
4
4
|
import { MessageOutlined as Ia, MailOutlined as xa, MoreOutlined as Oa, PlusOutlined as Ma, EditOutlined as Ea, LeftOutlined as Da, RightOutlined as Ca } from "@ant-design/icons";
|
|
5
5
|
import { toast as Te } from "react-toastify";
|
|
6
|
-
import { useQueryClient as Ra, useMutation as
|
|
6
|
+
import { useQueryClient as Ra, useMutation as Ua, useQuery as Qs, QueryClient as La, QueryClientProvider as Fa } from "@tanstack/react-query";
|
|
7
7
|
const $a = "#FF3B30", Pa = "#FF9500", Wa = "#FFCC00", Va = "#34C759", Ht = {
|
|
8
8
|
critical: $a,
|
|
9
9
|
high: Pa,
|
|
@@ -66,7 +66,7 @@ function qt(t, e) {
|
|
|
66
66
|
r != null && String(r).length > 0 && s.searchParams.set(n, String(r));
|
|
67
67
|
}), s.toString();
|
|
68
68
|
}
|
|
69
|
-
async function
|
|
69
|
+
async function Ue(t, e) {
|
|
70
70
|
const s = {
|
|
71
71
|
...e.headers,
|
|
72
72
|
...Ya()
|
|
@@ -95,21 +95,21 @@ function ja(t) {
|
|
|
95
95
|
};
|
|
96
96
|
return {
|
|
97
97
|
async listAlerts() {
|
|
98
|
-
const s = Re(t.baseUrl, "/api/Alert"), n = await
|
|
98
|
+
const s = Re(t.baseUrl, "/api/Alert"), n = await Ue(s, {
|
|
99
99
|
method: "GET",
|
|
100
100
|
headers: e
|
|
101
101
|
});
|
|
102
102
|
return Array.isArray(n) ? n : [];
|
|
103
103
|
},
|
|
104
104
|
async getAlertStatusList() {
|
|
105
|
-
const s = Re(t.baseUrl, "/api/Alert/AlertStatusList"), n = await
|
|
105
|
+
const s = Re(t.baseUrl, "/api/Alert/AlertStatusList"), n = await Ue(s, {
|
|
106
106
|
method: "GET",
|
|
107
107
|
headers: e
|
|
108
108
|
});
|
|
109
109
|
return Array.isArray(n) ? n : n && typeof n == "object" && Array.isArray(n.data) ? n.data : [];
|
|
110
110
|
},
|
|
111
111
|
async getAlertsReport(s) {
|
|
112
|
-
const n = Re(t.baseUrl, "/Alerts/GetAlertsReport"), r = qt(n, s), a = await
|
|
112
|
+
const n = Re(t.baseUrl, "/Alerts/GetAlertsReport"), r = qt(n, s), a = await Ue(r, {
|
|
113
113
|
method: "GET",
|
|
114
114
|
headers: e
|
|
115
115
|
});
|
|
@@ -117,14 +117,14 @@ function ja(t) {
|
|
|
117
117
|
},
|
|
118
118
|
async updateAlertStatus(s) {
|
|
119
119
|
const n = Re(t.baseUrl, "/api/Alert/status");
|
|
120
|
-
return
|
|
120
|
+
return Ue(n, {
|
|
121
121
|
method: "PUT",
|
|
122
122
|
headers: e,
|
|
123
123
|
body: JSON.stringify(s ?? {})
|
|
124
124
|
});
|
|
125
125
|
},
|
|
126
126
|
async getAdminSettings() {
|
|
127
|
-
const s = Re(t.baseUrl, "/api/Alert/GetAdminSettings"), n = await
|
|
127
|
+
const s = Re(t.baseUrl, "/api/Alert/GetAdminSettings"), n = await Ue(s, {
|
|
128
128
|
method: "GET",
|
|
129
129
|
headers: e
|
|
130
130
|
});
|
|
@@ -141,14 +141,14 @@ function ja(t) {
|
|
|
141
141
|
sortBy: s?.sortBy ?? "",
|
|
142
142
|
groupBy: s?.groupBy ?? null
|
|
143
143
|
};
|
|
144
|
-
return
|
|
144
|
+
return Ue(n, {
|
|
145
145
|
method: "POST",
|
|
146
146
|
headers: e,
|
|
147
147
|
body: JSON.stringify(r)
|
|
148
148
|
});
|
|
149
149
|
},
|
|
150
150
|
async getPreferenceSettings() {
|
|
151
|
-
const s = Re(t.baseUrl, "/api/Alert/GetPreferenceSettings"), n = await
|
|
151
|
+
const s = Re(t.baseUrl, "/api/Alert/GetPreferenceSettings"), n = await Ue(s, {
|
|
152
152
|
method: "GET",
|
|
153
153
|
headers: e
|
|
154
154
|
});
|
|
@@ -159,7 +159,7 @@ function ja(t) {
|
|
|
159
159
|
return null;
|
|
160
160
|
},
|
|
161
161
|
async setPreferenceSettings(s) {
|
|
162
|
-
const n = Re(t.baseUrl, "/api/Alert/SetPreferenceSettings"), r = await
|
|
162
|
+
const n = Re(t.baseUrl, "/api/Alert/SetPreferenceSettings"), r = await Ue(n, {
|
|
163
163
|
method: "POST",
|
|
164
164
|
headers: e,
|
|
165
165
|
body: JSON.stringify(s ?? {})
|
|
@@ -172,7 +172,7 @@ function ja(t) {
|
|
|
172
172
|
};
|
|
173
173
|
},
|
|
174
174
|
async getAlertNotifications(s) {
|
|
175
|
-
const n = Re(t.baseUrl, "/api/Alert/GetNotifications"), r = qt(n, { alertId: s }), a = await
|
|
175
|
+
const n = Re(t.baseUrl, "/api/Alert/GetNotifications"), r = qt(n, { alertId: s }), a = await Ue(r, {
|
|
176
176
|
method: "GET",
|
|
177
177
|
headers: e
|
|
178
178
|
});
|
|
@@ -180,27 +180,27 @@ function ja(t) {
|
|
|
180
180
|
},
|
|
181
181
|
async notifyFamilyMembers(s) {
|
|
182
182
|
const n = Re(t.baseUrl, "/api/Alert/NotificationToFamilyMembers"), r = qt(n, { alertId: s });
|
|
183
|
-
return
|
|
183
|
+
return Ue(r, {
|
|
184
184
|
method: "POST",
|
|
185
185
|
headers: e
|
|
186
186
|
});
|
|
187
187
|
},
|
|
188
188
|
async sendSMSorEmailNotifications(s, n, r) {
|
|
189
189
|
const a = Re(t.baseUrl, "/api/Alert/SendSMSorEmailNotifications"), i = qt(a, { alertId: s, isEmail: n, isSMS: r });
|
|
190
|
-
return
|
|
190
|
+
return Ue(i, {
|
|
191
191
|
method: "POST",
|
|
192
192
|
headers: e
|
|
193
193
|
});
|
|
194
194
|
},
|
|
195
195
|
async getTimeZoneMasters() {
|
|
196
|
-
const s = Re(t.baseUrl, "/api/UserPreference/GetTimeZoneMasters"), n = await
|
|
196
|
+
const s = Re(t.baseUrl, "/api/UserPreference/GetTimeZoneMasters"), n = await Ue(s, {
|
|
197
197
|
method: "GET",
|
|
198
198
|
headers: e
|
|
199
199
|
});
|
|
200
200
|
return Array.isArray(n) ? n : n && typeof n == "object" && Array.isArray(n.data) ? n.data : [];
|
|
201
201
|
},
|
|
202
202
|
async getMyAppPreferences() {
|
|
203
|
-
const s = Re(t.baseUrl, "/api/UserPreference/GetMyAppPreferences"), n = await
|
|
203
|
+
const s = Re(t.baseUrl, "/api/UserPreference/GetMyAppPreferences"), n = await Ue(s, {
|
|
204
204
|
method: "GET",
|
|
205
205
|
headers: e
|
|
206
206
|
});
|
|
@@ -296,8 +296,8 @@ function Xa() {
|
|
|
296
296
|
return (S <= 0 ? "+" : "-") + te(I, 2, "0") + ":" + te(v, 2, "0");
|
|
297
297
|
}, m: function D(S, p) {
|
|
298
298
|
if (S.date() < p.date()) return -D(p, S);
|
|
299
|
-
var I = 12 * (p.year() - S.year()) + (p.month() - S.month()), v = S.clone().add(I, d),
|
|
300
|
-
return +(-(I + (p - v) / (
|
|
299
|
+
var I = 12 * (p.year() - S.year()) + (p.month() - S.month()), v = S.clone().add(I, d), L = p - v < 0, A = S.clone().add(I + (L ? -1 : 1), d);
|
|
300
|
+
return +(-(I + (p - v) / (L ? v - A : A - v)) || 0);
|
|
301
301
|
}, a: function(D) {
|
|
302
302
|
return D < 0 ? Math.ceil(D) || 0 : Math.floor(D);
|
|
303
303
|
}, p: function(D) {
|
|
@@ -306,14 +306,14 @@ function Xa() {
|
|
|
306
306
|
return D === void 0;
|
|
307
307
|
} }, R = "en", V = {};
|
|
308
308
|
V[R] = _;
|
|
309
|
-
var
|
|
310
|
-
return D instanceof de || !(!D || !D[
|
|
309
|
+
var U = "$isDayjsObject", q = function(D) {
|
|
310
|
+
return D instanceof de || !(!D || !D[U]);
|
|
311
311
|
}, y = function D(S, p, I) {
|
|
312
312
|
var v;
|
|
313
313
|
if (!S) return R;
|
|
314
314
|
if (typeof S == "string") {
|
|
315
|
-
var
|
|
316
|
-
V[
|
|
315
|
+
var L = S.toLowerCase();
|
|
316
|
+
V[L] && (v = L), p && (V[L] = p, v = L);
|
|
317
317
|
var A = S.split("-");
|
|
318
318
|
if (!v && A.length > 1) return D(A[0]);
|
|
319
319
|
} else {
|
|
@@ -331,12 +331,12 @@ function Xa() {
|
|
|
331
331
|
};
|
|
332
332
|
var de = (function() {
|
|
333
333
|
function D(p) {
|
|
334
|
-
this.$L = y(p.locale, null, !0), this.parse(p), this.$x = this.$x || p.x || {}, this[
|
|
334
|
+
this.$L = y(p.locale, null, !0), this.parse(p), this.$x = this.$x || p.x || {}, this[U] = !0;
|
|
335
335
|
}
|
|
336
336
|
var S = D.prototype;
|
|
337
337
|
return S.parse = function(p) {
|
|
338
338
|
this.$d = (function(I) {
|
|
339
|
-
var v = I.date,
|
|
339
|
+
var v = I.date, L = I.utc;
|
|
340
340
|
if (v === null) return /* @__PURE__ */ new Date(NaN);
|
|
341
341
|
if (E.u(v)) return /* @__PURE__ */ new Date();
|
|
342
342
|
if (v instanceof Date) return new Date(v);
|
|
@@ -344,7 +344,7 @@ function Xa() {
|
|
|
344
344
|
var A = v.match(C);
|
|
345
345
|
if (A) {
|
|
346
346
|
var M = A[2] - 1 || 0, W = (A[7] || "0").substring(0, 3);
|
|
347
|
-
return
|
|
347
|
+
return L ? new Date(Date.UTC(A[1], M, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, W)) : new Date(A[1], M, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, W);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
return new Date(v);
|
|
@@ -370,20 +370,20 @@ function Xa() {
|
|
|
370
370
|
}, S.valueOf = function() {
|
|
371
371
|
return this.$d.getTime();
|
|
372
372
|
}, S.startOf = function(p, I) {
|
|
373
|
-
var v = this,
|
|
373
|
+
var v = this, L = !!E.u(I) || I, A = E.p(p), M = function(ue, me) {
|
|
374
374
|
var Ae = E.w(v.$u ? Date.UTC(v.$y, me, ue) : new Date(v.$y, me, ue), v);
|
|
375
|
-
return
|
|
375
|
+
return L ? Ae : Ae.endOf(u);
|
|
376
376
|
}, W = function(ue, me) {
|
|
377
|
-
return E.w(v.toDate()[ue].apply(v.toDate("s"), (
|
|
377
|
+
return E.w(v.toDate()[ue].apply(v.toDate("s"), (L ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(me)), v);
|
|
378
378
|
}, Z = this.$W, z = this.$M, Y = this.$D, X = "set" + (this.$u ? "UTC" : "");
|
|
379
379
|
switch (A) {
|
|
380
380
|
case f:
|
|
381
|
-
return
|
|
381
|
+
return L ? M(1, 0) : M(31, 11);
|
|
382
382
|
case d:
|
|
383
|
-
return
|
|
383
|
+
return L ? M(1, z) : M(0, z + 1);
|
|
384
384
|
case m:
|
|
385
385
|
var ie = this.$locale().weekStart || 0, Ne = (Z < ie ? Z + 7 : Z) - ie;
|
|
386
|
-
return M(
|
|
386
|
+
return M(L ? Y - Ne : Y + (6 - Ne), z);
|
|
387
387
|
case u:
|
|
388
388
|
case w:
|
|
389
389
|
return W(X + "Hours", 0);
|
|
@@ -399,8 +399,8 @@ function Xa() {
|
|
|
399
399
|
}, S.endOf = function(p) {
|
|
400
400
|
return this.startOf(p, !1);
|
|
401
401
|
}, S.$set = function(p, I) {
|
|
402
|
-
var v,
|
|
403
|
-
if (
|
|
402
|
+
var v, L = E.p(p), A = "set" + (this.$u ? "UTC" : ""), M = (v = {}, v[u] = A + "Date", v[w] = A + "Date", v[d] = A + "Month", v[f] = A + "FullYear", v[l] = A + "Hours", v[o] = A + "Minutes", v[i] = A + "Seconds", v[a] = A + "Milliseconds", v)[L], W = L === u ? this.$D + (I - this.$W) : I;
|
|
403
|
+
if (L === d || L === f) {
|
|
404
404
|
var Z = this.clone().set(w, 1);
|
|
405
405
|
Z.$d[M](W), Z.init(), this.$d = Z.set(w, Math.min(this.$D, Z.daysInMonth())).$d;
|
|
406
406
|
} else M && this.$d[M](W);
|
|
@@ -410,11 +410,11 @@ function Xa() {
|
|
|
410
410
|
}, S.get = function(p) {
|
|
411
411
|
return this[E.p(p)]();
|
|
412
412
|
}, S.add = function(p, I) {
|
|
413
|
-
var v,
|
|
413
|
+
var v, L = this;
|
|
414
414
|
p = Number(p);
|
|
415
415
|
var A = E.p(I), M = function(z) {
|
|
416
|
-
var Y = b(
|
|
417
|
-
return E.w(Y.date(Y.date() + Math.round(z * p)),
|
|
416
|
+
var Y = b(L);
|
|
417
|
+
return E.w(Y.date(Y.date() + Math.round(z * p)), L);
|
|
418
418
|
};
|
|
419
419
|
if (A === d) return this.set(d, this.$M + p);
|
|
420
420
|
if (A === f) return this.set(f, this.$y + p);
|
|
@@ -427,15 +427,15 @@ function Xa() {
|
|
|
427
427
|
}, S.format = function(p) {
|
|
428
428
|
var I = this, v = this.$locale();
|
|
429
429
|
if (!this.isValid()) return v.invalidDate || O;
|
|
430
|
-
var
|
|
431
|
-
return me && (me[Ae] || me(I,
|
|
430
|
+
var L = p || "YYYY-MM-DDTHH:mm:ssZ", A = E.z(this), M = this.$H, W = this.$m, Z = this.$M, z = v.weekdays, Y = v.months, X = v.meridiem, ie = function(me, Ae, Ie, Fe) {
|
|
431
|
+
return me && (me[Ae] || me(I, L)) || Ie[Ae].slice(0, Fe);
|
|
432
432
|
}, Ne = function(me) {
|
|
433
433
|
return E.s(M % 12 || 12, me, "0");
|
|
434
434
|
}, ue = X || function(me, Ae, Ie) {
|
|
435
435
|
var Fe = me < 12 ? "AM" : "PM";
|
|
436
436
|
return Ie ? Fe.toLowerCase() : Fe;
|
|
437
437
|
};
|
|
438
|
-
return
|
|
438
|
+
return L.replace(J, (function(me, Ae) {
|
|
439
439
|
return Ae || (function(Ie) {
|
|
440
440
|
switch (Ie) {
|
|
441
441
|
case "YY":
|
|
@@ -493,46 +493,46 @@ function Xa() {
|
|
|
493
493
|
}, S.utcOffset = function() {
|
|
494
494
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
495
495
|
}, S.diff = function(p, I, v) {
|
|
496
|
-
var
|
|
496
|
+
var L, A = this, M = E.p(I), W = b(p), Z = (W.utcOffset() - this.utcOffset()) * n, z = this - W, Y = function() {
|
|
497
497
|
return E.m(A, W);
|
|
498
498
|
};
|
|
499
499
|
switch (M) {
|
|
500
500
|
case f:
|
|
501
|
-
|
|
501
|
+
L = Y() / 12;
|
|
502
502
|
break;
|
|
503
503
|
case d:
|
|
504
|
-
|
|
504
|
+
L = Y();
|
|
505
505
|
break;
|
|
506
506
|
case g:
|
|
507
|
-
|
|
507
|
+
L = Y() / 3;
|
|
508
508
|
break;
|
|
509
509
|
case m:
|
|
510
|
-
|
|
510
|
+
L = (z - Z) / 6048e5;
|
|
511
511
|
break;
|
|
512
512
|
case u:
|
|
513
|
-
|
|
513
|
+
L = (z - Z) / 864e5;
|
|
514
514
|
break;
|
|
515
515
|
case l:
|
|
516
|
-
|
|
516
|
+
L = z / r;
|
|
517
517
|
break;
|
|
518
518
|
case o:
|
|
519
|
-
|
|
519
|
+
L = z / n;
|
|
520
520
|
break;
|
|
521
521
|
case i:
|
|
522
|
-
|
|
522
|
+
L = z / s;
|
|
523
523
|
break;
|
|
524
524
|
default:
|
|
525
|
-
|
|
525
|
+
L = z;
|
|
526
526
|
}
|
|
527
|
-
return v ?
|
|
527
|
+
return v ? L : E.a(L);
|
|
528
528
|
}, S.daysInMonth = function() {
|
|
529
529
|
return this.endOf(d).$D;
|
|
530
530
|
}, S.$locale = function() {
|
|
531
531
|
return V[this.$L];
|
|
532
532
|
}, S.locale = function(p, I) {
|
|
533
533
|
if (!p) return this.$L;
|
|
534
|
-
var v = this.clone(),
|
|
535
|
-
return
|
|
534
|
+
var v = this.clone(), L = y(p, I, !0);
|
|
535
|
+
return L && (v.$L = L), v;
|
|
536
536
|
}, S.clone = function() {
|
|
537
537
|
return E.w(this.$d, this);
|
|
538
538
|
}, S.toDate = function() {
|
|
@@ -651,7 +651,7 @@ function ri(t) {
|
|
|
651
651
|
assignTeam: fe(t?.AssignTeam, t?.assignTeam),
|
|
652
652
|
cameraName: fe(t?.CameraName, t?.cameraName),
|
|
653
653
|
type: fe(t?.Type, t?.type),
|
|
654
|
-
mediaDetails: fe(t?.MediaDetails, t?.mediaDetails),
|
|
654
|
+
mediaDetails: fe(t?.MediaDetails, t?.mediaDetails, t?.MediaUrls, t?.mediaUrls),
|
|
655
655
|
additionalMedia: fe(t?.AdditionalMedia, t?.additionalMedia),
|
|
656
656
|
timeElapsed: fe(t?.TimeElapsed, t?.timeElapsed),
|
|
657
657
|
timeRemaining: fe(t?.TimeRemaining, t?.timeRemaining),
|
|
@@ -901,7 +901,7 @@ function oi(t) {
|
|
|
901
901
|
})), V = O.map((y) => ({
|
|
902
902
|
thirdPartyId: Number(y?.ThirdPartyId),
|
|
903
903
|
thirdPartyName: y?.ThirdPartyName ?? y?.Name ?? ""
|
|
904
|
-
})),
|
|
904
|
+
})), U = te.map((y) => ({
|
|
905
905
|
userRoleId: y.UserRoleId ?? y.userRoleId ?? y.Id ?? y.id ?? 0,
|
|
906
906
|
userRoleName: y.UserRoleName ?? y.userRoleName ?? y.Name ?? y.name ?? ""
|
|
907
907
|
})), q = {
|
|
@@ -909,7 +909,7 @@ function oi(t) {
|
|
|
909
909
|
anomalies: R,
|
|
910
910
|
thirdParties: V
|
|
911
911
|
};
|
|
912
|
-
return C.length && (q.severities = C), J.length && (q.scheduleTypes = J),
|
|
912
|
+
return C.length && (q.severities = C), J.length && (q.scheduleTypes = J), U.length && (q.userRoles = U), q;
|
|
913
913
|
},
|
|
914
914
|
async updateRule(n, r) {
|
|
915
915
|
const a = `${s}/${n}`, { escalationSettings: i, ...o } = r ?? {};
|
|
@@ -982,7 +982,7 @@ function ci(t) {
|
|
|
982
982
|
});
|
|
983
983
|
},
|
|
984
984
|
async getLookups() {
|
|
985
|
-
const n = (
|
|
985
|
+
const n = (U) => new URL(U, t.baseUrl).toString(), r = t.userManagementBaseUrl || t.baseUrl, a = [
|
|
986
986
|
rt(n("/api/ActionTypeMaster/GetAll"), { method: "GET", headers: e }),
|
|
987
987
|
rt(n("/api/anomaly/anomaly-list"), {
|
|
988
988
|
method: "POST",
|
|
@@ -1000,33 +1000,33 @@ function ci(t) {
|
|
|
1000
1000
|
l,
|
|
1001
1001
|
u,
|
|
1002
1002
|
m
|
|
1003
|
-
] = await Promise.allSettled(a), d = (
|
|
1004
|
-
if (
|
|
1005
|
-
const q =
|
|
1003
|
+
] = await Promise.allSettled(a), d = (U) => {
|
|
1004
|
+
if (U.status !== "fulfilled") return [];
|
|
1005
|
+
const q = U.value;
|
|
1006
1006
|
return Array.isArray(q) ? q : Array.isArray(q?.data) ? q.data : [];
|
|
1007
|
-
}, g = d(i), f = d(o), w = d(l), O = d(u), C = m.status === "fulfilled" ? m.value : null, J = g.map((
|
|
1008
|
-
actionTypeId:
|
|
1009
|
-
name:
|
|
1010
|
-
})), _ = f.map((
|
|
1011
|
-
recordId:
|
|
1012
|
-
anomalyName:
|
|
1013
|
-
})), te = w.map((
|
|
1014
|
-
thirdPartyId: Number(
|
|
1015
|
-
thirdPartyName:
|
|
1007
|
+
}, g = d(i), f = d(o), w = d(l), O = d(u), C = m.status === "fulfilled" ? m.value : null, J = g.map((U) => ({
|
|
1008
|
+
actionTypeId: U?.ActionTypeUniqueId,
|
|
1009
|
+
name: U?.Name ?? ""
|
|
1010
|
+
})), _ = f.map((U) => ({
|
|
1011
|
+
recordId: U?.AnomalyId,
|
|
1012
|
+
anomalyName: U?.DisplayName ?? U?.Name ?? ""
|
|
1013
|
+
})), te = w.map((U) => ({
|
|
1014
|
+
thirdPartyId: Number(U?.ThirdPartyId),
|
|
1015
|
+
thirdPartyName: U?.ThirdPartyName ?? U?.Name ?? ""
|
|
1016
1016
|
}));
|
|
1017
1017
|
let k = [];
|
|
1018
1018
|
Array.isArray(C) ? k = C : Array.isArray(C?.Data) ? k = C.Data : Array.isArray(C?.data) && (k = C.data);
|
|
1019
|
-
const R = k.map((
|
|
1020
|
-
userRoleId:
|
|
1021
|
-
userRoleName:
|
|
1019
|
+
const R = k.map((U) => ({
|
|
1020
|
+
userRoleId: U.userRoleId ?? 0,
|
|
1021
|
+
userRoleName: U.userRoleName ?? ""
|
|
1022
1022
|
})), V = {
|
|
1023
1023
|
actionTypes: J,
|
|
1024
1024
|
anomalies: _,
|
|
1025
1025
|
thirdParties: te
|
|
1026
1026
|
};
|
|
1027
|
-
return O.length && (V.severities = O.map((
|
|
1028
|
-
SeverityId:
|
|
1029
|
-
DisplayName:
|
|
1027
|
+
return O.length && (V.severities = O.map((U) => ({
|
|
1028
|
+
SeverityId: U.SeverityId,
|
|
1029
|
+
DisplayName: U.SeverityName ?? U.DisplayName ?? ""
|
|
1030
1030
|
}))), R.length && (V.userRoles = R), V;
|
|
1031
1031
|
},
|
|
1032
1032
|
async updateRule(n, r) {
|
|
@@ -1381,7 +1381,7 @@ function bi({
|
|
|
1381
1381
|
] });
|
|
1382
1382
|
}
|
|
1383
1383
|
function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOptions: r, spaceOptions: a, renderActions: i, onAlertIdClick: o, onRefetch: l, onPageChange: u, excludeCompleted: m = !0 }) {
|
|
1384
|
-
const [d, g] = N("All"), [f, w] = N("All"), [O, C] = N("All"), [J, _] = N("All"), [te, k] = N(""), [R, V] = N([{ label: "All", value: "All" }]), [
|
|
1384
|
+
const [d, g] = N("All"), [f, w] = N("All"), [O, C] = N("All"), [J, _] = N("All"), [te, k] = N(""), [R, V] = N([{ label: "All", value: "All" }]), [U, q] = N(/* @__PURE__ */ new Set()), { rules: y, alerts: b } = He(), E = {
|
|
1385
1385
|
6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ c(xa, {}) },
|
|
1386
1386
|
7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ c(Ia, {}) }
|
|
1387
1387
|
}, de = Se(() => yi(t), [t]), ce = Se(() => gi(t), [t]);
|
|
@@ -1450,7 +1450,7 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1450
1450
|
return yt.delete(ht), yt;
|
|
1451
1451
|
});
|
|
1452
1452
|
}
|
|
1453
|
-
}, Z = Xs, z = en, Y = E[Z], X = E[z], ie = bn(Z, M, Y?.title), Ne = bn(z, M, X?.title), ue = ks(M.id, !0), me = ks(M.id, !1), Ae = jt(Z) &&
|
|
1453
|
+
}, Z = Xs, z = en, Y = E[Z], X = E[z], ie = bn(Z, M, Y?.title), Ne = bn(z, M, X?.title), ue = ks(M.id, !0), me = ks(M.id, !1), Ae = jt(Z) && U.has(ue), Ie = jt(z) && U.has(me);
|
|
1454
1454
|
return /* @__PURE__ */ h(Je, { size: "middle", children: [
|
|
1455
1455
|
/* @__PURE__ */ c(hn, { title: ie.tooltipTitle, children: /* @__PURE__ */ c(
|
|
1456
1456
|
De,
|
|
@@ -1525,13 +1525,13 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1525
1525
|
/* @__PURE__ */ c("div", { className: "text-black/65", children: A })
|
|
1526
1526
|
] })
|
|
1527
1527
|
}
|
|
1528
|
-
],
|
|
1528
|
+
], L = n && n.length ? n : v;
|
|
1529
1529
|
return /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
1530
1530
|
bi,
|
|
1531
1531
|
{
|
|
1532
1532
|
rowKey: "id",
|
|
1533
1533
|
data: S,
|
|
1534
|
-
columns:
|
|
1534
|
+
columns: L,
|
|
1535
1535
|
loading: e,
|
|
1536
1536
|
pageSize: s,
|
|
1537
1537
|
onPageChange: u,
|
|
@@ -1570,7 +1570,7 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1570
1570
|
}
|
|
1571
1571
|
function dr() {
|
|
1572
1572
|
const { alerts: t } = He(), e = Ra();
|
|
1573
|
-
return
|
|
1573
|
+
return Ua({
|
|
1574
1574
|
mutationFn: (s) => t.updateAlertStatus(s),
|
|
1575
1575
|
onSuccess: () => {
|
|
1576
1576
|
e.invalidateQueries({ queryKey: ["alerts", "list"] }), e.invalidateQueries({ queryKey: ["alerts", "report"] });
|
|
@@ -1608,7 +1608,7 @@ class at extends ft {
|
|
|
1608
1608
|
super("Zone is an abstract class");
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
1611
|
-
const T = "numeric", je = "short",
|
|
1611
|
+
const T = "numeric", je = "short", Le = "long", as = {
|
|
1612
1612
|
year: T,
|
|
1613
1613
|
month: T,
|
|
1614
1614
|
day: T
|
|
@@ -1623,13 +1623,13 @@ const T = "numeric", je = "short", Ue = "long", as = {
|
|
|
1623
1623
|
weekday: je
|
|
1624
1624
|
}, hr = {
|
|
1625
1625
|
year: T,
|
|
1626
|
-
month:
|
|
1626
|
+
month: Le,
|
|
1627
1627
|
day: T
|
|
1628
1628
|
}, yr = {
|
|
1629
1629
|
year: T,
|
|
1630
|
-
month:
|
|
1630
|
+
month: Le,
|
|
1631
1631
|
day: T,
|
|
1632
|
-
weekday:
|
|
1632
|
+
weekday: Le
|
|
1633
1633
|
}, gr = {
|
|
1634
1634
|
hour: T,
|
|
1635
1635
|
minute: T
|
|
@@ -1646,7 +1646,7 @@ const T = "numeric", je = "short", Ue = "long", as = {
|
|
|
1646
1646
|
hour: T,
|
|
1647
1647
|
minute: T,
|
|
1648
1648
|
second: T,
|
|
1649
|
-
timeZoneName:
|
|
1649
|
+
timeZoneName: Le
|
|
1650
1650
|
}, vr = {
|
|
1651
1651
|
hour: T,
|
|
1652
1652
|
minute: T,
|
|
@@ -1667,7 +1667,7 @@ const T = "numeric", je = "short", Ue = "long", as = {
|
|
|
1667
1667
|
minute: T,
|
|
1668
1668
|
second: T,
|
|
1669
1669
|
hourCycle: "h23",
|
|
1670
|
-
timeZoneName:
|
|
1670
|
+
timeZoneName: Le
|
|
1671
1671
|
}, br = {
|
|
1672
1672
|
year: T,
|
|
1673
1673
|
month: T,
|
|
@@ -1703,14 +1703,14 @@ const T = "numeric", je = "short", Ue = "long", as = {
|
|
|
1703
1703
|
minute: T
|
|
1704
1704
|
}, Or = {
|
|
1705
1705
|
year: T,
|
|
1706
|
-
month:
|
|
1706
|
+
month: Le,
|
|
1707
1707
|
day: T,
|
|
1708
1708
|
hour: T,
|
|
1709
1709
|
minute: T,
|
|
1710
1710
|
timeZoneName: je
|
|
1711
1711
|
}, Mr = {
|
|
1712
1712
|
year: T,
|
|
1713
|
-
month:
|
|
1713
|
+
month: Le,
|
|
1714
1714
|
day: T,
|
|
1715
1715
|
hour: T,
|
|
1716
1716
|
minute: T,
|
|
@@ -1718,21 +1718,21 @@ const T = "numeric", je = "short", Ue = "long", as = {
|
|
|
1718
1718
|
timeZoneName: je
|
|
1719
1719
|
}, Er = {
|
|
1720
1720
|
year: T,
|
|
1721
|
-
month:
|
|
1721
|
+
month: Le,
|
|
1722
1722
|
day: T,
|
|
1723
|
-
weekday:
|
|
1723
|
+
weekday: Le,
|
|
1724
1724
|
hour: T,
|
|
1725
1725
|
minute: T,
|
|
1726
|
-
timeZoneName:
|
|
1726
|
+
timeZoneName: Le
|
|
1727
1727
|
}, Dr = {
|
|
1728
1728
|
year: T,
|
|
1729
|
-
month:
|
|
1729
|
+
month: Le,
|
|
1730
1730
|
day: T,
|
|
1731
|
-
weekday:
|
|
1731
|
+
weekday: Le,
|
|
1732
1732
|
hour: T,
|
|
1733
1733
|
minute: T,
|
|
1734
1734
|
second: T,
|
|
1735
|
-
timeZoneName:
|
|
1735
|
+
timeZoneName: Le
|
|
1736
1736
|
};
|
|
1737
1737
|
class Wt {
|
|
1738
1738
|
/**
|
|
@@ -2037,7 +2037,7 @@ class tt extends Wt {
|
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
2039
2039
|
let kn = {};
|
|
2040
|
-
function
|
|
2040
|
+
function Ui(t, e = {}) {
|
|
2041
2041
|
const s = JSON.stringify([t, e]);
|
|
2042
2042
|
let n = kn[s];
|
|
2043
2043
|
return n || (n = new Intl.ListFormat(t, e), kn[s] = n), n;
|
|
@@ -2049,7 +2049,7 @@ function Vs(t, e = {}) {
|
|
|
2049
2049
|
return n === void 0 && (n = new Intl.DateTimeFormat(t, e), Ws.set(s, n)), n;
|
|
2050
2050
|
}
|
|
2051
2051
|
const Zs = /* @__PURE__ */ new Map();
|
|
2052
|
-
function
|
|
2052
|
+
function Li(t, e = {}) {
|
|
2053
2053
|
const s = JSON.stringify([t, e]);
|
|
2054
2054
|
let n = Zs.get(s);
|
|
2055
2055
|
return n === void 0 && (n = new Intl.NumberFormat(t, e), Zs.set(s, n)), n;
|
|
@@ -2128,7 +2128,7 @@ class Hi {
|
|
|
2128
2128
|
const { padTo: r, floor: a, ...i } = n;
|
|
2129
2129
|
if (!s || Object.keys(i).length > 0) {
|
|
2130
2130
|
const o = { useGrouping: !1, ...n };
|
|
2131
|
-
n.padTo > 0 && (o.minimumIntegerDigits = n.padTo), this.inf =
|
|
2131
|
+
n.padTo > 0 && (o.minimumIntegerDigits = n.padTo), this.inf = Li(e, o);
|
|
2132
2132
|
}
|
|
2133
2133
|
}
|
|
2134
2134
|
format(e) {
|
|
@@ -2297,7 +2297,7 @@ class ne {
|
|
|
2297
2297
|
return new Gi(this.intl, this.isEnglish(), e);
|
|
2298
2298
|
}
|
|
2299
2299
|
listFormatter(e = {}) {
|
|
2300
|
-
return
|
|
2300
|
+
return Ui(this.intl, e);
|
|
2301
2301
|
}
|
|
2302
2302
|
isEnglish() {
|
|
2303
2303
|
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || Cr(this.intl).locale.startsWith("en-us");
|
|
@@ -2560,7 +2560,7 @@ function qe({ numberingSystem: t }, e = "") {
|
|
|
2560
2560
|
let r = n.get(e);
|
|
2561
2561
|
return r === void 0 && (r = new RegExp(`${tn[s]}${e}`), n.set(e, r)), r;
|
|
2562
2562
|
}
|
|
2563
|
-
let xn = () => Date.now(), On = "system", Mn = null, En = null, Dn = null, Cn = 60, Rn,
|
|
2563
|
+
let xn = () => Date.now(), On = "system", Mn = null, En = null, Dn = null, Cn = 60, Rn, Un = null;
|
|
2564
2564
|
class ye {
|
|
2565
2565
|
/**
|
|
2566
2566
|
* Get the callback for returning the current timestamp.
|
|
@@ -2647,7 +2647,7 @@ class ye {
|
|
|
2647
2647
|
* @return {WeekSettings|null}
|
|
2648
2648
|
*/
|
|
2649
2649
|
static get defaultWeekSettings() {
|
|
2650
|
-
return
|
|
2650
|
+
return Un;
|
|
2651
2651
|
}
|
|
2652
2652
|
/**
|
|
2653
2653
|
* Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
|
|
@@ -2657,7 +2657,7 @@ class ye {
|
|
|
2657
2657
|
* @param {WeekSettings|null} weekSettings
|
|
2658
2658
|
*/
|
|
2659
2659
|
static set defaultWeekSettings(e) {
|
|
2660
|
-
|
|
2660
|
+
Un = Gs(e);
|
|
2661
2661
|
}
|
|
2662
2662
|
/**
|
|
2663
2663
|
* Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
|
|
@@ -2708,7 +2708,7 @@ class Ye {
|
|
|
2708
2708
|
return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason;
|
|
2709
2709
|
}
|
|
2710
2710
|
}
|
|
2711
|
-
const
|
|
2711
|
+
const Ur = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], Lr = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
|
|
2712
2712
|
function Be(t, e) {
|
|
2713
2713
|
return new Ye(
|
|
2714
2714
|
"unit out of range",
|
|
@@ -2722,10 +2722,10 @@ function sn(t, e, s) {
|
|
|
2722
2722
|
return r === 0 ? 7 : r;
|
|
2723
2723
|
}
|
|
2724
2724
|
function Fr(t, e, s) {
|
|
2725
|
-
return s + (Vt(t) ?
|
|
2725
|
+
return s + (Vt(t) ? Lr : Ur)[e - 1];
|
|
2726
2726
|
}
|
|
2727
2727
|
function $r(t, e) {
|
|
2728
|
-
const s = Vt(t) ?
|
|
2728
|
+
const s = Vt(t) ? Lr : Ur, n = s.findIndex((a) => a < e), r = e - s[n];
|
|
2729
2729
|
return { month: n + 1, day: r };
|
|
2730
2730
|
}
|
|
2731
2731
|
function nn(t, e) {
|
|
@@ -2736,7 +2736,7 @@ function is(t, e = 4, s = 1) {
|
|
|
2736
2736
|
let l = Math.floor((i - o + 14 - e) / 7), u;
|
|
2737
2737
|
return l < 1 ? (u = n - 1, l = $t(u, e, s)) : l > $t(n, e, s) ? (u = n + 1, l = 1) : u = n, { weekYear: u, weekNumber: l, weekday: o, ...gs(t) };
|
|
2738
2738
|
}
|
|
2739
|
-
function
|
|
2739
|
+
function Ln(t, e = 4, s = 1) {
|
|
2740
2740
|
const { weekYear: n, weekNumber: r, weekday: a } = t, i = nn(sn(n, 1, e), s), o = At(n);
|
|
2741
2741
|
let l = r * 7 + a - i - 7 + e, u;
|
|
2742
2742
|
l < 1 ? (u = n - 1, l += At(u)) : l > o ? (u = n + 1, l -= At(n)) : u = n;
|
|
@@ -3473,7 +3473,7 @@ function Do(t) {
|
|
|
3473
3473
|
function Co(t) {
|
|
3474
3474
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
|
3475
3475
|
}
|
|
3476
|
-
const Ro = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,
|
|
3476
|
+
const Ro = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, Uo = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, Lo = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
|
|
3477
3477
|
function Zn(t) {
|
|
3478
3478
|
const [, e, s, n, r, a, i, o] = t;
|
|
3479
3479
|
return [cn(e, r, n, s, a, i, o), Me.utcInstance];
|
|
@@ -3518,8 +3518,8 @@ function Go(t) {
|
|
|
3518
3518
|
return xt(
|
|
3519
3519
|
t,
|
|
3520
3520
|
[Ro, Zn],
|
|
3521
|
-
[
|
|
3522
|
-
[
|
|
3521
|
+
[Uo, Zn],
|
|
3522
|
+
[Lo, Fo]
|
|
3523
3523
|
);
|
|
3524
3524
|
}
|
|
3525
3525
|
function Yo(t) {
|
|
@@ -5265,7 +5265,7 @@ function ua(t, e) {
|
|
|
5265
5265
|
return r.map((i) => ml(i, t, a));
|
|
5266
5266
|
}
|
|
5267
5267
|
const Ds = "Invalid DateTime", jn = 864e13;
|
|
5268
|
-
function
|
|
5268
|
+
function Ut(t) {
|
|
5269
5269
|
return new Ye("unsupported zone", `the zone "${t.name}" is not supported`);
|
|
5270
5270
|
}
|
|
5271
5271
|
function Cs(t) {
|
|
@@ -5354,7 +5354,7 @@ function Xt(t, e, s = !0) {
|
|
|
5354
5354
|
forceSimple: !0
|
|
5355
5355
|
}).formatDateTimeFromString(t, e) : null;
|
|
5356
5356
|
}
|
|
5357
|
-
function
|
|
5357
|
+
function Us(t, e, s) {
|
|
5358
5358
|
const n = t.c.year > 9999 || t.c.year < 0;
|
|
5359
5359
|
let r = "";
|
|
5360
5360
|
if (n && t.c.year >= 0 && (r += "+"), r += pe(t.c.year, n ? 6 : 4), s === "year") return r;
|
|
@@ -5460,16 +5460,16 @@ function Kn(t) {
|
|
|
5460
5460
|
}
|
|
5461
5461
|
}
|
|
5462
5462
|
function Nl(t) {
|
|
5463
|
-
if (
|
|
5464
|
-
return t.offset(
|
|
5463
|
+
if (Lt === void 0 && (Lt = ye.now()), t.type !== "iana")
|
|
5464
|
+
return t.offset(Lt);
|
|
5465
5465
|
const e = t.name;
|
|
5466
5466
|
let s = js.get(e);
|
|
5467
|
-
return s === void 0 && (s = t.offset(
|
|
5467
|
+
return s === void 0 && (s = t.offset(Lt), js.set(e, s)), s;
|
|
5468
5468
|
}
|
|
5469
5469
|
function Qn(t, e) {
|
|
5470
5470
|
const s = ot(e.zone, ye.defaultZone);
|
|
5471
5471
|
if (!s.isValid)
|
|
5472
|
-
return $.invalid(
|
|
5472
|
+
return $.invalid(Ut(s));
|
|
5473
5473
|
const n = ne.fromObject(e);
|
|
5474
5474
|
let r, a;
|
|
5475
5475
|
if (P(t.year))
|
|
@@ -5500,7 +5500,7 @@ function er(t) {
|
|
|
5500
5500
|
let e = {}, s;
|
|
5501
5501
|
return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], s = Array.from(t).slice(0, t.length - 1)) : s = Array.from(t), [e, s];
|
|
5502
5502
|
}
|
|
5503
|
-
let
|
|
5503
|
+
let Lt;
|
|
5504
5504
|
const js = /* @__PURE__ */ new Map();
|
|
5505
5505
|
class $ {
|
|
5506
5506
|
/**
|
|
@@ -5508,7 +5508,7 @@ class $ {
|
|
|
5508
5508
|
*/
|
|
5509
5509
|
constructor(e) {
|
|
5510
5510
|
const s = e.zone || ye.defaultZone;
|
|
5511
|
-
let n = e.invalid || (Number.isNaN(e.ts) ? new Ye("invalid input") : null) || (s.isValid ? null :
|
|
5511
|
+
let n = e.invalid || (Number.isNaN(e.ts) ? new Ye("invalid input") : null) || (s.isValid ? null : Ut(s));
|
|
5512
5512
|
this.ts = P(e.ts) ? ye.now() : e.ts;
|
|
5513
5513
|
let r = null, a = null;
|
|
5514
5514
|
if (!n)
|
|
@@ -5601,7 +5601,7 @@ class $ {
|
|
|
5601
5601
|
ts: n,
|
|
5602
5602
|
zone: r,
|
|
5603
5603
|
loc: ne.fromObject(s)
|
|
5604
|
-
}) : $.invalid(
|
|
5604
|
+
}) : $.invalid(Ut(r));
|
|
5605
5605
|
}
|
|
5606
5606
|
/**
|
|
5607
5607
|
* Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
|
|
@@ -5682,7 +5682,7 @@ class $ {
|
|
|
5682
5682
|
e = e || {};
|
|
5683
5683
|
const n = ot(s.zone, ye.defaultZone);
|
|
5684
5684
|
if (!n.isValid)
|
|
5685
|
-
return $.invalid(
|
|
5685
|
+
return $.invalid(Ut(n));
|
|
5686
5686
|
const r = ne.fromObject(s), a = ls(e, Kn), { minDaysInFirstWeek: i, startOfWeek: o } = $n(a, r), l = ye.now(), u = P(s.specificOffset) ? n.offset(l) : s.specificOffset, m = !P(a.ordinal), d = !P(a.year), g = !P(a.month) || !P(a.day), f = d || g, w = a.weekYear || a.weekNumber;
|
|
5687
5687
|
if ((f || m) && w)
|
|
5688
5688
|
throw new vt(
|
|
@@ -5701,8 +5701,8 @@ class $ {
|
|
|
5701
5701
|
const k = O ? Ki(a, i, o) : m ? Qi(a) : Pr(a), R = k || Wr(a);
|
|
5702
5702
|
if (R)
|
|
5703
5703
|
return $.invalid(R);
|
|
5704
|
-
const V = O ?
|
|
5705
|
-
ts:
|
|
5704
|
+
const V = O ? Ln(a, i, o) : m ? Fn(a) : a, [U, q] = ss(V, u, n), y = new $({
|
|
5705
|
+
ts: U,
|
|
5706
5706
|
zone: n,
|
|
5707
5707
|
o: q,
|
|
5708
5708
|
loc: r
|
|
@@ -5870,7 +5870,7 @@ class $ {
|
|
|
5870
5870
|
return oa(ke.parseFormat(e), ne.fromObject(s)).map((r) => r.val).join("");
|
|
5871
5871
|
}
|
|
5872
5872
|
static resetCache() {
|
|
5873
|
-
|
|
5873
|
+
Lt = void 0, js.clear();
|
|
5874
5874
|
}
|
|
5875
5875
|
// INFO
|
|
5876
5876
|
/**
|
|
@@ -6278,7 +6278,7 @@ class $ {
|
|
|
6278
6278
|
}
|
|
6279
6279
|
return dt(this, { ts: r, zone: e });
|
|
6280
6280
|
} else
|
|
6281
|
-
return $.invalid(
|
|
6281
|
+
return $.invalid(Ut(e));
|
|
6282
6282
|
}
|
|
6283
6283
|
/**
|
|
6284
6284
|
* "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
|
|
@@ -6322,7 +6322,7 @@ class $ {
|
|
|
6322
6322
|
if (l && i)
|
|
6323
6323
|
throw new vt("Can't mix ordinal dates with month/day");
|
|
6324
6324
|
let d;
|
|
6325
|
-
a ? d =
|
|
6325
|
+
a ? d = Ln(
|
|
6326
6326
|
{ ...is(this.c, n, r), ...s },
|
|
6327
6327
|
n,
|
|
6328
6328
|
r
|
|
@@ -6506,7 +6506,7 @@ class $ {
|
|
|
6506
6506
|
return null;
|
|
6507
6507
|
i = rs(i);
|
|
6508
6508
|
const o = e === "extended";
|
|
6509
|
-
let l =
|
|
6509
|
+
let l = Us(this, o, i);
|
|
6510
6510
|
return ns.indexOf(i) >= 3 && (l += "T"), l += Jn(
|
|
6511
6511
|
this,
|
|
6512
6512
|
o,
|
|
@@ -6528,7 +6528,7 @@ class $ {
|
|
|
6528
6528
|
* @return {string|null}
|
|
6529
6529
|
*/
|
|
6530
6530
|
toISODate({ format: e = "extended", precision: s = "day" } = {}) {
|
|
6531
|
-
return this.isValid ?
|
|
6531
|
+
return this.isValid ? Us(this, e === "extended", rs(s)) : null;
|
|
6532
6532
|
}
|
|
6533
6533
|
/**
|
|
6534
6534
|
* Returns an ISO 8601-compliant string representation of this DateTime's week date
|
|
@@ -6600,7 +6600,7 @@ class $ {
|
|
|
6600
6600
|
* @return {string|null}
|
|
6601
6601
|
*/
|
|
6602
6602
|
toSQLDate() {
|
|
6603
|
-
return this.isValid ?
|
|
6603
|
+
return this.isValid ? Us(this, !0) : null;
|
|
6604
6604
|
}
|
|
6605
6605
|
/**
|
|
6606
6606
|
* Returns a string representation of this DateTime appropriate for use in SQL Time
|
|
@@ -7434,7 +7434,7 @@ const _s = (t) => /* @__PURE__ */ h(Nt, { children: [
|
|
|
7434
7434
|
t.length,
|
|
7435
7435
|
" more"
|
|
7436
7436
|
] }), { Text: et } = Pt;
|
|
7437
|
-
function
|
|
7437
|
+
function Ul(t) {
|
|
7438
7438
|
const {
|
|
7439
7439
|
// escBasis, setEscBasis,
|
|
7440
7440
|
// selectedSeverity, setSelectedSeverity,
|
|
@@ -7460,14 +7460,14 @@ function Ll(t) {
|
|
|
7460
7460
|
thirdPartyIds: k,
|
|
7461
7461
|
setThirdPartyIds: R,
|
|
7462
7462
|
humanLoop: V,
|
|
7463
|
-
setHumanLoop:
|
|
7463
|
+
setHumanLoop: U,
|
|
7464
7464
|
isAutoExpire: q,
|
|
7465
7465
|
setAutoExpire: y,
|
|
7466
7466
|
onClear: b,
|
|
7467
7467
|
onSave: E,
|
|
7468
7468
|
saving: de,
|
|
7469
7469
|
onActionTypesLoaded: ce
|
|
7470
|
-
} = t, { rules: D } = He(), [S, p] = N([]), [I, v] = N([]), [
|
|
7470
|
+
} = t, { rules: D } = He(), [S, p] = N([]), [I, v] = N([]), [L, A] = N(!1);
|
|
7471
7471
|
ve(() => {
|
|
7472
7472
|
let Y = !1;
|
|
7473
7473
|
return (async () => {
|
|
@@ -7489,7 +7489,7 @@ function Ll(t) {
|
|
|
7489
7489
|
};
|
|
7490
7490
|
}, []);
|
|
7491
7491
|
const M = typeof i == "number" || typeof l == "number", W = typeof m == "number" || typeof g == "number", Z = typeof i == "number" || typeof l == "number" || typeof m == "number" || typeof g == "number" || typeof w == "number" || typeof C == "number" || Array.isArray(_) && _.length > 0 || Array.isArray(k) && k.length > 0 || !!V || !!q;
|
|
7492
|
-
return /* @__PURE__ */ h(us, { spinning: !!de ||
|
|
7492
|
+
return /* @__PURE__ */ h(us, { spinning: !!de || L, children: [
|
|
7493
7493
|
/* @__PURE__ */ h(Ee, { gutter: [16, 16], align: "bottom", children: [
|
|
7494
7494
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
|
|
7495
7495
|
/* @__PURE__ */ c(et, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
|
|
@@ -7623,7 +7623,7 @@ function Ll(t) {
|
|
|
7623
7623
|
] }),
|
|
7624
7624
|
/* @__PURE__ */ h(Ee, { gutter: [16, 16], align: "bottom", className: "mt-4 items-center", children: [
|
|
7625
7625
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 7, children: /* @__PURE__ */ h("div", { className: "flex items-center h-full gap-8", children: [
|
|
7626
|
-
/* @__PURE__ */ c(wt, { checked: V, onChange: (Y) =>
|
|
7626
|
+
/* @__PURE__ */ c(wt, { checked: V, onChange: (Y) => U(Y.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
|
|
7627
7627
|
/* @__PURE__ */ c(wt, { checked: q, onChange: (Y) => y(Y.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
|
|
7628
7628
|
] }) }),
|
|
7629
7629
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
@@ -7633,7 +7633,7 @@ function Ll(t) {
|
|
|
7633
7633
|
] })
|
|
7634
7634
|
] });
|
|
7635
7635
|
}
|
|
7636
|
-
function
|
|
7636
|
+
function Ll({ entries: t, userRoles: e, onEdit: s, loading: n }) {
|
|
7637
7637
|
const r = new Map(e.map((i) => [i.userRoleId, i.userRoleName])), a = (i) => i.map((o) => r.get(o) || String(o)).join(", ");
|
|
7638
7638
|
return /* @__PURE__ */ c(
|
|
7639
7639
|
Js,
|
|
@@ -7701,7 +7701,7 @@ function Ul({ entries: t, userRoles: e, onEdit: s, loading: n }) {
|
|
|
7701
7701
|
}
|
|
7702
7702
|
);
|
|
7703
7703
|
}
|
|
7704
|
-
const { Title: Fl, Text:
|
|
7704
|
+
const { Title: Fl, Text: Ls } = Pt;
|
|
7705
7705
|
function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
7706
7706
|
const { rules: n } = He(), [r, a] = N(!1), [i, o] = N(!1), [l, u] = N(s), [m, d] = N(), [g, f] = N([]), w = Se(() => t.map((k) => ({ label: k.userRoleName, value: k.userRoleId })), [t]), O = Se(() => (e || []).map((k) => ({ label: k.Name || "-", value: k.RuleId || k.Name || "" })), [e]), C = Se(
|
|
7707
7707
|
() => (e || []).map((k, R) => ({
|
|
@@ -7744,7 +7744,7 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7744
7744
|
for (const R of C) {
|
|
7745
7745
|
const V = l.find(
|
|
7746
7746
|
(y) => y?.ruleId === R.key || y?.ruleName === R.key || y?.RuleId === R.key || y?.ruleName === R.ruleName || y?.Name === R.ruleName
|
|
7747
|
-
),
|
|
7747
|
+
), U = V?.userRoleIds ?? V?.UserRoleIds, q = Array.isArray(U) ? U : [];
|
|
7748
7748
|
q.length && (k[R.key] = q);
|
|
7749
7749
|
}
|
|
7750
7750
|
return k;
|
|
@@ -7753,7 +7753,7 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7753
7753
|
/* @__PURE__ */ c(Fl, { level: 4, className: "!mb-4", children: "Alert Assignment" }),
|
|
7754
7754
|
/* @__PURE__ */ c(us, { spinning: i || r, children: /* @__PURE__ */ h(Ee, { gutter: [16, 16], align: "bottom", className: "mb-6", children: [
|
|
7755
7755
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 6, children: /* @__PURE__ */ h("div", { children: [
|
|
7756
|
-
/* @__PURE__ */ c(
|
|
7756
|
+
/* @__PURE__ */ c(Ls, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
|
|
7757
7757
|
/* @__PURE__ */ c(
|
|
7758
7758
|
Oe,
|
|
7759
7759
|
{
|
|
@@ -7766,7 +7766,7 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7766
7766
|
)
|
|
7767
7767
|
] }) }),
|
|
7768
7768
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 8, children: /* @__PURE__ */ h("div", { children: [
|
|
7769
|
-
/* @__PURE__ */ c(
|
|
7769
|
+
/* @__PURE__ */ c(Ls, { className: "text-gray-700 font-medium block mb-1", children: "Alert Notification To" }),
|
|
7770
7770
|
/* @__PURE__ */ c(
|
|
7771
7771
|
Oe,
|
|
7772
7772
|
{
|
|
@@ -7804,12 +7804,12 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7804
7804
|
const V = g.map((y) => {
|
|
7805
7805
|
const b = t.find((E) => E.userRoleId === y);
|
|
7806
7806
|
return { id: y, name: b?.userRoleName ?? String(y) };
|
|
7807
|
-
}),
|
|
7807
|
+
}), U = {
|
|
7808
7808
|
...k,
|
|
7809
7809
|
ruleId: m,
|
|
7810
7810
|
userRoleIds: g,
|
|
7811
7811
|
userRoles: V
|
|
7812
|
-
}, q = await n.updateRule(R,
|
|
7812
|
+
}, q = await n.updateRule(R, U);
|
|
7813
7813
|
if (!q?.responseStatus && !q?.Success && !q?.success)
|
|
7814
7814
|
Te.error(q?.errorMessage || q?.Message || "Error saving Alert Assignment");
|
|
7815
7815
|
else {
|
|
@@ -7853,10 +7853,10 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7853
7853
|
key: "assign",
|
|
7854
7854
|
render: (k, R) => {
|
|
7855
7855
|
const V = J[R.key] ?? [];
|
|
7856
|
-
return V.length ? /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: V.map((
|
|
7857
|
-
const q = t.find((y) => y.userRoleId ===
|
|
7858
|
-
return /* @__PURE__ */ c(Nt, { children: q?.userRoleName ?? String(
|
|
7859
|
-
}) }) : /* @__PURE__ */ c(
|
|
7856
|
+
return V.length ? /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: V.map((U) => {
|
|
7857
|
+
const q = t.find((y) => y.userRoleId === U);
|
|
7858
|
+
return /* @__PURE__ */ c(Nt, { children: q?.userRoleName ?? String(U) }, U);
|
|
7859
|
+
}) }) : /* @__PURE__ */ c(Ls, { type: "secondary", children: "—" });
|
|
7860
7860
|
}
|
|
7861
7861
|
}
|
|
7862
7862
|
]
|
|
@@ -7880,7 +7880,7 @@ function Fs(t) {
|
|
|
7880
7880
|
};
|
|
7881
7881
|
}
|
|
7882
7882
|
function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: a }) {
|
|
7883
|
-
const { rules: i, alerts: o } = He(), [l, u] = N("By Severity"), [m, d] = N("By severity"), [g, f] = N("By Severity"), [w, O] = N(!1), [C, J] = N(!1), [_, te] = N(!1), [k, R] = N(null), [V,
|
|
7883
|
+
const { rules: i, alerts: o } = He(), [l, u] = N("By Severity"), [m, d] = N("By severity"), [g, f] = N("By Severity"), [w, O] = N(!1), [C, J] = N(!1), [_, te] = N(!1), [k, R] = N(null), [V, U] = N("rules"), [q, y] = N(), [b, E] = N(), [de, ce] = N(), [D, S] = N(), [p, I] = N(), [v, L] = N(), [A, M] = N(), [W, Z] = N(), [z, Y] = N([]), [X, ie] = N([]), [Ne, ue] = N(!1), [me, Ae] = N(!1), [Ie, Fe] = N({}), [st, ht] = N({}), [ge, yt] = N(s || []), [Mt, zt] = N([]), [ct, ws] = N(!1), [x, H] = N(!1), [K, we] = N(n || []);
|
|
7884
7884
|
ve(() => {
|
|
7885
7885
|
n && n.length && we(n);
|
|
7886
7886
|
}, [n]), ve(() => {
|
|
@@ -7947,7 +7947,7 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
7947
7947
|
(le) => le?.ruleId === b || le?.ruleName === b || le?.RuleId === b
|
|
7948
7948
|
), B = Fs(Q?.escalationSettings);
|
|
7949
7949
|
if (B && typeof B == "object") {
|
|
7950
|
-
ce(re(B.level1PostAssistTime)), S(F(B.level1UserRoleId)), I(re(B.level2PostAssistTime)),
|
|
7950
|
+
ce(re(B.level1PostAssistTime)), S(F(B.level1UserRoleId)), I(re(B.level2PostAssistTime)), L(F(B.level2UserRoleId)), M(re(B.level3PostAssistTime)), Z(F(B.level3UserRoleId));
|
|
7951
7951
|
const le = Array.isArray(B.escalationSettingsActionTypeIds) ? B.escalationSettingsActionTypeIds : [];
|
|
7952
7952
|
Y(le.map((G) => String(G))), ie(Array.isArray(B.thirdPartyId) ? B.thirdPartyId : []), ue(!!B.humanLoop), Ae(!!B.isAutoExpire);
|
|
7953
7953
|
}
|
|
@@ -8039,10 +8039,10 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8039
8039
|
/* @__PURE__ */ h("div", { children: [
|
|
8040
8040
|
/* @__PURE__ */ c(tr, { level: 4, className: "!mb-4", children: "Escalation Settings" }),
|
|
8041
8041
|
/* @__PURE__ */ c(
|
|
8042
|
-
|
|
8042
|
+
Ul,
|
|
8043
8043
|
{
|
|
8044
8044
|
escBasis: V,
|
|
8045
|
-
setEscBasis:
|
|
8045
|
+
setEscBasis: U,
|
|
8046
8046
|
selectedSeverity: q,
|
|
8047
8047
|
setSelectedSeverity: y,
|
|
8048
8048
|
selectedRule: b,
|
|
@@ -8058,7 +8058,7 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8058
8058
|
l2mins: p,
|
|
8059
8059
|
setL2mins: I,
|
|
8060
8060
|
l2role: v,
|
|
8061
|
-
setL2role:
|
|
8061
|
+
setL2role: L,
|
|
8062
8062
|
l3mins: A,
|
|
8063
8063
|
setL3mins: M,
|
|
8064
8064
|
l3role: W,
|
|
@@ -8070,7 +8070,7 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8070
8070
|
humanLoop: Ne,
|
|
8071
8071
|
setHumanLoop: ue,
|
|
8072
8072
|
onClear: () => {
|
|
8073
|
-
u("By Severity"), d("By severity"),
|
|
8073
|
+
u("By Severity"), d("By severity"), U("rules"), y(void 0), E(void 0), ce(void 0), S(void 0), I(void 0), L(void 0), M(void 0), Z(void 0), Y([]), ie([]), ue(!1), Ae(!1);
|
|
8074
8074
|
},
|
|
8075
8075
|
onSave: async () => {
|
|
8076
8076
|
ws(!0), a?.({
|
|
@@ -8109,7 +8109,7 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8109
8109
|
isAutoExpire: me
|
|
8110
8110
|
}
|
|
8111
8111
|
}, G = await i.updateRule(B, le);
|
|
8112
|
-
G?.responseStatus || G?.Success || G?.success ? (Te.success("Escalation settings saved"), await Ke(), E(void 0), ce(void 0), S(void 0), I(void 0),
|
|
8112
|
+
G?.responseStatus || G?.Success || G?.success ? (Te.success("Escalation settings saved"), await Ke(), E(void 0), ce(void 0), S(void 0), I(void 0), L(void 0), M(void 0), Z(void 0), Y([]), ie([]), ue(!1), Ae(!1)) : Te.error(G?.errorMessage || G?.Message || "Error saving Escalation Settings");
|
|
8113
8113
|
}
|
|
8114
8114
|
} catch (re) {
|
|
8115
8115
|
console.error("Error saving escalation settings", re);
|
|
@@ -8131,13 +8131,13 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8131
8131
|
] }),
|
|
8132
8132
|
/* @__PURE__ */ c(Dt, { className: "my-6" }),
|
|
8133
8133
|
/* @__PURE__ */ c(
|
|
8134
|
-
|
|
8134
|
+
Ll,
|
|
8135
8135
|
{
|
|
8136
8136
|
entries: Mt,
|
|
8137
8137
|
userRoles: ge,
|
|
8138
8138
|
loading: x || r,
|
|
8139
8139
|
onEdit: (F) => {
|
|
8140
|
-
|
|
8140
|
+
U("rules");
|
|
8141
8141
|
const re = Mt.find((B) => B.id === F), Q = e.find((B) => B.RuleId === F) || (re ? e.find((B) => B.Name === re.ruleOrSeverityLabel) : void 0);
|
|
8142
8142
|
E(Q ? Q.RuleId : F);
|
|
8143
8143
|
}
|
|
@@ -8149,7 +8149,7 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8149
8149
|
] });
|
|
8150
8150
|
}
|
|
8151
8151
|
const { Title: sr, Text: es } = Pt;
|
|
8152
|
-
function
|
|
8152
|
+
function bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
8153
8153
|
const { rules: r, alerts: a } = He(), i = [
|
|
8154
8154
|
{ label: "By Severity", value: "By Severity" },
|
|
8155
8155
|
{ label: "By Created Date", value: "By Created Date" }
|
|
@@ -8192,7 +8192,7 @@ function Nc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8192
8192
|
y = !0;
|
|
8193
8193
|
};
|
|
8194
8194
|
}, []);
|
|
8195
|
-
const
|
|
8195
|
+
const U = (y) => {
|
|
8196
8196
|
m((b) => {
|
|
8197
8197
|
const E = new Set(b);
|
|
8198
8198
|
return E.has(y) ? E.delete(y) : E.add(y), E;
|
|
@@ -8234,7 +8234,7 @@ function Nc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8234
8234
|
/* @__PURE__ */ c(sr, { level: 5, className: "!mb-2", children: "Anomalies" }),
|
|
8235
8235
|
te ? /* @__PURE__ */ c("div", { className: "py-4", children: /* @__PURE__ */ c(us, {}) }) : /* @__PURE__ */ c(Je, { direction: "vertical", size: 10, className: "w-full", children: (Array.isArray(J) ? J : []).map((y) => {
|
|
8236
8236
|
const b = String(y.recordId), E = y.anomalyName;
|
|
8237
|
-
return /* @__PURE__ */ c(wt, { checked: u.has(b), onChange: () =>
|
|
8237
|
+
return /* @__PURE__ */ c(wt, { checked: u.has(b), onChange: () => U(b), children: E }, b);
|
|
8238
8238
|
}) })
|
|
8239
8239
|
] }),
|
|
8240
8240
|
/* @__PURE__ */ h("div", { className: "mb-4", children: [
|
|
@@ -8599,21 +8599,34 @@ function rr(t) {
|
|
|
8599
8599
|
return e === "video" || e === "mp4" ? !0 : rc(t?.mediaUrl || t);
|
|
8600
8600
|
}
|
|
8601
8601
|
function ac(t) {
|
|
8602
|
+
const e = t?.mediaUrl;
|
|
8603
|
+
let s = null;
|
|
8604
|
+
if (Array.isArray(e))
|
|
8605
|
+
s = e;
|
|
8606
|
+
else if (typeof e == "string")
|
|
8607
|
+
try {
|
|
8608
|
+
const n = JSON.parse(e);
|
|
8609
|
+
Array.isArray(n) && (s = n);
|
|
8610
|
+
} catch {
|
|
8611
|
+
}
|
|
8612
|
+
return s && s.length > 0 ? s.map((n) => ({ ...t, mediaUrl: n })) : [t];
|
|
8613
|
+
}
|
|
8614
|
+
function ic(t) {
|
|
8602
8615
|
const e = t;
|
|
8603
|
-
return e ? Array.isArray(e) ? e : [e] : [];
|
|
8616
|
+
return e ? (Array.isArray(e) ? e : [e]).flatMap(ac) : [];
|
|
8604
8617
|
}
|
|
8605
|
-
const
|
|
8618
|
+
const oc = {
|
|
8606
8619
|
Critical: "#FF3B30",
|
|
8607
8620
|
High: "#FFB86A",
|
|
8608
8621
|
Medium: "#FFCC00",
|
|
8609
8622
|
Low: "#007AFF"
|
|
8610
|
-
},
|
|
8623
|
+
}, lc = {
|
|
8611
8624
|
Critical: "#FFE2E2",
|
|
8612
8625
|
High: "#FF95004D",
|
|
8613
8626
|
Medium: "#FEF9C2",
|
|
8614
8627
|
Low: "#E0EDFF"
|
|
8615
|
-
},
|
|
8616
|
-
const [l, u] = N(), [m, d] = N(""), [g, f] = N(!1), w = wa(null), [O, C] = N("details"), [J, _] = N(void 0), te = dr(), { alerts: k } = He(), { timeZoneDetails: R } = ps(), [V,
|
|
8628
|
+
}, cc = ({ isModalOpen: t, handleModalClose: e, selectedRow: s, fetchAlertLogs: n, alertStatusList: r = [], alertStatusLoading: a = !1, initialTab: i = "details", sourceTab: o }) => {
|
|
8629
|
+
const [l, u] = N(), [m, d] = N(""), [g, f] = N(!1), w = wa(null), [O, C] = N("details"), [J, _] = N(void 0), te = dr(), { alerts: k } = He(), { timeZoneDetails: R } = ps(), [V, U] = N(!1), [q, y] = N(void 0), [b, E] = N(void 0), [de, ce] = N({}), [D, S] = N({}), p = (x, H, K) => {
|
|
8617
8630
|
const we = D[x];
|
|
8618
8631
|
return de[x] === !1 && !we ? /* @__PURE__ */ h("div", { className: "w-full flex flex-col items-center justify-center min-h-[200px] bg-gray-100 rounded-lg gap-2 text-gray-400", children: [
|
|
8619
8632
|
/* @__PURE__ */ c(Kl, { size: 40 }),
|
|
@@ -8634,7 +8647,7 @@ const ic = {
|
|
|
8634
8647
|
] });
|
|
8635
8648
|
}, I = s?.originalData || {}, {
|
|
8636
8649
|
eventName: v,
|
|
8637
|
-
alertId:
|
|
8650
|
+
alertId: L,
|
|
8638
8651
|
timestamp: A,
|
|
8639
8652
|
description: M,
|
|
8640
8653
|
spaceName: W,
|
|
@@ -8697,7 +8710,7 @@ const ic = {
|
|
|
8697
8710
|
}, zt = (r || []).filter((x) => {
|
|
8698
8711
|
const H = Mt(x);
|
|
8699
8712
|
return typeof o < "u" ? o === "archived" ? H : !H : yt ? H : !H;
|
|
8700
|
-
}).map((x) => ({ value: x.value, label: x.statusName })), ct = Se(() =>
|
|
8713
|
+
}).map((x) => ({ value: x.value, label: x.statusName })), ct = Se(() => ic(ue), [ue]);
|
|
8701
8714
|
return ve(() => {
|
|
8702
8715
|
let x = !1;
|
|
8703
8716
|
const H = new AbortController(), K = async (oe) => {
|
|
@@ -8743,7 +8756,7 @@ const ic = {
|
|
|
8743
8756
|
try {
|
|
8744
8757
|
f(!0);
|
|
8745
8758
|
const x = {
|
|
8746
|
-
alertUniqueId:
|
|
8759
|
+
alertUniqueId: L,
|
|
8747
8760
|
alertId: X,
|
|
8748
8761
|
status: l ? String(l) : void 0,
|
|
8749
8762
|
notes: m.trim(),
|
|
@@ -8815,8 +8828,8 @@ const ic = {
|
|
|
8815
8828
|
{
|
|
8816
8829
|
className: "font-sm text-gray-500 rounded-[8px] py-2 px-3",
|
|
8817
8830
|
style: {
|
|
8818
|
-
border: `2px solid ${
|
|
8819
|
-
backgroundColor:
|
|
8831
|
+
border: `2px solid ${oc[String(z)] || "#DFE4EA"}`,
|
|
8832
|
+
backgroundColor: lc[String(z)]
|
|
8820
8833
|
},
|
|
8821
8834
|
children: [
|
|
8822
8835
|
"Severity: ",
|
|
@@ -8910,7 +8923,7 @@ const ic = {
|
|
|
8910
8923
|
"button",
|
|
8911
8924
|
{
|
|
8912
8925
|
onClick: () => {
|
|
8913
|
-
|
|
8926
|
+
U(!0), y(K), E(x.type || "image");
|
|
8914
8927
|
},
|
|
8915
8928
|
className: "absolute bottom-3 right-3 text-white bg-black/50 rounded-full p-2 hover:bg-black/70",
|
|
8916
8929
|
children: /* @__PURE__ */ c(ha, { size: 20 })
|
|
@@ -8923,7 +8936,7 @@ const ic = {
|
|
|
8923
8936
|
nc,
|
|
8924
8937
|
{
|
|
8925
8938
|
isOpen: V,
|
|
8926
|
-
onClose: () =>
|
|
8939
|
+
onClose: () => U(!1),
|
|
8927
8940
|
src: q || "",
|
|
8928
8941
|
type: b || "image"
|
|
8929
8942
|
}
|
|
@@ -8936,7 +8949,7 @@ const ic = {
|
|
|
8936
8949
|
children: /* @__PURE__ */ c(
|
|
8937
8950
|
Hl,
|
|
8938
8951
|
{
|
|
8939
|
-
alertId:
|
|
8952
|
+
alertId: L,
|
|
8940
8953
|
id: X,
|
|
8941
8954
|
priority: z,
|
|
8942
8955
|
spaceName: W,
|
|
@@ -8952,7 +8965,7 @@ const ic = {
|
|
|
8952
8965
|
}
|
|
8953
8966
|
);
|
|
8954
8967
|
};
|
|
8955
|
-
function
|
|
8968
|
+
function uc() {
|
|
8956
8969
|
const { alerts: t } = He(), e = Qs({
|
|
8957
8970
|
queryKey: ["alerts", "statusList"],
|
|
8958
8971
|
queryFn: () => t.getAlertStatusList(),
|
|
@@ -8966,7 +8979,7 @@ function cc() {
|
|
|
8966
8979
|
};
|
|
8967
8980
|
}
|
|
8968
8981
|
function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange: r }) {
|
|
8969
|
-
const [a, i] = N(!1), [o, l] = N(null), [u, m] = N("details"), { list: d, loading: g } =
|
|
8982
|
+
const [a, i] = N(!1), [o, l] = N(null), [u, m] = N("details"), { list: d, loading: g } = uc(), { timeZoneDetails: f } = ps(), w = f?.timeZoneName ?? "UTC", O = f?.ianaTimeZoneId ?? "UTC";
|
|
8970
8983
|
function C(R, V) {
|
|
8971
8984
|
l(R), m(V?.tab ?? "details"), te(V?.sourceTab ?? "active"), i(!0);
|
|
8972
8985
|
}
|
|
@@ -9010,7 +9023,7 @@ function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange
|
|
|
9010
9023
|
{
|
|
9011
9024
|
key: "settings",
|
|
9012
9025
|
label: "Settings",
|
|
9013
|
-
children: /* @__PURE__ */ c(
|
|
9026
|
+
children: /* @__PURE__ */ c(dc, {})
|
|
9014
9027
|
}
|
|
9015
9028
|
// {
|
|
9016
9029
|
// key: "reports",
|
|
@@ -9021,7 +9034,7 @@ function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange
|
|
|
9021
9034
|
}
|
|
9022
9035
|
),
|
|
9023
9036
|
/* @__PURE__ */ c(
|
|
9024
|
-
|
|
9037
|
+
cc,
|
|
9025
9038
|
{
|
|
9026
9039
|
isModalOpen: a,
|
|
9027
9040
|
handleModalClose: J,
|
|
@@ -9036,7 +9049,7 @@ function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange
|
|
|
9036
9049
|
)
|
|
9037
9050
|
] });
|
|
9038
9051
|
}
|
|
9039
|
-
function
|
|
9052
|
+
function dc() {
|
|
9040
9053
|
const [t, e] = N([]), [s, n] = N([]), [r, a] = N([]), [i, o] = N([]), [l, u] = N(!0), { rules: m } = He();
|
|
9041
9054
|
return ve(() => {
|
|
9042
9055
|
let d = !0;
|
|
@@ -9078,7 +9091,7 @@ function uc() {
|
|
|
9078
9091
|
}
|
|
9079
9092
|
);
|
|
9080
9093
|
}
|
|
9081
|
-
function
|
|
9094
|
+
function mc(t = 1) {
|
|
9082
9095
|
const { alerts: e } = He(), s = Qs({
|
|
9083
9096
|
queryKey: ["alerts", "list", t],
|
|
9084
9097
|
queryFn: () => e.listAlerts({ pageNumber: t, pageSize: 10 }),
|
|
@@ -9091,11 +9104,11 @@ function dc(t = 1) {
|
|
|
9091
9104
|
refetch: s.refetch
|
|
9092
9105
|
};
|
|
9093
9106
|
}
|
|
9094
|
-
function
|
|
9095
|
-
const [e, s] = N(1), { alerts: n, loading: r, refetch: a } =
|
|
9107
|
+
function fc(t) {
|
|
9108
|
+
const [e, s] = N(1), { alerts: n, loading: r, refetch: a } = mc(e);
|
|
9096
9109
|
return /* @__PURE__ */ c(ya, { alerts: n, loading: r, columns: t.columns, onRefetch: a, onPageChange: s });
|
|
9097
9110
|
}
|
|
9098
|
-
function
|
|
9111
|
+
function kc({
|
|
9099
9112
|
tenant: t,
|
|
9100
9113
|
apiDomain: e,
|
|
9101
9114
|
rulesDomain: s,
|
|
@@ -9106,7 +9119,7 @@ function bc({
|
|
|
9106
9119
|
loading: o,
|
|
9107
9120
|
columns: l
|
|
9108
9121
|
}) {
|
|
9109
|
-
const [u] = N(() => new
|
|
9122
|
+
const [u] = N(() => new La()), m = Se(
|
|
9110
9123
|
() => ({
|
|
9111
9124
|
alertsBaseUrl: e,
|
|
9112
9125
|
rulesBaseUrl: s || e,
|
|
@@ -9114,9 +9127,9 @@ function bc({
|
|
|
9114
9127
|
}),
|
|
9115
9128
|
[e, s, n]
|
|
9116
9129
|
);
|
|
9117
|
-
return /* @__PURE__ */ c(Fa, { client: u, children: /* @__PURE__ */ c(mi, { tenant: t, override: m, timeZone: r, userManagementDomain: a, children: Array.isArray(i) ? /* @__PURE__ */ c(ya, { alerts: i, loading: !!o, columns: l }) : /* @__PURE__ */ c(
|
|
9130
|
+
return /* @__PURE__ */ c(Fa, { client: u, children: /* @__PURE__ */ c(mi, { tenant: t, override: m, timeZone: r, userManagementDomain: a, children: Array.isArray(i) ? /* @__PURE__ */ c(ya, { alerts: i, loading: !!o, columns: l }) : /* @__PURE__ */ c(fc, { columns: l }) }) });
|
|
9118
9131
|
}
|
|
9119
|
-
function
|
|
9132
|
+
function Ic(t) {
|
|
9120
9133
|
const { alerts: e } = He(), s = Qs({
|
|
9121
9134
|
queryKey: ["alerts", "report", t],
|
|
9122
9135
|
queryFn: () => e.getAlertsReport(t),
|
|
@@ -9129,7 +9142,7 @@ function kc(t) {
|
|
|
9129
9142
|
refetch: s.refetch
|
|
9130
9143
|
};
|
|
9131
9144
|
}
|
|
9132
|
-
const
|
|
9145
|
+
const xc = [
|
|
9133
9146
|
{ title: "ID", dataIndex: "id", key: "id", width: 120 },
|
|
9134
9147
|
{ title: "Priority", dataIndex: "priority", key: "priority", width: 120 },
|
|
9135
9148
|
{ title: "Timestamp", dataIndex: "timestamp", key: "timestamp", width: 220 },
|
|
@@ -9139,19 +9152,19 @@ const Ic = [
|
|
|
9139
9152
|
export {
|
|
9140
9153
|
$l as AlertAssignment,
|
|
9141
9154
|
ya as AlertConsole,
|
|
9142
|
-
|
|
9155
|
+
kc as AlertConsoleWidget,
|
|
9143
9156
|
ur as AlertsTable,
|
|
9144
9157
|
mi as ApiProvider,
|
|
9145
9158
|
Ml as ArchivedTable,
|
|
9146
9159
|
Dl as Clock,
|
|
9147
9160
|
bi as DataTable,
|
|
9148
|
-
|
|
9161
|
+
bc as MyPreferencesPanel,
|
|
9149
9162
|
Pl as SettingsPanel,
|
|
9150
9163
|
Wl as SettingsTabs,
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9164
|
+
xc as exampleAlertColumns,
|
|
9165
|
+
uc as useAlertStatusList,
|
|
9166
|
+
mc as useAlerts,
|
|
9167
|
+
Ic as useAlertsReport,
|
|
9155
9168
|
He as useApi,
|
|
9156
9169
|
dr as useUpdateAlertStatus
|
|
9157
9170
|
};
|