meyi-insight-ui-dev 1.0.28 → 1.0.30
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.mjs
CHANGED
|
@@ -7784,9 +7784,9 @@ function Z4(e, t) {
|
|
|
7784
7784
|
S.resourceName && c.set(S.resourceName, (c.get(S.resourceName) ?? 0) + 1);
|
|
7785
7785
|
const u = [...c.values()].filter((S) => S > 1).reduce((S, w) => S + w, 0), p = (S) => {
|
|
7786
7786
|
if (S.status === "resolved" || S.status === "closed" || !S.createdAt) return !1;
|
|
7787
|
-
const w = (Date.now() - _r(S.createdAt)) / 6e4, T = S.status !== "open", A = String(S.
|
|
7787
|
+
const w = (Date.now() - _r(S.createdAt)) / 6e4, T = S.status !== "open", A = String(S.tags?.severity || S.tags?.priority || "").toLowerCase();
|
|
7788
7788
|
let N = 30, R = 120;
|
|
7789
|
-
return A === "critical" ? (N = 10, R = 60) : A === "high" && (N = 30, R = 120), !T && w > N || w > R;
|
|
7789
|
+
return A === "critical" || S.status === "in_progress" ? (N = 10, R = 60) : A === "high" && (N = 30, R = 120), !T && w > N || w > R;
|
|
7790
7790
|
}, d = a.filter(p).length, f = a.length ? Math.round(a.filter((S) => S.analysisStatus === "completed").length / a.length * 100) : 0, m = [];
|
|
7791
7791
|
for (let S = n - 1; S >= 0; S--) {
|
|
7792
7792
|
const w = /* @__PURE__ */ new Date();
|
|
@@ -17228,18 +17228,18 @@ function _R(e) {
|
|
|
17228
17228
|
return n < 60 ? `${n}m` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
17229
17229
|
}
|
|
17230
17230
|
function Xa(e) {
|
|
17231
|
-
const t = String(e.
|
|
17232
|
-
return t === "P1" || e.status === "in_progress" ? "P1" : t === "P2" ? "P2" : t === "P3" || e.status === "resolved" || e.status === "closed" ? "P3" : "P2";
|
|
17231
|
+
const t = String(e.tags?.priority || e.tags?.severity || "").toUpperCase();
|
|
17232
|
+
return t === "P1" || t === "CRITICAL" || e.status === "in_progress" ? "P1" : t === "P2" ? "P2" : t === "P3" || t === "LOW" || e.status === "resolved" || e.status === "closed" ? "P3" : "P2";
|
|
17233
17233
|
}
|
|
17234
17234
|
function RR(e) {
|
|
17235
17235
|
const t = String(e || "").toLowerCase();
|
|
17236
|
-
return t === "critical" ? { ack: 10, resolve: 60 } : t === "high" ? { ack: 30, resolve: 120 } : { ack: 30, resolve: 120 };
|
|
17236
|
+
return t === "critical" || t === "p1" ? { ack: 10, resolve: 60 } : t === "high" || t === "p2" ? { ack: 30, resolve: 120 } : { ack: 30, resolve: 120 };
|
|
17237
17237
|
}
|
|
17238
17238
|
function $S(e, t) {
|
|
17239
17239
|
return !e || !t ? null : Math.max(0, Math.floor((new Date(t).getTime() - new Date(e).getTime()) / 6e4));
|
|
17240
17240
|
}
|
|
17241
17241
|
function HS(e, t) {
|
|
17242
|
-
const { ack: n, resolve: r } = RR(e.
|
|
17242
|
+
const { ack: n, resolve: r } = RR(e.tags?.severity || e.tags?.priority), a = t === "ack" ? n : r, s = e.status !== "open", o = e.status === "resolved" || e.status === "closed";
|
|
17243
17243
|
if (t === "ack" ? s : o) {
|
|
17244
17244
|
const p = t === "ack" ? e.analysisTriggeredAt || e.updatedAt : e.resolvedAt, d = $S(e.createdAt, p);
|
|
17245
17245
|
return d == null ? { label: "✓ met", cls: "ok" } : d <= a ? { label: `✓ ${d}m`, cls: "ok" } : { label: `⚠ ${d}m`, cls: "breach" };
|
|
@@ -17352,8 +17352,12 @@ function h9({ incident: e }) {
|
|
|
17352
17352
|
/* @__PURE__ */ i.jsx("span", { children: e.createdAt ? new Date(e.createdAt).toLocaleString() : "—" })
|
|
17353
17353
|
] }),
|
|
17354
17354
|
/* @__PURE__ */ i.jsxs("div", { className: "im-inc-meta-row", children: [
|
|
17355
|
-
/* @__PURE__ */ i.jsx("span", { children: "
|
|
17356
|
-
/* @__PURE__ */ i.jsx("
|
|
17355
|
+
/* @__PURE__ */ i.jsx("span", { children: "Tags" }),
|
|
17356
|
+
/* @__PURE__ */ i.jsx("div", { className: "flex flex-wrap gap-1 justify-end", children: e.tags && Object.keys(e.tags).length > 0 ? Object.entries(e.tags).map(([r, a]) => /* @__PURE__ */ i.jsxs("span", { className: "im-inc-label-chip font-mono text-[11px]", children: [
|
|
17357
|
+
r,
|
|
17358
|
+
":",
|
|
17359
|
+
a
|
|
17360
|
+
] }, r)) : /* @__PURE__ */ i.jsx("span", { children: "—" }) })
|
|
17357
17361
|
] }),
|
|
17358
17362
|
e.alertId && /* @__PURE__ */ i.jsxs("div", { className: "im-inc-meta-row", children: [
|
|
17359
17363
|
/* @__PURE__ */ i.jsx("span", { children: "Source alarm" }),
|
|
@@ -17882,7 +17886,7 @@ function v9({ incidentId: e, onBack: t, onViewAlert: n }) {
|
|
|
17882
17886
|
/* @__PURE__ */ i.jsxs("div", { className: "im-inc-sidebar-section", children: [
|
|
17883
17887
|
/* @__PURE__ */ i.jsx("div", { className: "im-inc-sidebar-label", children: "SLA" }),
|
|
17884
17888
|
(() => {
|
|
17885
|
-
const { ack: Y, resolve: J } = RR(s.
|
|
17889
|
+
const { ack: Y, resolve: J } = RR(s.tags?.severity || s.tags?.priority), Ce = HS(s, "ack"), pe = HS(s, "resolve");
|
|
17886
17890
|
return /* @__PURE__ */ i.jsxs("div", { className: "im-inc-sla", children: [
|
|
17887
17891
|
/* @__PURE__ */ i.jsxs("div", { className: "im-inc-sla-row", children: [
|
|
17888
17892
|
/* @__PURE__ */ i.jsxs("span", { children: [
|
|
@@ -17927,8 +17931,12 @@ function v9({ incidentId: e, onBack: t, onViewAlert: n }) {
|
|
|
17927
17931
|
)) })
|
|
17928
17932
|
] }),
|
|
17929
17933
|
/* @__PURE__ */ i.jsxs("div", { className: "im-inc-sidebar-section", children: [
|
|
17930
|
-
/* @__PURE__ */ i.jsx("div", { className: "im-inc-sidebar-label", children: "
|
|
17931
|
-
s.
|
|
17934
|
+
/* @__PURE__ */ i.jsx("div", { className: "im-inc-sidebar-label", children: "Tags" }),
|
|
17935
|
+
s.tags && Object.keys(s.tags).length > 0 ? /* @__PURE__ */ i.jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: Object.entries(s.tags).map(([Y, J]) => /* @__PURE__ */ i.jsxs("span", { className: "im-inc-label-chip font-mono text-[11px]", children: [
|
|
17936
|
+
Y,
|
|
17937
|
+
":",
|
|
17938
|
+
J
|
|
17939
|
+
] }, Y)) }) : /* @__PURE__ */ i.jsx("div", { style: { fontSize: 12, color: "var(--im-fg-subtle)" }, children: "None" })
|
|
17932
17940
|
] }),
|
|
17933
17941
|
/* @__PURE__ */ i.jsxs("div", { className: "im-inc-sidebar-section", children: [
|
|
17934
17942
|
/* @__PURE__ */ i.jsx("div", { className: "im-inc-sidebar-label", children: "Quick actions" }),
|
|
@@ -19044,7 +19052,7 @@ function X$({ open: e, incident: t, submitting: n, onClose: r, onSubmit: a }) {
|
|
|
19044
19052
|
Ue(() => {
|
|
19045
19053
|
if (e) {
|
|
19046
19054
|
if (t) {
|
|
19047
|
-
o(t.name || ""), c(t.downMessage || ""), p(t.source || "Manual"), f(t.priority || "P2"), h(t.resourceName || ""), b(t.status || "open");
|
|
19055
|
+
o(t.name || ""), c(t.downMessage || ""), p(t.source || "Manual"), f(t.tags?.priority || t.priority || "P2"), h(t.resourceName || ""), b(t.status || "open");
|
|
19048
19056
|
return;
|
|
19049
19057
|
}
|
|
19050
19058
|
o(""), c(""), p("Manual"), f("P1"), h(""), b("open");
|
|
@@ -19059,10 +19067,11 @@ function X$({ open: e, incident: t, submitting: n, onClose: r, onSubmit: a }) {
|
|
|
19059
19067
|
re.error("Affected resource is required");
|
|
19060
19068
|
return;
|
|
19061
19069
|
}
|
|
19070
|
+
const w = t?.tags || {};
|
|
19062
19071
|
a({
|
|
19063
19072
|
name: s.trim(),
|
|
19064
19073
|
downMessage: l.trim() || void 0,
|
|
19065
|
-
|
|
19074
|
+
tags: { ...w, priority: d },
|
|
19066
19075
|
source: u.trim() || "Manual",
|
|
19067
19076
|
resourceName: m.trim() || t?.resourceName,
|
|
19068
19077
|
resourceType: "service",
|
|
@@ -21219,11 +21228,21 @@ const GH = (e) => [
|
|
|
21219
21228
|
}
|
|
21220
21229
|
},
|
|
21221
21230
|
{
|
|
21222
|
-
|
|
21223
|
-
header: ({ column: t }) => /* @__PURE__ */ i.jsx(mt, { column: t, title: "
|
|
21231
|
+
id: "tags",
|
|
21232
|
+
header: ({ column: t }) => /* @__PURE__ */ i.jsx(mt, { column: t, title: "Tags" }),
|
|
21224
21233
|
cell: ({ row: t }) => {
|
|
21225
|
-
const n = t.
|
|
21226
|
-
return
|
|
21234
|
+
const n = t.original.tags || {}, r = Object.entries(n);
|
|
21235
|
+
return r.length === 0 ? /* @__PURE__ */ i.jsx("span", { className: "text-muted-foreground text-xs", children: "—" }) : /* @__PURE__ */ i.jsxs("div", { className: "flex flex-wrap gap-1 max-w-[200px]", children: [
|
|
21236
|
+
r.slice(0, 2).map(([a, s]) => /* @__PURE__ */ i.jsxs(qt, { variant: "secondary", className: "text-[10px] px-1.5 py-0 font-mono truncate", children: [
|
|
21237
|
+
a,
|
|
21238
|
+
":",
|
|
21239
|
+
s
|
|
21240
|
+
] }, a)),
|
|
21241
|
+
r.length > 2 && /* @__PURE__ */ i.jsxs("span", { className: "text-[10px] text-muted-foreground self-center", children: [
|
|
21242
|
+
"+",
|
|
21243
|
+
r.length - 2
|
|
21244
|
+
] })
|
|
21245
|
+
] });
|
|
21227
21246
|
}
|
|
21228
21247
|
},
|
|
21229
21248
|
{
|
|
@@ -22769,8 +22788,8 @@ function mG({
|
|
|
22769
22788
|
] });
|
|
22770
22789
|
}
|
|
22771
22790
|
function hG(e) {
|
|
22772
|
-
const t = String(e.
|
|
22773
|
-
return t === "P1" || e.status === "in_progress" ? "P1" : t === "P3" || e.status === "resolved" ? "P3" : "P2";
|
|
22791
|
+
const t = String(e.tags?.priority || e.tags?.severity || "").toUpperCase();
|
|
22792
|
+
return t === "P1" || t === "CRITICAL" || e.status === "in_progress" ? "P1" : t === "P3" || t === "LOW" || e.status === "resolved" ? "P3" : "P2";
|
|
22774
22793
|
}
|
|
22775
22794
|
function gG({ onViewResult: e, sourceTypes: t }) {
|
|
22776
22795
|
const [n, r] = M([]), [a, s] = M(0), [o, l] = M(!0), [c, u] = M(1), [p, d] = M(""), [f, m] = M(""), [h, g] = M(() => fG()), [b, y] = M(null), [S, w] = M(!1), [T, A] = M(!1), { userId: N } = hr(), [R, D] = M(10);
|
|
@@ -22811,7 +22830,7 @@ function gG({ onViewResult: e, sourceTypes: t }) {
|
|
|
22811
22830
|
resourceName: z.resourceName,
|
|
22812
22831
|
resourceType: z.resourceType || "service",
|
|
22813
22832
|
downMessage: z.downMessage,
|
|
22814
|
-
|
|
22833
|
+
tags: z.tags || {}
|
|
22815
22834
|
}), re.success("Incident created")), w(!1), y(null), C();
|
|
22816
22835
|
} catch (j) {
|
|
22817
22836
|
re.error(j?.response?.data?.error || "Failed to save incident");
|
|
@@ -29573,17 +29592,16 @@ const bw = [
|
|
|
29573
29592
|
id: "tags",
|
|
29574
29593
|
header: ({ column: e }) => /* @__PURE__ */ i.jsx(mt, { column: e, title: "Tags" }),
|
|
29575
29594
|
cell: ({ row: e }) => {
|
|
29576
|
-
const t = e.original, n = t.
|
|
29577
|
-
return r.length === 0
|
|
29578
|
-
|
|
29579
|
-
r.slice(0, 2).map(([a, s]) => /* @__PURE__ */ i.jsxs("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[11px] bg-secondary text-secondary-foreground font-mono", children: [
|
|
29595
|
+
const t = e.original, n = t.tags || t.additionalConfiguration?.tags || {}, r = Object.entries(n);
|
|
29596
|
+
return r.length === 0 ? /* @__PURE__ */ i.jsx("span", { className: "text-muted-foreground text-xs", children: "—" }) : /* @__PURE__ */ i.jsxs("div", { className: "flex flex-wrap gap-1 max-w-[220px]", children: [
|
|
29597
|
+
r.slice(0, 3).map(([a, s]) => /* @__PURE__ */ i.jsxs("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[11px] bg-secondary text-secondary-foreground font-mono", children: [
|
|
29580
29598
|
a,
|
|
29581
29599
|
":",
|
|
29582
29600
|
s
|
|
29583
29601
|
] }, a)),
|
|
29584
|
-
r.length >
|
|
29602
|
+
r.length > 3 && /* @__PURE__ */ i.jsxs("span", { className: "text-[10px] text-muted-foreground self-center", children: [
|
|
29585
29603
|
"+",
|
|
29586
|
-
r.length -
|
|
29604
|
+
r.length - 3
|
|
29587
29605
|
] })
|
|
29588
29606
|
] });
|
|
29589
29607
|
}
|
|
@@ -32304,9 +32322,13 @@ function $I({
|
|
|
32304
32322
|
/* @__PURE__ */ i.jsx("span", { className: "text-muted-foreground", children: "Type" }),
|
|
32305
32323
|
/* @__PURE__ */ i.jsx("span", { children: e.resourceType })
|
|
32306
32324
|
] }),
|
|
32307
|
-
e.
|
|
32308
|
-
/* @__PURE__ */ i.jsx(id, { size: 12, className: "text-muted-foreground" }),
|
|
32309
|
-
/* @__PURE__ */ i.
|
|
32325
|
+
e.tags && Object.keys(e.tags).length > 0 && /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-1.5 mt-2 flex-wrap", children: [
|
|
32326
|
+
/* @__PURE__ */ i.jsx(id, { size: 12, className: "text-muted-foreground shrink-0" }),
|
|
32327
|
+
Object.entries(e.tags).map(([s, o]) => /* @__PURE__ */ i.jsxs("code", { className: "text-xs bg-muted px-1.5 py-0.5 rounded", children: [
|
|
32328
|
+
s,
|
|
32329
|
+
":",
|
|
32330
|
+
o
|
|
32331
|
+
] }, s))
|
|
32310
32332
|
] })
|
|
32311
32333
|
] }),
|
|
32312
32334
|
/* @__PURE__ */ i.jsxs(Vt, { children: [
|
|
@@ -32341,10 +32363,34 @@ function HI({
|
|
|
32341
32363
|
function zI({ open: e, alert: t, submitting: n, onClose: r, onSubmit: a }) {
|
|
32342
32364
|
const [s, o] = M(""), [l, c] = M(""), [u, p] = M(""), [d, f] = M("");
|
|
32343
32365
|
Ue(() => {
|
|
32344
|
-
e && t
|
|
32366
|
+
if (e && t) {
|
|
32367
|
+
o(t.alertName || ""), c(t.description || ""), p(t.severity || "");
|
|
32368
|
+
const g = t.tags || {};
|
|
32369
|
+
f(Object.entries(g).map(([b, y]) => `${b}: ${y}`).join(", "));
|
|
32370
|
+
}
|
|
32345
32371
|
}, [e, t]);
|
|
32346
|
-
const m = (
|
|
32347
|
-
|
|
32372
|
+
const m = (g) => {
|
|
32373
|
+
const b = {};
|
|
32374
|
+
if (!g.trim()) return b;
|
|
32375
|
+
if (g.trim().startsWith("{"))
|
|
32376
|
+
try {
|
|
32377
|
+
const y = JSON.parse(g);
|
|
32378
|
+
if (typeof y == "object" && y !== null) {
|
|
32379
|
+
for (const [S, w] of Object.entries(y))
|
|
32380
|
+
b[S] = String(w);
|
|
32381
|
+
return b;
|
|
32382
|
+
}
|
|
32383
|
+
} catch {
|
|
32384
|
+
}
|
|
32385
|
+
return g.split(",").forEach((y) => {
|
|
32386
|
+
const S = y.includes(":") ? y.split(":") : y.split("=");
|
|
32387
|
+
if (S.length >= 2) {
|
|
32388
|
+
const w = S[0].trim(), T = S.slice(1).join(":").trim();
|
|
32389
|
+
w && (b[w] = T);
|
|
32390
|
+
}
|
|
32391
|
+
}), b;
|
|
32392
|
+
}, h = (g) => {
|
|
32393
|
+
if (g.preventDefault(), !s.trim()) {
|
|
32348
32394
|
re.error("Name is required");
|
|
32349
32395
|
return;
|
|
32350
32396
|
}
|
|
@@ -32352,12 +32398,12 @@ function zI({ open: e, alert: t, submitting: n, onClose: r, onSubmit: a }) {
|
|
|
32352
32398
|
alertName: s.trim(),
|
|
32353
32399
|
description: l.trim() || void 0,
|
|
32354
32400
|
severity: u.trim() || void 0,
|
|
32355
|
-
|
|
32401
|
+
tags: m(d)
|
|
32356
32402
|
});
|
|
32357
32403
|
};
|
|
32358
|
-
return /* @__PURE__ */ i.jsx(Lt, { open: e, onOpenChange: (
|
|
32404
|
+
return /* @__PURE__ */ i.jsx(Lt, { open: e, onOpenChange: (g) => !g && !n && r(), children: /* @__PURE__ */ i.jsxs(jt, { className: "max-w-md", children: [
|
|
32359
32405
|
/* @__PURE__ */ i.jsx(Bt, { children: /* @__PURE__ */ i.jsx(Ut, { children: "Edit Alert" }) }),
|
|
32360
|
-
/* @__PURE__ */ i.jsxs("form", { id: "alert-form", onSubmit:
|
|
32406
|
+
/* @__PURE__ */ i.jsxs("form", { id: "alert-form", onSubmit: h, className: "flex flex-col gap-4 mt-2", children: [
|
|
32361
32407
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-4", children: [
|
|
32362
32408
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
|
|
32363
32409
|
/* @__PURE__ */ i.jsxs(Fe, { children: [
|
|
@@ -32369,7 +32415,7 @@ function zI({ open: e, alert: t, submitting: n, onClose: r, onSubmit: a }) {
|
|
|
32369
32415
|
{
|
|
32370
32416
|
id: "alert-name",
|
|
32371
32417
|
value: s,
|
|
32372
|
-
onChange: (
|
|
32418
|
+
onChange: (g) => o(g.target.value),
|
|
32373
32419
|
placeholder: "e.g. CPU Spike on API Server",
|
|
32374
32420
|
disabled: n
|
|
32375
32421
|
}
|
|
@@ -32381,7 +32427,7 @@ function zI({ open: e, alert: t, submitting: n, onClose: r, onSubmit: a }) {
|
|
|
32381
32427
|
Qe,
|
|
32382
32428
|
{
|
|
32383
32429
|
value: l,
|
|
32384
|
-
onChange: (
|
|
32430
|
+
onChange: (g) => c(g.target.value),
|
|
32385
32431
|
placeholder: "Description",
|
|
32386
32432
|
disabled: n
|
|
32387
32433
|
}
|
|
@@ -32407,17 +32453,18 @@ function zI({ open: e, alert: t, submitting: n, onClose: r, onSubmit: a }) {
|
|
|
32407
32453
|
)
|
|
32408
32454
|
] }),
|
|
32409
32455
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
|
|
32410
|
-
/* @__PURE__ */ i.jsx(Fe, { children: "
|
|
32456
|
+
/* @__PURE__ */ i.jsx(Fe, { children: "Tags" }),
|
|
32411
32457
|
/* @__PURE__ */ i.jsx(
|
|
32412
32458
|
Qe,
|
|
32413
32459
|
{
|
|
32414
32460
|
value: d,
|
|
32415
|
-
onChange: (
|
|
32416
|
-
placeholder: "
|
|
32461
|
+
onChange: (g) => f(g.target.value),
|
|
32462
|
+
placeholder: "project: meyiconnect, env: dev",
|
|
32417
32463
|
disabled: n,
|
|
32418
|
-
className: "font-mono"
|
|
32464
|
+
className: "font-mono text-xs"
|
|
32419
32465
|
}
|
|
32420
|
-
)
|
|
32466
|
+
),
|
|
32467
|
+
/* @__PURE__ */ i.jsx("p", { className: "text-[11px] text-muted-foreground", children: "Format: key: value, key: value" })
|
|
32421
32468
|
] })
|
|
32422
32469
|
] }),
|
|
32423
32470
|
/* @__PURE__ */ i.jsxs(Vt, { children: [
|
|
@@ -32568,11 +32615,21 @@ const TY = (e) => [
|
|
|
32568
32615
|
}
|
|
32569
32616
|
},
|
|
32570
32617
|
{
|
|
32571
|
-
|
|
32572
|
-
header: ({ column: t }) => /* @__PURE__ */ i.jsx(mt, { column: t, title: "
|
|
32618
|
+
id: "tags",
|
|
32619
|
+
header: ({ column: t }) => /* @__PURE__ */ i.jsx(mt, { column: t, title: "Tags" }),
|
|
32573
32620
|
cell: ({ row: t }) => {
|
|
32574
|
-
const n = t.
|
|
32575
|
-
return
|
|
32621
|
+
const n = t.original.tags || {}, r = Object.entries(n);
|
|
32622
|
+
return r.length === 0 ? /* @__PURE__ */ i.jsx("span", { className: "text-muted-foreground", children: "—" }) : /* @__PURE__ */ i.jsxs("div", { className: "flex flex-wrap gap-1 max-w-[200px]", children: [
|
|
32623
|
+
r.slice(0, 2).map(([a, s]) => /* @__PURE__ */ i.jsxs("span", { className: "text-[11px] bg-muted px-1.5 py-0.5 rounded font-mono truncate", children: [
|
|
32624
|
+
a,
|
|
32625
|
+
":",
|
|
32626
|
+
s
|
|
32627
|
+
] }, a)),
|
|
32628
|
+
r.length > 2 && /* @__PURE__ */ i.jsxs("span", { className: "text-[10px] text-muted-foreground self-center", children: [
|
|
32629
|
+
"+",
|
|
32630
|
+
r.length - 2
|
|
32631
|
+
] })
|
|
32632
|
+
] });
|
|
32576
32633
|
}
|
|
32577
32634
|
},
|
|
32578
32635
|
{
|
|
@@ -33019,19 +33076,15 @@ function DY({ alert: e }) {
|
|
|
33019
33076
|
/* @__PURE__ */ i.jsx("span", { children: new Date(e.createdAt).toLocaleString() })
|
|
33020
33077
|
] }),
|
|
33021
33078
|
/* @__PURE__ */ i.jsxs("div", { className: "im-inc-meta-row", children: [
|
|
33022
|
-
/* @__PURE__ */ i.jsx("span", { children: "Project Tag" }),
|
|
33023
|
-
/* @__PURE__ */ i.jsx("span", { children: e.projectTag ? /* @__PURE__ */ i.jsx("span", { className: "im-inc-label-chip", children: e.projectTag }) : "—" })
|
|
33024
|
-
] }),
|
|
33025
|
-
a && /* @__PURE__ */ i.jsxs("div", { className: "im-inc-meta-row", children: [
|
|
33026
33079
|
/* @__PURE__ */ i.jsx("span", { children: "Tags" }),
|
|
33027
|
-
/* @__PURE__ */ i.jsx("div", { className: "flex flex-wrap gap-1.5 justify-end", children: Object.entries(r).map(([s, o]) => /* @__PURE__ */ i.jsxs("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs bg-secondary text-secondary-foreground font-mono", children: [
|
|
33080
|
+
a ? /* @__PURE__ */ i.jsx("div", { className: "flex flex-wrap gap-1.5 justify-end", children: Object.entries(r).map(([s, o]) => /* @__PURE__ */ i.jsxs("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs bg-secondary text-secondary-foreground font-mono", children: [
|
|
33028
33081
|
/* @__PURE__ */ i.jsxs("span", { className: "text-muted-foreground mr-1", children: [
|
|
33029
33082
|
s,
|
|
33030
33083
|
":"
|
|
33031
33084
|
] }),
|
|
33032
33085
|
" ",
|
|
33033
33086
|
String(o)
|
|
33034
|
-
] }, s)) })
|
|
33087
|
+
] }, s)) }) : /* @__PURE__ */ i.jsx("span", { children: "—" })
|
|
33035
33088
|
] }),
|
|
33036
33089
|
e.additionalConfiguration?.groupName && /* @__PURE__ */ i.jsxs("div", { className: "im-inc-meta-row", children: [
|
|
33037
33090
|
/* @__PURE__ */ i.jsx("span", { children: "Group Name" }),
|
|
@@ -33154,7 +33207,7 @@ function jY({
|
|
|
33154
33207
|
const B = await Rr.create({
|
|
33155
33208
|
title: `SOP: ${a.alertName}`,
|
|
33156
33209
|
alertType: a.resourceType,
|
|
33157
|
-
service: a.
|
|
33210
|
+
service: a.tags?.project || a.tags?.service || void 0,
|
|
33158
33211
|
status: "generating",
|
|
33159
33212
|
alert_id: a.id,
|
|
33160
33213
|
alert_name: a.alertName,
|
|
@@ -81,7 +81,7 @@ export declare const insightService: {
|
|
|
81
81
|
resourceName: string;
|
|
82
82
|
resourceType: string;
|
|
83
83
|
downMessage?: string;
|
|
84
|
-
|
|
84
|
+
tags?: Record<string, string>;
|
|
85
85
|
downTime?: string;
|
|
86
86
|
alertId?: string | null;
|
|
87
87
|
assigneeIds?: string[];
|
|
@@ -95,7 +95,7 @@ export declare const insightService: {
|
|
|
95
95
|
updateIncident: (id: string, data: {
|
|
96
96
|
name?: string;
|
|
97
97
|
downMessage?: string;
|
|
98
|
-
|
|
98
|
+
tags?: Record<string, string>;
|
|
99
99
|
downTime?: string;
|
|
100
100
|
status?: string;
|
|
101
101
|
statusMessage?: string;
|
|
@@ -146,7 +146,7 @@ export declare const insightService: {
|
|
|
146
146
|
alertName?: string;
|
|
147
147
|
description?: string;
|
|
148
148
|
severity?: string;
|
|
149
|
-
|
|
149
|
+
tags?: Record<string, string>;
|
|
150
150
|
}) => Promise<any>;
|
|
151
151
|
deleteAlert(id: string): Promise<any>;
|
|
152
152
|
listSources: (params?: {
|
package/dist/types.d.ts
CHANGED
|
@@ -413,7 +413,6 @@ export type InsightAlert = {
|
|
|
413
413
|
resourceName: string;
|
|
414
414
|
resourceType: string;
|
|
415
415
|
accountId?: string | null;
|
|
416
|
-
projectTag?: string;
|
|
417
416
|
tags?: Record<string, string>;
|
|
418
417
|
severity: InsightAlertSeverity;
|
|
419
418
|
alertName: string;
|
|
@@ -483,7 +482,7 @@ export type InsightIncident = {
|
|
|
483
482
|
resourceType: string;
|
|
484
483
|
downMessage?: string;
|
|
485
484
|
description?: string | null;
|
|
486
|
-
|
|
485
|
+
tags?: Record<string, string>;
|
|
487
486
|
downTime: string | null;
|
|
488
487
|
accountId?: string | null;
|
|
489
488
|
resolvedAt?: string;
|