@ssgc/alert-console 2.10.12 → 2.10.13
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 +93 -86
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as c, jsxs as f, Fragment as rn } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as Li, useMemo as ve, createContext as Fi, useRef as pr, useState as S, useCallback as bn, useEffect as oe, useLayoutEffect as $i, forwardRef as gr, createElement as Hs } from "react";
|
|
3
|
-
import { Select as Pe, Table as an, Row as Ze, Col as K, Input as Pi, Tag as wt, Space as st, Tooltip as In, Button as ze, Progress as Wi, Dropdown as Vi, Typography as Jt, Spin as Ns, Checkbox as
|
|
3
|
+
import { Select as Pe, Table as an, Row as Ze, Col as K, Input as Pi, Tag as wt, Space as st, Tooltip as In, Button as ze, Progress as Wi, Dropdown as Vi, Typography as Jt, Spin as Ns, Checkbox as Mt, Divider as zt, TimePicker as kn, Tabs as on, Card as Ds, Steps as Bi, Timeline as Zi, Modal as zi, Carousel as Hi } from "antd";
|
|
4
4
|
import { MessageOutlined as Gi, MailOutlined as qi, MoreOutlined as Yi, PlusOutlined as _i, EditOutlined as ji, LeftOutlined as Ji, RightOutlined as Ki } from "@ant-design/icons";
|
|
5
5
|
import { toast as Ee } from "react-toastify";
|
|
6
6
|
import { useQueryClient as Qi, useMutation as Xi, useQuery as ln, QueryClient as ea, QueryClientProvider as ta } from "@tanstack/react-query";
|
|
@@ -54,7 +54,7 @@ function ma() {
|
|
|
54
54
|
return {};
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Bt(t, e) {
|
|
58
58
|
if (!e) return t;
|
|
59
59
|
const s = new URL(t);
|
|
60
60
|
return Object.entries(e).forEach(([n, r]) => {
|
|
@@ -90,7 +90,7 @@ function fa(t) {
|
|
|
90
90
|
};
|
|
91
91
|
return {
|
|
92
92
|
async listAlerts(s) {
|
|
93
|
-
const n = Ue(t.baseUrl, "/api/Alert"), r =
|
|
93
|
+
const n = Ue(t.baseUrl, "/api/Alert"), r = Bt(n, {
|
|
94
94
|
page: s?.pageNumber ?? 1,
|
|
95
95
|
pageSize: s?.pageSize ?? 10,
|
|
96
96
|
...s?.anomalyId !== void 0 && { anomalyId: s.anomalyId },
|
|
@@ -113,7 +113,7 @@ function fa(t) {
|
|
|
113
113
|
return Array.isArray(n) ? n : n && typeof n == "object" && Array.isArray(n.data) ? n.data : [];
|
|
114
114
|
},
|
|
115
115
|
async getAlertsReport(s) {
|
|
116
|
-
const n = Ue(t.baseUrl, "/Alerts/GetAlertsReport"), r =
|
|
116
|
+
const n = Ue(t.baseUrl, "/Alerts/GetAlertsReport"), r = Bt(n, s), i = await Le(r, {
|
|
117
117
|
method: "GET",
|
|
118
118
|
headers: e
|
|
119
119
|
});
|
|
@@ -183,21 +183,21 @@ function fa(t) {
|
|
|
183
183
|
};
|
|
184
184
|
},
|
|
185
185
|
async getAlertNotifications(s) {
|
|
186
|
-
const n = Ue(t.baseUrl, "/api/Alert/GetNotifications"), r =
|
|
186
|
+
const n = Ue(t.baseUrl, "/api/Alert/GetNotifications"), r = Bt(n, { alertId: s }), i = await Le(r, {
|
|
187
187
|
method: "GET",
|
|
188
188
|
headers: e
|
|
189
189
|
});
|
|
190
190
|
return Array.isArray(i) ? i : i && typeof i == "object" && Array.isArray(i.data) ? i.data : [];
|
|
191
191
|
},
|
|
192
192
|
async notifyFamilyMembers(s) {
|
|
193
|
-
const n = Ue(t.baseUrl, "/api/Alert/NotificationToFamilyMembers"), r =
|
|
193
|
+
const n = Ue(t.baseUrl, "/api/Alert/NotificationToFamilyMembers"), r = Bt(n, { alertId: s });
|
|
194
194
|
return Le(r, {
|
|
195
195
|
method: "POST",
|
|
196
196
|
headers: e
|
|
197
197
|
});
|
|
198
198
|
},
|
|
199
199
|
async sendSMSorEmailNotifications(s, n, r) {
|
|
200
|
-
const i = Ue(t.baseUrl, "/api/Alert/SendSMSorEmailNotifications"), a =
|
|
200
|
+
const i = Ue(t.baseUrl, "/api/Alert/SendSMSorEmailNotifications"), a = Bt(i, { alertId: s, isEmail: n, isSMS: r });
|
|
201
201
|
return Le(a, {
|
|
202
202
|
method: "POST",
|
|
203
203
|
headers: e
|
|
@@ -636,7 +636,7 @@ async function $e(t, e) {
|
|
|
636
636
|
return i;
|
|
637
637
|
}
|
|
638
638
|
const he = (...t) => t.find((e) => e != null);
|
|
639
|
-
function
|
|
639
|
+
function Ot(t, e, s = {}) {
|
|
640
640
|
const n = {};
|
|
641
641
|
for (const r of e) {
|
|
642
642
|
const i = s[r] ?? r.charAt(0).toUpperCase() + r.slice(1);
|
|
@@ -646,7 +646,7 @@ function zt(t, e, s = {}) {
|
|
|
646
646
|
}
|
|
647
647
|
function Na(t) {
|
|
648
648
|
return Array.isArray(t) ? t.map(
|
|
649
|
-
(e) =>
|
|
649
|
+
(e) => Ot(e, [
|
|
650
650
|
"alertLogId",
|
|
651
651
|
"alertId",
|
|
652
652
|
"status",
|
|
@@ -723,7 +723,7 @@ function ba(t) {
|
|
|
723
723
|
headers: e
|
|
724
724
|
});
|
|
725
725
|
return (Array.isArray(n) ? n : []).map(
|
|
726
|
-
(i) =>
|
|
726
|
+
(i) => Ot(i, ["alertStatusId", "value", "statusName"])
|
|
727
727
|
);
|
|
728
728
|
},
|
|
729
729
|
async getAlertsReport(s) {
|
|
@@ -746,11 +746,18 @@ function ba(t) {
|
|
|
746
746
|
});
|
|
747
747
|
},
|
|
748
748
|
async getAlertTimeline(s) {
|
|
749
|
-
const n = Fe(t.baseUrl, `/api/detectionpolicy/alerts/alertTimelines/${s}`)
|
|
750
|
-
return $e(n, {
|
|
749
|
+
const n = Fe(t.baseUrl, `/api/detectionpolicy/alerts/alertTimelines/${s}`), r = await $e(n, {
|
|
751
750
|
method: "GET",
|
|
752
751
|
headers: e
|
|
753
752
|
});
|
|
753
|
+
return (Array.isArray(r) ? r : []).map(
|
|
754
|
+
(a) => Ot(a, [
|
|
755
|
+
"alertUniqueId",
|
|
756
|
+
"timeElapsed",
|
|
757
|
+
"eventName",
|
|
758
|
+
"timeStamp"
|
|
759
|
+
])
|
|
760
|
+
);
|
|
754
761
|
},
|
|
755
762
|
async getAdminSettings() {
|
|
756
763
|
const s = Fe(t.baseUrl, "/api/detectionpolicy/alerts/GetAdminSettings"), n = await $e(s, {
|
|
@@ -760,7 +767,7 @@ function ba(t) {
|
|
|
760
767
|
if (n && typeof n == "object") {
|
|
761
768
|
const r = n.data ?? n.Data ?? n;
|
|
762
769
|
if (r && typeof r == "object")
|
|
763
|
-
return
|
|
770
|
+
return Ot(r, ["userId", "isAdminSetting", "sortBy"], {
|
|
764
771
|
sortBy: "SortOption"
|
|
765
772
|
});
|
|
766
773
|
}
|
|
@@ -836,7 +843,7 @@ function ba(t) {
|
|
|
836
843
|
});
|
|
837
844
|
let a = [];
|
|
838
845
|
return Array.isArray(i) ? a = i : Array.isArray(i?.data) && (a = i.data), a.map(
|
|
839
|
-
(o) =>
|
|
846
|
+
(o) => Ot(o, [
|
|
840
847
|
"alertNotificationSentId",
|
|
841
848
|
"alertId",
|
|
842
849
|
"notificationType",
|
|
@@ -856,7 +863,7 @@ function ba(t) {
|
|
|
856
863
|
headers: e
|
|
857
864
|
});
|
|
858
865
|
return (Array.isArray(n?.Data) ? n.Data : []).map(
|
|
859
|
-
(i) =>
|
|
866
|
+
(i) => Ot(i, [
|
|
860
867
|
"timeZoneUniqueId",
|
|
861
868
|
"ianaTimeZoneId",
|
|
862
869
|
"timeZoneName",
|
|
@@ -2014,7 +2021,7 @@ function Mr({
|
|
|
2014
2021
|
return It.delete(bt), It;
|
|
2015
2022
|
});
|
|
2016
2023
|
}
|
|
2017
|
-
}, ue = cn, Ve = un, be = me[ue], Ke = me[Ve], Me = Un(ue, W, be?.title), we = Un(Ve, W, Ke?.title),
|
|
2024
|
+
}, ue = cn, Ve = un, be = me[ue], Ke = me[Ve], Me = Un(ue, W, be?.title), we = Un(Ve, W, Ke?.title), Wt = Cs(W.id, !0), pt = Cs(W.id, !1), Nt = os(ue) && A.has(Wt), nt = os(Ve) && A.has(pt);
|
|
2018
2025
|
return /* @__PURE__ */ f(st, { size: "middle", children: [
|
|
2019
2026
|
/* @__PURE__ */ c(In, { title: Me.tooltipTitle, children: /* @__PURE__ */ c(
|
|
2020
2027
|
ze,
|
|
@@ -2204,7 +2211,7 @@ class ao extends At {
|
|
|
2204
2211
|
super(`Invalid Duration: ${e.toMessage()}`);
|
|
2205
2212
|
}
|
|
2206
2213
|
}
|
|
2207
|
-
class
|
|
2214
|
+
class Dt extends At {
|
|
2208
2215
|
}
|
|
2209
2216
|
class Cr extends At {
|
|
2210
2217
|
constructor(e) {
|
|
@@ -3347,9 +3354,9 @@ function vs(t, e = 4, s = 1) {
|
|
|
3347
3354
|
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, ...Es(t) };
|
|
3348
3355
|
}
|
|
3349
3356
|
function _n(t, e = 4, s = 1) {
|
|
3350
|
-
const { weekYear: n, weekNumber: r, weekday: i } = t, a = hn(fn(n, 1, e), s), o =
|
|
3357
|
+
const { weekYear: n, weekNumber: r, weekday: i } = t, a = hn(fn(n, 1, e), s), o = Ct(n);
|
|
3351
3358
|
let l = r * 7 + i - a - 7 + e, u;
|
|
3352
|
-
l < 1 ? (u = n - 1, l +=
|
|
3359
|
+
l < 1 ? (u = n - 1, l += Ct(u)) : l > o ? (u = n + 1, l -= Ct(n)) : u = n;
|
|
3353
3360
|
const { month: m, day: d } = ni(u, l);
|
|
3354
3361
|
return { year: u, month: m, day: d, ...Es(t) };
|
|
3355
3362
|
}
|
|
@@ -3364,7 +3371,7 @@ function jn(t) {
|
|
|
3364
3371
|
function Jn(t, e) {
|
|
3365
3372
|
if (!$(t.localWeekday) || !$(t.localWeekNumber) || !$(t.localWeekYear)) {
|
|
3366
3373
|
if (!$(t.weekday) || !$(t.weekNumber) || !$(t.weekYear))
|
|
3367
|
-
throw new
|
|
3374
|
+
throw new Dt(
|
|
3368
3375
|
"Cannot mix locale-based week fields with ISO-based week fields"
|
|
3369
3376
|
);
|
|
3370
3377
|
return $(t.localWeekday) || (t.weekday = t.localWeekday), $(t.localWeekNumber) || (t.weekNumber = t.localWeekNumber), $(t.localWeekYear) || (t.weekYear = t.localWeekYear), delete t.localWeekday, delete t.localWeekNumber, delete t.localWeekYear, {
|
|
@@ -3383,7 +3390,7 @@ function Do(t, e = 4, s = 1) {
|
|
|
3383
3390
|
return n ? r ? i ? !1 : je("weekday", t.weekday) : je("week", t.weekNumber) : je("weekYear", t.weekYear);
|
|
3384
3391
|
}
|
|
3385
3392
|
function Co(t) {
|
|
3386
|
-
const e = Is(t.year), s = Je(t.ordinal, 1,
|
|
3393
|
+
const e = Is(t.year), s = Je(t.ordinal, 1, Ct(t.year));
|
|
3387
3394
|
return e ? s ? !1 : je("ordinal", t.ordinal) : je("year", t.year);
|
|
3388
3395
|
}
|
|
3389
3396
|
function ri(t) {
|
|
@@ -3436,7 +3443,7 @@ function Kn(t, e, s) {
|
|
|
3436
3443
|
function Fo(t, e) {
|
|
3437
3444
|
return e.reduce((s, n) => (s[n] = t[n], s), {});
|
|
3438
3445
|
}
|
|
3439
|
-
function
|
|
3446
|
+
function Ut(t, e) {
|
|
3440
3447
|
return Object.prototype.hasOwnProperty.call(t, e);
|
|
3441
3448
|
}
|
|
3442
3449
|
function en(t) {
|
|
@@ -3497,7 +3504,7 @@ function pn(t, e, s = "round") {
|
|
|
3497
3504
|
function Qt(t) {
|
|
3498
3505
|
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
|
3499
3506
|
}
|
|
3500
|
-
function
|
|
3507
|
+
function Ct(t) {
|
|
3501
3508
|
return Qt(t) ? 366 : 365;
|
|
3502
3509
|
}
|
|
3503
3510
|
function ws(t, e) {
|
|
@@ -3521,7 +3528,7 @@ function Qn(t, e, s) {
|
|
|
3521
3528
|
}
|
|
3522
3529
|
function _t(t, e = 4, s = 1) {
|
|
3523
3530
|
const n = Qn(t, e, s), r = Qn(t + 1, e, s);
|
|
3524
|
-
return (
|
|
3531
|
+
return (Ct(t) - n + r) / 7;
|
|
3525
3532
|
}
|
|
3526
3533
|
function tn(t) {
|
|
3527
3534
|
return t > 99 ? t : t > Ne.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
|
|
@@ -3554,7 +3561,7 @@ function ci(t) {
|
|
|
3554
3561
|
function As(t, e) {
|
|
3555
3562
|
const s = {};
|
|
3556
3563
|
for (const n in t)
|
|
3557
|
-
if (
|
|
3564
|
+
if (Ut(t, n)) {
|
|
3558
3565
|
const r = t[n];
|
|
3559
3566
|
if (r == null) continue;
|
|
3560
3567
|
s[e(n)] = ci(r);
|
|
@@ -3962,11 +3969,11 @@ class Ce {
|
|
|
3962
3969
|
}
|
|
3963
3970
|
}
|
|
3964
3971
|
const gi = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
|
3965
|
-
function
|
|
3972
|
+
function Lt(...t) {
|
|
3966
3973
|
const e = t.reduce((s, n) => s + n.source, "");
|
|
3967
3974
|
return RegExp(`^${e}$`);
|
|
3968
3975
|
}
|
|
3969
|
-
function
|
|
3976
|
+
function Ft(...t) {
|
|
3970
3977
|
return (e) => t.reduce(
|
|
3971
3978
|
([s, n, r], i) => {
|
|
3972
3979
|
const [a, o, l] = i(e, r);
|
|
@@ -3975,7 +3982,7 @@ function Lt(...t) {
|
|
|
3975
3982
|
[{}, null, 1]
|
|
3976
3983
|
).slice(0, 2);
|
|
3977
3984
|
}
|
|
3978
|
-
function
|
|
3985
|
+
function $t(t, ...e) {
|
|
3979
3986
|
if (t == null)
|
|
3980
3987
|
return [null, null];
|
|
3981
3988
|
for (const [s, n] of e) {
|
|
@@ -3997,22 +4004,22 @@ function Si(...t) {
|
|
|
3997
4004
|
const vi = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/, Jo = `(?:${vi.source}?(?:\\[(${gi.source})\\])?)?`, gn = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, wi = RegExp(`${gn.source}${Jo}`), Sn = RegExp(`(?:[Tt]${wi.source})?`), Ko = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Qo = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Xo = /(\d{4})-?(\d{3})/, el = Si("weekYear", "weekNumber", "weekDay"), tl = Si("year", "ordinal"), sl = /(\d{4})-(\d\d)-(\d\d)/, Ai = RegExp(
|
|
3998
4005
|
`${gn.source} ?(?:${vi.source}|(${gi.source}))?`
|
|
3999
4006
|
), nl = RegExp(`(?: ${Ai.source})?`);
|
|
4000
|
-
function
|
|
4007
|
+
function Rt(t, e, s) {
|
|
4001
4008
|
const n = t[e];
|
|
4002
4009
|
return $(n) ? s : ft(n);
|
|
4003
4010
|
}
|
|
4004
4011
|
function rl(t, e) {
|
|
4005
4012
|
return [{
|
|
4006
|
-
year:
|
|
4007
|
-
month:
|
|
4008
|
-
day:
|
|
4013
|
+
year: Rt(t, e),
|
|
4014
|
+
month: Rt(t, e + 1, 1),
|
|
4015
|
+
day: Rt(t, e + 2, 1)
|
|
4009
4016
|
}, null, e + 3];
|
|
4010
4017
|
}
|
|
4011
|
-
function
|
|
4018
|
+
function Pt(t, e) {
|
|
4012
4019
|
return [{
|
|
4013
|
-
hours:
|
|
4014
|
-
minutes:
|
|
4015
|
-
seconds:
|
|
4020
|
+
hours: Rt(t, e, 0),
|
|
4021
|
+
minutes: Rt(t, e + 1, 0),
|
|
4022
|
+
seconds: Rt(t, e + 2, 0),
|
|
4016
4023
|
milliseconds: yn(t[e + 3])
|
|
4017
4024
|
}, null, e + 4];
|
|
4018
4025
|
}
|
|
@@ -4092,28 +4099,28 @@ function yl(t) {
|
|
|
4092
4099
|
const [, e, s, n, r, i, a, o] = t;
|
|
4093
4100
|
return [vn(e, o, s, n, r, i, a), We.utcInstance];
|
|
4094
4101
|
}
|
|
4095
|
-
const pl =
|
|
4102
|
+
const pl = Lt(Ko, Sn), gl = Lt(Qo, Sn), Sl = Lt(Xo, Sn), vl = Lt(wi), Ni = Ft(
|
|
4096
4103
|
rl,
|
|
4097
|
-
|
|
4104
|
+
Pt,
|
|
4098
4105
|
Xt,
|
|
4099
4106
|
es
|
|
4100
|
-
), wl =
|
|
4107
|
+
), wl = Ft(
|
|
4101
4108
|
el,
|
|
4102
|
-
|
|
4109
|
+
Pt,
|
|
4103
4110
|
Xt,
|
|
4104
4111
|
es
|
|
4105
|
-
), Al =
|
|
4112
|
+
), Al = Ft(
|
|
4106
4113
|
tl,
|
|
4107
|
-
|
|
4114
|
+
Pt,
|
|
4108
4115
|
Xt,
|
|
4109
4116
|
es
|
|
4110
|
-
), Nl =
|
|
4111
|
-
|
|
4117
|
+
), Nl = Ft(
|
|
4118
|
+
Pt,
|
|
4112
4119
|
Xt,
|
|
4113
4120
|
es
|
|
4114
4121
|
);
|
|
4115
4122
|
function Tl(t) {
|
|
4116
|
-
return
|
|
4123
|
+
return $t(
|
|
4117
4124
|
t,
|
|
4118
4125
|
[pl, Ni],
|
|
4119
4126
|
[gl, wl],
|
|
@@ -4122,10 +4129,10 @@ function Tl(t) {
|
|
|
4122
4129
|
);
|
|
4123
4130
|
}
|
|
4124
4131
|
function bl(t) {
|
|
4125
|
-
return
|
|
4132
|
+
return $t(dl(t), [cl, ul]);
|
|
4126
4133
|
}
|
|
4127
4134
|
function Il(t) {
|
|
4128
|
-
return
|
|
4135
|
+
return $t(
|
|
4129
4136
|
t,
|
|
4130
4137
|
[ml, er],
|
|
4131
4138
|
[fl, er],
|
|
@@ -4133,19 +4140,19 @@ function Il(t) {
|
|
|
4133
4140
|
);
|
|
4134
4141
|
}
|
|
4135
4142
|
function kl(t) {
|
|
4136
|
-
return
|
|
4143
|
+
return $t(t, [al, ol]);
|
|
4137
4144
|
}
|
|
4138
|
-
const xl =
|
|
4145
|
+
const xl = Ft(Pt);
|
|
4139
4146
|
function El(t) {
|
|
4140
|
-
return
|
|
4147
|
+
return $t(t, [il, xl]);
|
|
4141
4148
|
}
|
|
4142
|
-
const Ol =
|
|
4143
|
-
|
|
4149
|
+
const Ol = Lt(sl, nl), Ml = Lt(Ai), Dl = Ft(
|
|
4150
|
+
Pt,
|
|
4144
4151
|
Xt,
|
|
4145
4152
|
es
|
|
4146
4153
|
);
|
|
4147
4154
|
function Cl(t) {
|
|
4148
|
-
return
|
|
4155
|
+
return $t(
|
|
4149
4156
|
t,
|
|
4150
4157
|
[Ol, Ni],
|
|
4151
4158
|
[Ml, Dl]
|
|
@@ -4606,7 +4613,7 @@ class X {
|
|
|
4606
4613
|
if (!this.isValid) return this;
|
|
4607
4614
|
const s = X.fromDurationLike(e), n = {};
|
|
4608
4615
|
for (const r of vt)
|
|
4609
|
-
(
|
|
4616
|
+
(Ut(s.values, r) || Ut(this.values, r)) && (n[r] = s.get(r) + this.get(r));
|
|
4610
4617
|
return at(this, { values: n }, !0);
|
|
4611
4618
|
}
|
|
4612
4619
|
/**
|
|
@@ -4909,7 +4916,7 @@ class Ae {
|
|
|
4909
4916
|
* @return {Interval}
|
|
4910
4917
|
*/
|
|
4911
4918
|
static fromDateTimes(e, s) {
|
|
4912
|
-
const n =
|
|
4919
|
+
const n = Zt(e), r = Zt(s), i = Fl(n, r);
|
|
4913
4920
|
return i ?? new Ae({
|
|
4914
4921
|
start: n,
|
|
4915
4922
|
end: r
|
|
@@ -4922,7 +4929,7 @@ class Ae {
|
|
|
4922
4929
|
* @return {Interval}
|
|
4923
4930
|
*/
|
|
4924
4931
|
static after(e, s) {
|
|
4925
|
-
const n = X.fromDurationLike(s), r =
|
|
4932
|
+
const n = X.fromDurationLike(s), r = Zt(e);
|
|
4926
4933
|
return Ae.fromDateTimes(r, r.plus(n));
|
|
4927
4934
|
}
|
|
4928
4935
|
/**
|
|
@@ -4932,7 +4939,7 @@ class Ae {
|
|
|
4932
4939
|
* @return {Interval}
|
|
4933
4940
|
*/
|
|
4934
4941
|
static before(e, s) {
|
|
4935
|
-
const n = X.fromDurationLike(s), r =
|
|
4942
|
+
const n = X.fromDurationLike(s), r = Zt(e);
|
|
4936
4943
|
return Ae.fromDateTimes(r.minus(n), r);
|
|
4937
4944
|
}
|
|
4938
4945
|
/**
|
|
@@ -5102,7 +5109,7 @@ class Ae {
|
|
|
5102
5109
|
*/
|
|
5103
5110
|
splitAt(...e) {
|
|
5104
5111
|
if (!this.isValid) return [];
|
|
5105
|
-
const s = e.map(
|
|
5112
|
+
const s = e.map(Zt).filter((a) => this.contains(a)).sort((a, o) => a.toMillis() - o.toMillis()), n = [];
|
|
5106
5113
|
let { s: r } = this, i = 0;
|
|
5107
5114
|
for (; r < this.e; ) {
|
|
5108
5115
|
const a = s[i] || this.e, o = +a > +this.e ? this.e : a;
|
|
@@ -5766,7 +5773,7 @@ function Yl(t, e, s) {
|
|
|
5766
5773
|
const r = {};
|
|
5767
5774
|
let i = 1;
|
|
5768
5775
|
for (const a in s)
|
|
5769
|
-
if (
|
|
5776
|
+
if (Ut(s, a)) {
|
|
5770
5777
|
const o = s[a], l = o.groups ? o.groups + 1 : 1;
|
|
5771
5778
|
!o.literal && o.token && (r[o.token.val[0]] = o.deser(n.slice(i, i + l))), i += l;
|
|
5772
5779
|
}
|
|
@@ -5837,8 +5844,8 @@ class Ei {
|
|
|
5837
5844
|
explainFromTokens(e) {
|
|
5838
5845
|
if (this.isValid) {
|
|
5839
5846
|
const [s, n] = Yl(e, this.regex, this.handlers), [r, i, a] = n ? _l(n) : [null, null, void 0];
|
|
5840
|
-
if (
|
|
5841
|
-
throw new
|
|
5847
|
+
if (Ut(n, "a") && Ut(n, "H"))
|
|
5848
|
+
throw new Dt(
|
|
5842
5849
|
"Can't include meridiem when specifying 24-hour format"
|
|
5843
5850
|
);
|
|
5844
5851
|
return {
|
|
@@ -6295,11 +6302,11 @@ class F {
|
|
|
6295
6302
|
return F.invalid(Gt(n));
|
|
6296
6303
|
const r = re.fromObject(s), i = As(e, ur), { minDaysInFirstWeek: a, startOfWeek: o } = Jn(i, r), l = Ne.now(), u = $(s.specificOffset) ? n.offset(l) : s.specificOffset, m = !$(i.ordinal), d = !$(i.year), y = !$(i.month) || !$(i.day), p = d || y, v = i.weekYear || i.weekNumber;
|
|
6297
6304
|
if ((p || m) && v)
|
|
6298
|
-
throw new
|
|
6305
|
+
throw new Dt(
|
|
6299
6306
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
|
6300
6307
|
);
|
|
6301
6308
|
if (y && m)
|
|
6302
|
-
throw new
|
|
6309
|
+
throw new Dt("Can't mix ordinal dates with month/day");
|
|
6303
6310
|
const k = v || i.weekday && !p;
|
|
6304
6311
|
let b, B, q = ds(l, u);
|
|
6305
6312
|
k ? (b = ec, B = Ql, q = vs(q, a, o)) : m ? (b = tc, B = Xl, q = Fs(q)) : (b = ps, B = Ci);
|
|
@@ -6809,7 +6816,7 @@ class F {
|
|
|
6809
6816
|
* @type {number}
|
|
6810
6817
|
*/
|
|
6811
6818
|
get daysInYear() {
|
|
6812
|
-
return this.isValid ?
|
|
6819
|
+
return this.isValid ? Ct(this.year) : NaN;
|
|
6813
6820
|
}
|
|
6814
6821
|
/**
|
|
6815
6822
|
* Returns the number of weeks in this DateTime's year
|
|
@@ -6926,11 +6933,11 @@ class F {
|
|
|
6926
6933
|
if (!this.isValid) return this;
|
|
6927
6934
|
const s = As(e, ur), { minDaysInFirstWeek: n, startOfWeek: r } = Jn(s, this.loc), i = !$(s.weekYear) || !$(s.weekNumber) || !$(s.weekday), a = !$(s.ordinal), o = !$(s.year), l = !$(s.month) || !$(s.day), u = o || l, m = s.weekYear || s.weekNumber;
|
|
6928
6935
|
if ((u || a) && m)
|
|
6929
|
-
throw new
|
|
6936
|
+
throw new Dt(
|
|
6930
6937
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
|
6931
6938
|
);
|
|
6932
6939
|
if (l && a)
|
|
6933
|
-
throw new
|
|
6940
|
+
throw new Dt("Can't mix ordinal dates with month/day");
|
|
6934
6941
|
let d;
|
|
6935
6942
|
i ? d = _n(
|
|
6936
6943
|
{ ...vs(this.c, n, r), ...s },
|
|
@@ -7688,7 +7695,7 @@ class F {
|
|
|
7688
7695
|
return Kr;
|
|
7689
7696
|
}
|
|
7690
7697
|
}
|
|
7691
|
-
function
|
|
7698
|
+
function Zt(t) {
|
|
7692
7699
|
if (F.isDateTime(t))
|
|
7693
7700
|
return t;
|
|
7694
7701
|
if (t && t.valueOf && yt(t.valueOf()))
|
|
@@ -8247,8 +8254,8 @@ function fc(t) {
|
|
|
8247
8254
|
] }),
|
|
8248
8255
|
/* @__PURE__ */ f(Ze, { gutter: [16, 16], align: "bottom", className: "mt-4 items-center", children: [
|
|
8249
8256
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 7, children: /* @__PURE__ */ f("div", { className: "flex items-center h-full gap-8", children: [
|
|
8250
|
-
!A && /* @__PURE__ */ c(
|
|
8251
|
-
/* @__PURE__ */ c(
|
|
8257
|
+
!A && /* @__PURE__ */ c(Mt, { checked: Z, onChange: (te) => R(te.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
|
|
8258
|
+
/* @__PURE__ */ c(Mt, { checked: G, onChange: (te) => h(te.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
|
|
8252
8259
|
] }) }),
|
|
8253
8260
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
8254
8261
|
/* @__PURE__ */ c(ze, { onClick: g, children: "Clear" }),
|
|
@@ -8504,7 +8511,7 @@ function zs(t) {
|
|
|
8504
8511
|
};
|
|
8505
8512
|
}
|
|
8506
8513
|
function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: i }) {
|
|
8507
|
-
const { rules: a, alerts: o } = Ge(), [l, u] = S("By Severity"), [m, d] = S("By severity"), [y, p] = S("By Severity"), [v, k] = S(!1), [b, B] = S(!1), [q, Q] = S(!1), [x, C] = S(null), [Z, R] = S("rules"), [G, h] = S(), [g, M] = S(), [ie, ye] = S(), [O, N] = S(), [A, E] = S(), [T, D] = S(), [L, _] = S(), [Y, j] = S(), [ce, me] = S([]), [Oe, te] = S([]), [Se, ke] = S(!1), [pe, P] = S(!1), [W, ge] = S({}), [ue, Ve] = S({}), [be, Ke] = S(s || []), [Me, we] = S([]), [
|
|
8514
|
+
const { rules: a, alerts: o } = Ge(), [l, u] = S("By Severity"), [m, d] = S("By severity"), [y, p] = S("By Severity"), [v, k] = S(!1), [b, B] = S(!1), [q, Q] = S(!1), [x, C] = S(null), [Z, R] = S("rules"), [G, h] = S(), [g, M] = S(), [ie, ye] = S(), [O, N] = S(), [A, E] = S(), [T, D] = S(), [L, _] = S(), [Y, j] = S(), [ce, me] = S([]), [Oe, te] = S([]), [Se, ke] = S(!1), [pe, P] = S(!1), [W, ge] = S({}), [ue, Ve] = S({}), [be, Ke] = S(s || []), [Me, we] = S([]), [Wt, pt] = S(!1), [Nt, nt] = S(!1), [Be, Tt] = S(n || []);
|
|
8508
8515
|
oe(() => {
|
|
8509
8516
|
n && n.length && Tt(n);
|
|
8510
8517
|
}, [n]), oe(() => {
|
|
@@ -8661,7 +8668,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8661
8668
|
)
|
|
8662
8669
|
] })
|
|
8663
8670
|
] }),
|
|
8664
|
-
/* @__PURE__ */ c(
|
|
8671
|
+
/* @__PURE__ */ c(zt, { className: "my-6" }),
|
|
8665
8672
|
/* @__PURE__ */ f("div", { children: [
|
|
8666
8673
|
/* @__PURE__ */ c(hr, { level: 4, className: "!mb-4", children: "Escalation Settings" }),
|
|
8667
8674
|
/* @__PURE__ */ c(
|
|
@@ -8743,7 +8750,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8743
8750
|
pt(!1);
|
|
8744
8751
|
}
|
|
8745
8752
|
},
|
|
8746
|
-
saving:
|
|
8753
|
+
saving: Wt,
|
|
8747
8754
|
onActionTypesLoaded: (U) => {
|
|
8748
8755
|
const se = {};
|
|
8749
8756
|
for (const J of U)
|
|
@@ -8755,7 +8762,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8755
8762
|
}
|
|
8756
8763
|
)
|
|
8757
8764
|
] }),
|
|
8758
|
-
/* @__PURE__ */ c(
|
|
8765
|
+
/* @__PURE__ */ c(zt, { className: "my-6" }),
|
|
8759
8766
|
/* @__PURE__ */ c(
|
|
8760
8767
|
hc,
|
|
8761
8768
|
{
|
|
@@ -8769,9 +8776,9 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8769
8776
|
}
|
|
8770
8777
|
}
|
|
8771
8778
|
),
|
|
8772
|
-
/* @__PURE__ */ c(
|
|
8779
|
+
/* @__PURE__ */ c(zt, { className: "my-6" }),
|
|
8773
8780
|
/* @__PURE__ */ c(pc, { userRoles: be, rules: e, rawRules: n }),
|
|
8774
|
-
/* @__PURE__ */ c(
|
|
8781
|
+
/* @__PURE__ */ c(zt, {})
|
|
8775
8782
|
] });
|
|
8776
8783
|
}
|
|
8777
8784
|
const { Title: yr, Text: fs } = Jt;
|
|
@@ -8860,7 +8867,7 @@ function Bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8860
8867
|
/* @__PURE__ */ c(yr, { level: 5, className: "!mb-2", children: "Anomalies" }),
|
|
8861
8868
|
Q ? /* @__PURE__ */ c("div", { className: "py-4", children: /* @__PURE__ */ c(Ns, {}) }) : /* @__PURE__ */ c(st, { direction: "vertical", size: 10, className: "w-full", children: (Array.isArray(B) ? B : []).map((h) => {
|
|
8862
8869
|
const g = String(h.recordId), M = h.anomalyName;
|
|
8863
|
-
return /* @__PURE__ */ c(
|
|
8870
|
+
return /* @__PURE__ */ c(Mt, { checked: u.has(g), onChange: () => R(g), children: M }, g);
|
|
8864
8871
|
}) })
|
|
8865
8872
|
] }),
|
|
8866
8873
|
/* @__PURE__ */ f("div", { className: "mb-4", children: [
|
|
@@ -8879,12 +8886,12 @@ function Bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8879
8886
|
] })
|
|
8880
8887
|
] }) }) }),
|
|
8881
8888
|
/* @__PURE__ */ f(Ze, { gutter: [24, 12], children: [
|
|
8882
|
-
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(
|
|
8883
|
-
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(
|
|
8884
|
-
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(
|
|
8889
|
+
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Mt, { checked: k.inApp, onChange: (h) => b({ ...k, inApp: h.target.checked }), children: "In-app" }) }),
|
|
8890
|
+
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Mt, { checked: k.sms, onChange: (h) => b({ ...k, sms: h.target.checked }), children: "SMS" }) }),
|
|
8891
|
+
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Mt, { checked: k.email, onChange: (h) => b({ ...k, email: h.target.checked }), children: "Email" }) })
|
|
8885
8892
|
] })
|
|
8886
8893
|
] }),
|
|
8887
|
-
/* @__PURE__ */ c(
|
|
8894
|
+
/* @__PURE__ */ c(zt, {}),
|
|
8888
8895
|
/* @__PURE__ */ f(st, { className: "gap-3", children: [
|
|
8889
8896
|
/* @__PURE__ */ c(ze, { onClick: n, disabled: C, children: "Cancel" }),
|
|
8890
8897
|
/* @__PURE__ */ c(ze, { type: "primary", onClick: G, loading: C, children: "Save" })
|
|
@@ -9091,7 +9098,7 @@ const Tc = ({
|
|
|
9091
9098
|
/* @__PURE__ */ c(Tr, { boxes: d, priority: n })
|
|
9092
9099
|
] });
|
|
9093
9100
|
}, Ic = ({ items: t }) => {
|
|
9094
|
-
const { timeZoneDetails: e } = ts(), s = (i) => i
|
|
9101
|
+
const { timeZoneDetails: e } = ts(), s = (i) => i?.replace(/([a-z])([A-Z])/g, "$1 $2"), r = (() => {
|
|
9095
9102
|
if (!t?.length || t.length < 2) return null;
|
|
9096
9103
|
const i = new Date(t[0].timeStamp).getTime(), a = new Date(t[t.length - 1].timeStamp).getTime(), o = Math.floor((a - i) / 1e3), l = a - i, u = Math.floor(o / 3600), m = Math.floor(o % 3600 / 60), d = o % 60, y = l % 1e3;
|
|
9097
9104
|
return [
|
|
@@ -9195,7 +9202,7 @@ const Tc = ({
|
|
|
9195
9202
|
statusType: Ke,
|
|
9196
9203
|
id: Me,
|
|
9197
9204
|
alertDetails: we,
|
|
9198
|
-
statusHistory:
|
|
9205
|
+
statusHistory: Wt,
|
|
9199
9206
|
mediaDetails: pt,
|
|
9200
9207
|
alertNumber: Nt
|
|
9201
9208
|
} = te, nt = te.bbox_xyxy, Be = ve(
|
|
@@ -9306,15 +9313,15 @@ const Tc = ({
|
|
|
9306
9313
|
try {
|
|
9307
9314
|
const le = await fetch(fe, { method: "HEAD", signal: H.signal });
|
|
9308
9315
|
if (le.ok) {
|
|
9309
|
-
w || j((
|
|
9316
|
+
w || j((Vt) => ({ ...Vt, [fe]: !0 }));
|
|
9310
9317
|
return;
|
|
9311
9318
|
}
|
|
9312
9319
|
if (le.status === 404) {
|
|
9313
|
-
w || j((
|
|
9320
|
+
w || j((Vt) => ({ ...Vt, [fe]: !1 }));
|
|
9314
9321
|
return;
|
|
9315
9322
|
}
|
|
9316
9323
|
if (!(await fetch(fe, { method: "GET", signal: H.signal })).ok) throw new Error("Media not available");
|
|
9317
|
-
w || j((
|
|
9324
|
+
w || j((Vt) => ({ ...Vt, [fe]: !0 }));
|
|
9318
9325
|
} catch {
|
|
9319
9326
|
w || j((le) => ({ ...le, [fe]: !1 }));
|
|
9320
9327
|
}
|
|
@@ -9574,7 +9581,7 @@ const Tc = ({
|
|
|
9574
9581
|
priority: be,
|
|
9575
9582
|
spaceName: ue,
|
|
9576
9583
|
alertNumber: Nt,
|
|
9577
|
-
statusHistory:
|
|
9584
|
+
statusHistory: Wt,
|
|
9578
9585
|
notifGroups: C
|
|
9579
9586
|
}
|
|
9580
9587
|
)
|