react-semaphor 0.1.314 → 0.1.316
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/brand-studio/index.js +65 -65
- package/dist/briefings/index.cjs +1 -0
- package/dist/briefings/index.js +848 -0
- package/dist/chunks/{braces-CWi8x9ww.js → braces-CDPz6CF2.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-D70CuT-1.js → calendar-preferences-dialog-9NlFzHX8.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-BzpQ5u4h.js → calendar-preferences-dialog-BDdxi7Xm.js} +1 -1
- package/dist/chunks/{chevrons-up-down-B2viXO2I.js → chevrons-up-down-BsdQRmJL.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-5fM_KJoT.js +7321 -0
- package/dist/chunks/dashboard-briefing-launcher-CVxLt10p.js +96 -0
- package/dist/chunks/dashboard-controls-9YV-D1tD.js +2009 -0
- package/dist/chunks/dashboard-controls-UR_m0wD1.js +57 -0
- package/dist/chunks/{dashboard-json-CJCAen1R.js → dashboard-json-CKPID8Am.js} +2 -2
- package/dist/chunks/{dashboard-json-v2C6Tmqf.js → dashboard-json-ws4tortP.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-CmxnZI8I.js +178 -0
- package/dist/chunks/{edit-dashboard-visual-DljWvnMy.js → edit-dashboard-visual-ifKJLMTS.js} +807 -822
- package/dist/chunks/index-Xdag_85e.js +1298 -0
- package/dist/chunks/{index-P5hPTTzm.js → index-gcA9Rs35.js} +41178 -46390
- package/dist/chunks/{palette-CIuwlEiG.js → palette-BlxLchHy.js} +1 -1
- package/dist/chunks/{resource-management-panel-CAxXzMdi.js → resource-management-panel-BduJanWW.js} +1 -1
- package/dist/chunks/{resource-management-panel-Dk0DzgVm.js → resource-management-panel-paSAzVj2.js} +81 -81
- package/dist/chunks/{save-_ALpoMy6.js → save-DVRQBMeb.js} +1 -1
- package/dist/chunks/{switch-B6fh8nb-.js → switch-sauemjyY.js} +199 -199
- package/dist/chunks/{use-create-flow-overlay-state-Cqf7GaFm.js → use-create-flow-overlay-state-DKV6tIc5.js} +254 -225
- package/dist/chunks/use-create-flow-overlay-state-DWnzVVlP.js +26 -0
- package/dist/chunks/{use-visual-utils-CQQ3jvDn.js → use-visual-utils-C8PDxg2w.js} +1 -1
- package/dist/chunks/{use-visual-utils-CPMQLBYR.js → use-visual-utils-Cs0-baCK.js} +48 -48
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +232 -485
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings.d.ts +240 -0
- package/dist/types/dashboard.d.ts +1 -0
- package/dist/types/main.d.ts +619 -1017
- package/dist/types/surfboard.d.ts +1 -0
- package/dist/types/types.d.ts +411 -261
- package/package.json +7 -2
- package/dist/chunks/dashboard-controls-BS_aZcxs.js +0 -57
- package/dist/chunks/dashboard-controls-DbKtbw1V.js +0 -2021
- package/dist/chunks/dashboard-filter-controls-launcher-C8Wm2Smj.js +0 -1540
- package/dist/chunks/dashboard-filter-controls-launcher-CMXpudFJ.js +0 -11
- package/dist/chunks/edit-dashboard-visual-lRn3FeaP.js +0 -183
- package/dist/chunks/index-XYIIY48z.js +0 -1330
- package/dist/chunks/use-create-flow-overlay-state-DMZTflFt.js +0 -16
package/dist/index.js
CHANGED
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import { C as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import * as
|
|
9
|
-
import { useMemo as
|
|
10
|
-
import { ResourceManagementPanel as
|
|
11
|
-
import { DEFAULT_CALENDAR_CONTEXT as
|
|
12
|
-
import { u as
|
|
1
|
+
import { E as T, F as S, S as B, p as P, U as _, q as w, r as F, s as x, t as R, v as I, C as M, h as L, I as k, w as U, i as O, j as z, k as V, l as q } from "./chunks/index-gcA9Rs35.js";
|
|
2
|
+
import { T as ua, D as ca, P as fa, M as ma, a7 as pa, z as ha, G as ga, G as Ca, H as Ea, Q as Da, a as xa, a6 as Ta, a2 as ya, O as ba, N as va, aa as Aa, a5 as Na, a4 as Sa, a3 as Ba, a9 as Pa, a8 as _a, $ as wa, Y as Fa, L as Ra, W as Ia, K as Ma, y as La, V as ka, X as Ua, A as Oa, a1 as za, _ as Va, Z as qa, a0 as Ha, x as Wa, J as ja, B as Ga } from "./chunks/index-gcA9Rs35.js";
|
|
3
|
+
import { a as Ka, C as Xa, D as Ya, E as $a, P as Ja, g as Za, d as ae, h as ee, b as se, c as re, i as oe } from "./chunks/common-types-4bjoIgvm.js";
|
|
4
|
+
import { C as ne } from "./chunks/calendar-preferences-dialog-9NlFzHX8.js";
|
|
5
|
+
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
6
|
+
import { u as H, P as W, b as j, B as G, a as C, g as Q, d as K, e as X } from "./chunks/switch-sauemjyY.js";
|
|
7
|
+
import { F as le, q as de, h as ue, i as ce, k as fe, s as me, r as pe, w as he, x as ge, p as Ce, j as Ee, o as De, t as xe, n as Te, m as ye, l as be, y as ve, v as Ae, z as Ne, D as Se, A as Be, E as Pe, H as _e, G as we } from "./chunks/switch-sauemjyY.js";
|
|
8
|
+
import * as m from "react";
|
|
9
|
+
import { useMemo as Y, useEffect as y } from "react";
|
|
10
|
+
import { ResourceManagementPanel as Re } from "./chunks/resource-management-panel-paSAzVj2.js";
|
|
11
|
+
import { DEFAULT_CALENDAR_CONTEXT as Me, DEFAULT_SEMANTIC_DOMAIN_ACCESS as Le } from "./types/index.js";
|
|
12
|
+
import { u as Ue } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
|
|
13
13
|
import "react-dom";
|
|
14
14
|
import "./chunks/index-CJdxSyQq.js";
|
|
15
|
-
import { A as
|
|
16
|
-
import { n as
|
|
17
|
-
function
|
|
18
|
-
const { displayPreferences:
|
|
19
|
-
...
|
|
20
|
-
id:
|
|
15
|
+
import { A as ze, I as Ve, B as qe, J as He, D as We, d as je, e as Ge, c as Qe, a as Ke, E as Xe, N as Ye, U as $e, V as Je, W as Ze, z as as, F as es, G as ss, C as rs, t as os, h as ts, y as ns, j as is, v as ls, g as ds, w as us, x as cs, o as fs, s as ms, q as ps, f as hs, l as gs, p as Cs, m as Es, r as Ds, k as xs, n as Ts, i as ys, u as bs, b as vs, H as As } from "./chunks/dashboard-briefing-launcher-5fM_KJoT.js";
|
|
16
|
+
import { n as Ss, s as Bs } from "./chunks/normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
17
|
+
function oa(e) {
|
|
18
|
+
const { displayPreferences: s, cardId: t, ...l } = e, r = {
|
|
19
|
+
...l,
|
|
20
|
+
id: e.dashboardId
|
|
21
21
|
// override the id to the dashboard id so that the dashboard is not loaded
|
|
22
22
|
};
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ a(T, { FallbackComponent: S, children: /* @__PURE__ */ d(B, { dashboardProps: r, children: [
|
|
24
|
+
/* @__PURE__ */ a(P, { componentType: "visual", componentId: e.cardId }),
|
|
25
|
+
/* @__PURE__ */ a(_, { appearance: e.appearance, children: /* @__PURE__ */ a(w, { displayPreferences: s, children: /* @__PURE__ */ a(F, { type: "visual", cardId: t, ...r, children: /* @__PURE__ */ a($, { cardId: t }) }) }) })
|
|
26
26
|
] }) });
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
var
|
|
31
|
-
return (
|
|
32
|
-
}), { card:
|
|
33
|
-
const
|
|
34
|
-
(
|
|
35
|
-
var
|
|
36
|
-
return (
|
|
28
|
+
function $({ cardId: e }) {
|
|
29
|
+
const s = H((r) => {
|
|
30
|
+
var n;
|
|
31
|
+
return (n = r.dashboard) == null ? void 0 : n.sheets;
|
|
32
|
+
}), { card: t, frame: l } = Y(() => {
|
|
33
|
+
const r = s == null ? void 0 : s.flatMap((o) => o.frames), n = r == null ? void 0 : r.flatMap((o) => o == null ? void 0 : o.cards), p = n == null ? void 0 : n.find((o) => (o == null ? void 0 : o.id) === e), h = r == null ? void 0 : r.find(
|
|
34
|
+
(o) => {
|
|
35
|
+
var f;
|
|
36
|
+
return (f = o == null ? void 0 : o.cards) == null ? void 0 : f.find((u) => (u == null ? void 0 : u.id) === e);
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
|
-
return { card:
|
|
40
|
-
}, [
|
|
41
|
-
return !
|
|
42
|
-
|
|
39
|
+
return { card: p, frame: h };
|
|
40
|
+
}, [s, e]);
|
|
41
|
+
return !t || !l ? /* @__PURE__ */ a(
|
|
42
|
+
x,
|
|
43
43
|
{
|
|
44
44
|
error: new Error("Card not found"),
|
|
45
45
|
resetErrorBoundary: () => {
|
|
46
46
|
},
|
|
47
|
-
customerFacingMessage: `Card not found with ID: ${
|
|
47
|
+
customerFacingMessage: `Card not found with ID: ${e}`
|
|
48
48
|
}
|
|
49
|
-
) : /* @__PURE__ */
|
|
50
|
-
|
|
49
|
+
) : /* @__PURE__ */ a("main", { className: "flex h-full grow flex-col", children: /* @__PURE__ */ a(
|
|
50
|
+
T,
|
|
51
51
|
{
|
|
52
52
|
FallbackComponent: ({
|
|
53
|
-
error:
|
|
54
|
-
resetErrorBoundary:
|
|
55
|
-
}) => /* @__PURE__ */
|
|
56
|
-
|
|
53
|
+
error: r,
|
|
54
|
+
resetErrorBoundary: n
|
|
55
|
+
}) => /* @__PURE__ */ a(
|
|
56
|
+
x,
|
|
57
57
|
{
|
|
58
|
-
error:
|
|
59
|
-
resetErrorBoundary:
|
|
58
|
+
error: r,
|
|
59
|
+
resetErrorBoundary: n,
|
|
60
60
|
customerFacingMessage: "Error creating visual. Please try again."
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ a(R, { card: t, frame: l })
|
|
64
64
|
}
|
|
65
65
|
) });
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, [
|
|
67
|
+
function ta(e, s, t, l) {
|
|
68
|
+
y(() => {
|
|
69
|
+
e && !t && s && l(I(s));
|
|
70
|
+
}, [e, t, s, l]);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
name:
|
|
74
|
-
items:
|
|
75
|
-
value:
|
|
76
|
-
onChange:
|
|
77
|
-
isLoading:
|
|
78
|
-
isError:
|
|
79
|
-
refetch:
|
|
80
|
-
className:
|
|
81
|
-
icon:
|
|
82
|
-
showNone:
|
|
72
|
+
function na({
|
|
73
|
+
name: e,
|
|
74
|
+
items: s,
|
|
75
|
+
value: t,
|
|
76
|
+
onChange: l,
|
|
77
|
+
isLoading: r,
|
|
78
|
+
isError: n,
|
|
79
|
+
refetch: p,
|
|
80
|
+
className: h,
|
|
81
|
+
icon: o,
|
|
82
|
+
showNone: f = !1
|
|
83
83
|
}) {
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
const u = m.useRef(null), [E, D] = m.useState(!1), [b, v] = m.useState("100%"), g = f ? [...s || [], { id: "none", name: "None" }] : s;
|
|
85
|
+
m.useLayoutEffect(() => {
|
|
86
|
+
u.current && v(u.current.offsetWidth);
|
|
87
87
|
}, []);
|
|
88
|
-
function
|
|
89
|
-
var
|
|
90
|
-
return
|
|
88
|
+
function A() {
|
|
89
|
+
var i;
|
|
90
|
+
return r ? "Loading..." : n ? "Error" : t ? (i = s == null ? void 0 : s.find((c) => c.id === t)) == null ? void 0 : i.name : `Select ${e}`;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
92
|
+
function N(i, c) {
|
|
93
|
+
l(c), D(!1);
|
|
94
94
|
}
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
|
|
95
|
+
return /* @__PURE__ */ d(W, { open: E, onOpenChange: D, children: [
|
|
96
|
+
/* @__PURE__ */ a(j, { asChild: !0, children: /* @__PURE__ */ d(
|
|
97
|
+
G,
|
|
98
98
|
{
|
|
99
|
-
ref:
|
|
99
|
+
ref: u,
|
|
100
100
|
variant: "outline",
|
|
101
101
|
role: "combobox",
|
|
102
|
-
"aria-expanded":
|
|
103
|
-
className:
|
|
102
|
+
"aria-expanded": E,
|
|
103
|
+
className: C("flex h-9 w-full justify-between", h),
|
|
104
104
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
|
|
107
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
106
|
+
o && /* @__PURE__ */ a("div", { className: "mr-2", children: o }),
|
|
107
|
+
/* @__PURE__ */ a("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: A() })
|
|
108
108
|
] }),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ a(Q, { className: "size-4 opacity-50" })
|
|
110
110
|
]
|
|
111
111
|
}
|
|
112
112
|
) }),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
|
|
113
|
+
/* @__PURE__ */ a(
|
|
114
|
+
K,
|
|
115
115
|
{
|
|
116
116
|
className: "w-full p-0",
|
|
117
|
-
style: { minWidth:
|
|
118
|
-
children: /* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
|
|
117
|
+
style: { minWidth: b },
|
|
118
|
+
children: /* @__PURE__ */ d(M, { children: [
|
|
119
|
+
/* @__PURE__ */ d("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
|
|
120
|
+
/* @__PURE__ */ a(L, { className: "h-9", placeholder: "Search..." }),
|
|
121
|
+
/* @__PURE__ */ a(k, { className: "h-7", onClick: p, children: /* @__PURE__ */ a(
|
|
122
|
+
U,
|
|
123
123
|
{
|
|
124
|
-
className:
|
|
124
|
+
className: C(
|
|
125
125
|
"size-3.5 opacity-50",
|
|
126
|
-
|
|
126
|
+
r && "animate-spin"
|
|
127
127
|
)
|
|
128
128
|
}
|
|
129
129
|
) })
|
|
130
130
|
] }),
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ d(O, { children: [
|
|
132
|
+
/* @__PURE__ */ d(z, { children: [
|
|
133
133
|
"No ",
|
|
134
|
-
|
|
134
|
+
e == null ? void 0 : e.toLowerCase(),
|
|
135
135
|
" found."
|
|
136
136
|
] }),
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
137
|
+
/* @__PURE__ */ a(V, { children: g == null ? void 0 : g.map((i) => /* @__PURE__ */ a(
|
|
138
|
+
q,
|
|
139
139
|
{
|
|
140
140
|
className: "overflow-x-auto",
|
|
141
|
-
value:
|
|
142
|
-
onSelect: (
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
|
|
141
|
+
value: i.name,
|
|
142
|
+
onSelect: (c) => N(c, i.id),
|
|
143
|
+
children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
144
|
+
/* @__PURE__ */ a(
|
|
145
|
+
X,
|
|
146
146
|
{
|
|
147
|
-
className:
|
|
147
|
+
className: C(
|
|
148
148
|
"size-4",
|
|
149
|
-
|
|
149
|
+
t === i.id ? "opacity-100" : "opacity-0"
|
|
150
150
|
)
|
|
151
151
|
}
|
|
152
152
|
),
|
|
153
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ a("div", { title: i.name, children: i.name })
|
|
154
154
|
] })
|
|
155
155
|
},
|
|
156
|
-
|
|
156
|
+
i.id
|
|
157
157
|
)) })
|
|
158
158
|
] })
|
|
159
159
|
] })
|
|
@@ -161,391 +161,138 @@ function Ie({
|
|
|
161
161
|
)
|
|
162
162
|
] });
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}) {
|
|
168
|
-
const [n, o] = P(!1), i = L((u) => {
|
|
169
|
-
var s;
|
|
170
|
-
return (s = u.dashboard) == null ? void 0 : s.id;
|
|
171
|
-
}), c = L((u) => {
|
|
172
|
-
var s;
|
|
173
|
-
return (s = u.dashboard) == null ? void 0 : s.title;
|
|
174
|
-
});
|
|
175
|
-
return i ? /* @__PURE__ */ r(pe, { children: [
|
|
176
|
-
/* @__PURE__ */ e(
|
|
177
|
-
Q,
|
|
178
|
-
{
|
|
179
|
-
tooltip: "Schedule Dashboard",
|
|
180
|
-
className: _("h-7 p-2", a),
|
|
181
|
-
buttonProps: { variant: t },
|
|
182
|
-
onClick: () => o(!0),
|
|
183
|
-
children: /* @__PURE__ */ e(ie, { className: "size-4" })
|
|
184
|
-
}
|
|
185
|
-
),
|
|
186
|
-
/* @__PURE__ */ e(
|
|
187
|
-
le,
|
|
188
|
-
{
|
|
189
|
-
open: n,
|
|
190
|
-
onOpenChange: o,
|
|
191
|
-
dashboardId: i,
|
|
192
|
-
dashboardName: c
|
|
193
|
-
}
|
|
194
|
-
)
|
|
195
|
-
] }) : null;
|
|
196
|
-
}
|
|
197
|
-
function Pe(a) {
|
|
198
|
-
const { authToken: t, tokenProps: n } = W();
|
|
199
|
-
return de({
|
|
200
|
-
mutationFn: async (o) => ce(
|
|
201
|
-
n.apiServiceUrl,
|
|
202
|
-
t.accessToken,
|
|
203
|
-
a,
|
|
204
|
-
o
|
|
205
|
-
)
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
function Fe(a, t) {
|
|
209
|
-
F(() => (a && t && (window.__SEMAPHOR_PRINT_STATE__ = {
|
|
210
|
-
...t
|
|
164
|
+
function ia(e, s) {
|
|
165
|
+
y(() => (e && s && (window.__SEMAPHOR_PRINT_STATE__ = {
|
|
166
|
+
...s
|
|
211
167
|
}), () => {
|
|
212
|
-
|
|
213
|
-
}), [
|
|
214
|
-
}
|
|
215
|
-
function I(a) {
|
|
216
|
-
if (!a) return "--";
|
|
217
|
-
const t = new Date(a);
|
|
218
|
-
return Number.isNaN(t.getTime()) ? "--" : t.toLocaleString();
|
|
219
|
-
}
|
|
220
|
-
function Ce(a) {
|
|
221
|
-
var t;
|
|
222
|
-
return ((t = a.alertState) == null ? void 0 : t.currentState) === "FIRING" ? "Signal surfaced" : a.status === "ACTIVE" ? "Watching" : a.status === "PAUSED" ? "Paused" : a.status;
|
|
223
|
-
}
|
|
224
|
-
function ke({ alertId: a, onBack: t }) {
|
|
225
|
-
var h, v, U, O;
|
|
226
|
-
const { authToken: n, tokenProps: o } = W(), { data: i, isLoading: c, refetch: u } = ue(a), s = (i == null ? void 0 : i.alert) ?? null, [l, m] = P([]), [g, y] = P([]), [x, C] = P(null), A = M(async () => {
|
|
227
|
-
var f;
|
|
228
|
-
const d = o == null ? void 0 : o.apiServiceUrl, p = n == null ? void 0 : n.accessToken;
|
|
229
|
-
if (!d || !p || !a) return null;
|
|
230
|
-
try {
|
|
231
|
-
const S = await fetch(`${d}/v1/alerts/${a}/runs?limit=20`, {
|
|
232
|
-
headers: { Authorization: `Bearer ${p}` }
|
|
233
|
-
});
|
|
234
|
-
if (S.ok) {
|
|
235
|
-
const D = await S.json(), b = Array.isArray(D.runs) ? D.runs : [], z = x && b.some(($) => $.id === x) ? x : ((f = b[0]) == null ? void 0 : f.id) ?? null;
|
|
236
|
-
return y(b), C(z), z;
|
|
237
|
-
}
|
|
238
|
-
y([]), C(null);
|
|
239
|
-
} catch {
|
|
240
|
-
return y([]), C(null), null;
|
|
241
|
-
}
|
|
242
|
-
return null;
|
|
243
|
-
}, [a, n, x, o]), N = M(async (d) => {
|
|
244
|
-
const p = o == null ? void 0 : o.apiServiceUrl, f = n == null ? void 0 : n.accessToken, S = d ?? x;
|
|
245
|
-
if (!p || !f || !a || !S) {
|
|
246
|
-
m([]);
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
try {
|
|
250
|
-
const D = await fetch(
|
|
251
|
-
`${p}/v1/alerts/${a}/runs/${S}/deliveries`,
|
|
252
|
-
{
|
|
253
|
-
headers: { Authorization: `Bearer ${f}` }
|
|
254
|
-
}
|
|
255
|
-
);
|
|
256
|
-
if (D.ok) {
|
|
257
|
-
const b = await D.json();
|
|
258
|
-
m(Array.isArray(b.attempts) ? b.attempts : []);
|
|
259
|
-
} else
|
|
260
|
-
m([]);
|
|
261
|
-
} catch {
|
|
262
|
-
m([]);
|
|
263
|
-
}
|
|
264
|
-
}, [a, n, x, o]), k = M(async () => {
|
|
265
|
-
await u();
|
|
266
|
-
const d = await A();
|
|
267
|
-
await N(d);
|
|
268
|
-
}, [N, A, u]);
|
|
269
|
-
F(() => {
|
|
270
|
-
A().catch(() => {
|
|
271
|
-
});
|
|
272
|
-
}, [A]), F(() => {
|
|
273
|
-
N().catch(() => {
|
|
274
|
-
});
|
|
275
|
-
}, [N]);
|
|
276
|
-
const w = V(() => {
|
|
277
|
-
const d = {};
|
|
278
|
-
for (const p of l)
|
|
279
|
-
d[p.channel] || (d[p.channel] = []), d[p.channel].push(p);
|
|
280
|
-
return d;
|
|
281
|
-
}, [l]);
|
|
282
|
-
return c ? /* @__PURE__ */ e("div", { className: "p-4 text-sm text-muted-foreground", children: "Loading signal detail..." }) : s ? /* @__PURE__ */ r("div", { className: "space-y-4 p-4", children: [
|
|
283
|
-
/* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
|
|
284
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
285
|
-
t && /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: t, children: "Back" }),
|
|
286
|
-
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: s.name }),
|
|
287
|
-
/* @__PURE__ */ e(E, { variant: s.status === "ACTIVE" ? "default" : "secondary", children: Ce(s) }),
|
|
288
|
-
((h = s.alertState) == null ? void 0 : h.currentState) && /* @__PURE__ */ e(E, { variant: s.alertState.currentState === "FIRING" ? "destructive" : "outline", children: s.alertState.currentState === "FIRING" ? "Signal surfaced" : "Stable" })
|
|
289
|
-
] }),
|
|
290
|
-
/* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: () => void k(), children: "Refresh" })
|
|
291
|
-
] }),
|
|
292
|
-
s.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: s.description }),
|
|
293
|
-
/* @__PURE__ */ r("div", { className: "rounded-md border bg-muted/30 p-4 text-sm", children: [
|
|
294
|
-
/* @__PURE__ */ e("p", { className: "font-medium", children: "What changed" }),
|
|
295
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-muted-foreground", children: "Review the latest signal activity, then investigate the underlying dashboard context if you need more detail." })
|
|
296
|
-
] }),
|
|
297
|
-
/* @__PURE__ */ r("div", { className: "rounded-md border bg-background p-4 space-y-2", children: [
|
|
298
|
-
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Signal Watch" }),
|
|
299
|
-
/* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2 text-sm", children: [
|
|
300
|
-
/* @__PURE__ */ r("div", { children: [
|
|
301
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Watching for:" }),
|
|
302
|
-
" ",
|
|
303
|
-
me(s.jobConfig.operator, s.jobConfig.threshold)
|
|
304
|
-
] }),
|
|
305
|
-
/* @__PURE__ */ r("div", { children: [
|
|
306
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Severity:" }),
|
|
307
|
-
" ",
|
|
308
|
-
s.jobConfig.severity
|
|
309
|
-
] }),
|
|
310
|
-
/* @__PURE__ */ r("div", { children: [
|
|
311
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Last Evaluated:" }),
|
|
312
|
-
" ",
|
|
313
|
-
I((v = s.alertState) == null ? void 0 : v.lastEvaluatedAt)
|
|
314
|
-
] }),
|
|
315
|
-
/* @__PURE__ */ r("div", { children: [
|
|
316
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Last Surfaced:" }),
|
|
317
|
-
" ",
|
|
318
|
-
I((U = s.alertState) == null ? void 0 : U.lastTriggeredAt)
|
|
319
|
-
] })
|
|
320
|
-
] })
|
|
321
|
-
] }),
|
|
322
|
-
((O = s.deliveryConfig) == null ? void 0 : O.channels) && s.deliveryConfig.channels.length > 0 && /* @__PURE__ */ r("div", { className: "rounded-md border bg-background p-4 space-y-2", children: [
|
|
323
|
-
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Where It Surfaces" }),
|
|
324
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: s.deliveryConfig.channels.map((d) => /* @__PURE__ */ e(E, { variant: "outline", children: d }, d)) })
|
|
325
|
-
] }),
|
|
326
|
-
g.length > 0 && /* @__PURE__ */ r("div", { className: "rounded-md border bg-background p-4 space-y-3", children: [
|
|
327
|
-
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Recent Delivery Activity" }),
|
|
328
|
-
g.length > 1 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: g.map((d) => /* @__PURE__ */ e(
|
|
329
|
-
T,
|
|
330
|
-
{
|
|
331
|
-
variant: d.id === x ? "default" : "outline",
|
|
332
|
-
size: "sm",
|
|
333
|
-
onClick: () => C(d.id),
|
|
334
|
-
children: I(d.scheduledFor)
|
|
335
|
-
},
|
|
336
|
-
d.id
|
|
337
|
-
)) }),
|
|
338
|
-
Object.keys(w).length === 0 ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No delivery attempts were recorded for this run." }) : Object.entries(w).map(([d, p]) => /* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
339
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(E, { variant: "secondary", className: "text-xs", children: d }) }),
|
|
340
|
-
/* @__PURE__ */ e("div", { className: "overflow-hidden rounded border", children: /* @__PURE__ */ r("table", { className: "w-full text-xs", children: [
|
|
341
|
-
/* @__PURE__ */ e("thead", { className: "bg-muted/40", children: /* @__PURE__ */ r("tr", { children: [
|
|
342
|
-
/* @__PURE__ */ e("th", { className: "px-2 py-1 text-left font-medium", children: "Recipient" }),
|
|
343
|
-
/* @__PURE__ */ e("th", { className: "px-2 py-1 text-left font-medium", children: "Status" }),
|
|
344
|
-
/* @__PURE__ */ e("th", { className: "px-2 py-1 text-left font-medium", children: "Time" }),
|
|
345
|
-
/* @__PURE__ */ e("th", { className: "px-2 py-1 text-left font-medium", children: "Error" })
|
|
346
|
-
] }) }),
|
|
347
|
-
/* @__PURE__ */ e("tbody", { children: p.map((f) => /* @__PURE__ */ r("tr", { className: "border-t", children: [
|
|
348
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1", children: f.recipient }),
|
|
349
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1", children: /* @__PURE__ */ e(
|
|
350
|
-
E,
|
|
351
|
-
{
|
|
352
|
-
variant: f.status === "SENT" ? "default" : "destructive",
|
|
353
|
-
className: "text-[10px]",
|
|
354
|
-
children: f.status
|
|
355
|
-
}
|
|
356
|
-
) }),
|
|
357
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1", children: I(f.createdAt) }),
|
|
358
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1 text-muted-foreground", children: f.error || "--" })
|
|
359
|
-
] }, f.id)) })
|
|
360
|
-
] }) })
|
|
361
|
-
] }, d))
|
|
362
|
-
] })
|
|
363
|
-
] }) : /* @__PURE__ */ e("div", { className: "p-4 text-sm text-muted-foreground", children: "Signal not found." });
|
|
364
|
-
}
|
|
365
|
-
function Me() {
|
|
366
|
-
var c, u;
|
|
367
|
-
const { quotasQuery: a, usageQuery: t } = he(), n = ((c = a.data) == null ? void 0 : c.quotas) || [], o = ((u = t.data) == null ? void 0 : u.usage) || [], i = new Map(o.map((s) => [s.tenantId || "org", s]));
|
|
368
|
-
return /* @__PURE__ */ r("div", { className: "space-y-4 p-4", children: [
|
|
369
|
-
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
|
|
370
|
-
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold", children: "Alert Quotas" }),
|
|
371
|
-
/* @__PURE__ */ e(
|
|
372
|
-
T,
|
|
373
|
-
{
|
|
374
|
-
variant: "outline",
|
|
375
|
-
size: "sm",
|
|
376
|
-
onClick: () => {
|
|
377
|
-
a.refetch(), t.refetch();
|
|
378
|
-
},
|
|
379
|
-
children: "Refresh"
|
|
380
|
-
}
|
|
381
|
-
)
|
|
382
|
-
] }),
|
|
383
|
-
a.isLoading || t.isLoading ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Loading quota usage..." }) : null,
|
|
384
|
-
/* @__PURE__ */ e("div", { className: "overflow-hidden rounded-lg border", children: /* @__PURE__ */ r("table", { className: "w-full text-sm", children: [
|
|
385
|
-
/* @__PURE__ */ e("thead", { className: "bg-muted/40", children: /* @__PURE__ */ r("tr", { children: [
|
|
386
|
-
/* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Tenant" }),
|
|
387
|
-
/* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Active Alerts" }),
|
|
388
|
-
/* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Max Active" }),
|
|
389
|
-
/* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Min Cadence" }),
|
|
390
|
-
/* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Max Context Sources" })
|
|
391
|
-
] }) }),
|
|
392
|
-
/* @__PURE__ */ e("tbody", { children: n.map((s) => {
|
|
393
|
-
const l = s.tenantId || "org", m = i.get(l);
|
|
394
|
-
return /* @__PURE__ */ r("tr", { className: "border-t", children: [
|
|
395
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: l }),
|
|
396
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: (m == null ? void 0 : m.activeAlerts) ?? 0 }),
|
|
397
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: s.policy.maxActiveAlerts }),
|
|
398
|
-
/* @__PURE__ */ r("td", { className: "px-3 py-2", children: [
|
|
399
|
-
s.policy.minCadenceMinutes,
|
|
400
|
-
" min"
|
|
401
|
-
] }),
|
|
402
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: s.policy.maxContextSources })
|
|
403
|
-
] }, l);
|
|
404
|
-
}) })
|
|
405
|
-
] }) })
|
|
406
|
-
] });
|
|
168
|
+
e && window.__SEMAPHOR_PRINT_STATE__ && delete window.__SEMAPHOR_PRINT_STATE__;
|
|
169
|
+
}), [e, s]);
|
|
407
170
|
}
|
|
408
171
|
export {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
$
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
qa as useDateFilterHook,
|
|
536
|
-
qt as useDebouncedDirtyCheck,
|
|
537
|
-
Bt as useEditorActions,
|
|
538
|
-
Ka as useEditorAside,
|
|
539
|
-
jt as useEditorStore,
|
|
540
|
-
Ya as useExportActions,
|
|
541
|
-
os as useExportPolling,
|
|
542
|
-
is as useExportRecovery,
|
|
543
|
-
Xa as useExportStore,
|
|
544
|
-
Fe as useExposePrintState,
|
|
545
|
-
Ja as useInProgressExportsCount,
|
|
546
|
-
Za as useManagementStore,
|
|
547
|
-
Re as usePristineSnapshotInitializer,
|
|
548
|
-
et as useResourceManagement,
|
|
549
|
-
at as useSelectedAlertId,
|
|
550
|
-
tt as useTextFilterHook
|
|
172
|
+
ze as AdvancedModeToggle,
|
|
173
|
+
Ve as BriefingAuthor,
|
|
174
|
+
qe as BriefingsApiError,
|
|
175
|
+
Ka as CALCULATED_FIELD_ENTITY_MARKER,
|
|
176
|
+
Xa as CONTROL_CARD_DEFAULT_VALUE,
|
|
177
|
+
ne as CalendarPreferencesDialog,
|
|
178
|
+
ua as CardSummary,
|
|
179
|
+
na as Combobox,
|
|
180
|
+
Ya as DATE_FORMAT_VALUES,
|
|
181
|
+
Me as DEFAULT_CALENDAR_CONTEXT,
|
|
182
|
+
Le as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
|
|
183
|
+
ca as Dashboard,
|
|
184
|
+
He as DashboardBriefingLauncher,
|
|
185
|
+
We as DashboardControlsSettings,
|
|
186
|
+
fa as DashboardExportDialog,
|
|
187
|
+
je as DashboardFilterControlsButton,
|
|
188
|
+
Ge as DashboardFilterControlsLauncher,
|
|
189
|
+
ma as DashboardWC,
|
|
190
|
+
Qe as DocumentControlsSettings,
|
|
191
|
+
$a as EMPTY_SELECTION,
|
|
192
|
+
pa as ExportError,
|
|
193
|
+
Ke as ExportNotificationItem,
|
|
194
|
+
Xe as ExportNotificationList,
|
|
195
|
+
Ye as NotificationBell,
|
|
196
|
+
Ja as PivotMarkerEnum,
|
|
197
|
+
Re as ResourceManagementPanel,
|
|
198
|
+
ha as ResourceType,
|
|
199
|
+
B as SemaphorContextProvider,
|
|
200
|
+
ga as SemaphorDataProvider,
|
|
201
|
+
Ca as SemaphorQueryClient,
|
|
202
|
+
Ea as ShareDialog,
|
|
203
|
+
Da as SummaryCard,
|
|
204
|
+
xa as Surfboard,
|
|
205
|
+
$e as UnsavedChangesAlert,
|
|
206
|
+
oa as Visual,
|
|
207
|
+
Je as VisualEditingControls,
|
|
208
|
+
Ze as WatchDashboardButton,
|
|
209
|
+
as as applyBriefingFormPatch,
|
|
210
|
+
es as briefingFormDraftToCreateRequest,
|
|
211
|
+
ss as briefingFormDraftToUpdateRequest,
|
|
212
|
+
rs as briefingToFormDraft,
|
|
213
|
+
os as cancelBriefingRun,
|
|
214
|
+
Ta as cancelExport,
|
|
215
|
+
I as cloneDeep,
|
|
216
|
+
ts as createBriefing,
|
|
217
|
+
ns as createBriefingFormDraft,
|
|
218
|
+
le as createEmptyKpiConfig,
|
|
219
|
+
ya as createExport,
|
|
220
|
+
de as createSqlGenConfig,
|
|
221
|
+
is as deleteBriefing,
|
|
222
|
+
ls as deleteBriefingRun,
|
|
223
|
+
ba as downloadDocumentPdf,
|
|
224
|
+
va as downloadPdf,
|
|
225
|
+
ue as emitDashboardLoad,
|
|
226
|
+
ce as emitDashboardUnload,
|
|
227
|
+
fe as fmt,
|
|
228
|
+
Aa as formatFileSize,
|
|
229
|
+
ds as getBriefing,
|
|
230
|
+
us as getBriefingArtifact,
|
|
231
|
+
cs as getBriefingEvidence,
|
|
232
|
+
fs as getBriefingPreviewRun,
|
|
233
|
+
ms as getBriefingRun,
|
|
234
|
+
me as getColumnDataType,
|
|
235
|
+
Na as getDownloadUrl,
|
|
236
|
+
Sa as getExportStatus,
|
|
237
|
+
Ba as getExports,
|
|
238
|
+
Za as getFieldRuntimeColumnName,
|
|
239
|
+
pe as getFilterValueType,
|
|
240
|
+
he as getFormattedTableNameForQuery,
|
|
241
|
+
ge as getQualifiedTableName,
|
|
242
|
+
Ce as getSql,
|
|
243
|
+
ae as hasCalculatedFieldMarker,
|
|
244
|
+
ee as hasCalculatedFormulaInputs,
|
|
245
|
+
Ee as invalidateToken,
|
|
246
|
+
De as isBooleanDataType,
|
|
247
|
+
se as isCalculatedDimension,
|
|
248
|
+
re as isCalculatedField,
|
|
249
|
+
oe as isCalculatedMetric,
|
|
250
|
+
xe as isColumnInSqlGen,
|
|
251
|
+
Te as isDateDataType,
|
|
252
|
+
Pa as isExportComplete,
|
|
253
|
+
_a as isExportInProgress,
|
|
254
|
+
ye as isNumberDataType,
|
|
255
|
+
be as isTextDataType,
|
|
256
|
+
ps as listBriefingRuns,
|
|
257
|
+
hs as listBriefingTenantSummaries,
|
|
258
|
+
gs as listBriefings,
|
|
259
|
+
Ss as normalizeDashboardForDirtyCheck,
|
|
260
|
+
Cs as pauseBriefing,
|
|
261
|
+
Es as previewBriefingPlan,
|
|
262
|
+
ve as resolveDataType,
|
|
263
|
+
Ae as resolveDatamodelName,
|
|
264
|
+
Ds as resumeBriefing,
|
|
265
|
+
xs as runBriefingNow,
|
|
266
|
+
Ts as runBriefingPreview,
|
|
267
|
+
Bs as serializeDashboardForDirtyCheck,
|
|
268
|
+
ys as updateBriefing,
|
|
269
|
+
wa as useActiveExports,
|
|
270
|
+
Fa as useAddNewFrame,
|
|
271
|
+
Ra as useCard,
|
|
272
|
+
Ia as useCardSummary,
|
|
273
|
+
Ne as useCurrentActiveCard,
|
|
274
|
+
Se as useCurrentCardConfig,
|
|
275
|
+
Be as useCurrentSheetActiveCards,
|
|
276
|
+
Pe as useDashboardActions,
|
|
277
|
+
Ma as useDashboardById,
|
|
278
|
+
La as useDashboardQuery,
|
|
279
|
+
H as useDashboardStore,
|
|
280
|
+
ka as useDashboardSummary,
|
|
281
|
+
Ua as useDataColumns,
|
|
282
|
+
Oa as useDateFilterHook,
|
|
283
|
+
Ue as useDebouncedDirtyCheck,
|
|
284
|
+
_e as useEditorActions,
|
|
285
|
+
za as useEditorAside,
|
|
286
|
+
we as useEditorStore,
|
|
287
|
+
Va as useExportActions,
|
|
288
|
+
bs as useExportPolling,
|
|
289
|
+
vs as useExportRecovery,
|
|
290
|
+
qa as useExportStore,
|
|
291
|
+
ia as useExposePrintState,
|
|
292
|
+
Ha as useInProgressExportsCount,
|
|
293
|
+
Wa as useManagementStore,
|
|
294
|
+
ta as usePristineSnapshotInitializer,
|
|
295
|
+
ja as useResourceManagement,
|
|
296
|
+
Ga as useTextFilterHook,
|
|
297
|
+
As as validateBriefingFormDraft
|
|
551
298
|
};
|