@ssgc/alert-console 2.10.7 → 2.10.8
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 +148 -139
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -306,7 +306,7 @@ function Sa() {
|
|
|
306
306
|
(function(s, n) {
|
|
307
307
|
t.exports = n();
|
|
308
308
|
})(ga, (function() {
|
|
309
|
-
var s = 1e3, n = 6e4, r = 36e5, i = "millisecond", a = "second", o = "minute", l = "hour", u = "day", m = "week", d = "month",
|
|
309
|
+
var s = 1e3, n = 6e4, r = 36e5, i = "millisecond", a = "second", o = "minute", l = "hour", u = "day", m = "week", d = "month", y = "quarter", p = "year", v = "date", k = "Invalid Date", b = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, V = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, q = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(E) {
|
|
310
310
|
var N = ["th", "st", "nd", "rd"], w = E % 100;
|
|
311
311
|
return "[" + E + (N[(w - 20) % 10] || N[w] || N[0]) + "]";
|
|
312
312
|
} }, Q = function(E, N, w) {
|
|
@@ -322,7 +322,7 @@ function Sa() {
|
|
|
322
322
|
}, a: function(E) {
|
|
323
323
|
return E < 0 ? Math.ceil(E) || 0 : Math.floor(E);
|
|
324
324
|
}, p: function(E) {
|
|
325
|
-
return { M: d, y, w: m, d: u, D: v, h: l, m: o, s: a, ms: i, Q:
|
|
325
|
+
return { M: d, y: p, w: m, d: u, D: v, h: l, m: o, s: a, ms: i, Q: y }[E] || String(E || "").toLowerCase().replace(/s$/, "");
|
|
326
326
|
}, u: function(E) {
|
|
327
327
|
return E === void 0;
|
|
328
328
|
} }, C = "en", Z = {};
|
|
@@ -398,7 +398,7 @@ function Sa() {
|
|
|
398
398
|
return M.w(T.toDate()[ke].apply(T.toDate("s"), (D ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ye)), T);
|
|
399
399
|
}, j = this.$W, le = this.$M, de = this.$D, Ee = "set" + (this.$u ? "UTC" : "");
|
|
400
400
|
switch (L) {
|
|
401
|
-
case
|
|
401
|
+
case p:
|
|
402
402
|
return D ? _(1, 0) : _(31, 11);
|
|
403
403
|
case d:
|
|
404
404
|
return D ? _(1, le) : _(0, le + 1);
|
|
@@ -420,8 +420,8 @@ function Sa() {
|
|
|
420
420
|
}, N.endOf = function(w) {
|
|
421
421
|
return this.startOf(w, !1);
|
|
422
422
|
}, N.$set = function(w, O) {
|
|
423
|
-
var T, D = M.p(w), L = "set" + (this.$u ? "UTC" : ""), _ = (T = {}, T[u] = L + "Date", T[v] = L + "Date", T[d] = L + "Month", T[
|
|
424
|
-
if (D === d || D ===
|
|
423
|
+
var T, D = M.p(w), L = "set" + (this.$u ? "UTC" : ""), _ = (T = {}, T[u] = L + "Date", T[v] = L + "Date", T[d] = L + "Month", T[p] = L + "FullYear", T[l] = L + "Hours", T[o] = L + "Minutes", T[a] = L + "Seconds", T[i] = L + "Milliseconds", T)[D], Y = D === u ? this.$D + (O - this.$W) : O;
|
|
424
|
+
if (D === d || D === p) {
|
|
425
425
|
var j = this.clone().set(v, 1);
|
|
426
426
|
j.$d[_](Y), j.init(), this.$d = j.set(v, Math.min(this.$D, j.daysInMonth())).$d;
|
|
427
427
|
} else _ && this.$d[_](Y);
|
|
@@ -438,7 +438,7 @@ function Sa() {
|
|
|
438
438
|
return M.w(de.date(de.date() + Math.round(le * w)), D);
|
|
439
439
|
};
|
|
440
440
|
if (L === d) return this.set(d, this.$M + w);
|
|
441
|
-
if (L ===
|
|
441
|
+
if (L === p) return this.set(p, this.$y + w);
|
|
442
442
|
if (L === u) return _(1);
|
|
443
443
|
if (L === m) return _(7);
|
|
444
444
|
var Y = (T = {}, T[o] = n, T[l] = r, T[a] = s, T)[L] || 1, j = this.$d.getTime() + w * Y;
|
|
@@ -518,13 +518,13 @@ function Sa() {
|
|
|
518
518
|
return M.m(L, Y);
|
|
519
519
|
};
|
|
520
520
|
switch (_) {
|
|
521
|
-
case
|
|
521
|
+
case p:
|
|
522
522
|
D = de() / 12;
|
|
523
523
|
break;
|
|
524
524
|
case d:
|
|
525
525
|
D = de();
|
|
526
526
|
break;
|
|
527
|
-
case
|
|
527
|
+
case y:
|
|
528
528
|
D = de() / 3;
|
|
529
529
|
break;
|
|
530
530
|
case m:
|
|
@@ -566,7 +566,7 @@ function Sa() {
|
|
|
566
566
|
return this.$d.toUTCString();
|
|
567
567
|
}, E;
|
|
568
568
|
})(), he = ie.prototype;
|
|
569
|
-
return g.prototype = he, [["$ms", i], ["$s", a], ["$m", o], ["$H", l], ["$W", u], ["$M", d], ["$y",
|
|
569
|
+
return g.prototype = he, [["$ms", i], ["$s", a], ["$m", o], ["$H", l], ["$W", u], ["$M", d], ["$y", p], ["$D", v]].forEach((function(E) {
|
|
570
570
|
he[E[1]] = function(N) {
|
|
571
571
|
return this.$g(N, E[0], E[1]);
|
|
572
572
|
};
|
|
@@ -782,8 +782,8 @@ function ba(t) {
|
|
|
782
782
|
},
|
|
783
783
|
async setPreferenceSettings(s) {
|
|
784
784
|
const n = Be(t.baseUrl, "/api/detectionpolicy/alerts/SetPreferenceSettings"), r = (u) => {
|
|
785
|
-
const { hours: m, minutes: d, seconds:
|
|
786
|
-
return (m * 3600 + d * 60 +
|
|
785
|
+
const { hours: m, minutes: d, seconds: y } = wr(u);
|
|
786
|
+
return (m * 3600 + d * 60 + y) * 1e7;
|
|
787
787
|
}, i = {
|
|
788
788
|
Settings: {
|
|
789
789
|
UserId: 0,
|
|
@@ -940,14 +940,14 @@ function ka(t) {
|
|
|
940
940
|
u,
|
|
941
941
|
m,
|
|
942
942
|
d
|
|
943
|
-
] = await Promise.allSettled(i),
|
|
943
|
+
] = await Promise.allSettled(i), y = (h) => {
|
|
944
944
|
if (h.status !== "fulfilled") return [];
|
|
945
945
|
const g = h.value;
|
|
946
946
|
return Array.isArray(g) ? g : Array.isArray(g?.Data) ? g.Data : Array.isArray(g?.data) ? g.data : [];
|
|
947
|
-
},
|
|
947
|
+
}, p = y(a), v = y(o), k = y(l), b = y(u), V = y(m), q = d.status === "fulfilled" ? d.value : null;
|
|
948
948
|
let Q = [];
|
|
949
949
|
Array.isArray(q) ? Q = q : Array.isArray(q?.Data) ? Q = q.Data : Array.isArray(q?.data) && (Q = q.data);
|
|
950
|
-
const x =
|
|
950
|
+
const x = p.map((h) => ({
|
|
951
951
|
actionTypeId: Number(h?.ActionTypeId),
|
|
952
952
|
name: h?.DisplayName ?? h?.Name ?? ""
|
|
953
953
|
})), C = v.map((h) => ({
|
|
@@ -1067,10 +1067,10 @@ function Oa(t) {
|
|
|
1067
1067
|
if (R.status !== "fulfilled") return [];
|
|
1068
1068
|
const G = R.value;
|
|
1069
1069
|
return Array.isArray(G) ? G : Array.isArray(G?.data) ? G.data : [];
|
|
1070
|
-
},
|
|
1070
|
+
}, y = d(a), p = d(o), v = d(l), k = d(u), b = m.status === "fulfilled" ? m.value : null, V = y.map((R) => ({
|
|
1071
1071
|
actionTypeId: R?.ActionTypeUniqueId,
|
|
1072
1072
|
name: R?.Name ?? ""
|
|
1073
|
-
})), q =
|
|
1073
|
+
})), q = p.map((R) => ({
|
|
1074
1074
|
recordId: R?.AnomalyId,
|
|
1075
1075
|
anomalyName: R?.DisplayName ?? R?.Name ?? ""
|
|
1076
1076
|
})), Q = v.map((R) => ({
|
|
@@ -1093,14 +1093,14 @@ function Oa(t) {
|
|
|
1093
1093
|
}))), C.length && (Z.userRoles = C), Z;
|
|
1094
1094
|
},
|
|
1095
1095
|
async updateRule(n, r) {
|
|
1096
|
-
const i = new URL("/update-rule", t.baseUrl).toString(), { escalationSettings: a, ruleId: o, ruleName: l, ruleDesc: u, ...m } = r ?? {}, d = a ?? {},
|
|
1096
|
+
const i = new URL("/update-rule", t.baseUrl).toString(), { escalationSettings: a, ruleId: o, ruleName: l, ruleDesc: u, ...m } = r ?? {}, d = a ?? {}, y = (d.escalationSettingsActionTypeIds ?? []).filter((v) => v != null && !Number.isNaN(v)), p = {
|
|
1097
1097
|
Level1UserRoleId: d.level1UserRoleId ?? 0,
|
|
1098
1098
|
Level1PostAssistTime: d.level1PostAssistTime ?? 0,
|
|
1099
1099
|
Level2UserRoleId: d.level2UserRoleId ?? 0,
|
|
1100
1100
|
Level2PostAssistTime: d.level2PostAssistTime ?? 0,
|
|
1101
1101
|
Level3UserRoleId: d.level3UserRoleId ?? 0,
|
|
1102
1102
|
Level3PostAssistTime: d.level3PostAssistTime ?? 0,
|
|
1103
|
-
EscalationSettingsActionTypeIds:
|
|
1103
|
+
EscalationSettingsActionTypeIds: y,
|
|
1104
1104
|
ThirdPartyIds: d.thirdPartyId ?? [],
|
|
1105
1105
|
HumanLoop: d.humanLoop ?? !1
|
|
1106
1106
|
};
|
|
@@ -1112,8 +1112,8 @@ function Oa(t) {
|
|
|
1112
1112
|
RuleId: o ?? m.RuleId ?? n,
|
|
1113
1113
|
RuleName: l ?? m.RuleName,
|
|
1114
1114
|
RuleDesc: u ?? m.RuleDesc ?? null,
|
|
1115
|
-
ActionTypeUniqueIdList:
|
|
1116
|
-
EscalationSettings:
|
|
1115
|
+
ActionTypeUniqueIdList: y,
|
|
1116
|
+
EscalationSettings: p
|
|
1117
1117
|
})
|
|
1118
1118
|
});
|
|
1119
1119
|
}
|
|
@@ -1438,7 +1438,7 @@ function Va({
|
|
|
1438
1438
|
current: i,
|
|
1439
1439
|
total: r ?? d,
|
|
1440
1440
|
showSizeChanger: !1,
|
|
1441
|
-
showTotal: (
|
|
1441
|
+
showTotal: (y) => `Total: ${y}`,
|
|
1442
1442
|
onChange: u
|
|
1443
1443
|
},
|
|
1444
1444
|
bordered: !0,
|
|
@@ -1570,14 +1570,14 @@ const Ha = (t) => {
|
|
|
1570
1570
|
return [];
|
|
1571
1571
|
const i = Math.min(n / e, r / s), a = (n - e * i) / 2, o = (r - s * i) / 2;
|
|
1572
1572
|
return t.flatMap((l) => {
|
|
1573
|
-
const [u, m, d,
|
|
1574
|
-
return u > e || d > e || m > s ||
|
|
1573
|
+
const [u, m, d, y] = Ha(l.bbox_xyxy);
|
|
1574
|
+
return u > e || d > e || m > s || y > s ? [] : [
|
|
1575
1575
|
{
|
|
1576
1576
|
personName: l.personName,
|
|
1577
1577
|
x: u * i + a,
|
|
1578
1578
|
y: m * i + o,
|
|
1579
1579
|
width: (d - u) * i,
|
|
1580
|
-
height: (
|
|
1580
|
+
height: (y - m) * i
|
|
1581
1581
|
}
|
|
1582
1582
|
];
|
|
1583
1583
|
});
|
|
@@ -1604,7 +1604,7 @@ const kr = ({
|
|
|
1604
1604
|
detections: r = [],
|
|
1605
1605
|
priority: i
|
|
1606
1606
|
}) => {
|
|
1607
|
-
const [a, o] = S(!1), { imageRef: l, dimensions: u, onLoad: m, resetDimensions: d } = Ir(),
|
|
1607
|
+
const [a, o] = S(!1), { imageRef: l, dimensions: u, onLoad: m, resetDimensions: d } = Ir(), y = ve(
|
|
1608
1608
|
() => br(
|
|
1609
1609
|
r,
|
|
1610
1610
|
u.naturalWidth,
|
|
@@ -1613,9 +1613,9 @@ const kr = ({
|
|
|
1613
1613
|
u.renderedHeight
|
|
1614
1614
|
),
|
|
1615
1615
|
[r, u]
|
|
1616
|
-
),
|
|
1617
|
-
() =>
|
|
1618
|
-
[
|
|
1616
|
+
), p = ve(
|
|
1617
|
+
() => y.map((v) => ({ ...v, label: v.personName || "" })),
|
|
1618
|
+
[y]
|
|
1619
1619
|
);
|
|
1620
1620
|
return oe(() => {
|
|
1621
1621
|
t && (o(!1), d());
|
|
@@ -1652,7 +1652,7 @@ const kr = ({
|
|
|
1652
1652
|
onError: () => o(!0)
|
|
1653
1653
|
}
|
|
1654
1654
|
),
|
|
1655
|
-
/* @__PURE__ */ c(Tr, { boxes:
|
|
1655
|
+
/* @__PURE__ */ c(Tr, { boxes: p, priority: i }),
|
|
1656
1656
|
/* @__PURE__ */ c(
|
|
1657
1657
|
"button",
|
|
1658
1658
|
{
|
|
@@ -1844,9 +1844,9 @@ function Mr({
|
|
|
1844
1844
|
onFilterChange: m,
|
|
1845
1845
|
resetKey: d
|
|
1846
1846
|
}) {
|
|
1847
|
-
const [
|
|
1847
|
+
const [y, p] = S("All"), [v, k] = S("All"), [b, V] = S("All"), [q, Q] = S("All"), [x, C] = S(""), [Z, R] = S(r ?? 1);
|
|
1848
1848
|
oe(() => {
|
|
1849
|
-
d !== void 0 && (
|
|
1849
|
+
d !== void 0 && (p("All"), k("All"), V("All"), Q("All"), C(""), R(1));
|
|
1850
1850
|
}, [d]), oe(() => {
|
|
1851
1851
|
r !== void 0 && R(r);
|
|
1852
1852
|
}, [r]);
|
|
@@ -1898,12 +1898,12 @@ function Mr({
|
|
|
1898
1898
|
};
|
|
1899
1899
|
}, [T]), oe(() => {
|
|
1900
1900
|
if (!m) return;
|
|
1901
|
-
const P = E.find((pe) => pe.value ===
|
|
1901
|
+
const P = E.find((pe) => pe.value === y), W = {
|
|
1902
1902
|
anomalyId: ie.length > 1 && v !== "All" ? v : void 0,
|
|
1903
1903
|
spaceId: !Y && g.length > 1 && b !== "All" ? b : void 0,
|
|
1904
1904
|
spaceNumber: Y && g.length > 1 && b !== "All" ? b : void 0,
|
|
1905
|
-
severityId: E.length > 1 &&
|
|
1906
|
-
severityName: E.length > 1 &&
|
|
1905
|
+
severityId: E.length > 1 && y !== "All" ? y : void 0,
|
|
1906
|
+
severityName: E.length > 1 && y !== "All" ? P?.label : void 0,
|
|
1907
1907
|
thirdPartyIds: q === "All" ? void 0 : [Number(q)],
|
|
1908
1908
|
searchText: j.trim() || void 0
|
|
1909
1909
|
};
|
|
@@ -1911,7 +1911,7 @@ function Mr({
|
|
|
1911
1911
|
}, [
|
|
1912
1912
|
v,
|
|
1913
1913
|
b,
|
|
1914
|
-
|
|
1914
|
+
y,
|
|
1915
1915
|
q,
|
|
1916
1916
|
j,
|
|
1917
1917
|
ie.length,
|
|
@@ -2085,8 +2085,8 @@ function Mr({
|
|
|
2085
2085
|
/* @__PURE__ */ c(
|
|
2086
2086
|
La,
|
|
2087
2087
|
{
|
|
2088
|
-
value:
|
|
2089
|
-
onChange:
|
|
2088
|
+
value: y,
|
|
2089
|
+
onChange: p,
|
|
2090
2090
|
options: Se
|
|
2091
2091
|
}
|
|
2092
2092
|
)
|
|
@@ -2578,7 +2578,7 @@ class lt extends Qt {
|
|
|
2578
2578
|
const n = co(this.name);
|
|
2579
2579
|
let [r, i, a, o, l, u, m] = n.formatToParts ? fo(n, s) : mo(n, s);
|
|
2580
2580
|
o === "BC" && (r = -Math.abs(r) + 1);
|
|
2581
|
-
const
|
|
2581
|
+
const y = xs({
|
|
2582
2582
|
year: r,
|
|
2583
2583
|
month: i,
|
|
2584
2584
|
day: a,
|
|
@@ -2587,9 +2587,9 @@ class lt extends Qt {
|
|
|
2587
2587
|
second: m,
|
|
2588
2588
|
millisecond: 0
|
|
2589
2589
|
});
|
|
2590
|
-
let
|
|
2591
|
-
const v =
|
|
2592
|
-
return
|
|
2590
|
+
let p = +s;
|
|
2591
|
+
const v = p % 1e3;
|
|
2592
|
+
return p -= v >= 0 ? v : 1e3 + v, (y - p) / (60 * 1e3);
|
|
2593
2593
|
}
|
|
2594
2594
|
/**
|
|
2595
2595
|
* Return whether this Zone is equal to another zone
|
|
@@ -3731,14 +3731,14 @@ class Ce {
|
|
|
3731
3731
|
return s > 0 && (r.padTo = s), n && (r.signDisplay = n), this.loc.numberFormatter(r).format(e);
|
|
3732
3732
|
}
|
|
3733
3733
|
formatDateTimeFromString(e, s) {
|
|
3734
|
-
const n = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (
|
|
3735
|
-
v ? { weekday:
|
|
3734
|
+
const n = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (p, v) => this.loc.extract(e, p, v), a = (p) => e.isOffsetFixed && e.offset === 0 && p.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, p.format) : "", o = () => n ? Ho(e) : i({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), l = (p, v) => n ? qo(e, p) : i(v ? { month: p } : { month: p, day: "numeric" }, "month"), u = (p, v) => n ? Go(e, p) : i(
|
|
3735
|
+
v ? { weekday: p } : { weekday: p, month: "long", day: "numeric" },
|
|
3736
3736
|
"weekday"
|
|
3737
|
-
), m = (
|
|
3738
|
-
const v = Ce.macroTokenToFormatOpts(
|
|
3739
|
-
return v ? this.formatWithSystemDefault(e, v) :
|
|
3740
|
-
}, d = (
|
|
3741
|
-
switch (
|
|
3737
|
+
), m = (p) => {
|
|
3738
|
+
const v = Ce.macroTokenToFormatOpts(p);
|
|
3739
|
+
return v ? this.formatWithSystemDefault(e, v) : p;
|
|
3740
|
+
}, d = (p) => n ? Yo(e, p) : i({ era: p }, "era"), y = (p) => {
|
|
3741
|
+
switch (p) {
|
|
3742
3742
|
// ms
|
|
3743
3743
|
case "S":
|
|
3744
3744
|
return this.num(e.millisecond);
|
|
@@ -3877,10 +3877,10 @@ class Ce {
|
|
|
3877
3877
|
case "x":
|
|
3878
3878
|
return this.num(e.ts);
|
|
3879
3879
|
default:
|
|
3880
|
-
return m(
|
|
3880
|
+
return m(p);
|
|
3881
3881
|
}
|
|
3882
3882
|
};
|
|
3883
|
-
return Xn(Ce.parseFormat(s),
|
|
3883
|
+
return Xn(Ce.parseFormat(s), y);
|
|
3884
3884
|
}
|
|
3885
3885
|
formatDurationFromString(e, s) {
|
|
3886
3886
|
const n = this.opts.signMode === "negativeLargestOnly" ? -1 : 1, r = (m) => {
|
|
@@ -3904,16 +3904,16 @@ class Ce {
|
|
|
3904
3904
|
default:
|
|
3905
3905
|
return null;
|
|
3906
3906
|
}
|
|
3907
|
-
}, i = (m, d) => (
|
|
3908
|
-
const
|
|
3909
|
-
if (
|
|
3910
|
-
const v = d.isNegativeDuration &&
|
|
3907
|
+
}, i = (m, d) => (y) => {
|
|
3908
|
+
const p = r(y);
|
|
3909
|
+
if (p) {
|
|
3910
|
+
const v = d.isNegativeDuration && p !== d.largestUnit ? n : 1;
|
|
3911
3911
|
let k;
|
|
3912
|
-
return this.opts.signMode === "negativeLargestOnly" &&
|
|
3912
|
+
return this.opts.signMode === "negativeLargestOnly" && p !== d.largestUnit ? k = "never" : this.opts.signMode === "all" ? k = "always" : k = "auto", this.num(m.get(p) * v, y.length, k);
|
|
3913
3913
|
} else
|
|
3914
|
-
return
|
|
3914
|
+
return y;
|
|
3915
3915
|
}, a = Ce.parseFormat(s), o = a.reduce(
|
|
3916
|
-
(m, { literal: d, val:
|
|
3916
|
+
(m, { literal: d, val: y }) => d ? m : m.concat(y),
|
|
3917
3917
|
[]
|
|
3918
3918
|
), l = e.shiftTo(...o.map(r).filter((m) => m)), u = {
|
|
3919
3919
|
isNegativeDuration: l < 0,
|
|
@@ -3989,17 +3989,17 @@ function ts(t, e) {
|
|
|
3989
3989
|
}
|
|
3990
3990
|
const il = RegExp(`^T?${Sn.source}$`), al = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
|
|
3991
3991
|
function ol(t) {
|
|
3992
|
-
const [e, s, n, r, i, a, o, l, u] = t, m = e[0] === "-", d = l && l[0] === "-",
|
|
3992
|
+
const [e, s, n, r, i, a, o, l, u] = t, m = e[0] === "-", d = l && l[0] === "-", y = (p, v = !1) => p !== void 0 && (v || p && m) ? -p : p;
|
|
3993
3993
|
return [
|
|
3994
3994
|
{
|
|
3995
|
-
years:
|
|
3996
|
-
months:
|
|
3997
|
-
weeks:
|
|
3998
|
-
days:
|
|
3999
|
-
hours:
|
|
4000
|
-
minutes:
|
|
4001
|
-
seconds:
|
|
4002
|
-
milliseconds:
|
|
3995
|
+
years: y(St(s)),
|
|
3996
|
+
months: y(St(n)),
|
|
3997
|
+
weeks: y(St(r)),
|
|
3998
|
+
days: y(St(i)),
|
|
3999
|
+
hours: y(St(a)),
|
|
4000
|
+
minutes: y(St(o)),
|
|
4001
|
+
seconds: y(St(l), l === "-0"),
|
|
4002
|
+
milliseconds: y(pn(u), d)
|
|
4003
4003
|
}
|
|
4004
4004
|
];
|
|
4005
4005
|
}
|
|
@@ -4039,9 +4039,9 @@ function ul(t) {
|
|
|
4039
4039
|
u,
|
|
4040
4040
|
m,
|
|
4041
4041
|
d
|
|
4042
|
-
] = t,
|
|
4043
|
-
let
|
|
4044
|
-
return l ?
|
|
4042
|
+
] = t, y = wn(e, r, n, s, i, a, o);
|
|
4043
|
+
let p;
|
|
4044
|
+
return l ? p = ll[l] : u ? p = 0 : p = Os(m, d), [y, new $e(p)];
|
|
4045
4045
|
}
|
|
4046
4046
|
function dl(t) {
|
|
4047
4047
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
|
@@ -5534,9 +5534,9 @@ function Zl(t) {
|
|
|
5534
5534
|
return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
5535
5535
|
}
|
|
5536
5536
|
function zl(t, e) {
|
|
5537
|
-
const s = Qe(e), n = Qe(e, "{2}"), r = Qe(e, "{3}"), i = Qe(e, "{4}"), a = Qe(e, "{6}"), o = Qe(e, "{1,2}"), l = Qe(e, "{1,3}"), u = Qe(e, "{1,6}"), m = Qe(e, "{1,9}"), d = Qe(e, "{2,4}"),
|
|
5537
|
+
const s = Qe(e), n = Qe(e, "{2}"), r = Qe(e, "{3}"), i = Qe(e, "{4}"), a = Qe(e, "{6}"), o = Qe(e, "{1,2}"), l = Qe(e, "{1,3}"), u = Qe(e, "{1,6}"), m = Qe(e, "{1,9}"), d = Qe(e, "{2,4}"), y = Qe(e, "{4,6}"), p = (b) => ({ regex: RegExp(Zl(b.val)), deser: ([V]) => V, literal: !0 }), k = ((b) => {
|
|
5538
5538
|
if (t.literal)
|
|
5539
|
-
return
|
|
5539
|
+
return p(b);
|
|
5540
5540
|
switch (b.val) {
|
|
5541
5541
|
// era
|
|
5542
5542
|
case "G":
|
|
@@ -5551,7 +5551,7 @@ function zl(t, e) {
|
|
|
5551
5551
|
case "yyyy":
|
|
5552
5552
|
return ee(i);
|
|
5553
5553
|
case "yyyyy":
|
|
5554
|
-
return ee(
|
|
5554
|
+
return ee(y);
|
|
5555
5555
|
case "yyyyyy":
|
|
5556
5556
|
return ee(a);
|
|
5557
5557
|
// months
|
|
@@ -5652,7 +5652,7 @@ function zl(t, e) {
|
|
|
5652
5652
|
case " ":
|
|
5653
5653
|
return ds(/[^\S\n\r]/);
|
|
5654
5654
|
default:
|
|
5655
|
-
return
|
|
5655
|
+
return p(b);
|
|
5656
5656
|
}
|
|
5657
5657
|
})(t) || {
|
|
5658
5658
|
invalidReason: Wl
|
|
@@ -6256,14 +6256,14 @@ class F {
|
|
|
6256
6256
|
const n = ht(s.zone, Ae.defaultZone);
|
|
6257
6257
|
if (!n.isValid)
|
|
6258
6258
|
return F.invalid(qt(n));
|
|
6259
|
-
const r = re.fromObject(s), i = Ns(e, ur), { minDaysInFirstWeek: a, startOfWeek: o } = Jn(i, r), l = Ae.now(), u = $(s.specificOffset) ? n.offset(l) : s.specificOffset, m = !$(i.ordinal), d = !$(i.year),
|
|
6260
|
-
if ((
|
|
6259
|
+
const r = re.fromObject(s), i = Ns(e, ur), { minDaysInFirstWeek: a, startOfWeek: o } = Jn(i, r), l = Ae.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;
|
|
6260
|
+
if ((p || m) && v)
|
|
6261
6261
|
throw new Ct(
|
|
6262
6262
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
|
6263
6263
|
);
|
|
6264
|
-
if (
|
|
6264
|
+
if (y && m)
|
|
6265
6265
|
throw new Ct("Can't mix ordinal dates with month/day");
|
|
6266
|
-
const k = v || i.weekday && !
|
|
6266
|
+
const k = v || i.weekday && !p;
|
|
6267
6267
|
let b, V, q = ms(l, u);
|
|
6268
6268
|
k ? (b = ec, V = Ql, q = ws(q, a, o)) : m ? (b = tc, V = Xl, q = $s(q)) : (b = gs, V = Ci);
|
|
6269
6269
|
let Q = !1;
|
|
@@ -6280,7 +6280,7 @@ class F {
|
|
|
6280
6280
|
o: G,
|
|
6281
6281
|
loc: r
|
|
6282
6282
|
});
|
|
6283
|
-
return i.weekday &&
|
|
6283
|
+
return i.weekday && p && e.weekday !== h.weekday ? F.invalid(
|
|
6284
6284
|
"mismatched weekday",
|
|
6285
6285
|
`you can't specify both a weekday of ${i.weekday} and a date of ${h.toISO()}`
|
|
6286
6286
|
) : h.isValid ? h : F.invalid(h.invalid);
|
|
@@ -6900,8 +6900,8 @@ class F {
|
|
|
6900
6900
|
n,
|
|
6901
6901
|
r
|
|
6902
6902
|
) : $(s.ordinal) ? (d = { ...this.toObject(), ...s }, $(s.day) && (d.day = Math.min(As(d.year, d.month), d.day))) : d = jn({ ...$s(this.c), ...s });
|
|
6903
|
-
const [
|
|
6904
|
-
return vt(this, { ts:
|
|
6903
|
+
const [y, p] = ps(d, this.o, this.zone);
|
|
6904
|
+
return vt(this, { ts: y, o: p });
|
|
6905
6905
|
}
|
|
6906
6906
|
/**
|
|
6907
6907
|
* Add a period of time to this DateTime and return the resulting DateTime
|
|
@@ -7719,7 +7719,7 @@ function lc({
|
|
|
7719
7719
|
onRefetch: u,
|
|
7720
7720
|
resetKey: m
|
|
7721
7721
|
}) {
|
|
7722
|
-
const d = Dr(),
|
|
7722
|
+
const d = Dr(), y = async (k) => {
|
|
7723
7723
|
try {
|
|
7724
7724
|
const b = await d.mutateAsync({
|
|
7725
7725
|
alertUniqueId: k.alertId ?? k.id,
|
|
@@ -7738,7 +7738,7 @@ function lc({
|
|
|
7738
7738
|
} catch {
|
|
7739
7739
|
Oe.error("Failed to reopen alert. Please try again.");
|
|
7740
7740
|
}
|
|
7741
|
-
},
|
|
7741
|
+
}, p = [
|
|
7742
7742
|
{
|
|
7743
7743
|
title: "Severity",
|
|
7744
7744
|
dataIndex: "priority",
|
|
@@ -7806,7 +7806,7 @@ function lc({
|
|
|
7806
7806
|
menu: {
|
|
7807
7807
|
items: [{ key: "reopen", label: "Reopen" }],
|
|
7808
7808
|
onClick: ({ key: V }) => {
|
|
7809
|
-
V === "reopen" &&
|
|
7809
|
+
V === "reopen" && y(b);
|
|
7810
7810
|
}
|
|
7811
7811
|
},
|
|
7812
7812
|
children: /* @__PURE__ */ c(ze, { type: "text", icon: /* @__PURE__ */ c(Yi, {}) })
|
|
@@ -7825,7 +7825,7 @@ function lc({
|
|
|
7825
7825
|
pageSize: s,
|
|
7826
7826
|
total: n,
|
|
7827
7827
|
currentPage: r,
|
|
7828
|
-
columns:
|
|
7828
|
+
columns: p,
|
|
7829
7829
|
renderActions: void 0,
|
|
7830
7830
|
onAlertIdClick: i,
|
|
7831
7831
|
onAlertView: a,
|
|
@@ -7851,9 +7851,9 @@ function cc({
|
|
|
7851
7851
|
hour12: !1
|
|
7852
7852
|
}).formatToParts(e);
|
|
7853
7853
|
return {
|
|
7854
|
-
hours: parseInt(d.find((
|
|
7855
|
-
minutes: parseInt(d.find((
|
|
7856
|
-
seconds: parseInt(d.find((
|
|
7854
|
+
hours: parseInt(d.find((y) => y.type === "hour")?.value || "0", 10),
|
|
7855
|
+
minutes: parseInt(d.find((y) => y.type === "minute")?.value || "0", 10),
|
|
7856
|
+
seconds: parseInt(d.find((y) => y.type === "second")?.value || "0", 10)
|
|
7857
7857
|
};
|
|
7858
7858
|
}, [e, s]), a = i * 6, o = r * 6 + i * 0.1, l = n % 12 * 30 + r * 0.5, u = t / 2;
|
|
7859
7859
|
return /* @__PURE__ */ f(
|
|
@@ -7865,7 +7865,7 @@ function cc({
|
|
|
7865
7865
|
"aria-label": "Analog Clock",
|
|
7866
7866
|
children: [
|
|
7867
7867
|
[...Array(12)].map((m, d) => {
|
|
7868
|
-
const
|
|
7868
|
+
const y = d * 30, p = 6, v = u - 4, k = v - p, b = (y - 90) * (Math.PI / 180), V = u + k * Math.cos(b), q = u + k * Math.sin(b), Q = u + v * Math.cos(b), x = u + v * Math.sin(b);
|
|
7869
7869
|
return /* @__PURE__ */ c(
|
|
7870
7870
|
"svg",
|
|
7871
7871
|
{
|
|
@@ -8036,8 +8036,8 @@ function fc(t) {
|
|
|
8036
8036
|
setL1role: u,
|
|
8037
8037
|
l2mins: m,
|
|
8038
8038
|
setL2mins: d,
|
|
8039
|
-
l2role:
|
|
8040
|
-
setL2role:
|
|
8039
|
+
l2role: y,
|
|
8040
|
+
setL2role: p,
|
|
8041
8041
|
l3mins: v,
|
|
8042
8042
|
setL3mins: k,
|
|
8043
8043
|
l3role: b,
|
|
@@ -8075,7 +8075,7 @@ function fc(t) {
|
|
|
8075
8075
|
te = !0;
|
|
8076
8076
|
};
|
|
8077
8077
|
}, []);
|
|
8078
|
-
const j = typeof a == "number" || typeof l == "number", le = typeof m == "number" || typeof
|
|
8078
|
+
const j = typeof a == "number" || typeof l == "number", le = typeof m == "number" || typeof y == "number", de = typeof a == "number" || typeof l == "number" || typeof m == "number" || typeof y == "number" || typeof v == "number" || typeof b == "number" || Array.isArray(q) && q.length > 0 || Array.isArray(x) && x.length > 0 || !!Z || !!G;
|
|
8079
8079
|
return /* @__PURE__ */ f(Ts, { spinning: !!ie || _, children: [
|
|
8080
8080
|
/* @__PURE__ */ f(Ze, { gutter: [16, 16], align: "bottom", children: [
|
|
8081
8081
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ f("div", { children: [
|
|
@@ -8140,8 +8140,8 @@ function fc(t) {
|
|
|
8140
8140
|
{
|
|
8141
8141
|
placeholder: "Escalate to",
|
|
8142
8142
|
className: "w-full",
|
|
8143
|
-
value:
|
|
8144
|
-
onChange:
|
|
8143
|
+
value: y,
|
|
8144
|
+
onChange: p,
|
|
8145
8145
|
options: i
|
|
8146
8146
|
}
|
|
8147
8147
|
) })
|
|
@@ -8290,7 +8290,7 @@ function hc({ entries: t, userRoles: e, onEdit: s, loading: n }) {
|
|
|
8290
8290
|
}
|
|
8291
8291
|
const { Title: yc, Text: zs } = Kt;
|
|
8292
8292
|
function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
8293
|
-
const { rules: n } = Ge(), [r, i] = S(!1), [a, o] = S(!1), [l, u] = S(s), [m, d] = S(), [
|
|
8293
|
+
const { rules: n } = Ge(), [r, i] = S(!1), [a, o] = S(!1), [l, u] = S(s), [m, d] = S(), [y, p] = S([]), v = ve(() => t.map((x) => ({ label: x.userRoleName, value: x.userRoleId })), [t]), k = ve(() => (e || []).map((x) => ({ label: x.Name || "-", value: x.RuleId || x.Name || "" })), [e]), b = ve(
|
|
8294
8294
|
() => (e || []).map((x, C) => ({
|
|
8295
8295
|
key: x.RuleId || x.Name || String(C),
|
|
8296
8296
|
ruleName: x.Name || "-",
|
|
@@ -8317,13 +8317,13 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8317
8317
|
!l && Array.isArray(s) && u(s);
|
|
8318
8318
|
}, [s]), oe(() => {
|
|
8319
8319
|
if (!m || !Array.isArray(l)) {
|
|
8320
|
-
|
|
8320
|
+
p([]);
|
|
8321
8321
|
return;
|
|
8322
8322
|
}
|
|
8323
8323
|
const x = l.find(
|
|
8324
8324
|
(Z) => Z?.ruleId === m || Z?.RuleId === m || Z?.ruleName === m
|
|
8325
8325
|
), C = x?.userRoleIds ?? x?.UserRoleIds;
|
|
8326
|
-
|
|
8326
|
+
p(Array.isArray(C) ? C : []);
|
|
8327
8327
|
}, [m, l]);
|
|
8328
8328
|
const V = ve(() => {
|
|
8329
8329
|
if (!Array.isArray(l) || !l.length) return {};
|
|
@@ -8360,8 +8360,8 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8360
8360
|
mode: "multiple",
|
|
8361
8361
|
placeholder: "Select roles",
|
|
8362
8362
|
className: "w-full",
|
|
8363
|
-
value:
|
|
8364
|
-
onChange:
|
|
8363
|
+
value: y,
|
|
8364
|
+
onChange: p,
|
|
8365
8365
|
options: v,
|
|
8366
8366
|
maxTagCount: 1,
|
|
8367
8367
|
maxTagPlaceholder: rn
|
|
@@ -8370,7 +8370,7 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8370
8370
|
] }) }),
|
|
8371
8371
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
8372
8372
|
/* @__PURE__ */ c(ze, { onClick: () => {
|
|
8373
|
-
d(void 0),
|
|
8373
|
+
d(void 0), p([]);
|
|
8374
8374
|
}, disabled: a, children: "Cancel" }),
|
|
8375
8375
|
/* @__PURE__ */ c(
|
|
8376
8376
|
ze,
|
|
@@ -8388,19 +8388,19 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8388
8388
|
) : void 0, C = typeof x?.recordId == "number" ? x.recordId : x?.ruleId || x?.RuleId || void 0;
|
|
8389
8389
|
if (!x || !C)
|
|
8390
8390
|
throw new Error(`Unable to find rule identifier for rule ${m}`);
|
|
8391
|
-
const Z =
|
|
8391
|
+
const Z = y.map((h) => {
|
|
8392
8392
|
const g = t.find((M) => M.userRoleId === h);
|
|
8393
8393
|
return { id: h, name: g?.userRoleName ?? String(h) };
|
|
8394
8394
|
}), R = {
|
|
8395
8395
|
...x,
|
|
8396
8396
|
ruleId: m,
|
|
8397
|
-
userRoleIds:
|
|
8397
|
+
userRoleIds: y,
|
|
8398
8398
|
userRoles: Z
|
|
8399
8399
|
}, G = await n.updateRule(C, R);
|
|
8400
8400
|
if (!G?.responseStatus && !G?.Success && !G?.success)
|
|
8401
8401
|
Oe.error(G?.errorMessage || G?.Message || "Error saving Alert Assignment");
|
|
8402
8402
|
else {
|
|
8403
|
-
Oe.success("Alert assignment saved"), d(void 0),
|
|
8403
|
+
Oe.success("Alert assignment saved"), d(void 0), p([]);
|
|
8404
8404
|
try {
|
|
8405
8405
|
const h = await n.getRules();
|
|
8406
8406
|
u(Array.isArray(h) ? h : []);
|
|
@@ -8467,7 +8467,7 @@ function Hs(t) {
|
|
|
8467
8467
|
};
|
|
8468
8468
|
}
|
|
8469
8469
|
function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: i }) {
|
|
8470
|
-
const { rules: a, alerts: o } = Ge(), [l, u] = S("By Severity"), [m, d] = S("By severity"), [
|
|
8470
|
+
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, V] = S(!1), [q, Q] = S(!1), [x, C] = S(null), [Z, R] = S("rules"), [G, h] = S(), [g, M] = S(), [ie, he] = S(), [E, N] = S(), [w, O] = S(), [T, D] = S(), [L, _] = S(), [Y, j] = S(), [le, de] = S([]), [Ee, te] = S([]), [Se, ke] = S(!1), [ye, P] = S(!1), [W, pe] = S({}), [ce, Pe] = S({}), [be, Ke] = S(s || []), [Me, Ne] = S([]), [Bt, pt] = S(!1), [Tt, nt] = S(!1), [We, bt] = S(n || []);
|
|
8471
8471
|
oe(() => {
|
|
8472
8472
|
n && n.length && bt(n);
|
|
8473
8473
|
}, [n]), oe(() => {
|
|
@@ -8508,7 +8508,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8508
8508
|
const J = await o.getAdminSettings();
|
|
8509
8509
|
if (!U && J) {
|
|
8510
8510
|
const B = vr(J.sortBy);
|
|
8511
|
-
u(B),
|
|
8511
|
+
u(B), p(B), k(!1);
|
|
8512
8512
|
}
|
|
8513
8513
|
} catch (J) {
|
|
8514
8514
|
if (!U) {
|
|
@@ -8609,7 +8609,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8609
8609
|
V(!0);
|
|
8610
8610
|
try {
|
|
8611
8611
|
const U = await o.setAdminSettings({ sortBy: l, groupBy: "string" });
|
|
8612
|
-
U?.responseStatus && U?.data && Oe.success(U.data),
|
|
8612
|
+
U?.responseStatus && U?.data && Oe.success(U.data), p(l), k(!1);
|
|
8613
8613
|
} catch (U) {
|
|
8614
8614
|
console.error("Error saving admin settings", U);
|
|
8615
8615
|
} finally {
|
|
@@ -8617,7 +8617,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8617
8617
|
}
|
|
8618
8618
|
},
|
|
8619
8619
|
onClear: () => {
|
|
8620
|
-
u(
|
|
8620
|
+
u(y), k(!1);
|
|
8621
8621
|
},
|
|
8622
8622
|
saving: b
|
|
8623
8623
|
}
|
|
@@ -8742,7 +8742,7 @@ function Vc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8742
8742
|
const { rules: r, alerts: i } = Ge(), a = [
|
|
8743
8743
|
{ label: "By Severity", value: "By Severity" },
|
|
8744
8744
|
{ label: "By Created Date", value: "By Created Date" }
|
|
8745
|
-
], [o, l] = S("By Severity"), [u, m] = S(/* @__PURE__ */ new Set()), [d,
|
|
8745
|
+
], [o, l] = S("By Severity"), [u, m] = S(/* @__PURE__ */ new Set()), [d, y] = S(null), [p, v] = S(null), [k, b] = S({ inApp: !1, sms: !1, email: !1 }), [V, q] = S([]), [Q, x] = S(!0), [C, Z] = S(!1);
|
|
8746
8746
|
oe(() => {
|
|
8747
8747
|
let h = !1;
|
|
8748
8748
|
return (async () => {
|
|
@@ -8756,7 +8756,7 @@ function Vc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8756
8756
|
email: !!g.email
|
|
8757
8757
|
});
|
|
8758
8758
|
const M = vr(g.sortBy);
|
|
8759
|
-
l(M === "By Created Date" ? "By Created Date" : "By Severity"),
|
|
8759
|
+
l(M === "By Created Date" ? "By Created Date" : "By Severity"), y(Rn(g.doNotDisturbStart)), v(Rn(g.doNotDisturbEnd)), Array.isArray(g.anomalyIds) && m(new Set(g.anomalyIds.map((ie) => String(ie))));
|
|
8760
8760
|
} catch (g) {
|
|
8761
8761
|
console.error("Error in loading my preferences: ", g);
|
|
8762
8762
|
}
|
|
@@ -8792,13 +8792,13 @@ function Vc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8792
8792
|
subscribedRuleIds: Array.from(u),
|
|
8793
8793
|
dnd: {
|
|
8794
8794
|
from: d,
|
|
8795
|
-
to:
|
|
8795
|
+
to: p
|
|
8796
8796
|
},
|
|
8797
8797
|
channels: k
|
|
8798
8798
|
});
|
|
8799
8799
|
try {
|
|
8800
8800
|
Z(!0);
|
|
8801
|
-
const h = d ? d.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", g =
|
|
8801
|
+
const h = d ? d.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", g = p ? p.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", M = Array.from(u).map((he) => Number(he)).filter((he) => Number.isFinite(he)), ie = await i.setPreferenceSettings({
|
|
8802
8802
|
anomalyIds: M,
|
|
8803
8803
|
doNotDisturbStart: h,
|
|
8804
8804
|
doNotDisturbEnd: g,
|
|
@@ -8833,11 +8833,11 @@ function Vc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8833
8833
|
/* @__PURE__ */ f(st, { size: 12, className: "w-full", children: [
|
|
8834
8834
|
/* @__PURE__ */ f(st, { direction: "horizontal", size: 8, className: "items-center", children: [
|
|
8835
8835
|
/* @__PURE__ */ c(hs, { children: "From" }),
|
|
8836
|
-
/* @__PURE__ */ c(kn, { value: d, onChange: (h) =>
|
|
8836
|
+
/* @__PURE__ */ c(kn, { value: d, onChange: (h) => y(h), format: "HH:mm" })
|
|
8837
8837
|
] }),
|
|
8838
8838
|
/* @__PURE__ */ f(st, { direction: "horizontal", size: 8, className: "items-center", children: [
|
|
8839
8839
|
/* @__PURE__ */ c(hs, { children: "To" }),
|
|
8840
|
-
/* @__PURE__ */ c(kn, { value:
|
|
8840
|
+
/* @__PURE__ */ c(kn, { value: p, onChange: (h) => v(h), format: "HH:mm" })
|
|
8841
8841
|
] })
|
|
8842
8842
|
] })
|
|
8843
8843
|
] }) }) }),
|
|
@@ -8931,7 +8931,11 @@ function Nc({ data: t }) {
|
|
|
8931
8931
|
/* @__PURE__ */ f("div", { className: "flex items-start justify-between", children: [
|
|
8932
8932
|
/* @__PURE__ */ f("div", { className: "flex flex-col", children: [
|
|
8933
8933
|
/* @__PURE__ */ c("h4", { className: "text-sm text-black font-medium", children: s.channelLabel }),
|
|
8934
|
-
/* @__PURE__ */ c("span", { className: "text-xs text-gray-500 mt-1", children: Jt(
|
|
8934
|
+
/* @__PURE__ */ c("span", { className: "text-xs text-gray-500 mt-1", children: Jt(
|
|
8935
|
+
s.sentAt,
|
|
8936
|
+
e?.ianaTimeZoneId,
|
|
8937
|
+
!0
|
|
8938
|
+
) })
|
|
8935
8939
|
] }),
|
|
8936
8940
|
/* @__PURE__ */ f("span", { className: "text-[11px] px-2 py-1 rounded-full bg-green-50 text-green-700 border border-green-200", children: [
|
|
8937
8941
|
s.delivered,
|
|
@@ -9029,12 +9033,12 @@ const Tc = ({
|
|
|
9029
9033
|
location: n || "",
|
|
9030
9034
|
alertNumber: r ?? ""
|
|
9031
9035
|
}, { timeZoneDetails: l } = ss(), u = i?.length ? i.map((d) => {
|
|
9032
|
-
const
|
|
9036
|
+
const y = (d?.status || d?.eventStatus || "").toLowerCase() === "completed" ? "Completed" : "Inprogress", p = d?.createdDate ? Jt(d.createdDate, l?.ianaTimeZoneId) : d?.timestamp ? Jt(d.timestamp, l?.ianaTimeZoneId) : "";
|
|
9033
9037
|
return {
|
|
9034
|
-
status:
|
|
9038
|
+
status: y,
|
|
9035
9039
|
title: d?.status || d?.eventStatus || "Status Update",
|
|
9036
9040
|
description: d?.description || d?.actionNotes || "",
|
|
9037
|
-
timestamp:
|
|
9041
|
+
timestamp: p
|
|
9038
9042
|
};
|
|
9039
9043
|
}) : [];
|
|
9040
9044
|
return /* @__PURE__ */ c(Nc, { data: {
|
|
@@ -9061,7 +9065,7 @@ const Tc = ({
|
|
|
9061
9065
|
),
|
|
9062
9066
|
[r, l]
|
|
9063
9067
|
), d = ve(
|
|
9064
|
-
() => m.map((
|
|
9068
|
+
() => m.map((y) => ({ ...y, label: y.personName || "" })),
|
|
9065
9069
|
[m]
|
|
9066
9070
|
);
|
|
9067
9071
|
return /* @__PURE__ */ f("div", { style: { position: "relative", display: "inline-block" }, children: [
|
|
@@ -9083,8 +9087,13 @@ const Tc = ({
|
|
|
9083
9087
|
}, Ic = ({ items: t }) => {
|
|
9084
9088
|
const { timeZoneDetails: e } = ss(), s = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), r = (() => {
|
|
9085
9089
|
if (!t?.length || t.length < 2) return null;
|
|
9086
|
-
const i = new Date(t[0].timeStamp).getTime(), a = new Date(t[t.length - 1].timeStamp).getTime(), o = Math.floor((a - i) / 1e3), l = Math.floor(o / 3600),
|
|
9087
|
-
return [
|
|
9090
|
+
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;
|
|
9091
|
+
return [
|
|
9092
|
+
u > 0 ? `${u}h` : null,
|
|
9093
|
+
m > 0 ? `${m}m` : null,
|
|
9094
|
+
`${d}s`,
|
|
9095
|
+
`${y}ms`
|
|
9096
|
+
].filter(Boolean).join(" ");
|
|
9088
9097
|
})();
|
|
9089
9098
|
return /* @__PURE__ */ f("div", { className: "bg-[#F7F7F7] rounded-lg p-4", children: [
|
|
9090
9099
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
@@ -9145,7 +9154,7 @@ const Tc = ({
|
|
|
9145
9154
|
onAlertView: l,
|
|
9146
9155
|
showAlertTimeline: u
|
|
9147
9156
|
}) => {
|
|
9148
|
-
const [m, d] = S(), [
|
|
9157
|
+
const [m, d] = S(), [y, p] = S(""), [v, k] = S(!1), [b, V] = S([]), q = pr(null), [Q, x] = S("details"), [C, Z] = S(void 0), R = Dr(), { alerts: G, rules: h, config: g } = Ge(), { timeZoneDetails: M } = ss(), [ie, he] = S(
|
|
9149
9158
|
null
|
|
9150
9159
|
), [E, N] = S(!1), [w, O] = S(!1), [T, D] = S(void 0), [L, _] = S(void 0), [Y, j] = S({}), [le, de] = S({}), Ee = (A, H, ae) => {
|
|
9151
9160
|
const Ie = le[A];
|
|
@@ -9244,7 +9253,7 @@ const Tc = ({
|
|
|
9244
9253
|
}
|
|
9245
9254
|
})();
|
|
9246
9255
|
}, [P]), oe(() => {
|
|
9247
|
-
t ? x(a) : (d(void 0),
|
|
9256
|
+
t ? x(a) : (d(void 0), p(""));
|
|
9248
9257
|
}, [t, a]), oe(() => {
|
|
9249
9258
|
!t || !l || l([
|
|
9250
9259
|
{
|
|
@@ -9333,7 +9342,7 @@ const Tc = ({
|
|
|
9333
9342
|
alertUniqueId: P,
|
|
9334
9343
|
alertId: Me,
|
|
9335
9344
|
status: m ? String(m) : void 0,
|
|
9336
|
-
notes:
|
|
9345
|
+
notes: y.trim(),
|
|
9337
9346
|
modifiedBy: 0
|
|
9338
9347
|
}, H = await R.mutateAsync(A);
|
|
9339
9348
|
if (H?.responseStatus || H?.Success) {
|
|
@@ -9343,7 +9352,7 @@ const Tc = ({
|
|
|
9343
9352
|
onClose: () => {
|
|
9344
9353
|
n(), e();
|
|
9345
9354
|
}
|
|
9346
|
-
}), d(void 0),
|
|
9355
|
+
}), d(void 0), p("");
|
|
9347
9356
|
} else {
|
|
9348
9357
|
const ae = H?.errorMessage || H?.Message || "Failed to update alert status";
|
|
9349
9358
|
Oe.error(ae);
|
|
@@ -9459,8 +9468,8 @@ const Tc = ({
|
|
|
9459
9468
|
id: "action-details-input",
|
|
9460
9469
|
placeholder: "Enter details...",
|
|
9461
9470
|
className: "w-full text-gray-500 h-20 border border-grey-500 rounded-md p-2",
|
|
9462
|
-
value:
|
|
9463
|
-
onChange: (A) =>
|
|
9471
|
+
value: y,
|
|
9472
|
+
onChange: (A) => p(A.target.value)
|
|
9464
9473
|
}
|
|
9465
9474
|
)
|
|
9466
9475
|
] })
|
|
@@ -9594,20 +9603,20 @@ function Ri({
|
|
|
9594
9603
|
onAlertView: l,
|
|
9595
9604
|
showAlertTimeline: u
|
|
9596
9605
|
}) {
|
|
9597
|
-
const [m, d] = S(!1), [
|
|
9606
|
+
const [m, d] = S(!1), [y, p] = S(null), [v, k] = S("details"), { list: b, loading: V } = Mc(), { timeZoneDetails: q } = ss(), Q = q?.timeZoneName ?? "UTC", x = q?.ianaTimeZoneId ?? "UTC";
|
|
9598
9607
|
function C(ie, he) {
|
|
9599
|
-
|
|
9608
|
+
p(ie), k(he?.tab ?? "details"), G(he?.sourceTab ?? "active"), d(!0);
|
|
9600
9609
|
}
|
|
9601
9610
|
function Z() {
|
|
9602
9611
|
d(!1);
|
|
9603
9612
|
}
|
|
9604
|
-
const [R, G] = S("active"), [h, g] = S(0), M =
|
|
9613
|
+
const [R, G] = S("active"), [h, g] = S(0), M = y ? {
|
|
9605
9614
|
originalData: {
|
|
9606
9615
|
// include the full selected alert so alll modal fieldsare present
|
|
9607
|
-
...
|
|
9616
|
+
...y,
|
|
9608
9617
|
// ensure alertId is available even if backend uses id
|
|
9609
|
-
alertId:
|
|
9610
|
-
mediaDetails:
|
|
9618
|
+
alertId: y.alertId ?? y.id,
|
|
9619
|
+
mediaDetails: y.mediaDetails
|
|
9611
9620
|
}
|
|
9612
9621
|
} : null;
|
|
9613
9622
|
return /* @__PURE__ */ f("div", { className: "p-6 flex flex-col items-start justify-start min-h-screen w-full overflow-auto", children: [
|
|
@@ -9704,16 +9713,16 @@ function Dc() {
|
|
|
9704
9713
|
let d = !0;
|
|
9705
9714
|
return (async () => {
|
|
9706
9715
|
try {
|
|
9707
|
-
const
|
|
9716
|
+
const y = await m.getRules();
|
|
9708
9717
|
if (!d) return;
|
|
9709
|
-
o(Array.isArray(
|
|
9710
|
-
const
|
|
9718
|
+
o(Array.isArray(y) ? y : []);
|
|
9719
|
+
const p = (y || []).map((v, k) => ({
|
|
9711
9720
|
RuleId: v.ruleId || v.ruleName || String(k),
|
|
9712
9721
|
Name: v.ruleName || v.Name || "-",
|
|
9713
9722
|
Description: v.ruleDesc || v.Description || "",
|
|
9714
9723
|
SeverityId: 0
|
|
9715
9724
|
}));
|
|
9716
|
-
e(
|
|
9725
|
+
e(p);
|
|
9717
9726
|
try {
|
|
9718
9727
|
const v = await m.getLookups(), k = Array.isArray(v?.userRoles) ? v.userRoles.map((b) => ({
|
|
9719
9728
|
userRoleId: b.userRoleId ?? b.id,
|
|
@@ -9800,7 +9809,7 @@ function Zc({
|
|
|
9800
9809
|
onAlertView: m,
|
|
9801
9810
|
showAlertTimeline: d
|
|
9802
9811
|
}) {
|
|
9803
|
-
const [
|
|
9812
|
+
const [y] = S(
|
|
9804
9813
|
() => new ea({
|
|
9805
9814
|
defaultOptions: {
|
|
9806
9815
|
queries: {
|
|
@@ -9812,7 +9821,7 @@ function Zc({
|
|
|
9812
9821
|
}
|
|
9813
9822
|
}
|
|
9814
9823
|
})
|
|
9815
|
-
),
|
|
9824
|
+
), p = ve(
|
|
9816
9825
|
() => ({
|
|
9817
9826
|
alertsBaseUrl: e,
|
|
9818
9827
|
rulesBaseUrl: s || e,
|
|
@@ -9820,11 +9829,11 @@ function Zc({
|
|
|
9820
9829
|
}),
|
|
9821
9830
|
[e, s, n]
|
|
9822
9831
|
);
|
|
9823
|
-
return /* @__PURE__ */ c(ta, { client:
|
|
9832
|
+
return /* @__PURE__ */ c(ta, { client: y, children: /* @__PURE__ */ c(
|
|
9824
9833
|
Da,
|
|
9825
9834
|
{
|
|
9826
9835
|
tenant: t,
|
|
9827
|
-
override:
|
|
9836
|
+
override: p,
|
|
9828
9837
|
timeZone: r,
|
|
9829
9838
|
userManagementDomain: i,
|
|
9830
9839
|
spacesBaseUrl: a,
|