@ssgc/alert-console 2.6.5 → 2.6.7
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 +581 -557
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as c, jsxs as h, Fragment as ga } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as pa, useMemo as Se, createContext as Sa, useState as
|
|
2
|
+
import { useContext as pa, useMemo as Se, createContext as Sa, useState as b, useEffect as ve, forwardRef as ar, createElement as $s, useRef as wa } from "react";
|
|
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
|
});
|
|
@@ -285,107 +285,107 @@ function Xa() {
|
|
|
285
285
|
(function(s, n) {
|
|
286
286
|
t.exports = n();
|
|
287
287
|
})(Qa, (function() {
|
|
288
|
-
var s = 1e3, n = 6e4, r = 36e5, a = "millisecond", i = "second", o = "minute", l = "hour", u = "day", m = "week", d = "month", g = "quarter", f = "year",
|
|
289
|
-
var
|
|
290
|
-
return "[" + D + (
|
|
291
|
-
} }, te = function(D,
|
|
288
|
+
var s = 1e3, n = 6e4, r = 36e5, a = "millisecond", i = "second", o = "minute", l = "hour", u = "day", m = "week", d = "month", g = "quarter", f = "year", v = "date", O = "Invalid Date", C = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, J = /\[([^\]]+)]|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, _ = { 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(D) {
|
|
289
|
+
var w = ["th", "st", "nd", "rd"], p = D % 100;
|
|
290
|
+
return "[" + D + (w[(p - 20) % 10] || w[p] || w[0]) + "]";
|
|
291
|
+
} }, te = function(D, w, p) {
|
|
292
292
|
var I = String(D);
|
|
293
|
-
return !I || I.length >=
|
|
293
|
+
return !I || I.length >= w ? D : "" + Array(w + 1 - I.length).join(p) + D;
|
|
294
294
|
}, k = { s: te, z: function(D) {
|
|
295
|
-
var
|
|
296
|
-
return (
|
|
297
|
-
}, m: function D(
|
|
298
|
-
if (
|
|
299
|
-
var I = 12 * (p.year() -
|
|
300
|
-
return +(-(I + (p -
|
|
295
|
+
var w = -D.utcOffset(), p = Math.abs(w), I = Math.floor(p / 60), A = p % 60;
|
|
296
|
+
return (w <= 0 ? "+" : "-") + te(I, 2, "0") + ":" + te(A, 2, "0");
|
|
297
|
+
}, m: function D(w, p) {
|
|
298
|
+
if (w.date() < p.date()) return -D(p, w);
|
|
299
|
+
var I = 12 * (p.year() - w.year()) + (p.month() - w.month()), A = w.clone().add(I, d), L = p - A < 0, T = w.clone().add(I + (L ? -1 : 1), d);
|
|
300
|
+
return +(-(I + (p - A) / (L ? A - T : T - A)) || 0);
|
|
301
301
|
}, a: function(D) {
|
|
302
302
|
return D < 0 ? Math.ceil(D) || 0 : Math.floor(D);
|
|
303
303
|
}, p: function(D) {
|
|
304
|
-
return { M: d, y: f, w: m, d: u, D:
|
|
304
|
+
return { M: d, y: f, w: m, d: u, D: v, h: l, m: o, s: i, ms: a, Q: g }[D] || String(D || "").toLowerCase().replace(/s$/, "");
|
|
305
305
|
}, u: function(D) {
|
|
306
306
|
return D === void 0;
|
|
307
307
|
} }, R = "en", V = {};
|
|
308
308
|
V[R] = _;
|
|
309
|
-
var
|
|
310
|
-
return D instanceof de || !(!D || !D[
|
|
311
|
-
}, y = function D(
|
|
312
|
-
var
|
|
313
|
-
if (!
|
|
314
|
-
if (typeof
|
|
315
|
-
var
|
|
316
|
-
V[
|
|
317
|
-
var
|
|
318
|
-
if (!
|
|
309
|
+
var U = "$isDayjsObject", G = function(D) {
|
|
310
|
+
return D instanceof de || !(!D || !D[U]);
|
|
311
|
+
}, y = function D(w, p, I) {
|
|
312
|
+
var A;
|
|
313
|
+
if (!w) return R;
|
|
314
|
+
if (typeof w == "string") {
|
|
315
|
+
var L = w.toLowerCase();
|
|
316
|
+
V[L] && (A = L), p && (V[L] = p, A = L);
|
|
317
|
+
var T = w.split("-");
|
|
318
|
+
if (!A && T.length > 1) return D(T[0]);
|
|
319
319
|
} else {
|
|
320
|
-
var M =
|
|
321
|
-
V[M] =
|
|
320
|
+
var M = w.name;
|
|
321
|
+
V[M] = w, A = M;
|
|
322
322
|
}
|
|
323
|
-
return !I &&
|
|
324
|
-
},
|
|
325
|
-
if (
|
|
326
|
-
var p = typeof
|
|
323
|
+
return !I && A && (R = A), A || !I && R;
|
|
324
|
+
}, S = function(D, w) {
|
|
325
|
+
if (G(D)) return D.clone();
|
|
326
|
+
var p = typeof w == "object" ? w : {};
|
|
327
327
|
return p.date = D, p.args = arguments, new de(p);
|
|
328
328
|
}, E = k;
|
|
329
|
-
E.l = y, E.i =
|
|
330
|
-
return
|
|
329
|
+
E.l = y, E.i = G, E.w = function(D, w) {
|
|
330
|
+
return S(D, { locale: w.$L, utc: w.$u, x: w.$x, $offset: w.$offset });
|
|
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
|
-
var
|
|
337
|
-
return
|
|
336
|
+
var w = D.prototype;
|
|
337
|
+
return w.parse = function(p) {
|
|
338
338
|
this.$d = (function(I) {
|
|
339
|
-
var
|
|
340
|
-
if (
|
|
341
|
-
if (E.u(
|
|
342
|
-
if (
|
|
343
|
-
if (typeof
|
|
344
|
-
var
|
|
345
|
-
if (
|
|
346
|
-
var M =
|
|
347
|
-
return
|
|
339
|
+
var A = I.date, L = I.utc;
|
|
340
|
+
if (A === null) return /* @__PURE__ */ new Date(NaN);
|
|
341
|
+
if (E.u(A)) return /* @__PURE__ */ new Date();
|
|
342
|
+
if (A instanceof Date) return new Date(A);
|
|
343
|
+
if (typeof A == "string" && !/Z$/i.test(A)) {
|
|
344
|
+
var T = A.match(C);
|
|
345
|
+
if (T) {
|
|
346
|
+
var M = T[2] - 1 || 0, W = (T[7] || "0").substring(0, 3);
|
|
347
|
+
return L ? new Date(Date.UTC(T[1], M, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, W)) : new Date(T[1], M, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, W);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
return new Date(
|
|
350
|
+
return new Date(A);
|
|
351
351
|
})(p), this.init();
|
|
352
|
-
},
|
|
352
|
+
}, w.init = function() {
|
|
353
353
|
var p = this.$d;
|
|
354
354
|
this.$y = p.getFullYear(), this.$M = p.getMonth(), this.$D = p.getDate(), this.$W = p.getDay(), this.$H = p.getHours(), this.$m = p.getMinutes(), this.$s = p.getSeconds(), this.$ms = p.getMilliseconds();
|
|
355
|
-
},
|
|
355
|
+
}, w.$utils = function() {
|
|
356
356
|
return E;
|
|
357
|
-
},
|
|
357
|
+
}, w.isValid = function() {
|
|
358
358
|
return this.$d.toString() !== O;
|
|
359
|
-
},
|
|
360
|
-
var
|
|
361
|
-
return this.startOf(I) <=
|
|
362
|
-
},
|
|
363
|
-
return
|
|
364
|
-
},
|
|
365
|
-
return this.endOf(I) <
|
|
366
|
-
},
|
|
367
|
-
return E.u(p) ? this[I] : this.set(
|
|
368
|
-
},
|
|
359
|
+
}, w.isSame = function(p, I) {
|
|
360
|
+
var A = S(p);
|
|
361
|
+
return this.startOf(I) <= A && A <= this.endOf(I);
|
|
362
|
+
}, w.isAfter = function(p, I) {
|
|
363
|
+
return S(p) < this.startOf(I);
|
|
364
|
+
}, w.isBefore = function(p, I) {
|
|
365
|
+
return this.endOf(I) < S(p);
|
|
366
|
+
}, w.$g = function(p, I, A) {
|
|
367
|
+
return E.u(p) ? this[I] : this.set(A, p);
|
|
368
|
+
}, w.unix = function() {
|
|
369
369
|
return Math.floor(this.valueOf() / 1e3);
|
|
370
|
-
},
|
|
370
|
+
}, w.valueOf = function() {
|
|
371
371
|
return this.$d.getTime();
|
|
372
|
-
},
|
|
373
|
-
var
|
|
374
|
-
var Ae = E.w(
|
|
375
|
-
return
|
|
376
|
-
}, W = function(
|
|
377
|
-
return E.w(
|
|
372
|
+
}, w.startOf = function(p, I) {
|
|
373
|
+
var A = this, L = !!E.u(I) || I, T = E.p(p), M = function(le, me) {
|
|
374
|
+
var Ae = E.w(A.$u ? Date.UTC(A.$y, me, le) : new Date(A.$y, me, le), A);
|
|
375
|
+
return L ? Ae : Ae.endOf(u);
|
|
376
|
+
}, W = function(le, me) {
|
|
377
|
+
return E.w(A.toDate()[le].apply(A.toDate("s"), (L ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(me)), A);
|
|
378
378
|
}, Z = this.$W, z = this.$M, Y = this.$D, X = "set" + (this.$u ? "UTC" : "");
|
|
379
|
-
switch (
|
|
379
|
+
switch (T) {
|
|
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
|
-
case
|
|
388
|
+
case v:
|
|
389
389
|
return W(X + "Hours", 0);
|
|
390
390
|
case l:
|
|
391
391
|
return W(X + "Minutes", 1);
|
|
@@ -396,46 +396,46 @@ function Xa() {
|
|
|
396
396
|
default:
|
|
397
397
|
return this.clone();
|
|
398
398
|
}
|
|
399
|
-
},
|
|
399
|
+
}, w.endOf = function(p) {
|
|
400
400
|
return this.startOf(p, !1);
|
|
401
|
-
},
|
|
402
|
-
var
|
|
403
|
-
if (
|
|
404
|
-
var Z = this.clone().set(
|
|
405
|
-
Z.$d[M](W), Z.init(), this.$d = Z.set(
|
|
401
|
+
}, w.$set = function(p, I) {
|
|
402
|
+
var A, L = E.p(p), T = "set" + (this.$u ? "UTC" : ""), M = (A = {}, A[u] = T + "Date", A[v] = T + "Date", A[d] = T + "Month", A[f] = T + "FullYear", A[l] = T + "Hours", A[o] = T + "Minutes", A[i] = T + "Seconds", A[a] = T + "Milliseconds", A)[L], W = L === u ? this.$D + (I - this.$W) : I;
|
|
403
|
+
if (L === d || L === f) {
|
|
404
|
+
var Z = this.clone().set(v, 1);
|
|
405
|
+
Z.$d[M](W), Z.init(), this.$d = Z.set(v, Math.min(this.$D, Z.daysInMonth())).$d;
|
|
406
406
|
} else M && this.$d[M](W);
|
|
407
407
|
return this.init(), this;
|
|
408
|
-
},
|
|
408
|
+
}, w.set = function(p, I) {
|
|
409
409
|
return this.clone().$set(p, I);
|
|
410
|
-
},
|
|
410
|
+
}, w.get = function(p) {
|
|
411
411
|
return this[E.p(p)]();
|
|
412
|
-
},
|
|
413
|
-
var
|
|
412
|
+
}, w.add = function(p, I) {
|
|
413
|
+
var A, L = this;
|
|
414
414
|
p = Number(p);
|
|
415
|
-
var
|
|
416
|
-
var Y =
|
|
417
|
-
return E.w(Y.date(Y.date() + Math.round(z * p)),
|
|
415
|
+
var T = E.p(I), M = function(z) {
|
|
416
|
+
var Y = S(L);
|
|
417
|
+
return E.w(Y.date(Y.date() + Math.round(z * p)), L);
|
|
418
418
|
};
|
|
419
|
-
if (
|
|
420
|
-
if (
|
|
421
|
-
if (
|
|
422
|
-
if (
|
|
423
|
-
var W = (
|
|
419
|
+
if (T === d) return this.set(d, this.$M + p);
|
|
420
|
+
if (T === f) return this.set(f, this.$y + p);
|
|
421
|
+
if (T === u) return M(1);
|
|
422
|
+
if (T === m) return M(7);
|
|
423
|
+
var W = (A = {}, A[o] = n, A[l] = r, A[i] = s, A)[T] || 1, Z = this.$d.getTime() + p * W;
|
|
424
424
|
return E.w(Z, this);
|
|
425
|
-
},
|
|
425
|
+
}, w.subtract = function(p, I) {
|
|
426
426
|
return this.add(-1 * p, I);
|
|
427
|
-
},
|
|
428
|
-
var I = this,
|
|
429
|
-
if (!this.isValid()) return
|
|
430
|
-
var
|
|
431
|
-
return me && (me[Ae] || me(I,
|
|
427
|
+
}, w.format = function(p) {
|
|
428
|
+
var I = this, A = this.$locale();
|
|
429
|
+
if (!this.isValid()) return A.invalidDate || O;
|
|
430
|
+
var L = p || "YYYY-MM-DDTHH:mm:ssZ", T = E.z(this), M = this.$H, W = this.$m, Z = this.$M, z = A.weekdays, Y = A.months, X = A.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
|
+
}, le = 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":
|
|
@@ -447,7 +447,7 @@ function Xa() {
|
|
|
447
447
|
case "MM":
|
|
448
448
|
return E.s(Z + 1, 2, "0");
|
|
449
449
|
case "MMM":
|
|
450
|
-
return ie(
|
|
450
|
+
return ie(A.monthsShort, Z, Y, 3);
|
|
451
451
|
case "MMMM":
|
|
452
452
|
return ie(Y, Z);
|
|
453
453
|
case "D":
|
|
@@ -457,9 +457,9 @@ function Xa() {
|
|
|
457
457
|
case "d":
|
|
458
458
|
return String(I.$W);
|
|
459
459
|
case "dd":
|
|
460
|
-
return ie(
|
|
460
|
+
return ie(A.weekdaysMin, I.$W, z, 2);
|
|
461
461
|
case "ddd":
|
|
462
|
-
return ie(
|
|
462
|
+
return ie(A.weekdaysShort, I.$W, z, 3);
|
|
463
463
|
case "dddd":
|
|
464
464
|
return z[I.$W];
|
|
465
465
|
case "H":
|
|
@@ -471,9 +471,9 @@ function Xa() {
|
|
|
471
471
|
case "hh":
|
|
472
472
|
return Ne(2);
|
|
473
473
|
case "a":
|
|
474
|
-
return
|
|
474
|
+
return le(M, W, !0);
|
|
475
475
|
case "A":
|
|
476
|
-
return
|
|
476
|
+
return le(M, W, !1);
|
|
477
477
|
case "m":
|
|
478
478
|
return String(W);
|
|
479
479
|
case "mm":
|
|
@@ -485,75 +485,75 @@ function Xa() {
|
|
|
485
485
|
case "SSS":
|
|
486
486
|
return E.s(I.$ms, 3, "0");
|
|
487
487
|
case "Z":
|
|
488
|
-
return
|
|
488
|
+
return T;
|
|
489
489
|
}
|
|
490
490
|
return null;
|
|
491
|
-
})(me) ||
|
|
491
|
+
})(me) || T.replace(":", "");
|
|
492
492
|
}));
|
|
493
|
-
},
|
|
493
|
+
}, w.utcOffset = function() {
|
|
494
494
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
495
|
-
},
|
|
496
|
-
var
|
|
497
|
-
return E.m(
|
|
495
|
+
}, w.diff = function(p, I, A) {
|
|
496
|
+
var L, T = this, M = E.p(I), W = S(p), Z = (W.utcOffset() - this.utcOffset()) * n, z = this - W, Y = function() {
|
|
497
|
+
return E.m(T, 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
|
|
528
|
-
},
|
|
527
|
+
return A ? L : E.a(L);
|
|
528
|
+
}, w.daysInMonth = function() {
|
|
529
529
|
return this.endOf(d).$D;
|
|
530
|
-
},
|
|
530
|
+
}, w.$locale = function() {
|
|
531
531
|
return V[this.$L];
|
|
532
|
-
},
|
|
532
|
+
}, w.locale = function(p, I) {
|
|
533
533
|
if (!p) return this.$L;
|
|
534
|
-
var
|
|
535
|
-
return
|
|
536
|
-
},
|
|
534
|
+
var A = this.clone(), L = y(p, I, !0);
|
|
535
|
+
return L && (A.$L = L), A;
|
|
536
|
+
}, w.clone = function() {
|
|
537
537
|
return E.w(this.$d, this);
|
|
538
|
-
},
|
|
538
|
+
}, w.toDate = function() {
|
|
539
539
|
return new Date(this.valueOf());
|
|
540
|
-
},
|
|
540
|
+
}, w.toJSON = function() {
|
|
541
541
|
return this.isValid() ? this.toISOString() : null;
|
|
542
|
-
},
|
|
542
|
+
}, w.toISOString = function() {
|
|
543
543
|
return this.$d.toISOString();
|
|
544
|
-
},
|
|
544
|
+
}, w.toString = function() {
|
|
545
545
|
return this.$d.toUTCString();
|
|
546
546
|
}, D;
|
|
547
|
-
})(),
|
|
548
|
-
return
|
|
549
|
-
|
|
550
|
-
return this.$g(
|
|
547
|
+
})(), ue = de.prototype;
|
|
548
|
+
return S.prototype = ue, [["$ms", a], ["$s", i], ["$m", o], ["$H", l], ["$W", u], ["$M", d], ["$y", f], ["$D", v]].forEach((function(D) {
|
|
549
|
+
ue[D[1]] = function(w) {
|
|
550
|
+
return this.$g(w, D[0], D[1]);
|
|
551
551
|
};
|
|
552
|
-
})),
|
|
553
|
-
return D.$i || (D(
|
|
554
|
-
},
|
|
555
|
-
return
|
|
556
|
-
},
|
|
552
|
+
})), S.extend = function(D, w) {
|
|
553
|
+
return D.$i || (D(w, de, S), D.$i = !0), S;
|
|
554
|
+
}, S.locale = y, S.isDayjs = G, S.unix = function(D) {
|
|
555
|
+
return S(1e3 * D);
|
|
556
|
+
}, S.en = V[R], S.Ls = V, S.p = {}, S;
|
|
557
557
|
}));
|
|
558
558
|
})(ts)), ts.exports;
|
|
559
559
|
}
|
|
@@ -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),
|
|
@@ -889,41 +889,50 @@ function oi(t) {
|
|
|
889
889
|
u,
|
|
890
890
|
m,
|
|
891
891
|
d
|
|
892
|
-
] = await Promise.allSettled(a), g = (y) =>
|
|
892
|
+
] = await Promise.allSettled(a), g = (y) => {
|
|
893
|
+
if (y.status !== "fulfilled") return [];
|
|
894
|
+
const S = y.value;
|
|
895
|
+
return Array.isArray(S) ? S : Array.isArray(S?.Data) ? S.Data : Array.isArray(S?.data) ? S.data : [];
|
|
896
|
+
}, f = g(i), v = g(o), O = g(l), C = g(u), J = g(m), _ = d.status === "fulfilled" ? d.value : null;
|
|
893
897
|
let te = [];
|
|
894
898
|
Array.isArray(_) ? te = _ : Array.isArray(_?.Data) ? te = _.Data : Array.isArray(_?.data) && (te = _.data);
|
|
895
899
|
const k = f.map((y) => ({
|
|
896
900
|
actionTypeId: Number(y?.ActionTypeId),
|
|
897
901
|
name: y?.DisplayName ?? y?.Name ?? ""
|
|
898
|
-
})), R =
|
|
902
|
+
})), R = v.map((y) => ({
|
|
899
903
|
recordId: y?.AnomalyId,
|
|
900
904
|
anomalyName: y?.DisplayName ?? y?.Name ?? ""
|
|
901
905
|
})), V = O.map((y) => ({
|
|
902
|
-
|
|
906
|
+
thirdPartyIds: Number(y?.ThirdPartyId),
|
|
903
907
|
thirdPartyName: y?.ThirdPartyName ?? y?.Name ?? ""
|
|
904
|
-
})),
|
|
908
|
+
})), U = te.map((y) => ({
|
|
905
909
|
userRoleId: y.UserRoleId ?? y.userRoleId ?? y.Id ?? y.id ?? 0,
|
|
906
910
|
userRoleName: y.UserRoleName ?? y.userRoleName ?? y.Name ?? y.name ?? ""
|
|
907
|
-
})),
|
|
911
|
+
})), G = {
|
|
908
912
|
actionTypes: k,
|
|
909
913
|
anomalies: R,
|
|
910
914
|
thirdParties: V
|
|
911
915
|
};
|
|
912
|
-
return C.length && (
|
|
916
|
+
return C.length && (G.severities = C), J.length && (G.scheduleTypes = J), U.length && (G.userRoles = U), G;
|
|
913
917
|
},
|
|
914
918
|
async updateRule(n, r) {
|
|
915
|
-
const a = `${s}/${n}`, { escalationSettings: i,
|
|
916
|
-
return Qe(a, {
|
|
919
|
+
const a = `${s}/${n}`, { escalationSettings: i, Anomaly: o, Severity: l, ...u } = r ?? {};
|
|
920
|
+
return console.log("payload", r), Qe(a, {
|
|
917
921
|
method: "PUT",
|
|
918
922
|
headers: e,
|
|
919
923
|
body: JSON.stringify({
|
|
920
|
-
...
|
|
924
|
+
...u,
|
|
921
925
|
CustomerId: "99e5c8b5-b9d4-4d35-8885-7f121c532664",
|
|
922
926
|
Version: {
|
|
923
927
|
DeDupWindowSeconds: 0,
|
|
924
928
|
IncludeSubjectInHash: !0
|
|
925
929
|
},
|
|
926
|
-
|
|
930
|
+
AnomalyId: o?.AnomalyId,
|
|
931
|
+
SeverityId: l?.SeverityId,
|
|
932
|
+
EscalationSettings: i ? {
|
|
933
|
+
...i,
|
|
934
|
+
ThirdPartyIds: i.thirdPartyId ?? []
|
|
935
|
+
} : {}
|
|
927
936
|
})
|
|
928
937
|
});
|
|
929
938
|
}
|
|
@@ -982,7 +991,7 @@ function ci(t) {
|
|
|
982
991
|
});
|
|
983
992
|
},
|
|
984
993
|
async getLookups() {
|
|
985
|
-
const n = (
|
|
994
|
+
const n = (U) => new URL(U, t.baseUrl).toString(), r = t.userManagementBaseUrl || t.baseUrl, a = [
|
|
986
995
|
rt(n("/api/ActionTypeMaster/GetAll"), { method: "GET", headers: e }),
|
|
987
996
|
rt(n("/api/anomaly/anomaly-list"), {
|
|
988
997
|
method: "POST",
|
|
@@ -1000,37 +1009,37 @@ function ci(t) {
|
|
|
1000
1009
|
l,
|
|
1001
1010
|
u,
|
|
1002
1011
|
m
|
|
1003
|
-
] = await Promise.allSettled(a), d = (
|
|
1004
|
-
if (
|
|
1005
|
-
const
|
|
1006
|
-
return Array.isArray(
|
|
1007
|
-
}, g = d(i), f = d(o),
|
|
1008
|
-
actionTypeId:
|
|
1009
|
-
name:
|
|
1010
|
-
})), _ = f.map((
|
|
1011
|
-
recordId:
|
|
1012
|
-
anomalyName:
|
|
1013
|
-
})), te =
|
|
1014
|
-
thirdPartyId: Number(
|
|
1015
|
-
thirdPartyName:
|
|
1012
|
+
] = await Promise.allSettled(a), d = (U) => {
|
|
1013
|
+
if (U.status !== "fulfilled") return [];
|
|
1014
|
+
const G = U.value;
|
|
1015
|
+
return Array.isArray(G) ? G : Array.isArray(G?.data) ? G.data : [];
|
|
1016
|
+
}, g = d(i), f = d(o), v = d(l), O = d(u), C = m.status === "fulfilled" ? m.value : null, J = g.map((U) => ({
|
|
1017
|
+
actionTypeId: U?.ActionTypeUniqueId,
|
|
1018
|
+
name: U?.Name ?? ""
|
|
1019
|
+
})), _ = f.map((U) => ({
|
|
1020
|
+
recordId: U?.AnomalyId,
|
|
1021
|
+
anomalyName: U?.DisplayName ?? U?.Name ?? ""
|
|
1022
|
+
})), te = v.map((U) => ({
|
|
1023
|
+
thirdPartyId: Number(U?.ThirdPartyId),
|
|
1024
|
+
thirdPartyName: U?.ThirdPartyName ?? U?.Name ?? ""
|
|
1016
1025
|
}));
|
|
1017
1026
|
let k = [];
|
|
1018
1027
|
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:
|
|
1028
|
+
const R = k.map((U) => ({
|
|
1029
|
+
userRoleId: U.userRoleId ?? 0,
|
|
1030
|
+
userRoleName: U.userRoleName ?? ""
|
|
1022
1031
|
})), V = {
|
|
1023
1032
|
actionTypes: J,
|
|
1024
1033
|
anomalies: _,
|
|
1025
1034
|
thirdParties: te
|
|
1026
1035
|
};
|
|
1027
|
-
return O.length && (V.severities = O.map((
|
|
1028
|
-
SeverityId:
|
|
1029
|
-
DisplayName:
|
|
1036
|
+
return O.length && (V.severities = O.map((U) => ({
|
|
1037
|
+
SeverityId: U.SeverityId,
|
|
1038
|
+
DisplayName: U.SeverityName ?? U.DisplayName ?? ""
|
|
1030
1039
|
}))), R.length && (V.userRoles = R), V;
|
|
1031
1040
|
},
|
|
1032
1041
|
async updateRule(n, r) {
|
|
1033
|
-
const a = new URL("/update-rule", t.baseUrl).toString(), { escalationSettings: i, ruleId: o, ruleName: l, ruleDesc: u, ...m } = r ?? {}, d = i ?? {}, g = (d.escalationSettingsActionTypeIds ?? []).filter((
|
|
1042
|
+
const a = new URL("/update-rule", t.baseUrl).toString(), { escalationSettings: i, ruleId: o, ruleName: l, ruleDesc: u, ...m } = r ?? {}, d = i ?? {}, g = (d.escalationSettingsActionTypeIds ?? []).filter((v) => v != null && !Number.isNaN(v)), f = {
|
|
1034
1043
|
Level1UserRoleId: d.level1UserRoleId ?? 0,
|
|
1035
1044
|
Level1PostAssistTime: d.level1PostAssistTime ?? 0,
|
|
1036
1045
|
Level2UserRoleId: d.level2UserRoleId ?? 0,
|
|
@@ -1381,45 +1390,45 @@ function bi({
|
|
|
1381
1390
|
] });
|
|
1382
1391
|
}
|
|
1383
1392
|
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] =
|
|
1393
|
+
const [d, g] = b("All"), [f, v] = b("All"), [O, C] = b("All"), [J, _] = b("All"), [te, k] = b(""), [R, V] = b([{ label: "All", value: "All" }]), [U, G] = b(/* @__PURE__ */ new Set()), { rules: y, alerts: S } = He(), E = {
|
|
1385
1394
|
6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ c(xa, {}) },
|
|
1386
1395
|
7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ c(Ia, {}) }
|
|
1387
|
-
}, de = Se(() => yi(t), [t]),
|
|
1396
|
+
}, de = Se(() => yi(t), [t]), ue = Se(() => gi(t), [t]);
|
|
1388
1397
|
ve(() => {
|
|
1389
|
-
let
|
|
1398
|
+
let T = !0;
|
|
1390
1399
|
return (async () => {
|
|
1391
1400
|
try {
|
|
1392
1401
|
const M = await y.getLookups(), Z = (Array.isArray(M.thirdParties) ? M.thirdParties : []).map((z) => ({
|
|
1393
1402
|
label: z.thirdPartyName,
|
|
1394
1403
|
value: String(z.thirdPartyId)
|
|
1395
1404
|
}));
|
|
1396
|
-
|
|
1405
|
+
T && V([{ label: "All", value: "All" }, ...Z]);
|
|
1397
1406
|
} catch (M) {
|
|
1398
1407
|
console.error("Error loading third party options", M);
|
|
1399
1408
|
}
|
|
1400
1409
|
})(), () => {
|
|
1401
|
-
|
|
1410
|
+
T = !1;
|
|
1402
1411
|
};
|
|
1403
1412
|
}, [y]);
|
|
1404
1413
|
const D = Se(
|
|
1405
|
-
() => (t || []).some((
|
|
1414
|
+
() => (t || []).some((T) => Sn(T).length > 0),
|
|
1406
1415
|
[t]
|
|
1407
|
-
),
|
|
1408
|
-
const M = d === "All" ||
|
|
1416
|
+
), w = Se(() => (t || []).filter((T) => {
|
|
1417
|
+
const M = d === "All" || T.priority === d, W = `${T.id} ${T.description} ${T.statusType}`.toLowerCase(), Z = !te || W.includes(te.toLowerCase()), z = f === "All" || (T.anomalyName || "").toLowerCase() === f.toLowerCase(), Y = O === "All" || (T.spaceName || "").toLowerCase() === O.toLowerCase(), X = !D || J === "All" || Sn(T).includes(Number(J)), ie = !m || !["completed", "false positive"].includes(String(T.statusType || "").toLowerCase());
|
|
1409
1418
|
return M && Z && z && Y && X && ie;
|
|
1410
|
-
}), [t, d, te, f, O, J, D, m]), p = de, I = a?.length ? a :
|
|
1419
|
+
}), [t, d, te, f, O, J, D, m]), p = de, I = a?.length ? a : ue, A = [
|
|
1411
1420
|
{
|
|
1412
1421
|
title: "Severity",
|
|
1413
1422
|
dataIndex: "priority",
|
|
1414
1423
|
key: "priority",
|
|
1415
1424
|
width: 120,
|
|
1416
|
-
render: (
|
|
1425
|
+
render: (T) => /* @__PURE__ */ c(Nt, { className: "px-[10px] py-[2px]", style: { border: `2px solid ${hi[T]}`, backgroundColor: fi[T] }, children: T })
|
|
1417
1426
|
},
|
|
1418
1427
|
{
|
|
1419
1428
|
title: "Tracker",
|
|
1420
1429
|
key: "tracker",
|
|
1421
1430
|
width: 140,
|
|
1422
|
-
render: (
|
|
1431
|
+
render: (T, M) => /* @__PURE__ */ c(
|
|
1423
1432
|
"a",
|
|
1424
1433
|
{
|
|
1425
1434
|
onClick: (W) => {
|
|
@@ -1434,23 +1443,23 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1434
1443
|
title: "Call to action/Human in the loop",
|
|
1435
1444
|
key: "actions",
|
|
1436
1445
|
width: 320,
|
|
1437
|
-
render: (
|
|
1446
|
+
render: (T, M) => {
|
|
1438
1447
|
if (i) return /* @__PURE__ */ c(ga, { children: i(M) });
|
|
1439
1448
|
const W = async (Fe, st) => {
|
|
1440
1449
|
const ht = ks(M.id, Fe);
|
|
1441
|
-
|
|
1450
|
+
G((ge) => new Set(ge).add(ht));
|
|
1442
1451
|
try {
|
|
1443
|
-
const ge = await
|
|
1452
|
+
const ge = await S.sendSMSorEmailNotifications?.(M.id, Fe, st);
|
|
1444
1453
|
ge?.responseStatus || ge?.Success || ge?.success ? (Te.success(ge?.message || ge.data || (Fe ? "Email sent successfully" : "SMS sent successfully")), l?.()) : Te.error(ge?.message || ge?.data || ge?.errorMessage || "Failed to send notification");
|
|
1445
1454
|
} catch (ge) {
|
|
1446
1455
|
Te.error(ge?.message || "Failed to send notification");
|
|
1447
1456
|
} finally {
|
|
1448
|
-
|
|
1457
|
+
G((ge) => {
|
|
1449
1458
|
const yt = new Set(ge);
|
|
1450
1459
|
return yt.delete(ht), yt;
|
|
1451
1460
|
});
|
|
1452
1461
|
}
|
|
1453
|
-
}, Z = Xs, z = en, Y = E[Z], X = E[z], ie = bn(Z, M, Y?.title), Ne = bn(z, M, X?.title),
|
|
1462
|
+
}, Z = Xs, z = en, Y = E[Z], X = E[z], ie = bn(Z, M, Y?.title), Ne = bn(z, M, X?.title), le = ks(M.id, !0), me = ks(M.id, !1), Ae = jt(Z) && U.has(le), Ie = jt(z) && U.has(me);
|
|
1454
1463
|
return /* @__PURE__ */ h(Je, { size: "middle", children: [
|
|
1455
1464
|
/* @__PURE__ */ c(hn, { title: ie.tooltipTitle, children: /* @__PURE__ */ c(
|
|
1456
1465
|
De,
|
|
@@ -1486,7 +1495,7 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1486
1495
|
dataIndex: "timestamp",
|
|
1487
1496
|
key: "timestamp",
|
|
1488
1497
|
width: 220,
|
|
1489
|
-
render: (
|
|
1498
|
+
render: (T, M) => {
|
|
1490
1499
|
const W = M?.timeElapsed, Z = M?.timeRemaining, z = W ? pn(W) : 0, Y = Z ? pn(Z) : 0, X = Math.round(z / (z + Y) * 100);
|
|
1491
1500
|
return /* @__PURE__ */ h("div", { children: [
|
|
1492
1501
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1511,7 +1520,7 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1511
1520
|
title: "Description",
|
|
1512
1521
|
dataIndex: "description",
|
|
1513
1522
|
key: "description",
|
|
1514
|
-
render: (
|
|
1523
|
+
render: (T, M) => /* @__PURE__ */ h("div", { children: [
|
|
1515
1524
|
/* @__PURE__ */ c(
|
|
1516
1525
|
"a",
|
|
1517
1526
|
{
|
|
@@ -1522,16 +1531,16 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1522
1531
|
children: M.alertNumber
|
|
1523
1532
|
}
|
|
1524
1533
|
),
|
|
1525
|
-
/* @__PURE__ */ c("div", { className: "text-black/65", children:
|
|
1534
|
+
/* @__PURE__ */ c("div", { className: "text-black/65", children: T })
|
|
1526
1535
|
] })
|
|
1527
1536
|
}
|
|
1528
|
-
],
|
|
1537
|
+
], L = n && n.length ? n : A;
|
|
1529
1538
|
return /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
1530
1539
|
bi,
|
|
1531
1540
|
{
|
|
1532
1541
|
rowKey: "id",
|
|
1533
|
-
data:
|
|
1534
|
-
columns:
|
|
1542
|
+
data: w,
|
|
1543
|
+
columns: L,
|
|
1535
1544
|
loading: e,
|
|
1536
1545
|
pageSize: s,
|
|
1537
1546
|
onPageChange: u,
|
|
@@ -1542,7 +1551,7 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1542
1551
|
] }) }),
|
|
1543
1552
|
/* @__PURE__ */ c(j, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1544
1553
|
/* @__PURE__ */ c("span", { children: "Anomaly type" }),
|
|
1545
|
-
/* @__PURE__ */ c(vi, { value: f, onChange:
|
|
1554
|
+
/* @__PURE__ */ c(vi, { value: f, onChange: v, options: p })
|
|
1546
1555
|
] }) }),
|
|
1547
1556
|
/* @__PURE__ */ c(j, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1548
1557
|
/* @__PURE__ */ c("span", { children: "Space" }),
|
|
@@ -1559,7 +1568,7 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1559
1568
|
allowClear: !0,
|
|
1560
1569
|
placeholder: "Search",
|
|
1561
1570
|
onSearch: k,
|
|
1562
|
-
onChange: (
|
|
1571
|
+
onChange: (T) => k(T.target.value),
|
|
1563
1572
|
className: "w-[260px] ",
|
|
1564
1573
|
enterButton: !0
|
|
1565
1574
|
}
|
|
@@ -1570,7 +1579,7 @@ function ur({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
|
|
|
1570
1579
|
}
|
|
1571
1580
|
function dr() {
|
|
1572
1581
|
const { alerts: t } = He(), e = Ra();
|
|
1573
|
-
return
|
|
1582
|
+
return Ua({
|
|
1574
1583
|
mutationFn: (s) => t.updateAlertStatus(s),
|
|
1575
1584
|
onSuccess: () => {
|
|
1576
1585
|
e.invalidateQueries({ queryKey: ["alerts", "list"] }), e.invalidateQueries({ queryKey: ["alerts", "report"] });
|
|
@@ -1608,131 +1617,131 @@ class at extends ft {
|
|
|
1608
1617
|
super("Zone is an abstract class");
|
|
1609
1618
|
}
|
|
1610
1619
|
}
|
|
1611
|
-
const
|
|
1612
|
-
year:
|
|
1613
|
-
month:
|
|
1614
|
-
day:
|
|
1620
|
+
const N = "numeric", je = "short", Le = "long", as = {
|
|
1621
|
+
year: N,
|
|
1622
|
+
month: N,
|
|
1623
|
+
day: N
|
|
1615
1624
|
}, fr = {
|
|
1616
|
-
year:
|
|
1625
|
+
year: N,
|
|
1617
1626
|
month: je,
|
|
1618
|
-
day:
|
|
1627
|
+
day: N
|
|
1619
1628
|
}, Oi = {
|
|
1620
|
-
year:
|
|
1629
|
+
year: N,
|
|
1621
1630
|
month: je,
|
|
1622
|
-
day:
|
|
1631
|
+
day: N,
|
|
1623
1632
|
weekday: je
|
|
1624
1633
|
}, hr = {
|
|
1625
|
-
year:
|
|
1626
|
-
month:
|
|
1627
|
-
day:
|
|
1634
|
+
year: N,
|
|
1635
|
+
month: Le,
|
|
1636
|
+
day: N
|
|
1628
1637
|
}, yr = {
|
|
1629
|
-
year:
|
|
1630
|
-
month:
|
|
1631
|
-
day:
|
|
1632
|
-
weekday:
|
|
1638
|
+
year: N,
|
|
1639
|
+
month: Le,
|
|
1640
|
+
day: N,
|
|
1641
|
+
weekday: Le
|
|
1633
1642
|
}, gr = {
|
|
1634
|
-
hour:
|
|
1635
|
-
minute:
|
|
1643
|
+
hour: N,
|
|
1644
|
+
minute: N
|
|
1636
1645
|
}, pr = {
|
|
1637
|
-
hour:
|
|
1638
|
-
minute:
|
|
1639
|
-
second:
|
|
1646
|
+
hour: N,
|
|
1647
|
+
minute: N,
|
|
1648
|
+
second: N
|
|
1640
1649
|
}, Sr = {
|
|
1641
|
-
hour:
|
|
1642
|
-
minute:
|
|
1643
|
-
second:
|
|
1650
|
+
hour: N,
|
|
1651
|
+
minute: N,
|
|
1652
|
+
second: N,
|
|
1644
1653
|
timeZoneName: je
|
|
1645
1654
|
}, wr = {
|
|
1646
|
-
hour:
|
|
1647
|
-
minute:
|
|
1648
|
-
second:
|
|
1649
|
-
timeZoneName:
|
|
1655
|
+
hour: N,
|
|
1656
|
+
minute: N,
|
|
1657
|
+
second: N,
|
|
1658
|
+
timeZoneName: Le
|
|
1650
1659
|
}, vr = {
|
|
1651
|
-
hour:
|
|
1652
|
-
minute:
|
|
1660
|
+
hour: N,
|
|
1661
|
+
minute: N,
|
|
1653
1662
|
hourCycle: "h23"
|
|
1654
1663
|
}, Ar = {
|
|
1655
|
-
hour:
|
|
1656
|
-
minute:
|
|
1657
|
-
second:
|
|
1664
|
+
hour: N,
|
|
1665
|
+
minute: N,
|
|
1666
|
+
second: N,
|
|
1658
1667
|
hourCycle: "h23"
|
|
1659
1668
|
}, Tr = {
|
|
1660
|
-
hour:
|
|
1661
|
-
minute:
|
|
1662
|
-
second:
|
|
1669
|
+
hour: N,
|
|
1670
|
+
minute: N,
|
|
1671
|
+
second: N,
|
|
1663
1672
|
hourCycle: "h23",
|
|
1664
1673
|
timeZoneName: je
|
|
1665
1674
|
}, Nr = {
|
|
1666
|
-
hour:
|
|
1667
|
-
minute:
|
|
1668
|
-
second:
|
|
1675
|
+
hour: N,
|
|
1676
|
+
minute: N,
|
|
1677
|
+
second: N,
|
|
1669
1678
|
hourCycle: "h23",
|
|
1670
|
-
timeZoneName:
|
|
1679
|
+
timeZoneName: Le
|
|
1671
1680
|
}, br = {
|
|
1672
|
-
year:
|
|
1673
|
-
month:
|
|
1674
|
-
day:
|
|
1675
|
-
hour:
|
|
1676
|
-
minute:
|
|
1681
|
+
year: N,
|
|
1682
|
+
month: N,
|
|
1683
|
+
day: N,
|
|
1684
|
+
hour: N,
|
|
1685
|
+
minute: N
|
|
1677
1686
|
}, kr = {
|
|
1678
|
-
year:
|
|
1679
|
-
month:
|
|
1680
|
-
day:
|
|
1681
|
-
hour:
|
|
1682
|
-
minute:
|
|
1683
|
-
second:
|
|
1687
|
+
year: N,
|
|
1688
|
+
month: N,
|
|
1689
|
+
day: N,
|
|
1690
|
+
hour: N,
|
|
1691
|
+
minute: N,
|
|
1692
|
+
second: N
|
|
1684
1693
|
}, Ir = {
|
|
1685
|
-
year:
|
|
1694
|
+
year: N,
|
|
1686
1695
|
month: je,
|
|
1687
|
-
day:
|
|
1688
|
-
hour:
|
|
1689
|
-
minute:
|
|
1696
|
+
day: N,
|
|
1697
|
+
hour: N,
|
|
1698
|
+
minute: N
|
|
1690
1699
|
}, xr = {
|
|
1691
|
-
year:
|
|
1700
|
+
year: N,
|
|
1692
1701
|
month: je,
|
|
1693
|
-
day:
|
|
1694
|
-
hour:
|
|
1695
|
-
minute:
|
|
1696
|
-
second:
|
|
1702
|
+
day: N,
|
|
1703
|
+
hour: N,
|
|
1704
|
+
minute: N,
|
|
1705
|
+
second: N
|
|
1697
1706
|
}, Mi = {
|
|
1698
|
-
year:
|
|
1707
|
+
year: N,
|
|
1699
1708
|
month: je,
|
|
1700
|
-
day:
|
|
1709
|
+
day: N,
|
|
1701
1710
|
weekday: je,
|
|
1702
|
-
hour:
|
|
1703
|
-
minute:
|
|
1711
|
+
hour: N,
|
|
1712
|
+
minute: N
|
|
1704
1713
|
}, Or = {
|
|
1705
|
-
year:
|
|
1706
|
-
month:
|
|
1707
|
-
day:
|
|
1708
|
-
hour:
|
|
1709
|
-
minute:
|
|
1714
|
+
year: N,
|
|
1715
|
+
month: Le,
|
|
1716
|
+
day: N,
|
|
1717
|
+
hour: N,
|
|
1718
|
+
minute: N,
|
|
1710
1719
|
timeZoneName: je
|
|
1711
1720
|
}, Mr = {
|
|
1712
|
-
year:
|
|
1713
|
-
month:
|
|
1714
|
-
day:
|
|
1715
|
-
hour:
|
|
1716
|
-
minute:
|
|
1717
|
-
second:
|
|
1721
|
+
year: N,
|
|
1722
|
+
month: Le,
|
|
1723
|
+
day: N,
|
|
1724
|
+
hour: N,
|
|
1725
|
+
minute: N,
|
|
1726
|
+
second: N,
|
|
1718
1727
|
timeZoneName: je
|
|
1719
1728
|
}, Er = {
|
|
1720
|
-
year:
|
|
1721
|
-
month:
|
|
1722
|
-
day:
|
|
1723
|
-
weekday:
|
|
1724
|
-
hour:
|
|
1725
|
-
minute:
|
|
1726
|
-
timeZoneName:
|
|
1729
|
+
year: N,
|
|
1730
|
+
month: Le,
|
|
1731
|
+
day: N,
|
|
1732
|
+
weekday: Le,
|
|
1733
|
+
hour: N,
|
|
1734
|
+
minute: N,
|
|
1735
|
+
timeZoneName: Le
|
|
1727
1736
|
}, Dr = {
|
|
1728
|
-
year:
|
|
1729
|
-
month:
|
|
1730
|
-
day:
|
|
1731
|
-
weekday:
|
|
1732
|
-
hour:
|
|
1733
|
-
minute:
|
|
1734
|
-
second:
|
|
1735
|
-
timeZoneName:
|
|
1737
|
+
year: N,
|
|
1738
|
+
month: Le,
|
|
1739
|
+
day: N,
|
|
1740
|
+
weekday: Le,
|
|
1741
|
+
hour: N,
|
|
1742
|
+
minute: N,
|
|
1743
|
+
second: N,
|
|
1744
|
+
timeZoneName: Le
|
|
1736
1745
|
};
|
|
1737
1746
|
class Wt {
|
|
1738
1747
|
/**
|
|
@@ -2015,8 +2024,8 @@ class tt extends Wt {
|
|
|
2015
2024
|
millisecond: 0
|
|
2016
2025
|
});
|
|
2017
2026
|
let f = +s;
|
|
2018
|
-
const
|
|
2019
|
-
return f -=
|
|
2027
|
+
const v = f % 1e3;
|
|
2028
|
+
return f -= v >= 0 ? v : 1e3 + v, (g - f) / (60 * 1e3);
|
|
2020
2029
|
}
|
|
2021
2030
|
/**
|
|
2022
2031
|
* Return whether this Zone is equal to another zone
|
|
@@ -2037,7 +2046,7 @@ class tt extends Wt {
|
|
|
2037
2046
|
}
|
|
2038
2047
|
}
|
|
2039
2048
|
let kn = {};
|
|
2040
|
-
function
|
|
2049
|
+
function Ui(t, e = {}) {
|
|
2041
2050
|
const s = JSON.stringify([t, e]);
|
|
2042
2051
|
let n = kn[s];
|
|
2043
2052
|
return n || (n = new Intl.ListFormat(t, e), kn[s] = n), n;
|
|
@@ -2049,7 +2058,7 @@ function Vs(t, e = {}) {
|
|
|
2049
2058
|
return n === void 0 && (n = new Intl.DateTimeFormat(t, e), Ws.set(s, n)), n;
|
|
2050
2059
|
}
|
|
2051
2060
|
const Zs = /* @__PURE__ */ new Map();
|
|
2052
|
-
function
|
|
2061
|
+
function Li(t, e = {}) {
|
|
2053
2062
|
const s = JSON.stringify([t, e]);
|
|
2054
2063
|
let n = Zs.get(s);
|
|
2055
2064
|
return n === void 0 && (n = new Intl.NumberFormat(t, e), Zs.set(s, n)), n;
|
|
@@ -2128,7 +2137,7 @@ class Hi {
|
|
|
2128
2137
|
const { padTo: r, floor: a, ...i } = n;
|
|
2129
2138
|
if (!s || Object.keys(i).length > 0) {
|
|
2130
2139
|
const o = { useGrouping: !1, ...n };
|
|
2131
|
-
n.padTo > 0 && (o.minimumIntegerDigits = n.padTo), this.inf =
|
|
2140
|
+
n.padTo > 0 && (o.minimumIntegerDigits = n.padTo), this.inf = Li(e, o);
|
|
2132
2141
|
}
|
|
2133
2142
|
}
|
|
2134
2143
|
format(e) {
|
|
@@ -2297,7 +2306,7 @@ class ne {
|
|
|
2297
2306
|
return new Gi(this.intl, this.isEnglish(), e);
|
|
2298
2307
|
}
|
|
2299
2308
|
listFormatter(e = {}) {
|
|
2300
|
-
return
|
|
2309
|
+
return Ui(this.intl, e);
|
|
2301
2310
|
}
|
|
2302
2311
|
isEnglish() {
|
|
2303
2312
|
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || Cr(this.intl).locale.startsWith("en-us");
|
|
@@ -2560,7 +2569,7 @@ function qe({ numberingSystem: t }, e = "") {
|
|
|
2560
2569
|
let r = n.get(e);
|
|
2561
2570
|
return r === void 0 && (r = new RegExp(`${tn[s]}${e}`), n.set(e, r)), r;
|
|
2562
2571
|
}
|
|
2563
|
-
let xn = () => Date.now(), On = "system", Mn = null, En = null, Dn = null, Cn = 60, Rn,
|
|
2572
|
+
let xn = () => Date.now(), On = "system", Mn = null, En = null, Dn = null, Cn = 60, Rn, Un = null;
|
|
2564
2573
|
class ye {
|
|
2565
2574
|
/**
|
|
2566
2575
|
* Get the callback for returning the current timestamp.
|
|
@@ -2647,7 +2656,7 @@ class ye {
|
|
|
2647
2656
|
* @return {WeekSettings|null}
|
|
2648
2657
|
*/
|
|
2649
2658
|
static get defaultWeekSettings() {
|
|
2650
|
-
return
|
|
2659
|
+
return Un;
|
|
2651
2660
|
}
|
|
2652
2661
|
/**
|
|
2653
2662
|
* Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
|
|
@@ -2657,7 +2666,7 @@ class ye {
|
|
|
2657
2666
|
* @param {WeekSettings|null} weekSettings
|
|
2658
2667
|
*/
|
|
2659
2668
|
static set defaultWeekSettings(e) {
|
|
2660
|
-
|
|
2669
|
+
Un = Gs(e);
|
|
2661
2670
|
}
|
|
2662
2671
|
/**
|
|
2663
2672
|
* 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 +2717,7 @@ class Ye {
|
|
|
2708
2717
|
return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason;
|
|
2709
2718
|
}
|
|
2710
2719
|
}
|
|
2711
|
-
const
|
|
2720
|
+
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
2721
|
function Be(t, e) {
|
|
2713
2722
|
return new Ye(
|
|
2714
2723
|
"unit out of range",
|
|
@@ -2722,10 +2731,10 @@ function sn(t, e, s) {
|
|
|
2722
2731
|
return r === 0 ? 7 : r;
|
|
2723
2732
|
}
|
|
2724
2733
|
function Fr(t, e, s) {
|
|
2725
|
-
return s + (Vt(t) ?
|
|
2734
|
+
return s + (Vt(t) ? Lr : Ur)[e - 1];
|
|
2726
2735
|
}
|
|
2727
2736
|
function $r(t, e) {
|
|
2728
|
-
const s = Vt(t) ?
|
|
2737
|
+
const s = Vt(t) ? Lr : Ur, n = s.findIndex((a) => a < e), r = e - s[n];
|
|
2729
2738
|
return { month: n + 1, day: r };
|
|
2730
2739
|
}
|
|
2731
2740
|
function nn(t, e) {
|
|
@@ -2736,7 +2745,7 @@ function is(t, e = 4, s = 1) {
|
|
|
2736
2745
|
let l = Math.floor((i - o + 14 - e) / 7), u;
|
|
2737
2746
|
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
2747
|
}
|
|
2739
|
-
function
|
|
2748
|
+
function Ln(t, e = 4, s = 1) {
|
|
2740
2749
|
const { weekYear: n, weekNumber: r, weekday: a } = t, i = nn(sn(n, 1, e), s), o = At(n);
|
|
2741
2750
|
let l = r * 7 + a - i - 7 + e, u;
|
|
2742
2751
|
l < 1 ? (u = n - 1, l += At(u)) : l > o ? (u = n + 1, l -= At(n)) : u = n;
|
|
@@ -3158,12 +3167,12 @@ class ke {
|
|
|
3158
3167
|
return s > 0 && (r.padTo = s), n && (r.signDisplay = n), this.loc.numberFormatter(r).format(e);
|
|
3159
3168
|
}
|
|
3160
3169
|
formatDateTimeFromString(e, s) {
|
|
3161
|
-
const n = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", a = (f,
|
|
3162
|
-
|
|
3170
|
+
const n = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", a = (f, v) => this.loc.extract(e, f, v), i = (f) => e.isOffsetFixed && e.offset === 0 && f.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, f.format) : "", o = () => n ? uo(e) : a({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), l = (f, v) => n ? fo(e, f) : a(v ? { month: f } : { month: f, day: "numeric" }, "month"), u = (f, v) => n ? mo(e, f) : a(
|
|
3171
|
+
v ? { weekday: f } : { weekday: f, month: "long", day: "numeric" },
|
|
3163
3172
|
"weekday"
|
|
3164
3173
|
), m = (f) => {
|
|
3165
|
-
const
|
|
3166
|
-
return
|
|
3174
|
+
const v = ke.macroTokenToFormatOpts(f);
|
|
3175
|
+
return v ? this.formatWithSystemDefault(e, v) : f;
|
|
3167
3176
|
}, d = (f) => n ? ho(e, f) : a({ era: f }, "era"), g = (f) => {
|
|
3168
3177
|
switch (f) {
|
|
3169
3178
|
// ms
|
|
@@ -3334,9 +3343,9 @@ class ke {
|
|
|
3334
3343
|
}, a = (m, d) => (g) => {
|
|
3335
3344
|
const f = r(g);
|
|
3336
3345
|
if (f) {
|
|
3337
|
-
const
|
|
3346
|
+
const v = d.isNegativeDuration && f !== d.largestUnit ? n : 1;
|
|
3338
3347
|
let O;
|
|
3339
|
-
return this.opts.signMode === "negativeLargestOnly" && f !== d.largestUnit ? O = "never" : this.opts.signMode === "all" ? O = "always" : O = "auto", this.num(m.get(f) *
|
|
3348
|
+
return this.opts.signMode === "negativeLargestOnly" && f !== d.largestUnit ? O = "never" : this.opts.signMode === "all" ? O = "always" : O = "auto", this.num(m.get(f) * v, g.length, O);
|
|
3340
3349
|
} else
|
|
3341
3350
|
return g;
|
|
3342
3351
|
}, i = ke.parseFormat(s), o = i.reduce(
|
|
@@ -3416,7 +3425,7 @@ function Bt(t, e) {
|
|
|
3416
3425
|
}
|
|
3417
3426
|
const Io = RegExp(`^T?${on.source}$`), xo = /^-?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)?)?)$/;
|
|
3418
3427
|
function Oo(t) {
|
|
3419
|
-
const [e, s, n, r, a, i, o, l, u] = t, m = e[0] === "-", d = l && l[0] === "-", g = (f,
|
|
3428
|
+
const [e, s, n, r, a, i, o, l, u] = t, m = e[0] === "-", d = l && l[0] === "-", g = (f, v = !1) => f !== void 0 && (v || f && m) ? -f : f;
|
|
3420
3429
|
return [
|
|
3421
3430
|
{
|
|
3422
3431
|
years: g(ut(s)),
|
|
@@ -3473,7 +3482,7 @@ function Do(t) {
|
|
|
3473
3482
|
function Co(t) {
|
|
3474
3483
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
|
3475
3484
|
}
|
|
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$/,
|
|
3485
|
+
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
3486
|
function Zn(t) {
|
|
3478
3487
|
const [, e, s, n, r, a, i, o] = t;
|
|
3479
3488
|
return [cn(e, r, n, s, a, i, o), Me.utcInstance];
|
|
@@ -3518,8 +3527,8 @@ function Go(t) {
|
|
|
3518
3527
|
return xt(
|
|
3519
3528
|
t,
|
|
3520
3529
|
[Ro, Zn],
|
|
3521
|
-
[
|
|
3522
|
-
[
|
|
3530
|
+
[Uo, Zn],
|
|
3531
|
+
[Lo, Fo]
|
|
3523
3532
|
);
|
|
3524
3533
|
}
|
|
3525
3534
|
function Yo(t) {
|
|
@@ -5265,7 +5274,7 @@ function ua(t, e) {
|
|
|
5265
5274
|
return r.map((i) => ml(i, t, a));
|
|
5266
5275
|
}
|
|
5267
5276
|
const Ds = "Invalid DateTime", jn = 864e13;
|
|
5268
|
-
function
|
|
5277
|
+
function Ut(t) {
|
|
5269
5278
|
return new Ye("unsupported zone", `the zone "${t.name}" is not supported`);
|
|
5270
5279
|
}
|
|
5271
5280
|
function Cs(t) {
|
|
@@ -5354,7 +5363,7 @@ function Xt(t, e, s = !0) {
|
|
|
5354
5363
|
forceSimple: !0
|
|
5355
5364
|
}).formatDateTimeFromString(t, e) : null;
|
|
5356
5365
|
}
|
|
5357
|
-
function
|
|
5366
|
+
function Us(t, e, s) {
|
|
5358
5367
|
const n = t.c.year > 9999 || t.c.year < 0;
|
|
5359
5368
|
let r = "";
|
|
5360
5369
|
if (n && t.c.year >= 0 && (r += "+"), r += pe(t.c.year, n ? 6 : 4), s === "year") return r;
|
|
@@ -5460,16 +5469,16 @@ function Kn(t) {
|
|
|
5460
5469
|
}
|
|
5461
5470
|
}
|
|
5462
5471
|
function Nl(t) {
|
|
5463
|
-
if (
|
|
5464
|
-
return t.offset(
|
|
5472
|
+
if (Lt === void 0 && (Lt = ye.now()), t.type !== "iana")
|
|
5473
|
+
return t.offset(Lt);
|
|
5465
5474
|
const e = t.name;
|
|
5466
5475
|
let s = js.get(e);
|
|
5467
|
-
return s === void 0 && (s = t.offset(
|
|
5476
|
+
return s === void 0 && (s = t.offset(Lt), js.set(e, s)), s;
|
|
5468
5477
|
}
|
|
5469
5478
|
function Qn(t, e) {
|
|
5470
5479
|
const s = ot(e.zone, ye.defaultZone);
|
|
5471
5480
|
if (!s.isValid)
|
|
5472
|
-
return $.invalid(
|
|
5481
|
+
return $.invalid(Ut(s));
|
|
5473
5482
|
const n = ne.fromObject(e);
|
|
5474
5483
|
let r, a;
|
|
5475
5484
|
if (P(t.year))
|
|
@@ -5500,7 +5509,7 @@ function er(t) {
|
|
|
5500
5509
|
let e = {}, s;
|
|
5501
5510
|
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
5511
|
}
|
|
5503
|
-
let
|
|
5512
|
+
let Lt;
|
|
5504
5513
|
const js = /* @__PURE__ */ new Map();
|
|
5505
5514
|
class $ {
|
|
5506
5515
|
/**
|
|
@@ -5508,7 +5517,7 @@ class $ {
|
|
|
5508
5517
|
*/
|
|
5509
5518
|
constructor(e) {
|
|
5510
5519
|
const s = e.zone || ye.defaultZone;
|
|
5511
|
-
let n = e.invalid || (Number.isNaN(e.ts) ? new Ye("invalid input") : null) || (s.isValid ? null :
|
|
5520
|
+
let n = e.invalid || (Number.isNaN(e.ts) ? new Ye("invalid input") : null) || (s.isValid ? null : Ut(s));
|
|
5512
5521
|
this.ts = P(e.ts) ? ye.now() : e.ts;
|
|
5513
5522
|
let r = null, a = null;
|
|
5514
5523
|
if (!n)
|
|
@@ -5601,7 +5610,7 @@ class $ {
|
|
|
5601
5610
|
ts: n,
|
|
5602
5611
|
zone: r,
|
|
5603
5612
|
loc: ne.fromObject(s)
|
|
5604
|
-
}) : $.invalid(
|
|
5613
|
+
}) : $.invalid(Ut(r));
|
|
5605
5614
|
}
|
|
5606
5615
|
/**
|
|
5607
5616
|
* 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,29 +5691,29 @@ class $ {
|
|
|
5682
5691
|
e = e || {};
|
|
5683
5692
|
const n = ot(s.zone, ye.defaultZone);
|
|
5684
5693
|
if (!n.isValid)
|
|
5685
|
-
return $.invalid(
|
|
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,
|
|
5687
|
-
if ((f || m) &&
|
|
5694
|
+
return $.invalid(Ut(n));
|
|
5695
|
+
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, v = a.weekYear || a.weekNumber;
|
|
5696
|
+
if ((f || m) && v)
|
|
5688
5697
|
throw new vt(
|
|
5689
5698
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
|
5690
5699
|
);
|
|
5691
5700
|
if (g && m)
|
|
5692
5701
|
throw new vt("Can't mix ordinal dates with month/day");
|
|
5693
|
-
const O =
|
|
5702
|
+
const O = v || a.weekday && !f;
|
|
5694
5703
|
let C, J, _ = Qt(l, u);
|
|
5695
5704
|
O ? (C = Al, J = wl, _ = is(_, i, o)) : m ? (C = Tl, J = vl, _ = Ms(_)) : (C = ns, J = ma);
|
|
5696
5705
|
let te = !1;
|
|
5697
|
-
for (const
|
|
5698
|
-
const E = a[
|
|
5699
|
-
P(E) ? te ? a[
|
|
5706
|
+
for (const S of C) {
|
|
5707
|
+
const E = a[S];
|
|
5708
|
+
P(E) ? te ? a[S] = J[S] : a[S] = _[S] : te = !0;
|
|
5700
5709
|
}
|
|
5701
5710
|
const k = O ? Ki(a, i, o) : m ? Qi(a) : Pr(a), R = k || Wr(a);
|
|
5702
5711
|
if (R)
|
|
5703
5712
|
return $.invalid(R);
|
|
5704
|
-
const V = O ?
|
|
5705
|
-
ts:
|
|
5713
|
+
const V = O ? Ln(a, i, o) : m ? Fn(a) : a, [U, G] = ss(V, u, n), y = new $({
|
|
5714
|
+
ts: U,
|
|
5706
5715
|
zone: n,
|
|
5707
|
-
o:
|
|
5716
|
+
o: G,
|
|
5708
5717
|
loc: r
|
|
5709
5718
|
});
|
|
5710
5719
|
return a.weekday && f && e.weekday !== y.weekday ? $.invalid(
|
|
@@ -5870,7 +5879,7 @@ class $ {
|
|
|
5870
5879
|
return oa(ke.parseFormat(e), ne.fromObject(s)).map((r) => r.val).join("");
|
|
5871
5880
|
}
|
|
5872
5881
|
static resetCache() {
|
|
5873
|
-
|
|
5882
|
+
Lt = void 0, js.clear();
|
|
5874
5883
|
}
|
|
5875
5884
|
// INFO
|
|
5876
5885
|
/**
|
|
@@ -6278,7 +6287,7 @@ class $ {
|
|
|
6278
6287
|
}
|
|
6279
6288
|
return dt(this, { ts: r, zone: e });
|
|
6280
6289
|
} else
|
|
6281
|
-
return $.invalid(
|
|
6290
|
+
return $.invalid(Ut(e));
|
|
6282
6291
|
}
|
|
6283
6292
|
/**
|
|
6284
6293
|
* "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
|
|
@@ -6322,7 +6331,7 @@ class $ {
|
|
|
6322
6331
|
if (l && i)
|
|
6323
6332
|
throw new vt("Can't mix ordinal dates with month/day");
|
|
6324
6333
|
let d;
|
|
6325
|
-
a ? d =
|
|
6334
|
+
a ? d = Ln(
|
|
6326
6335
|
{ ...is(this.c, n, r), ...s },
|
|
6327
6336
|
n,
|
|
6328
6337
|
r
|
|
@@ -6506,7 +6515,7 @@ class $ {
|
|
|
6506
6515
|
return null;
|
|
6507
6516
|
i = rs(i);
|
|
6508
6517
|
const o = e === "extended";
|
|
6509
|
-
let l =
|
|
6518
|
+
let l = Us(this, o, i);
|
|
6510
6519
|
return ns.indexOf(i) >= 3 && (l += "T"), l += Jn(
|
|
6511
6520
|
this,
|
|
6512
6521
|
o,
|
|
@@ -6528,7 +6537,7 @@ class $ {
|
|
|
6528
6537
|
* @return {string|null}
|
|
6529
6538
|
*/
|
|
6530
6539
|
toISODate({ format: e = "extended", precision: s = "day" } = {}) {
|
|
6531
|
-
return this.isValid ?
|
|
6540
|
+
return this.isValid ? Us(this, e === "extended", rs(s)) : null;
|
|
6532
6541
|
}
|
|
6533
6542
|
/**
|
|
6534
6543
|
* Returns an ISO 8601-compliant string representation of this DateTime's week date
|
|
@@ -6600,7 +6609,7 @@ class $ {
|
|
|
6600
6609
|
* @return {string|null}
|
|
6601
6610
|
*/
|
|
6602
6611
|
toSQLDate() {
|
|
6603
|
-
return this.isValid ?
|
|
6612
|
+
return this.isValid ? Us(this, !0) : null;
|
|
6604
6613
|
}
|
|
6605
6614
|
/**
|
|
6606
6615
|
* Returns a string representation of this DateTime appropriate for use in SQL Time
|
|
@@ -7152,11 +7161,11 @@ function Ml({
|
|
|
7152
7161
|
modifiedBy: 0
|
|
7153
7162
|
});
|
|
7154
7163
|
if (f?.responseStatus || f?.Success) {
|
|
7155
|
-
const
|
|
7156
|
-
Te.success(
|
|
7164
|
+
const v = f?.Message || f?.data || "Alert reopened successfully.";
|
|
7165
|
+
Te.success(v);
|
|
7157
7166
|
} else {
|
|
7158
|
-
const
|
|
7159
|
-
Te.error(
|
|
7167
|
+
const v = f?.errorMessage || f?.Message || "Failed to reopen alert";
|
|
7168
|
+
Te.error(v);
|
|
7160
7169
|
}
|
|
7161
7170
|
} catch {
|
|
7162
7171
|
Te.error("Failed to reopen alert. Please try again.");
|
|
@@ -7200,8 +7209,8 @@ function Ml({
|
|
|
7200
7209
|
/* @__PURE__ */ c(
|
|
7201
7210
|
"a",
|
|
7202
7211
|
{
|
|
7203
|
-
onClick: (
|
|
7204
|
-
|
|
7212
|
+
onClick: (v) => {
|
|
7213
|
+
v.preventDefault(), i?.(f, { sourceTab: "archived" });
|
|
7205
7214
|
},
|
|
7206
7215
|
className: "inline-block mb-1 text-blue-600",
|
|
7207
7216
|
children: f.alertNumber
|
|
@@ -7223,8 +7232,8 @@ function Ml({
|
|
|
7223
7232
|
items: [
|
|
7224
7233
|
{ key: "reopen", label: "Reopen" }
|
|
7225
7234
|
],
|
|
7226
|
-
onClick: ({ key:
|
|
7227
|
-
|
|
7235
|
+
onClick: ({ key: v }) => {
|
|
7236
|
+
v === "reopen" && u(f);
|
|
7228
7237
|
}
|
|
7229
7238
|
},
|
|
7230
7239
|
children: /* @__PURE__ */ c(De, { type: "text", icon: /* @__PURE__ */ c(Oa, {}) })
|
|
@@ -7278,7 +7287,7 @@ function El({
|
|
|
7278
7287
|
"aria-label": "Analog Clock",
|
|
7279
7288
|
children: [
|
|
7280
7289
|
[...Array(12)].map((m, d) => {
|
|
7281
|
-
const g = d * 30, f = 6,
|
|
7290
|
+
const g = d * 30, f = 6, v = u - 4, O = v - f, C = (g - 90) * (Math.PI / 180), J = u + O * Math.cos(C), _ = u + O * Math.sin(C), te = u + v * Math.cos(C), k = u + v * Math.sin(C);
|
|
7282
7291
|
return /* @__PURE__ */ c(
|
|
7283
7292
|
"svg",
|
|
7284
7293
|
{
|
|
@@ -7381,7 +7390,7 @@ function El({
|
|
|
7381
7390
|
);
|
|
7382
7391
|
}
|
|
7383
7392
|
function Dl({ label: t = "USA", timeZone: e = "America/New_York", updateIntervalMs: s = 1e3, className: n }) {
|
|
7384
|
-
const [r, a] =
|
|
7393
|
+
const [r, a] = b(/* @__PURE__ */ new Date());
|
|
7385
7394
|
ve(() => {
|
|
7386
7395
|
const u = setInterval(() => a(/* @__PURE__ */ new Date()), s);
|
|
7387
7396
|
return () => clearInterval(u);
|
|
@@ -7434,7 +7443,7 @@ const _s = (t) => /* @__PURE__ */ h(Nt, { children: [
|
|
|
7434
7443
|
t.length,
|
|
7435
7444
|
" more"
|
|
7436
7445
|
] }), { Text: et } = Pt;
|
|
7437
|
-
function
|
|
7446
|
+
function Ul(t) {
|
|
7438
7447
|
const {
|
|
7439
7448
|
// escBasis, setEscBasis,
|
|
7440
7449
|
// selectedSeverity, setSelectedSeverity,
|
|
@@ -7451,7 +7460,7 @@ function Ll(t) {
|
|
|
7451
7460
|
setL2mins: d,
|
|
7452
7461
|
l2role: g,
|
|
7453
7462
|
setL2role: f,
|
|
7454
|
-
l3mins:
|
|
7463
|
+
l3mins: v,
|
|
7455
7464
|
setL3mins: O,
|
|
7456
7465
|
l3role: C,
|
|
7457
7466
|
setL3role: J,
|
|
@@ -7460,36 +7469,36 @@ function Ll(t) {
|
|
|
7460
7469
|
thirdPartyIds: k,
|
|
7461
7470
|
setThirdPartyIds: R,
|
|
7462
7471
|
humanLoop: V,
|
|
7463
|
-
setHumanLoop:
|
|
7464
|
-
isAutoExpire:
|
|
7472
|
+
setHumanLoop: U,
|
|
7473
|
+
isAutoExpire: G,
|
|
7465
7474
|
setAutoExpire: y,
|
|
7466
|
-
onClear:
|
|
7475
|
+
onClear: S,
|
|
7467
7476
|
onSave: E,
|
|
7468
7477
|
saving: de,
|
|
7469
|
-
onActionTypesLoaded:
|
|
7470
|
-
} = t, { rules: D } = He(), [
|
|
7478
|
+
onActionTypesLoaded: ue
|
|
7479
|
+
} = t, { rules: D } = He(), [w, p] = b([]), [I, A] = b([]), [L, T] = b(!1);
|
|
7471
7480
|
ve(() => {
|
|
7472
7481
|
let Y = !1;
|
|
7473
7482
|
return (async () => {
|
|
7474
7483
|
try {
|
|
7475
|
-
|
|
7484
|
+
T(!0);
|
|
7476
7485
|
const X = await D.getLookups();
|
|
7477
7486
|
if (Y || !X || !Array.isArray(X.actionTypes)) return;
|
|
7478
|
-
const ie = X.actionTypes.map((
|
|
7479
|
-
p(ie),
|
|
7480
|
-
const Ne = Array.isArray(X.thirdParties) ? X.thirdParties.map((
|
|
7481
|
-
|
|
7487
|
+
const ie = X.actionTypes.map((le) => ({ label: le.name, value: String(le.actionTypeId) }));
|
|
7488
|
+
p(ie), ue && ue(X.actionTypes);
|
|
7489
|
+
const Ne = Array.isArray(X.thirdParties) ? X.thirdParties.map((le) => ({ label: le.thirdPartyName, value: le.thirdPartyIds ?? le.thirdPartyId })) : [];
|
|
7490
|
+
A(Ne);
|
|
7482
7491
|
} catch (X) {
|
|
7483
7492
|
console.error("Error loading lookups", X);
|
|
7484
7493
|
} finally {
|
|
7485
|
-
Y ||
|
|
7494
|
+
Y || T(!1);
|
|
7486
7495
|
}
|
|
7487
7496
|
})(), () => {
|
|
7488
7497
|
Y = !0;
|
|
7489
7498
|
};
|
|
7490
7499
|
}, []);
|
|
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
|
|
7492
|
-
return /* @__PURE__ */ h(us, { spinning: !!de ||
|
|
7500
|
+
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 v == "number" || typeof C == "number" || Array.isArray(_) && _.length > 0 || Array.isArray(k) && k.length > 0 || !!V || !!G;
|
|
7501
|
+
return /* @__PURE__ */ h(us, { spinning: !!de || L, children: [
|
|
7493
7502
|
/* @__PURE__ */ h(Ee, { gutter: [16, 16], align: "bottom", children: [
|
|
7494
7503
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
|
|
7495
7504
|
/* @__PURE__ */ c(et, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
|
|
@@ -7571,7 +7580,7 @@ function Ll(t) {
|
|
|
7571
7580
|
{
|
|
7572
7581
|
className: "w-full",
|
|
7573
7582
|
placeholder: "Mins",
|
|
7574
|
-
value:
|
|
7583
|
+
value: v,
|
|
7575
7584
|
onChange: O,
|
|
7576
7585
|
options: r
|
|
7577
7586
|
}
|
|
@@ -7598,7 +7607,7 @@ function Ll(t) {
|
|
|
7598
7607
|
className: "w-full",
|
|
7599
7608
|
value: _,
|
|
7600
7609
|
onChange: te,
|
|
7601
|
-
options:
|
|
7610
|
+
options: w,
|
|
7602
7611
|
maxTagCount: 1,
|
|
7603
7612
|
maxTagPlaceholder: _s
|
|
7604
7613
|
}
|
|
@@ -7623,17 +7632,17 @@ function Ll(t) {
|
|
|
7623
7632
|
] }),
|
|
7624
7633
|
/* @__PURE__ */ h(Ee, { gutter: [16, 16], align: "bottom", className: "mt-4 items-center", children: [
|
|
7625
7634
|
/* @__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) =>
|
|
7627
|
-
/* @__PURE__ */ c(wt, { checked:
|
|
7635
|
+
/* @__PURE__ */ c(wt, { checked: V, onChange: (Y) => U(Y.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
|
|
7636
|
+
/* @__PURE__ */ c(wt, { checked: G, onChange: (Y) => y(Y.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
|
|
7628
7637
|
] }) }),
|
|
7629
7638
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
7630
|
-
/* @__PURE__ */ c(De, { onClick:
|
|
7639
|
+
/* @__PURE__ */ c(De, { onClick: S, children: "Clear" }),
|
|
7631
7640
|
/* @__PURE__ */ c(De, { type: "primary", onClick: E, loading: !!de, disabled: !(!!e && Z && !de), children: "Save" })
|
|
7632
7641
|
] }) })
|
|
7633
7642
|
] })
|
|
7634
7643
|
] });
|
|
7635
7644
|
}
|
|
7636
|
-
function
|
|
7645
|
+
function Ll({ entries: t, userRoles: e, onEdit: s, loading: n }) {
|
|
7637
7646
|
const r = new Map(e.map((i) => [i.userRoleId, i.userRoleName])), a = (i) => i.map((o) => r.get(o) || String(o)).join(", ");
|
|
7638
7647
|
return /* @__PURE__ */ c(
|
|
7639
7648
|
Js,
|
|
@@ -7701,9 +7710,9 @@ function Ul({ entries: t, userRoles: e, onEdit: s, loading: n }) {
|
|
|
7701
7710
|
}
|
|
7702
7711
|
);
|
|
7703
7712
|
}
|
|
7704
|
-
const { Title: Fl, Text:
|
|
7713
|
+
const { Title: Fl, Text: Ls } = Pt;
|
|
7705
7714
|
function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
7706
|
-
const { rules: n } = He(), [r, a] =
|
|
7715
|
+
const { rules: n } = He(), [r, a] = b(!1), [i, o] = b(!1), [l, u] = b(s), [m, d] = b(), [g, f] = b([]), v = 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
7716
|
() => (e || []).map((k, R) => ({
|
|
7708
7717
|
key: k.RuleId || k.Name || String(R),
|
|
7709
7718
|
ruleName: k.Name || "-",
|
|
@@ -7744,8 +7753,8 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7744
7753
|
for (const R of C) {
|
|
7745
7754
|
const V = l.find(
|
|
7746
7755
|
(y) => y?.ruleId === R.key || y?.ruleName === R.key || y?.RuleId === R.key || y?.ruleName === R.ruleName || y?.Name === R.ruleName
|
|
7747
|
-
),
|
|
7748
|
-
|
|
7756
|
+
), U = V?.userRoleIds ?? V?.UserRoleIds, G = Array.isArray(U) ? U : [];
|
|
7757
|
+
G.length && (k[R.key] = G);
|
|
7749
7758
|
}
|
|
7750
7759
|
return k;
|
|
7751
7760
|
}, [l, C]);
|
|
@@ -7753,7 +7762,7 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7753
7762
|
/* @__PURE__ */ c(Fl, { level: 4, className: "!mb-4", children: "Alert Assignment" }),
|
|
7754
7763
|
/* @__PURE__ */ c(us, { spinning: i || r, children: /* @__PURE__ */ h(Ee, { gutter: [16, 16], align: "bottom", className: "mb-6", children: [
|
|
7755
7764
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 6, children: /* @__PURE__ */ h("div", { children: [
|
|
7756
|
-
/* @__PURE__ */ c(
|
|
7765
|
+
/* @__PURE__ */ c(Ls, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
|
|
7757
7766
|
/* @__PURE__ */ c(
|
|
7758
7767
|
Oe,
|
|
7759
7768
|
{
|
|
@@ -7766,7 +7775,7 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7766
7775
|
)
|
|
7767
7776
|
] }) }),
|
|
7768
7777
|
/* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 8, children: /* @__PURE__ */ h("div", { children: [
|
|
7769
|
-
/* @__PURE__ */ c(
|
|
7778
|
+
/* @__PURE__ */ c(Ls, { className: "text-gray-700 font-medium block mb-1", children: "Alert Notification To" }),
|
|
7770
7779
|
/* @__PURE__ */ c(
|
|
7771
7780
|
Oe,
|
|
7772
7781
|
{
|
|
@@ -7775,7 +7784,7 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7775
7784
|
className: "w-full",
|
|
7776
7785
|
value: g,
|
|
7777
7786
|
onChange: f,
|
|
7778
|
-
options:
|
|
7787
|
+
options: v,
|
|
7779
7788
|
maxTagCount: 1,
|
|
7780
7789
|
maxTagPlaceholder: _s
|
|
7781
7790
|
}
|
|
@@ -7802,16 +7811,16 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7802
7811
|
if (!k || !R)
|
|
7803
7812
|
throw new Error(`Unable to find rule identifier for rule ${m}`);
|
|
7804
7813
|
const V = g.map((y) => {
|
|
7805
|
-
const
|
|
7806
|
-
return { id: y, name:
|
|
7807
|
-
}),
|
|
7814
|
+
const S = t.find((E) => E.userRoleId === y);
|
|
7815
|
+
return { id: y, name: S?.userRoleName ?? String(y) };
|
|
7816
|
+
}), U = {
|
|
7808
7817
|
...k,
|
|
7809
7818
|
ruleId: m,
|
|
7810
7819
|
userRoleIds: g,
|
|
7811
7820
|
userRoles: V
|
|
7812
|
-
},
|
|
7813
|
-
if (!
|
|
7814
|
-
Te.error(
|
|
7821
|
+
}, G = await n.updateRule(R, U);
|
|
7822
|
+
if (!G?.responseStatus && !G?.Success && !G?.success)
|
|
7823
|
+
Te.error(G?.errorMessage || G?.Message || "Error saving Alert Assignment");
|
|
7815
7824
|
else {
|
|
7816
7825
|
Te.success("Alert assignment saved"), d(void 0), f([]);
|
|
7817
7826
|
try {
|
|
@@ -7853,10 +7862,10 @@ function $l({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
7853
7862
|
key: "assign",
|
|
7854
7863
|
render: (k, R) => {
|
|
7855
7864
|
const V = J[R.key] ?? [];
|
|
7856
|
-
return V.length ? /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: V.map((
|
|
7857
|
-
const
|
|
7858
|
-
return /* @__PURE__ */ c(Nt, { children:
|
|
7859
|
-
}) }) : /* @__PURE__ */ c(
|
|
7865
|
+
return V.length ? /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: V.map((U) => {
|
|
7866
|
+
const G = t.find((y) => y.userRoleId === U);
|
|
7867
|
+
return /* @__PURE__ */ c(Nt, { children: G?.userRoleName ?? String(U) }, U);
|
|
7868
|
+
}) }) : /* @__PURE__ */ c(Ls, { type: "secondary", children: "—" });
|
|
7860
7869
|
}
|
|
7861
7870
|
}
|
|
7862
7871
|
]
|
|
@@ -7874,13 +7883,13 @@ function Fs(t) {
|
|
|
7874
7883
|
level3UserRoleId: t.level3UserRoleId ?? t.Level3UserRoleId,
|
|
7875
7884
|
level3PostAssistTime: t.level3PostAssistTime ?? t.Level3PostAssistTime,
|
|
7876
7885
|
escalationSettingsActionTypeIds: t.escalationSettingsActionTypeIds ?? t.EscalationSettingsActionTypeIds,
|
|
7877
|
-
thirdPartyId: t.thirdPartyId ?? t.ThirdPartyIds,
|
|
7886
|
+
thirdPartyId: t.thirdPartyId ?? t.ThirdPartyId ?? t.ThirdPartyIds,
|
|
7878
7887
|
humanLoop: t.humanLoop ?? t.HumanLoop,
|
|
7879
7888
|
isAutoExpire: t.isAutoExpire ?? t.IsAutoExpire
|
|
7880
7889
|
};
|
|
7881
7890
|
}
|
|
7882
7891
|
function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: a }) {
|
|
7883
|
-
const { rules: i, alerts: o } = He(), [l, u] =
|
|
7892
|
+
const { rules: i, alerts: o } = He(), [l, u] = b("By Severity"), [m, d] = b("By severity"), [g, f] = b("By Severity"), [v, O] = b(!1), [C, J] = b(!1), [_, te] = b(!1), [k, R] = b(null), [V, U] = b("rules"), [G, y] = b(), [S, E] = b(), [de, ue] = b(), [D, w] = b(), [p, I] = b(), [A, L] = b(), [T, M] = b(), [W, Z] = b(), [z, Y] = b([]), [X, ie] = b([]), [Ne, le] = b(!1), [me, Ae] = b(!1), [Ie, Fe] = b({}), [st, ht] = b({}), [ge, yt] = b(s || []), [Mt, zt] = b([]), [ct, ws] = b(!1), [x, q] = b(!1), [K, we] = b(n || []);
|
|
7884
7893
|
ve(() => {
|
|
7885
7894
|
n && n.length && we(n);
|
|
7886
7895
|
}, [n]), ve(() => {
|
|
@@ -7888,13 +7897,13 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
7888
7897
|
const F = Object.keys(Ie).length > 0 || Object.keys(st).length > 0;
|
|
7889
7898
|
if (Mt.length && !F) return;
|
|
7890
7899
|
const re = K.map((Q, B) => {
|
|
7891
|
-
const
|
|
7900
|
+
const ce = e.find((xe) => xe.RuleId === (Q.ruleId || Q.ruleName))?.Name || Q.ruleName || Q.Name || "-", H = Fs(Q.escalationSettings), ae = typeof H.level1UserRoleId == "number" && H.level1UserRoleId > 0 ? [H.level1UserRoleId] : [], vs = typeof H.level2UserRoleId == "number" && H.level2UserRoleId > 0 ? [H.level2UserRoleId] : [], As = typeof H.level3UserRoleId == "number" && H.level3UserRoleId > 0 ? [H.level3UserRoleId] : [], dn = (Array.isArray(H.escalationSettingsActionTypeIds) ? H.escalationSettingsActionTypeIds : []).map((xe) => Ie[xe] || String(xe)), fn = (Array.isArray(H.thirdPartyId) ? H.thirdPartyId : []).map((xe) => st[xe] || String(xe)), Ts = typeof H.humanLoop == "boolean" ? H.humanLoop : null, Ns = typeof H.isAutoExpire == "boolean" ? H.isAutoExpire : null;
|
|
7892
7901
|
return {
|
|
7893
7902
|
id: String(Q.ruleId || Q.ruleName || B),
|
|
7894
|
-
ruleOrSeverityLabel:
|
|
7895
|
-
l1: { minutes:
|
|
7896
|
-
l2: { minutes:
|
|
7897
|
-
l3: { minutes:
|
|
7903
|
+
ruleOrSeverityLabel: ce,
|
|
7904
|
+
l1: { minutes: H.level1PostAssistTime ?? void 0, roles: ae },
|
|
7905
|
+
l2: { minutes: H.level2PostAssistTime ?? void 0, roles: vs },
|
|
7906
|
+
l3: { minutes: H.level3PostAssistTime ?? void 0, roles: As },
|
|
7898
7907
|
actions: dn,
|
|
7899
7908
|
notify: fn,
|
|
7900
7909
|
humanLoop: Ts,
|
|
@@ -7936,32 +7945,32 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
7936
7945
|
F = !0;
|
|
7937
7946
|
};
|
|
7938
7947
|
}, []), ve(() => {
|
|
7939
|
-
if (!
|
|
7940
|
-
const F = (
|
|
7941
|
-
const
|
|
7942
|
-
return !isNaN(
|
|
7943
|
-
}, re = (
|
|
7944
|
-
const
|
|
7945
|
-
return !isNaN(
|
|
7948
|
+
if (!S) return;
|
|
7949
|
+
const F = (ce) => {
|
|
7950
|
+
const H = Number(ce);
|
|
7951
|
+
return !isNaN(H) && H > 0 ? H : void 0;
|
|
7952
|
+
}, re = (ce) => {
|
|
7953
|
+
const H = Number(ce);
|
|
7954
|
+
return !isNaN(H) && H > 0 ? H : void 0;
|
|
7946
7955
|
}, Q = (K || []).find(
|
|
7947
|
-
(
|
|
7956
|
+
(ce) => ce?.ruleId === S || ce?.ruleName === S || ce?.RuleId === S
|
|
7948
7957
|
), B = Fs(Q?.escalationSettings);
|
|
7949
7958
|
if (B && typeof B == "object") {
|
|
7950
|
-
|
|
7951
|
-
const
|
|
7952
|
-
Y(
|
|
7959
|
+
ue(re(B.level1PostAssistTime)), w(F(B.level1UserRoleId)), I(re(B.level2PostAssistTime)), L(F(B.level2UserRoleId)), M(re(B.level3PostAssistTime)), Z(F(B.level3UserRoleId));
|
|
7960
|
+
const ce = Array.isArray(B.escalationSettingsActionTypeIds) ? B.escalationSettingsActionTypeIds : [];
|
|
7961
|
+
Y(ce.map((H) => String(H))), ie(Array.isArray(B.thirdPartyId) ? B.thirdPartyId : []), le(!!B.humanLoop), Ae(!!B.isAutoExpire);
|
|
7953
7962
|
}
|
|
7954
|
-
}, [V,
|
|
7963
|
+
}, [V, S, K]);
|
|
7955
7964
|
const Ke = async () => {
|
|
7956
7965
|
try {
|
|
7957
|
-
|
|
7966
|
+
q(!0);
|
|
7958
7967
|
const F = await i.getRules(), re = Array.isArray(F) ? F : Array.isArray(F?.data) ? F.data : [];
|
|
7959
7968
|
we(re);
|
|
7960
|
-
const Q = re.map((B,
|
|
7961
|
-
const
|
|
7969
|
+
const Q = re.map((B, ce) => {
|
|
7970
|
+
const H = e.find((xe) => xe.RuleId === (B.ruleId || B.ruleName))?.Name || B.ruleName || B.Name || "-", ae = Fs(B.escalationSettings ?? B.EscalationSettings), vs = typeof ae.level1UserRoleId == "number" && ae.level1UserRoleId > 0 ? [ae.level1UserRoleId] : [], As = typeof ae.level2UserRoleId == "number" && ae.level2UserRoleId > 0 ? [ae.level2UserRoleId] : [], un = typeof ae.level3UserRoleId == "number" && ae.level3UserRoleId > 0 ? [ae.level3UserRoleId] : [], mn = (Array.isArray(ae.escalationSettingsActionTypeIds) ? ae.escalationSettingsActionTypeIds : []).map((xe) => Ie[xe] || String(xe)), Ts = (Array.isArray(ae.thirdPartyId) ? ae.thirdPartyId : []).map((xe) => st[xe] || String(xe)), Ns = typeof ae.humanLoop == "boolean" ? ae.humanLoop : null;
|
|
7962
7971
|
return {
|
|
7963
|
-
id: String(B.ruleId || B.ruleName ||
|
|
7964
|
-
ruleOrSeverityLabel:
|
|
7972
|
+
id: String(B.ruleId || B.ruleName || ce),
|
|
7973
|
+
ruleOrSeverityLabel: H,
|
|
7965
7974
|
l1: { minutes: ae.level1PostAssistTime ?? void 0, roles: vs },
|
|
7966
7975
|
l2: { minutes: ae.level2PostAssistTime ?? void 0, roles: As },
|
|
7967
7976
|
l3: { minutes: ae.level3PostAssistTime ?? void 0, roles: un },
|
|
@@ -7974,7 +7983,7 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
7974
7983
|
} catch (F) {
|
|
7975
7984
|
console.error("Failed to refetch entries", F);
|
|
7976
7985
|
} finally {
|
|
7977
|
-
|
|
7986
|
+
q(!1);
|
|
7978
7987
|
}
|
|
7979
7988
|
};
|
|
7980
7989
|
return ve(() => {
|
|
@@ -7985,12 +7994,14 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
7985
7994
|
if (F || !re) return;
|
|
7986
7995
|
const Q = {};
|
|
7987
7996
|
if (Array.isArray(re.thirdParties))
|
|
7988
|
-
for (const
|
|
7989
|
-
|
|
7997
|
+
for (const ce of re.thirdParties) {
|
|
7998
|
+
const H = ce.thirdPartyIds ?? ce.thirdPartyId;
|
|
7999
|
+
typeof H == "number" && (Q[H] = ce.thirdPartyName);
|
|
8000
|
+
}
|
|
7990
8001
|
ht(Q);
|
|
7991
|
-
const B = Array.isArray(re.userRoles) ? re.userRoles.map((
|
|
7992
|
-
userRoleId:
|
|
7993
|
-
userRoleName:
|
|
8002
|
+
const B = Array.isArray(re.userRoles) ? re.userRoles.map((ce) => ({
|
|
8003
|
+
userRoleId: ce.userRoleId ?? ce.id,
|
|
8004
|
+
userRoleName: ce.userRoleName ?? ce.name
|
|
7994
8005
|
})) : [];
|
|
7995
8006
|
F || yt(B.length ? B : s || []);
|
|
7996
8007
|
} catch (re) {
|
|
@@ -8015,7 +8026,7 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8015
8026
|
onChange: (F) => {
|
|
8016
8027
|
F.sortBy && (u(F.sortBy), O(!0)), F.groupBy && (d(F.groupBy), O(!0));
|
|
8017
8028
|
},
|
|
8018
|
-
showActions:
|
|
8029
|
+
showActions: v,
|
|
8019
8030
|
onSave: async () => {
|
|
8020
8031
|
J(!0);
|
|
8021
8032
|
try {
|
|
@@ -8039,27 +8050,27 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8039
8050
|
/* @__PURE__ */ h("div", { children: [
|
|
8040
8051
|
/* @__PURE__ */ c(tr, { level: 4, className: "!mb-4", children: "Escalation Settings" }),
|
|
8041
8052
|
/* @__PURE__ */ c(
|
|
8042
|
-
|
|
8053
|
+
Ul,
|
|
8043
8054
|
{
|
|
8044
8055
|
escBasis: V,
|
|
8045
|
-
setEscBasis:
|
|
8046
|
-
selectedSeverity:
|
|
8056
|
+
setEscBasis: U,
|
|
8057
|
+
selectedSeverity: G,
|
|
8047
8058
|
setSelectedSeverity: y,
|
|
8048
|
-
selectedRule:
|
|
8059
|
+
selectedRule: S,
|
|
8049
8060
|
setSelectedRule: E,
|
|
8050
8061
|
severityOptions: Ce,
|
|
8051
8062
|
ruleOptions: oe,
|
|
8052
8063
|
minsOptions: nt,
|
|
8053
8064
|
roleOptions: _e,
|
|
8054
8065
|
l1mins: de,
|
|
8055
|
-
setL1mins:
|
|
8066
|
+
setL1mins: ue,
|
|
8056
8067
|
l1role: D,
|
|
8057
|
-
setL1role:
|
|
8068
|
+
setL1role: w,
|
|
8058
8069
|
l2mins: p,
|
|
8059
8070
|
setL2mins: I,
|
|
8060
|
-
l2role:
|
|
8061
|
-
setL2role:
|
|
8062
|
-
l3mins:
|
|
8071
|
+
l2role: A,
|
|
8072
|
+
setL2role: L,
|
|
8073
|
+
l3mins: T,
|
|
8063
8074
|
setL3mins: M,
|
|
8064
8075
|
l3role: W,
|
|
8065
8076
|
setL3role: Z,
|
|
@@ -8068,17 +8079,17 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8068
8079
|
thirdPartyIds: X,
|
|
8069
8080
|
setThirdPartyIds: ie,
|
|
8070
8081
|
humanLoop: Ne,
|
|
8071
|
-
setHumanLoop:
|
|
8082
|
+
setHumanLoop: le,
|
|
8072
8083
|
onClear: () => {
|
|
8073
|
-
u("By Severity"), d("By severity"),
|
|
8084
|
+
u("By Severity"), d("By severity"), U("rules"), y(void 0), E(void 0), ue(void 0), w(void 0), I(void 0), L(void 0), M(void 0), Z(void 0), Y([]), ie([]), le(!1), Ae(!1);
|
|
8074
8085
|
},
|
|
8075
8086
|
onSave: async () => {
|
|
8076
8087
|
ws(!0), a?.({
|
|
8077
|
-
ruleId:
|
|
8088
|
+
ruleId: S,
|
|
8078
8089
|
levels: [
|
|
8079
8090
|
{ minutes: de, role: D },
|
|
8080
|
-
{ minutes: p, role:
|
|
8081
|
-
{ minutes:
|
|
8091
|
+
{ minutes: p, role: A },
|
|
8092
|
+
{ minutes: T, role: W }
|
|
8082
8093
|
],
|
|
8083
8094
|
actions: z,
|
|
8084
8095
|
thirdPartyIds: X,
|
|
@@ -8086,30 +8097,30 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8086
8097
|
isAutoExpire: me
|
|
8087
8098
|
});
|
|
8088
8099
|
try {
|
|
8089
|
-
if (
|
|
8100
|
+
if (S) {
|
|
8090
8101
|
const re = Array.isArray(z) ? z.map((ae) => Number.isNaN(Number(ae)) ? ae : Number(ae)) : [], Q = (K || []).find(
|
|
8091
|
-
(ae) => ae?.ruleId ===
|
|
8102
|
+
(ae) => ae?.ruleId === S || ae?.ruleName === S || ae?.RuleId === S
|
|
8092
8103
|
), B = typeof Q?.recordId == "number" ? Q.recordId : Q?.ruleId || Q?.RuleId || void 0;
|
|
8093
8104
|
if (!Q || !B) {
|
|
8094
8105
|
Te.error("Unable to find rule identifier for update");
|
|
8095
8106
|
return;
|
|
8096
8107
|
}
|
|
8097
|
-
const
|
|
8108
|
+
const ce = {
|
|
8098
8109
|
...Q,
|
|
8099
8110
|
escalationSettings: {
|
|
8100
8111
|
level1UserRoleId: D ?? 0,
|
|
8101
8112
|
level1PostAssistTime: de ?? 0,
|
|
8102
|
-
level2UserRoleId:
|
|
8113
|
+
level2UserRoleId: A ?? 0,
|
|
8103
8114
|
level2PostAssistTime: p ?? 0,
|
|
8104
8115
|
level3UserRoleId: W ?? 0,
|
|
8105
|
-
level3PostAssistTime:
|
|
8116
|
+
level3PostAssistTime: T ?? 0,
|
|
8106
8117
|
escalationSettingsActionTypeIds: re,
|
|
8107
8118
|
thirdPartyId: Array.isArray(X) ? X : [],
|
|
8108
8119
|
humanLoop: Ne,
|
|
8109
8120
|
isAutoExpire: me
|
|
8110
8121
|
}
|
|
8111
|
-
},
|
|
8112
|
-
|
|
8122
|
+
}, H = await i.updateRule(B, ce);
|
|
8123
|
+
H?.responseStatus || H?.Success || H?.success ? (Te.success("Escalation settings saved"), await Ke(), E(void 0), ue(void 0), w(void 0), I(void 0), L(void 0), M(void 0), Z(void 0), Y([]), ie([]), le(!1), Ae(!1)) : Te.error(H?.errorMessage || H?.Message || "Error saving Escalation Settings");
|
|
8113
8124
|
}
|
|
8114
8125
|
} catch (re) {
|
|
8115
8126
|
console.error("Error saving escalation settings", re);
|
|
@@ -8131,13 +8142,13 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8131
8142
|
] }),
|
|
8132
8143
|
/* @__PURE__ */ c(Dt, { className: "my-6" }),
|
|
8133
8144
|
/* @__PURE__ */ c(
|
|
8134
|
-
|
|
8145
|
+
Ll,
|
|
8135
8146
|
{
|
|
8136
8147
|
entries: Mt,
|
|
8137
8148
|
userRoles: ge,
|
|
8138
8149
|
loading: x || r,
|
|
8139
8150
|
onEdit: (F) => {
|
|
8140
|
-
|
|
8151
|
+
U("rules");
|
|
8141
8152
|
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
8153
|
E(Q ? Q.RuleId : F);
|
|
8143
8154
|
}
|
|
@@ -8149,27 +8160,27 @@ function Pl({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8149
8160
|
] });
|
|
8150
8161
|
}
|
|
8151
8162
|
const { Title: sr, Text: es } = Pt;
|
|
8152
|
-
function
|
|
8163
|
+
function bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
8153
8164
|
const { rules: r, alerts: a } = He(), i = [
|
|
8154
8165
|
{ label: "By Severity", value: "By Severity" },
|
|
8155
8166
|
{ label: "By Created Date", value: "By Created Date" }
|
|
8156
|
-
], [o, l] =
|
|
8167
|
+
], [o, l] = b("By Severity"), [u, m] = b(/* @__PURE__ */ new Set()), [d, g] = b(null), [f, v] = b(null), [O, C] = b({ inApp: !1, sms: !1, email: !1 }), [J, _] = b([]), [te, k] = b(!0), [R, V] = b(!1);
|
|
8157
8168
|
ve(() => {
|
|
8158
8169
|
let y = !1;
|
|
8159
8170
|
return (async () => {
|
|
8160
8171
|
try {
|
|
8161
|
-
const
|
|
8162
|
-
if (y || !
|
|
8172
|
+
const S = await a.getPreferenceSettings();
|
|
8173
|
+
if (y || !S) return;
|
|
8163
8174
|
C({
|
|
8164
|
-
inApp: !!
|
|
8175
|
+
inApp: !!S.inApp,
|
|
8165
8176
|
//convert to bool - as the resp is str
|
|
8166
|
-
sms: !!
|
|
8167
|
-
email: !!
|
|
8177
|
+
sms: !!S.sms,
|
|
8178
|
+
email: !!S.email
|
|
8168
8179
|
});
|
|
8169
|
-
const E = or(
|
|
8170
|
-
l(E === "By Created Date" ? "By Created Date" : "By Severity"), g(Tn(
|
|
8171
|
-
} catch (
|
|
8172
|
-
console.error("Error in loading my preferences: ",
|
|
8180
|
+
const E = or(S.sortBy);
|
|
8181
|
+
l(E === "By Created Date" ? "By Created Date" : "By Severity"), g(Tn(S.doNotDisturbStart)), v(Tn(S.doNotDisturbEnd)), Array.isArray(S.anomalyIds) && m(new Set(S.anomalyIds.map((de) => String(de))));
|
|
8182
|
+
} catch (S) {
|
|
8183
|
+
console.error("Error in loading my preferences: ", S);
|
|
8173
8184
|
}
|
|
8174
8185
|
})(), () => {
|
|
8175
8186
|
y = !0;
|
|
@@ -8179,12 +8190,12 @@ function Nc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8179
8190
|
return (async () => {
|
|
8180
8191
|
try {
|
|
8181
8192
|
k(!0);
|
|
8182
|
-
const
|
|
8183
|
-
if (y || !
|
|
8184
|
-
const E = Array.isArray(
|
|
8193
|
+
const S = await r.getLookups();
|
|
8194
|
+
if (y || !S) return;
|
|
8195
|
+
const E = Array.isArray(S.anomalies) ? S.anomalies : [];
|
|
8185
8196
|
_(E);
|
|
8186
|
-
} catch (
|
|
8187
|
-
console.error("Failed to load anomalies lookups",
|
|
8197
|
+
} catch (S) {
|
|
8198
|
+
console.error("Failed to load anomalies lookups", S);
|
|
8188
8199
|
} finally {
|
|
8189
8200
|
y || k(!1);
|
|
8190
8201
|
}
|
|
@@ -8192,12 +8203,12 @@ function Nc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8192
8203
|
y = !0;
|
|
8193
8204
|
};
|
|
8194
8205
|
}, []);
|
|
8195
|
-
const
|
|
8196
|
-
m((
|
|
8197
|
-
const E = new Set(
|
|
8206
|
+
const U = (y) => {
|
|
8207
|
+
m((S) => {
|
|
8208
|
+
const E = new Set(S);
|
|
8198
8209
|
return E.has(y) ? E.delete(y) : E.add(y), E;
|
|
8199
8210
|
});
|
|
8200
|
-
},
|
|
8211
|
+
}, G = async () => {
|
|
8201
8212
|
s?.({
|
|
8202
8213
|
sortBy: o,
|
|
8203
8214
|
subscribedRuleIds: Array.from(u),
|
|
@@ -8209,10 +8220,10 @@ function Nc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8209
8220
|
});
|
|
8210
8221
|
try {
|
|
8211
8222
|
V(!0);
|
|
8212
|
-
const y = d ? d.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00",
|
|
8223
|
+
const y = d ? d.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", S = f ? f.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", E = Array.from(u).map((ue) => Number(ue)).filter((ue) => Number.isFinite(ue)), de = await a.setPreferenceSettings({
|
|
8213
8224
|
anomalyIds: E,
|
|
8214
8225
|
doNotDisturbStart: y,
|
|
8215
|
-
doNotDisturbEnd:
|
|
8226
|
+
doNotDisturbEnd: S,
|
|
8216
8227
|
inApp: !!O.inApp,
|
|
8217
8228
|
sms: !!O.sms,
|
|
8218
8229
|
email: !!O.email,
|
|
@@ -8233,8 +8244,8 @@ function Nc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8233
8244
|
/* @__PURE__ */ h("div", { className: "mb-4", children: [
|
|
8234
8245
|
/* @__PURE__ */ c(sr, { level: 5, className: "!mb-2", children: "Anomalies" }),
|
|
8235
8246
|
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
|
-
const
|
|
8237
|
-
return /* @__PURE__ */ c(wt, { checked: u.has(
|
|
8247
|
+
const S = String(y.recordId), E = y.anomalyName;
|
|
8248
|
+
return /* @__PURE__ */ c(wt, { checked: u.has(S), onChange: () => U(S), children: E }, S);
|
|
8238
8249
|
}) })
|
|
8239
8250
|
] }),
|
|
8240
8251
|
/* @__PURE__ */ h("div", { className: "mb-4", children: [
|
|
@@ -8248,7 +8259,7 @@ function Nc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8248
8259
|
] }),
|
|
8249
8260
|
/* @__PURE__ */ h(Je, { direction: "horizontal", size: 8, className: "items-center", children: [
|
|
8250
8261
|
/* @__PURE__ */ c(es, { children: "To" }),
|
|
8251
|
-
/* @__PURE__ */ c(yn, { value: f, onChange: (y) =>
|
|
8262
|
+
/* @__PURE__ */ c(yn, { value: f, onChange: (y) => v(y), format: "HH:mm" })
|
|
8252
8263
|
] })
|
|
8253
8264
|
] })
|
|
8254
8265
|
] }) }) }),
|
|
@@ -8261,7 +8272,7 @@ function Nc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8261
8272
|
/* @__PURE__ */ c(Dt, {}),
|
|
8262
8273
|
/* @__PURE__ */ h(Je, { className: "gap-3", children: [
|
|
8263
8274
|
/* @__PURE__ */ c(De, { onClick: n, disabled: R, children: "Cancel" }),
|
|
8264
|
-
/* @__PURE__ */ c(De, { type: "primary", onClick:
|
|
8275
|
+
/* @__PURE__ */ c(De, { type: "primary", onClick: G, loading: R, children: "Save" })
|
|
8265
8276
|
] })
|
|
8266
8277
|
] });
|
|
8267
8278
|
}
|
|
@@ -8527,7 +8538,7 @@ const tc = [
|
|
|
8527
8538
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
8528
8539
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
8529
8540
|
], sc = Ss("minimize-2", tc), nc = ({ isOpen: t, onClose: e, src: s, type: n = "image" }) => {
|
|
8530
|
-
const [r, a] =
|
|
8541
|
+
const [r, a] = b(!1), [i, o] = b(!1);
|
|
8531
8542
|
return ve(() => {
|
|
8532
8543
|
t && o(!1);
|
|
8533
8544
|
}, [t, s]), ve(() => {
|
|
@@ -8599,21 +8610,34 @@ function rr(t) {
|
|
|
8599
8610
|
return e === "video" || e === "mp4" ? !0 : rc(t?.mediaUrl || t);
|
|
8600
8611
|
}
|
|
8601
8612
|
function ac(t) {
|
|
8613
|
+
const e = t?.mediaUrl;
|
|
8614
|
+
let s = null;
|
|
8615
|
+
if (Array.isArray(e))
|
|
8616
|
+
s = e;
|
|
8617
|
+
else if (typeof e == "string")
|
|
8618
|
+
try {
|
|
8619
|
+
const n = JSON.parse(e);
|
|
8620
|
+
Array.isArray(n) && (s = n);
|
|
8621
|
+
} catch {
|
|
8622
|
+
}
|
|
8623
|
+
return s && s.length > 0 ? s.map((n) => ({ ...t, mediaUrl: n })) : [t];
|
|
8624
|
+
}
|
|
8625
|
+
function ic(t) {
|
|
8602
8626
|
const e = t;
|
|
8603
|
-
return e ? Array.isArray(e) ? e : [e] : [];
|
|
8627
|
+
return e ? (Array.isArray(e) ? e : [e]).flatMap(ac) : [];
|
|
8604
8628
|
}
|
|
8605
|
-
const
|
|
8629
|
+
const oc = {
|
|
8606
8630
|
Critical: "#FF3B30",
|
|
8607
8631
|
High: "#FFB86A",
|
|
8608
8632
|
Medium: "#FFCC00",
|
|
8609
8633
|
Low: "#007AFF"
|
|
8610
|
-
},
|
|
8634
|
+
}, lc = {
|
|
8611
8635
|
Critical: "#FFE2E2",
|
|
8612
8636
|
High: "#FF95004D",
|
|
8613
8637
|
Medium: "#FEF9C2",
|
|
8614
8638
|
Low: "#E0EDFF"
|
|
8615
|
-
},
|
|
8616
|
-
const [l, u] =
|
|
8639
|
+
}, cc = ({ isModalOpen: t, handleModalClose: e, selectedRow: s, fetchAlertLogs: n, alertStatusList: r = [], alertStatusLoading: a = !1, initialTab: i = "details", sourceTab: o }) => {
|
|
8640
|
+
const [l, u] = b(), [m, d] = b(""), [g, f] = b(!1), v = wa(null), [O, C] = b("details"), [J, _] = b(void 0), te = dr(), { alerts: k } = He(), { timeZoneDetails: R } = ps(), [V, U] = b(!1), [G, y] = b(void 0), [S, E] = b(void 0), [de, ue] = b({}), [D, w] = b({}), p = (x, q, K) => {
|
|
8617
8641
|
const we = D[x];
|
|
8618
8642
|
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
8643
|
/* @__PURE__ */ c(Kl, { size: 40 }),
|
|
@@ -8624,18 +8648,18 @@ const ic = {
|
|
|
8624
8648
|
"img",
|
|
8625
8649
|
{
|
|
8626
8650
|
src: x,
|
|
8627
|
-
alt:
|
|
8651
|
+
alt: q.caption || `media-${K}`,
|
|
8628
8652
|
className: `max-w-full max-h-[90vh] object-contain rounded-lg shadow-lg transition-opacity duration-200 ${we ? "opacity-0" : "opacity-100"}`,
|
|
8629
|
-
onLoad: () =>
|
|
8630
|
-
onError: () =>
|
|
8653
|
+
onLoad: () => w((Ce) => ({ ...Ce, [x]: !1 })),
|
|
8654
|
+
onError: () => w((Ce) => ({ ...Ce, [x]: !1 }))
|
|
8631
8655
|
},
|
|
8632
8656
|
x
|
|
8633
8657
|
)
|
|
8634
8658
|
] });
|
|
8635
8659
|
}, I = s?.originalData || {}, {
|
|
8636
|
-
eventName:
|
|
8637
|
-
alertId:
|
|
8638
|
-
timestamp:
|
|
8660
|
+
eventName: A,
|
|
8661
|
+
alertId: L,
|
|
8662
|
+
timestamp: T,
|
|
8639
8663
|
description: M,
|
|
8640
8664
|
spaceName: W,
|
|
8641
8665
|
assignTeam: Z,
|
|
@@ -8644,19 +8668,19 @@ const ic = {
|
|
|
8644
8668
|
id: X,
|
|
8645
8669
|
alertDetails: ie,
|
|
8646
8670
|
statusHistory: Ne,
|
|
8647
|
-
mediaDetails:
|
|
8671
|
+
mediaDetails: le,
|
|
8648
8672
|
alertNumber: me
|
|
8649
8673
|
} = I, Ae = (x) => {
|
|
8650
|
-
const
|
|
8651
|
-
return
|
|
8674
|
+
const q = String(x || "").toLowerCase();
|
|
8675
|
+
return q === "delivered" || q === "sent" ? "Delivered" : q === "failed" ? "Failed" : "Queued";
|
|
8652
8676
|
}, Ie = (x) => ({
|
|
8653
8677
|
name: x?.receipientName || x?.recipientName || "-",
|
|
8654
8678
|
role: x?.receipientRoleName || "",
|
|
8655
8679
|
phone: x?.receipentPhoneNumber || x?.recipientPhoneNumber || x?.receipientEmail || x?.recipientEmail || "",
|
|
8656
8680
|
status: Ae(x?.messageStatus),
|
|
8657
8681
|
notificationReceipientType: x?.notificationReceipientType || ""
|
|
8658
|
-
}), Fe = (x,
|
|
8659
|
-
const K =
|
|
8682
|
+
}), Fe = (x, q) => {
|
|
8683
|
+
const K = q.map(Ie), we = K.filter((nt) => nt.status === "Delivered").length, Ce = q.map((nt) => nt?.sentAt).filter(Boolean).sort((nt, Ke) => new Date(Ke).getTime() - new Date(nt).getTime())[0], oe = q[0] || {}, _e = [oe?.severityName, oe?.anomalyName].filter(Boolean).join(" - ") || `${x} Notification`;
|
|
8660
8684
|
return {
|
|
8661
8685
|
channelLabel: `${x} Notification`,
|
|
8662
8686
|
sentAt: Ce || "",
|
|
@@ -8667,14 +8691,14 @@ const ic = {
|
|
|
8667
8691
|
recipients: K
|
|
8668
8692
|
};
|
|
8669
8693
|
}, st = (x) => {
|
|
8670
|
-
const
|
|
8694
|
+
const q = /* @__PURE__ */ new Map();
|
|
8671
8695
|
return (x || []).forEach((K) => {
|
|
8672
|
-
const we = String(K?.notificationType || "Unknown"), Ce =
|
|
8673
|
-
Ce.push(K),
|
|
8674
|
-
}), Array.from(
|
|
8696
|
+
const we = String(K?.notificationType || "Unknown"), Ce = q.get(we) || [];
|
|
8697
|
+
Ce.push(K), q.set(we, Ce);
|
|
8698
|
+
}), Array.from(q.entries()).map(([K, we]) => Fe(K, we));
|
|
8675
8699
|
}, ht = async (x) => {
|
|
8676
8700
|
try {
|
|
8677
|
-
const
|
|
8701
|
+
const q = await k.getAlertNotifications(x), K = st(q);
|
|
8678
8702
|
_(K);
|
|
8679
8703
|
} catch {
|
|
8680
8704
|
_(void 0);
|
|
@@ -8692,40 +8716,40 @@ const ic = {
|
|
|
8692
8716
|
t && C(i);
|
|
8693
8717
|
}, [t, i]);
|
|
8694
8718
|
const yt = o === "archived" || ["completed", "false positive"].includes(String(Y || "").toLowerCase()), Mt = (x) => {
|
|
8695
|
-
const
|
|
8696
|
-
return
|
|
8719
|
+
const q = String(x?.value || "").toLowerCase(), K = String(x?.statusName || "").toLowerCase();
|
|
8720
|
+
return q.includes("reopen") || K.includes("reopen");
|
|
8697
8721
|
}, zt = (r || []).filter((x) => {
|
|
8698
|
-
const
|
|
8699
|
-
return typeof o < "u" ? o === "archived" ?
|
|
8700
|
-
}).map((x) => ({ value: x.value, label: x.statusName })), ct = Se(() =>
|
|
8722
|
+
const q = Mt(x);
|
|
8723
|
+
return typeof o < "u" ? o === "archived" ? q : !q : yt ? q : !q;
|
|
8724
|
+
}).map((x) => ({ value: x.value, label: x.statusName })), ct = Se(() => ic(le), [le]);
|
|
8701
8725
|
return ve(() => {
|
|
8702
8726
|
let x = !1;
|
|
8703
|
-
const
|
|
8727
|
+
const q = new AbortController(), K = async (oe) => {
|
|
8704
8728
|
if (oe) {
|
|
8705
|
-
x ||
|
|
8729
|
+
x || ue((_e) => ({ ..._e, [oe]: !1 }));
|
|
8706
8730
|
try {
|
|
8707
|
-
const _e = await fetch(oe, { method: "HEAD", signal:
|
|
8731
|
+
const _e = await fetch(oe, { method: "HEAD", signal: q.signal });
|
|
8708
8732
|
if (_e.ok) {
|
|
8709
|
-
x ||
|
|
8733
|
+
x || ue((Ke) => ({ ...Ke, [oe]: !0 }));
|
|
8710
8734
|
return;
|
|
8711
8735
|
}
|
|
8712
8736
|
if (_e.status === 404) {
|
|
8713
|
-
x ||
|
|
8737
|
+
x || ue((Ke) => ({ ...Ke, [oe]: !1 }));
|
|
8714
8738
|
return;
|
|
8715
8739
|
}
|
|
8716
|
-
if (!(await fetch(oe, { method: "GET", signal:
|
|
8717
|
-
x ||
|
|
8740
|
+
if (!(await fetch(oe, { method: "GET", signal: q.signal })).ok) throw new Error("Media not available");
|
|
8741
|
+
x || ue((Ke) => ({ ...Ke, [oe]: !0 }));
|
|
8718
8742
|
} catch {
|
|
8719
|
-
x ||
|
|
8743
|
+
x || ue((_e) => ({ ..._e, [oe]: !1 }));
|
|
8720
8744
|
}
|
|
8721
8745
|
}
|
|
8722
8746
|
};
|
|
8723
|
-
|
|
8747
|
+
ue({});
|
|
8724
8748
|
const we = ct.filter((oe) => !rr(oe)).map((oe) => oe?.mediaUrl || oe).filter((oe) => typeof oe == "string" && oe.length > 0), Ce = {};
|
|
8725
8749
|
return we.forEach((oe) => {
|
|
8726
8750
|
Ce[oe] = !0;
|
|
8727
|
-
}),
|
|
8728
|
-
x = !0,
|
|
8751
|
+
}), w(Ce), we.forEach((oe) => K(oe)), () => {
|
|
8752
|
+
x = !0, q.abort();
|
|
8729
8753
|
};
|
|
8730
8754
|
}, [ct]), /* @__PURE__ */ c(
|
|
8731
8755
|
ba,
|
|
@@ -8743,14 +8767,14 @@ const ic = {
|
|
|
8743
8767
|
try {
|
|
8744
8768
|
f(!0);
|
|
8745
8769
|
const x = {
|
|
8746
|
-
alertUniqueId:
|
|
8770
|
+
alertUniqueId: L,
|
|
8747
8771
|
alertId: X,
|
|
8748
8772
|
status: l ? String(l) : void 0,
|
|
8749
8773
|
notes: m.trim(),
|
|
8750
8774
|
modifiedBy: 0
|
|
8751
|
-
},
|
|
8752
|
-
if (
|
|
8753
|
-
const K =
|
|
8775
|
+
}, q = await te.mutateAsync(x);
|
|
8776
|
+
if (q?.responseStatus || q?.Success) {
|
|
8777
|
+
const K = q?.Message || q?.data || "Alert updated successfully.";
|
|
8754
8778
|
Te.success(K, {
|
|
8755
8779
|
autoClose: 1500,
|
|
8756
8780
|
onClose: () => {
|
|
@@ -8758,7 +8782,7 @@ const ic = {
|
|
|
8758
8782
|
}
|
|
8759
8783
|
}), u(void 0), d("");
|
|
8760
8784
|
} else {
|
|
8761
|
-
const K =
|
|
8785
|
+
const K = q?.errorMessage || q?.Message || "Failed to update alert status";
|
|
8762
8786
|
Te.error(K);
|
|
8763
8787
|
}
|
|
8764
8788
|
} catch (x) {
|
|
@@ -8783,7 +8807,7 @@ const ic = {
|
|
|
8783
8807
|
label: "Alert Detail",
|
|
8784
8808
|
children: /* @__PURE__ */ h("div", { className: "grid grid-cols-2 gap-2", style: { maxHeight: "50vh", overflowY: "auto" }, children: [
|
|
8785
8809
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-2", children: [
|
|
8786
|
-
/* @__PURE__ */ c("div", { className: "text-sm font-bold", children:
|
|
8810
|
+
/* @__PURE__ */ c("div", { className: "text-sm font-bold", children: A || "Alert Event" }),
|
|
8787
8811
|
ie?.firstName ? /* @__PURE__ */ h("div", { className: "text-sm text-gray-500", children: [
|
|
8788
8812
|
"Resident ID/Name: ",
|
|
8789
8813
|
ie?.firstName,
|
|
@@ -8794,7 +8818,7 @@ const ic = {
|
|
|
8794
8818
|
] }) : null,
|
|
8795
8819
|
/* @__PURE__ */ h("div", { className: "text-sm text-gray-500", children: [
|
|
8796
8820
|
"Timestamp: ",
|
|
8797
|
-
cs(
|
|
8821
|
+
cs(T, R?.ianaTimeZoneId)
|
|
8798
8822
|
] }),
|
|
8799
8823
|
/* @__PURE__ */ h("div", { className: "font-sm text-gray-500", children: [
|
|
8800
8824
|
/* @__PURE__ */ c("b", { className: "text-black text-sm/6", children: "Description:" }),
|
|
@@ -8815,8 +8839,8 @@ const ic = {
|
|
|
8815
8839
|
{
|
|
8816
8840
|
className: "font-sm text-gray-500 rounded-[8px] py-2 px-3",
|
|
8817
8841
|
style: {
|
|
8818
|
-
border: `2px solid ${
|
|
8819
|
-
backgroundColor:
|
|
8842
|
+
border: `2px solid ${oc[String(z)] || "#DFE4EA"}`,
|
|
8843
|
+
backgroundColor: lc[String(z)]
|
|
8820
8844
|
},
|
|
8821
8845
|
children: [
|
|
8822
8846
|
"Severity: ",
|
|
@@ -8871,7 +8895,7 @@ const ic = {
|
|
|
8871
8895
|
"button",
|
|
8872
8896
|
{
|
|
8873
8897
|
type: "button",
|
|
8874
|
-
onClick: () =>
|
|
8898
|
+
onClick: () => v.current?.prev?.(),
|
|
8875
8899
|
className: "w-6 h-6 flex items-center justify-center rounded-full bg-gray-200 hover:bg-gray-300 text-gray-600",
|
|
8876
8900
|
"aria-label": "Previous media",
|
|
8877
8901
|
children: /* @__PURE__ */ c(Da, { style: { fontSize: 12 } })
|
|
@@ -8881,7 +8905,7 @@ const ic = {
|
|
|
8881
8905
|
"button",
|
|
8882
8906
|
{
|
|
8883
8907
|
type: "button",
|
|
8884
|
-
onClick: () =>
|
|
8908
|
+
onClick: () => v.current?.next?.(),
|
|
8885
8909
|
className: "w-6 h-6 flex items-center justify-center rounded-full bg-gray-200 hover:bg-gray-300 text-gray-600",
|
|
8886
8910
|
"aria-label": "Next media",
|
|
8887
8911
|
children: /* @__PURE__ */ c(Ca, { style: { fontSize: 12 } })
|
|
@@ -8889,7 +8913,7 @@ const ic = {
|
|
|
8889
8913
|
)
|
|
8890
8914
|
] }) : null
|
|
8891
8915
|
] }),
|
|
8892
|
-
ct.length ? /* @__PURE__ */ c("div", { className: "w-full", children: /* @__PURE__ */ c(ka, { ref:
|
|
8916
|
+
ct.length ? /* @__PURE__ */ c("div", { className: "w-full", children: /* @__PURE__ */ c(ka, { ref: v, dots: !0, className: "w-full", children: ct.map((x, q) => {
|
|
8893
8917
|
const K = x.mediaUrl || x, we = rr(x);
|
|
8894
8918
|
return /* @__PURE__ */ h("div", { className: "flex justify-center items-center relative", children: [
|
|
8895
8919
|
we ? /* @__PURE__ */ h(
|
|
@@ -8904,28 +8928,28 @@ const ic = {
|
|
|
8904
8928
|
"Your browser does not support the video tag."
|
|
8905
8929
|
]
|
|
8906
8930
|
}
|
|
8907
|
-
) : p(String(K), x,
|
|
8931
|
+
) : p(String(K), x, q),
|
|
8908
8932
|
x.caption && /* @__PURE__ */ c("p", { className: "text-xs text-gray-500 mt-1", children: x.caption }),
|
|
8909
8933
|
!we && de[String(K)] ? /* @__PURE__ */ c(
|
|
8910
8934
|
"button",
|
|
8911
8935
|
{
|
|
8912
8936
|
onClick: () => {
|
|
8913
|
-
|
|
8937
|
+
U(!0), y(K), E(x.type || "image");
|
|
8914
8938
|
},
|
|
8915
8939
|
className: "absolute bottom-3 right-3 text-white bg-black/50 rounded-full p-2 hover:bg-black/70",
|
|
8916
8940
|
children: /* @__PURE__ */ c(ha, { size: 20 })
|
|
8917
8941
|
}
|
|
8918
8942
|
) : null
|
|
8919
|
-
] }, String(K) ||
|
|
8943
|
+
] }, String(K) || q);
|
|
8920
8944
|
}) }) }) : null
|
|
8921
8945
|
] }) }),
|
|
8922
8946
|
/* @__PURE__ */ c(
|
|
8923
8947
|
nc,
|
|
8924
8948
|
{
|
|
8925
8949
|
isOpen: V,
|
|
8926
|
-
onClose: () =>
|
|
8927
|
-
src:
|
|
8928
|
-
type:
|
|
8950
|
+
onClose: () => U(!1),
|
|
8951
|
+
src: G || "",
|
|
8952
|
+
type: S || "image"
|
|
8929
8953
|
}
|
|
8930
8954
|
)
|
|
8931
8955
|
] })
|
|
@@ -8936,7 +8960,7 @@ const ic = {
|
|
|
8936
8960
|
children: /* @__PURE__ */ c(
|
|
8937
8961
|
Hl,
|
|
8938
8962
|
{
|
|
8939
|
-
alertId:
|
|
8963
|
+
alertId: L,
|
|
8940
8964
|
id: X,
|
|
8941
8965
|
priority: z,
|
|
8942
8966
|
spaceName: W,
|
|
@@ -8952,7 +8976,7 @@ const ic = {
|
|
|
8952
8976
|
}
|
|
8953
8977
|
);
|
|
8954
8978
|
};
|
|
8955
|
-
function
|
|
8979
|
+
function uc() {
|
|
8956
8980
|
const { alerts: t } = He(), e = Qs({
|
|
8957
8981
|
queryKey: ["alerts", "statusList"],
|
|
8958
8982
|
queryFn: () => t.getAlertStatusList(),
|
|
@@ -8966,14 +8990,14 @@ function cc() {
|
|
|
8966
8990
|
};
|
|
8967
8991
|
}
|
|
8968
8992
|
function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange: r }) {
|
|
8969
|
-
const [a, i] =
|
|
8993
|
+
const [a, i] = b(!1), [o, l] = b(null), [u, m] = b("details"), { list: d, loading: g } = uc(), { timeZoneDetails: f } = ps(), v = f?.timeZoneName ?? "UTC", O = f?.ianaTimeZoneId ?? "UTC";
|
|
8970
8994
|
function C(R, V) {
|
|
8971
8995
|
l(R), m(V?.tab ?? "details"), te(V?.sourceTab ?? "active"), i(!0);
|
|
8972
8996
|
}
|
|
8973
8997
|
function J() {
|
|
8974
8998
|
i(!1);
|
|
8975
8999
|
}
|
|
8976
|
-
const [_, te] =
|
|
9000
|
+
const [_, te] = b("active"), k = o ? {
|
|
8977
9001
|
originalData: {
|
|
8978
9002
|
// include the full selected alert so alll modal fieldsare present
|
|
8979
9003
|
...o,
|
|
@@ -8985,7 +9009,7 @@ function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange
|
|
|
8985
9009
|
return /* @__PURE__ */ h("div", { className: "p-6 flex flex-col items-start justify-start min-h-screen w-full overflow-auto", children: [
|
|
8986
9010
|
/* @__PURE__ */ h("div", { className: "w-full grid grid-cols-3 sm:grid-cols-1 items-center mb-4", children: [
|
|
8987
9011
|
/* @__PURE__ */ c("h1", { className: "text-xl font-bold text-black", children: "Alert Console" }),
|
|
8988
|
-
/* @__PURE__ */ c("div", { className: "flex items-center justify-start sm:justify-center", children: /* @__PURE__ */ c(Dl, { label:
|
|
9012
|
+
/* @__PURE__ */ c("div", { className: "flex items-center justify-start sm:justify-center", children: /* @__PURE__ */ c(Dl, { label: v, timeZone: O }) })
|
|
8989
9013
|
] }),
|
|
8990
9014
|
/* @__PURE__ */ c(
|
|
8991
9015
|
Ks,
|
|
@@ -9010,7 +9034,7 @@ function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange
|
|
|
9010
9034
|
{
|
|
9011
9035
|
key: "settings",
|
|
9012
9036
|
label: "Settings",
|
|
9013
|
-
children: /* @__PURE__ */ c(
|
|
9037
|
+
children: /* @__PURE__ */ c(dc, {})
|
|
9014
9038
|
}
|
|
9015
9039
|
// {
|
|
9016
9040
|
// key: "reports",
|
|
@@ -9021,7 +9045,7 @@ function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange
|
|
|
9021
9045
|
}
|
|
9022
9046
|
),
|
|
9023
9047
|
/* @__PURE__ */ c(
|
|
9024
|
-
|
|
9048
|
+
cc,
|
|
9025
9049
|
{
|
|
9026
9050
|
isModalOpen: a,
|
|
9027
9051
|
handleModalClose: J,
|
|
@@ -9036,8 +9060,8 @@ function ya({ alerts: t, loading: e = !1, columns: s, onRefetch: n, onPageChange
|
|
|
9036
9060
|
)
|
|
9037
9061
|
] });
|
|
9038
9062
|
}
|
|
9039
|
-
function
|
|
9040
|
-
const [t, e] =
|
|
9063
|
+
function dc() {
|
|
9064
|
+
const [t, e] = b([]), [s, n] = b([]), [r, a] = b([]), [i, o] = b([]), [l, u] = b(!0), { rules: m } = He();
|
|
9041
9065
|
return ve(() => {
|
|
9042
9066
|
let d = !0;
|
|
9043
9067
|
return (async () => {
|
|
@@ -9045,19 +9069,19 @@ function uc() {
|
|
|
9045
9069
|
const g = await m.getRules();
|
|
9046
9070
|
if (!d) return;
|
|
9047
9071
|
o(Array.isArray(g) ? g : []);
|
|
9048
|
-
const f = (g || []).map((
|
|
9049
|
-
RuleId:
|
|
9050
|
-
Name:
|
|
9051
|
-
Description:
|
|
9072
|
+
const f = (g || []).map((v, O) => ({
|
|
9073
|
+
RuleId: v.ruleId || v.ruleName || String(O),
|
|
9074
|
+
Name: v.ruleName || v.Name || "-",
|
|
9075
|
+
Description: v.ruleDesc || v.Description || "",
|
|
9052
9076
|
SeverityId: 0
|
|
9053
9077
|
}));
|
|
9054
9078
|
e(f);
|
|
9055
9079
|
try {
|
|
9056
|
-
const
|
|
9080
|
+
const v = await m.getLookups(), O = Array.isArray(v?.userRoles) ? v.userRoles.map((C) => ({
|
|
9057
9081
|
userRoleId: C.userRoleId ?? C.id,
|
|
9058
9082
|
userRoleName: C.userRoleName ?? C.name
|
|
9059
9083
|
})) : [];
|
|
9060
|
-
n(O), a(Array.isArray(
|
|
9084
|
+
n(O), a(Array.isArray(v?.severities) ? v.severities : []);
|
|
9061
9085
|
} catch {
|
|
9062
9086
|
}
|
|
9063
9087
|
} catch {
|
|
@@ -9078,7 +9102,7 @@ function uc() {
|
|
|
9078
9102
|
}
|
|
9079
9103
|
);
|
|
9080
9104
|
}
|
|
9081
|
-
function
|
|
9105
|
+
function mc(t = 1) {
|
|
9082
9106
|
const { alerts: e } = He(), s = Qs({
|
|
9083
9107
|
queryKey: ["alerts", "list", t],
|
|
9084
9108
|
queryFn: () => e.listAlerts({ pageNumber: t, pageSize: 10 }),
|
|
@@ -9091,11 +9115,11 @@ function dc(t = 1) {
|
|
|
9091
9115
|
refetch: s.refetch
|
|
9092
9116
|
};
|
|
9093
9117
|
}
|
|
9094
|
-
function
|
|
9095
|
-
const [e, s] =
|
|
9118
|
+
function fc(t) {
|
|
9119
|
+
const [e, s] = b(1), { alerts: n, loading: r, refetch: a } = mc(e);
|
|
9096
9120
|
return /* @__PURE__ */ c(ya, { alerts: n, loading: r, columns: t.columns, onRefetch: a, onPageChange: s });
|
|
9097
9121
|
}
|
|
9098
|
-
function
|
|
9122
|
+
function kc({
|
|
9099
9123
|
tenant: t,
|
|
9100
9124
|
apiDomain: e,
|
|
9101
9125
|
rulesDomain: s,
|
|
@@ -9106,7 +9130,7 @@ function bc({
|
|
|
9106
9130
|
loading: o,
|
|
9107
9131
|
columns: l
|
|
9108
9132
|
}) {
|
|
9109
|
-
const [u] =
|
|
9133
|
+
const [u] = b(() => new La()), m = Se(
|
|
9110
9134
|
() => ({
|
|
9111
9135
|
alertsBaseUrl: e,
|
|
9112
9136
|
rulesBaseUrl: s || e,
|
|
@@ -9114,9 +9138,9 @@ function bc({
|
|
|
9114
9138
|
}),
|
|
9115
9139
|
[e, s, n]
|
|
9116
9140
|
);
|
|
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(
|
|
9141
|
+
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
9142
|
}
|
|
9119
|
-
function
|
|
9143
|
+
function Ic(t) {
|
|
9120
9144
|
const { alerts: e } = He(), s = Qs({
|
|
9121
9145
|
queryKey: ["alerts", "report", t],
|
|
9122
9146
|
queryFn: () => e.getAlertsReport(t),
|
|
@@ -9129,7 +9153,7 @@ function kc(t) {
|
|
|
9129
9153
|
refetch: s.refetch
|
|
9130
9154
|
};
|
|
9131
9155
|
}
|
|
9132
|
-
const
|
|
9156
|
+
const xc = [
|
|
9133
9157
|
{ title: "ID", dataIndex: "id", key: "id", width: 120 },
|
|
9134
9158
|
{ title: "Priority", dataIndex: "priority", key: "priority", width: 120 },
|
|
9135
9159
|
{ title: "Timestamp", dataIndex: "timestamp", key: "timestamp", width: 220 },
|
|
@@ -9139,19 +9163,19 @@ const Ic = [
|
|
|
9139
9163
|
export {
|
|
9140
9164
|
$l as AlertAssignment,
|
|
9141
9165
|
ya as AlertConsole,
|
|
9142
|
-
|
|
9166
|
+
kc as AlertConsoleWidget,
|
|
9143
9167
|
ur as AlertsTable,
|
|
9144
9168
|
mi as ApiProvider,
|
|
9145
9169
|
Ml as ArchivedTable,
|
|
9146
9170
|
Dl as Clock,
|
|
9147
9171
|
bi as DataTable,
|
|
9148
|
-
|
|
9172
|
+
bc as MyPreferencesPanel,
|
|
9149
9173
|
Pl as SettingsPanel,
|
|
9150
9174
|
Wl as SettingsTabs,
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9175
|
+
xc as exampleAlertColumns,
|
|
9176
|
+
uc as useAlertStatusList,
|
|
9177
|
+
mc as useAlerts,
|
|
9178
|
+
Ic as useAlertsReport,
|
|
9155
9179
|
He as useApi,
|
|
9156
9180
|
dr as useUpdateAlertStatus
|
|
9157
9181
|
};
|