react-semaphor 0.1.293 → 0.1.294
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/chunks/{braces-C7GP95Fp.js → braces-DR-GdaLC.js} +1 -1
- package/dist/chunks/{braces-BwW2HFlB.js → braces-DfDQiR3J.js} +1 -1
- package/dist/chunks/{dashboard-controls-jrkoCSY_.js → dashboard-controls-C3Z9bpYE.js} +504 -472
- package/dist/chunks/{dashboard-controls-DgUc38Tn.js → dashboard-controls-DGEVXgP5.js} +9 -9
- package/dist/chunks/dashboard-filter-controls-button-BIYT1ucX.js +11 -0
- package/dist/chunks/dashboard-filter-controls-button-DxgGUl00.js +1152 -0
- package/dist/chunks/{dashboard-json-COjT-zjQ.js → dashboard-json-BvTeHePu.js} +1 -1
- package/dist/chunks/{dashboard-json-C0NiRL-A.js → dashboard-json-DQW8TN0I.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CXqaN_zj.js → dashboard-summary-settings-dialog-BsmKiGud.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CGuFl7Xe.js → dashboard-summary-settings-dialog-q7fx3YAK.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-ChKj-Lzr.js +183 -0
- package/dist/chunks/{edit-dashboard-visual-ppdXk86H.js → edit-dashboard-visual-RVl9nbDZ.js} +2175 -2160
- package/dist/chunks/index-BlspGR07.js +1435 -0
- package/dist/chunks/{index-9z-jMqN8.js → index-DerPpfv0.js} +32720 -31308
- package/dist/chunks/{resource-management-panel-CP8cegZP.js → resource-management-panel-DnZ1rw1A.js} +64 -64
- package/dist/chunks/{resource-management-panel-os6AuEKT.js → resource-management-panel-epydPwyM.js} +1 -1
- package/dist/chunks/use-create-flow-overlay-state-Bcg4EgoD.js +21 -0
- package/dist/chunks/{use-create-flow-overlay-state-wpuqRZX5.js → use-create-flow-overlay-state-C5vdfXhM.js} +430 -425
- package/dist/chunks/use-visual-utils-D9Kknvjl.js +337 -0
- package/dist/chunks/use-visual-utils-Dw_yw9zU.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +258 -253
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard.d.ts +28 -0
- package/dist/types/main.d.ts +42 -4
- package/dist/types/shared.d.ts +3 -0
- package/dist/types/surfboard.d.ts +28 -0
- package/dist/types/types.d.ts +28 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-controls-button-B19UWmsK.js +0 -11
- package/dist/chunks/dashboard-filter-controls-button-DGH4DxJ8.js +0 -1109
- package/dist/chunks/edit-dashboard-visual-CDOz4LWO.js +0 -183
- package/dist/chunks/index-K25f5Rqr.js +0 -1435
- package/dist/chunks/use-create-flow-overlay-state-CecnMS_v.js +0 -21
- package/dist/chunks/use-visual-utils-BTfG-ppd.js +0 -1
- package/dist/chunks/use-visual-utils-BhRKGJql.js +0 -334
package/dist/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { d as j,
|
|
2
|
-
import {
|
|
3
|
-
import { CONTROL_CARD_DEFAULT_VALUE as
|
|
4
|
-
import { C as
|
|
5
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
1
|
+
import { d as j, Z as q, _ as H, $ as Q, a0 as G, a1 as K, a2 as X, a3 as Y, a4 as J, a5 as Z, u as L, a6 as O, a7 as ee, a8 as ae, P as te, k as se, B as T, b as _, a9 as re, m as ne, n as ie, o as oe, aa as W, ab as le, p as de, q as ce, r as ue, s as me, t as he, ac as pe, ad as fe, ae as be, af as E, ag as ge, ah as xe } from "./chunks/index-DerPpfv0.js";
|
|
2
|
+
import { aW as Le, aY as Ue, bE as ze, a_ as Be, aX as Oe, az as je, a$ as Qe, D as We, ax as Ve, as as $e, bK as qe, b3 as He, ak as Ge, an as Ke, an as Xe, ao as Ye, ay as Je, a as Ze, bJ as ea, bp as aa, bm as ta, bF as sa, ba as ra, br as na, aw as ia, at as oa, au as la, b4 as da, bN as ca, bo as ua, by as ma, bv as ha, bC as pa, bw as fa, bx as ba, bu as ga, bt as xa, bc as Na, bI as va, bH as ya, bG as Aa, bb as Ca, bf as Sa, bg as Da, b9 as Ea, av as Ta, b8 as wa, b1 as Ra, b2 as Ia, b0 as _a, bd as Pa, b7 as ka, bM as Ma, bL as Fa, b6 as La, b5 as Ua, bB as za, bn as Ba, bA as Oa, bh as ja, be as Qa, bs as Wa, bq as Va, bz as $a, bD as qa, aG as Ha, aD as Ga, aP as Ka, aN as Xa, aV as Ya, aU as Ja, aM as Za, aL as et, aK as at, aO as tt, aZ as st, aI as rt, aJ as nt, aQ as it, aS as ot, ar as lt, aR as dt, aB as ct, bj as ut, bl as mt, bk as ht, Q as pt, aq as ft, aj as bt, aA as gt, aC as xt, al as Nt, O as vt, bi as yt, W as At, aF as Ct, aE as St, aH as Dt, ai as Et, ap as Tt, aT as wt, am as Rt } from "./chunks/index-DerPpfv0.js";
|
|
3
|
+
import { CONTROL_CARD_DEFAULT_VALUE as _t, DEFAULT_CALENDAR_CONTEXT as Pt, DEFAULT_SEMANTIC_DOMAIN_ACCESS as kt, EMPTY_SELECTION as Mt } from "./types/index.js";
|
|
4
|
+
import { C as Lt, D as Ut } from "./chunks/dashboard-summary-settings-dialog-q7fx3YAK.js";
|
|
5
|
+
import { jsx as e, jsxs as r, Fragment as Ne } from "react/jsx-runtime";
|
|
6
6
|
import * as R from "react";
|
|
7
|
-
import { useMemo as
|
|
8
|
-
import { ResourceManagementPanel as
|
|
9
|
-
import { u as
|
|
7
|
+
import { useMemo as V, useEffect as k, useState as P, useCallback as F } from "react";
|
|
8
|
+
import { ResourceManagementPanel as Bt } from "./chunks/resource-management-panel-DnZ1rw1A.js";
|
|
9
|
+
import { u as jt } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
|
|
10
10
|
import "react-dom";
|
|
11
|
-
import { A as
|
|
11
|
+
import { A as Wt, D as Vt, c as $t, a as qt, E as Ht, N as Gt, U as Kt, V as Xt, u as Yt, b as Jt } from "./chunks/dashboard-filter-controls-button-DxgGUl00.js";
|
|
12
12
|
import { n as es, s as as } from "./chunks/normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
13
|
-
function
|
|
14
|
-
const { authToken:
|
|
13
|
+
function Ee(a) {
|
|
14
|
+
const { authToken: t, tokenProps: n } = j();
|
|
15
15
|
return q({
|
|
16
|
-
mutationFn: async (
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
mutationFn: async (i) => H(
|
|
17
|
+
n.apiServiceUrl,
|
|
18
|
+
t.accessToken,
|
|
19
19
|
a,
|
|
20
|
-
|
|
20
|
+
i
|
|
21
21
|
)
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const { displayPreferences:
|
|
26
|
-
...
|
|
24
|
+
function Te(a) {
|
|
25
|
+
const { displayPreferences: t, cardId: n, ...i } = a, o = {
|
|
26
|
+
...i,
|
|
27
27
|
id: a.dashboardId
|
|
28
28
|
// override the id to the dashboard id so that the dashboard is not loaded
|
|
29
29
|
};
|
|
30
|
-
return /* @__PURE__ */ e(Q, { FallbackComponent: G, children: /* @__PURE__ */ r(K, { dashboardProps:
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
/* @__PURE__ */ e(
|
|
30
|
+
return /* @__PURE__ */ e(Q, { FallbackComponent: G, children: /* @__PURE__ */ r(K, { dashboardProps: o, children: [
|
|
31
|
+
/* @__PURE__ */ e(X, { componentType: "visual", componentId: a.cardId }),
|
|
32
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { displayPreferences: t, children: /* @__PURE__ */ e(Z, { type: "visual", cardId: n, ...o, children: /* @__PURE__ */ e(ve, { cardId: n }) }) }) })
|
|
33
33
|
] }) });
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
35
|
+
function ve({ cardId: a }) {
|
|
36
|
+
const t = L((o) => {
|
|
37
37
|
var c;
|
|
38
|
-
return (c =
|
|
39
|
-
}), { card:
|
|
40
|
-
const
|
|
41
|
-
(
|
|
38
|
+
return (c = o.dashboard) == null ? void 0 : c.sheets;
|
|
39
|
+
}), { card: n, frame: i } = V(() => {
|
|
40
|
+
const o = t == null ? void 0 : t.flatMap((l) => l.frames), c = o == null ? void 0 : o.flatMap((l) => l == null ? void 0 : l.cards), u = c == null ? void 0 : c.find((l) => (l == null ? void 0 : l.id) === a), s = o == null ? void 0 : o.find(
|
|
41
|
+
(l) => {
|
|
42
42
|
var m;
|
|
43
|
-
return (m =
|
|
43
|
+
return (m = l == null ? void 0 : l.cards) == null ? void 0 : m.find((b) => (b == null ? void 0 : b.id) === a);
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
return { card: u, frame:
|
|
47
|
-
}, [
|
|
48
|
-
return !
|
|
46
|
+
return { card: u, frame: s };
|
|
47
|
+
}, [t, a]);
|
|
48
|
+
return !n || !i ? /* @__PURE__ */ e(
|
|
49
49
|
O,
|
|
50
50
|
{
|
|
51
51
|
error: new Error("Card not found"),
|
|
@@ -57,98 +57,103 @@ function Ne({ cardId: a }) {
|
|
|
57
57
|
Q,
|
|
58
58
|
{
|
|
59
59
|
FallbackComponent: ({
|
|
60
|
-
error:
|
|
60
|
+
error: o,
|
|
61
61
|
resetErrorBoundary: c
|
|
62
62
|
}) => /* @__PURE__ */ e(
|
|
63
63
|
O,
|
|
64
64
|
{
|
|
65
|
-
error:
|
|
65
|
+
error: o,
|
|
66
66
|
resetErrorBoundary: c,
|
|
67
67
|
customerFacingMessage: "Error creating visual. Please try again."
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
children: /* @__PURE__ */ e(ee, { card:
|
|
70
|
+
children: /* @__PURE__ */ e(ee, { card: n, frame: i })
|
|
71
71
|
}
|
|
72
72
|
) });
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function we(a, t, n, i) {
|
|
75
|
+
k(() => {
|
|
76
|
+
a && !n && t && i(ae(t));
|
|
77
|
+
}, [a, n, t, i]);
|
|
78
|
+
}
|
|
79
|
+
function Re({
|
|
75
80
|
name: a,
|
|
76
|
-
items:
|
|
77
|
-
value:
|
|
78
|
-
onChange:
|
|
79
|
-
isLoading:
|
|
81
|
+
items: t,
|
|
82
|
+
value: n,
|
|
83
|
+
onChange: i,
|
|
84
|
+
isLoading: o,
|
|
80
85
|
isError: c,
|
|
81
86
|
refetch: u,
|
|
82
|
-
className:
|
|
83
|
-
icon:
|
|
87
|
+
className: s,
|
|
88
|
+
icon: l,
|
|
84
89
|
showNone: m = !1
|
|
85
90
|
}) {
|
|
86
|
-
const b = R.useRef(null), [v, g] = R.useState(!1), [y, A] = R.useState("100%"), x = m ? [...
|
|
91
|
+
const b = R.useRef(null), [v, g] = R.useState(!1), [y, A] = R.useState("100%"), x = m ? [...t || [], { id: "none", name: "None" }] : t;
|
|
87
92
|
R.useLayoutEffect(() => {
|
|
88
93
|
b.current && A(b.current.offsetWidth);
|
|
89
94
|
}, []);
|
|
90
|
-
function
|
|
95
|
+
function M() {
|
|
91
96
|
var h;
|
|
92
|
-
return
|
|
97
|
+
return o ? "Loading..." : c ? "Error" : n ? (h = t == null ? void 0 : t.find((N) => N.id === n)) == null ? void 0 : h.name : `Select ${a}`;
|
|
93
98
|
}
|
|
94
99
|
function w(h, N) {
|
|
95
|
-
|
|
100
|
+
i(N), g(!1);
|
|
96
101
|
}
|
|
97
|
-
return /* @__PURE__ */ r(
|
|
98
|
-
/* @__PURE__ */ e(
|
|
102
|
+
return /* @__PURE__ */ r(te, { open: v, onOpenChange: g, children: [
|
|
103
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ r(
|
|
99
104
|
T,
|
|
100
105
|
{
|
|
101
106
|
ref: b,
|
|
102
107
|
variant: "outline",
|
|
103
108
|
role: "combobox",
|
|
104
109
|
"aria-expanded": v,
|
|
105
|
-
className: _("flex h-9 w-full justify-between",
|
|
110
|
+
className: _("flex h-9 w-full justify-between", s),
|
|
106
111
|
children: [
|
|
107
112
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
108
|
-
|
|
109
|
-
/* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children:
|
|
113
|
+
l && /* @__PURE__ */ e("div", { className: "mr-2", children: l }),
|
|
114
|
+
/* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: M() })
|
|
110
115
|
] }),
|
|
111
|
-
/* @__PURE__ */ e(
|
|
116
|
+
/* @__PURE__ */ e(re, { className: "size-4 opacity-50" })
|
|
112
117
|
]
|
|
113
118
|
}
|
|
114
119
|
) }),
|
|
115
120
|
/* @__PURE__ */ e(
|
|
116
|
-
|
|
121
|
+
ne,
|
|
117
122
|
{
|
|
118
123
|
className: "w-full p-0",
|
|
119
124
|
style: { minWidth: y },
|
|
120
|
-
children: /* @__PURE__ */ r(
|
|
125
|
+
children: /* @__PURE__ */ r(ie, { children: [
|
|
121
126
|
/* @__PURE__ */ r("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
|
|
122
|
-
/* @__PURE__ */ e(
|
|
123
|
-
/* @__PURE__ */ e(
|
|
124
|
-
|
|
127
|
+
/* @__PURE__ */ e(oe, { className: "h-9", placeholder: "Search..." }),
|
|
128
|
+
/* @__PURE__ */ e(W, { className: "h-7", onClick: u, children: /* @__PURE__ */ e(
|
|
129
|
+
le,
|
|
125
130
|
{
|
|
126
131
|
className: _(
|
|
127
132
|
"size-3.5 opacity-50",
|
|
128
|
-
|
|
133
|
+
o && "animate-spin"
|
|
129
134
|
)
|
|
130
135
|
}
|
|
131
136
|
) })
|
|
132
137
|
] }),
|
|
133
|
-
/* @__PURE__ */ r(
|
|
134
|
-
/* @__PURE__ */ r(
|
|
138
|
+
/* @__PURE__ */ r(de, { children: [
|
|
139
|
+
/* @__PURE__ */ r(ce, { children: [
|
|
135
140
|
"No ",
|
|
136
141
|
a == null ? void 0 : a.toLowerCase(),
|
|
137
142
|
" found."
|
|
138
143
|
] }),
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
-
|
|
144
|
+
/* @__PURE__ */ e(ue, { children: x == null ? void 0 : x.map((h) => /* @__PURE__ */ e(
|
|
145
|
+
me,
|
|
141
146
|
{
|
|
142
147
|
className: "overflow-x-auto",
|
|
143
148
|
value: h.name,
|
|
144
149
|
onSelect: (N) => w(N, h.id),
|
|
145
150
|
children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
146
151
|
/* @__PURE__ */ e(
|
|
147
|
-
|
|
152
|
+
he,
|
|
148
153
|
{
|
|
149
154
|
className: _(
|
|
150
155
|
"size-4",
|
|
151
|
-
|
|
156
|
+
n === h.id ? "opacity-100" : "opacity-0"
|
|
152
157
|
)
|
|
153
158
|
}
|
|
154
159
|
),
|
|
@@ -163,60 +168,60 @@ function Te({
|
|
|
163
168
|
)
|
|
164
169
|
] });
|
|
165
170
|
}
|
|
166
|
-
function
|
|
171
|
+
function Ie({
|
|
167
172
|
triggerButtonClassName: a,
|
|
168
|
-
variant:
|
|
173
|
+
variant: t = "ghost"
|
|
169
174
|
}) {
|
|
170
|
-
const [
|
|
171
|
-
var
|
|
172
|
-
return (
|
|
173
|
-
}), c =
|
|
174
|
-
var
|
|
175
|
-
return (
|
|
175
|
+
const [n, i] = P(!1), o = L((u) => {
|
|
176
|
+
var s;
|
|
177
|
+
return (s = u.dashboard) == null ? void 0 : s.id;
|
|
178
|
+
}), c = L((u) => {
|
|
179
|
+
var s;
|
|
180
|
+
return (s = u.dashboard) == null ? void 0 : s.title;
|
|
176
181
|
});
|
|
177
|
-
return
|
|
182
|
+
return o ? /* @__PURE__ */ r(Ne, { children: [
|
|
178
183
|
/* @__PURE__ */ e(
|
|
179
|
-
|
|
184
|
+
W,
|
|
180
185
|
{
|
|
181
186
|
tooltip: "Schedule Dashboard",
|
|
182
187
|
className: _("h-7 p-2", a),
|
|
183
|
-
buttonProps: { variant:
|
|
184
|
-
onClick: () =>
|
|
185
|
-
children: /* @__PURE__ */ e(
|
|
188
|
+
buttonProps: { variant: t },
|
|
189
|
+
onClick: () => i(!0),
|
|
190
|
+
children: /* @__PURE__ */ e(pe, { className: "size-4" })
|
|
186
191
|
}
|
|
187
192
|
),
|
|
188
193
|
/* @__PURE__ */ e(
|
|
189
|
-
|
|
194
|
+
fe,
|
|
190
195
|
{
|
|
191
|
-
open:
|
|
192
|
-
onOpenChange:
|
|
193
|
-
dashboardId:
|
|
196
|
+
open: n,
|
|
197
|
+
onOpenChange: i,
|
|
198
|
+
dashboardId: o,
|
|
194
199
|
dashboardName: c
|
|
195
200
|
}
|
|
196
201
|
)
|
|
197
202
|
] }) : null;
|
|
198
203
|
}
|
|
199
|
-
function
|
|
200
|
-
|
|
201
|
-
...
|
|
204
|
+
function _e(a, t) {
|
|
205
|
+
k(() => (a && t && (window.__SEMAPHOR_PRINT_STATE__ = {
|
|
206
|
+
...t
|
|
202
207
|
}), () => {
|
|
203
208
|
a && window.__SEMAPHOR_PRINT_STATE__ && delete window.__SEMAPHOR_PRINT_STATE__;
|
|
204
|
-
}), [a,
|
|
209
|
+
}), [a, t]);
|
|
205
210
|
}
|
|
206
211
|
function I(a) {
|
|
207
212
|
if (!a) return "--";
|
|
208
|
-
const
|
|
209
|
-
return Number.isNaN(
|
|
213
|
+
const t = new Date(a);
|
|
214
|
+
return Number.isNaN(t.getTime()) ? "--" : t.toLocaleString();
|
|
210
215
|
}
|
|
211
|
-
function
|
|
212
|
-
var
|
|
213
|
-
return ((
|
|
216
|
+
function ye(a) {
|
|
217
|
+
var t;
|
|
218
|
+
return ((t = a.alertState) == null ? void 0 : t.currentState) === "FIRING" ? "Signal surfaced" : a.status === "ACTIVE" ? "Watching" : a.status === "PAUSED" ? "Paused" : a.status;
|
|
214
219
|
}
|
|
215
|
-
function
|
|
220
|
+
function Pe({ alertId: a, onBack: t }) {
|
|
216
221
|
var h, N, U, z;
|
|
217
|
-
const { authToken:
|
|
222
|
+
const { authToken: n, tokenProps: i } = j(), { data: o, isLoading: c, refetch: u } = be(a), s = (o == null ? void 0 : o.alert) ?? null, [l, m] = P([]), [b, v] = P([]), [g, y] = P(null), A = F(async () => {
|
|
218
223
|
var f;
|
|
219
|
-
const d =
|
|
224
|
+
const d = i == null ? void 0 : i.apiServiceUrl, p = n == null ? void 0 : n.accessToken;
|
|
220
225
|
if (!d || !p || !a) return null;
|
|
221
226
|
try {
|
|
222
227
|
const S = await fetch(`${d}/v1/alerts/${a}/runs?limit=20`, {
|
|
@@ -231,8 +236,8 @@ function Ie({ alertId: a, onBack: s }) {
|
|
|
231
236
|
return v([]), y(null), null;
|
|
232
237
|
}
|
|
233
238
|
return null;
|
|
234
|
-
}, [a,
|
|
235
|
-
const p =
|
|
239
|
+
}, [a, n, g, i]), x = F(async (d) => {
|
|
240
|
+
const p = i == null ? void 0 : i.apiServiceUrl, f = n == null ? void 0 : n.accessToken, S = d ?? g;
|
|
236
241
|
if (!p || !f || !a || !S) {
|
|
237
242
|
m([]);
|
|
238
243
|
return;
|
|
@@ -252,35 +257,35 @@ function Ie({ alertId: a, onBack: s }) {
|
|
|
252
257
|
} catch {
|
|
253
258
|
m([]);
|
|
254
259
|
}
|
|
255
|
-
}, [a,
|
|
260
|
+
}, [a, n, g, i]), M = F(async () => {
|
|
256
261
|
await u();
|
|
257
262
|
const d = await A();
|
|
258
263
|
await x(d);
|
|
259
264
|
}, [x, A, u]);
|
|
260
|
-
|
|
265
|
+
k(() => {
|
|
261
266
|
A().catch(() => {
|
|
262
267
|
});
|
|
263
|
-
}, [A]),
|
|
268
|
+
}, [A]), k(() => {
|
|
264
269
|
x().catch(() => {
|
|
265
270
|
});
|
|
266
271
|
}, [x]);
|
|
267
|
-
const w =
|
|
272
|
+
const w = V(() => {
|
|
268
273
|
const d = {};
|
|
269
|
-
for (const p of
|
|
274
|
+
for (const p of l)
|
|
270
275
|
d[p.channel] || (d[p.channel] = []), d[p.channel].push(p);
|
|
271
276
|
return d;
|
|
272
|
-
}, [
|
|
273
|
-
return c ? /* @__PURE__ */ e("div", { className: "p-4 text-sm text-muted-foreground", children: "Loading signal detail..." }) :
|
|
277
|
+
}, [l]);
|
|
278
|
+
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: [
|
|
274
279
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
|
|
275
280
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
276
|
-
|
|
277
|
-
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children:
|
|
278
|
-
/* @__PURE__ */ e(E, { variant:
|
|
279
|
-
((h =
|
|
281
|
+
t && /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: t, children: "Back" }),
|
|
282
|
+
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: s.name }),
|
|
283
|
+
/* @__PURE__ */ e(E, { variant: s.status === "ACTIVE" ? "default" : "secondary", children: ye(s) }),
|
|
284
|
+
((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" })
|
|
280
285
|
] }),
|
|
281
|
-
/* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: () => void
|
|
286
|
+
/* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: () => void M(), children: "Refresh" })
|
|
282
287
|
] }),
|
|
283
|
-
|
|
288
|
+
s.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: s.description }),
|
|
284
289
|
/* @__PURE__ */ r("div", { className: "rounded-md border bg-muted/30 p-4 text-sm", children: [
|
|
285
290
|
/* @__PURE__ */ e("p", { className: "font-medium", children: "What changed" }),
|
|
286
291
|
/* @__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." })
|
|
@@ -291,28 +296,28 @@ function Ie({ alertId: a, onBack: s }) {
|
|
|
291
296
|
/* @__PURE__ */ r("div", { children: [
|
|
292
297
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Watching for:" }),
|
|
293
298
|
" ",
|
|
294
|
-
|
|
299
|
+
ge(s.jobConfig.operator, s.jobConfig.threshold)
|
|
295
300
|
] }),
|
|
296
301
|
/* @__PURE__ */ r("div", { children: [
|
|
297
302
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Severity:" }),
|
|
298
303
|
" ",
|
|
299
|
-
|
|
304
|
+
s.jobConfig.severity
|
|
300
305
|
] }),
|
|
301
306
|
/* @__PURE__ */ r("div", { children: [
|
|
302
307
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Last Evaluated:" }),
|
|
303
308
|
" ",
|
|
304
|
-
I((N =
|
|
309
|
+
I((N = s.alertState) == null ? void 0 : N.lastEvaluatedAt)
|
|
305
310
|
] }),
|
|
306
311
|
/* @__PURE__ */ r("div", { children: [
|
|
307
312
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Last Surfaced:" }),
|
|
308
313
|
" ",
|
|
309
|
-
I((U =
|
|
314
|
+
I((U = s.alertState) == null ? void 0 : U.lastTriggeredAt)
|
|
310
315
|
] })
|
|
311
316
|
] })
|
|
312
317
|
] }),
|
|
313
|
-
((z =
|
|
318
|
+
((z = s.deliveryConfig) == null ? void 0 : z.channels) && s.deliveryConfig.channels.length > 0 && /* @__PURE__ */ r("div", { className: "rounded-md border bg-background p-4 space-y-2", children: [
|
|
314
319
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Where It Surfaces" }),
|
|
315
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children:
|
|
320
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: s.deliveryConfig.channels.map((d) => /* @__PURE__ */ e(E, { variant: "outline", children: d }, d)) })
|
|
316
321
|
] }),
|
|
317
322
|
b.length > 0 && /* @__PURE__ */ r("div", { className: "rounded-md border bg-background p-4 space-y-3", children: [
|
|
318
323
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Recent Delivery Activity" }),
|
|
@@ -353,9 +358,9 @@ function Ie({ alertId: a, onBack: s }) {
|
|
|
353
358
|
] })
|
|
354
359
|
] }) : /* @__PURE__ */ e("div", { className: "p-4 text-sm text-muted-foreground", children: "Signal not found." });
|
|
355
360
|
}
|
|
356
|
-
function
|
|
361
|
+
function ke() {
|
|
357
362
|
var c, u;
|
|
358
|
-
const { quotasQuery: a, usageQuery:
|
|
363
|
+
const { quotasQuery: a, usageQuery: t } = xe(), n = ((c = a.data) == null ? void 0 : c.quotas) || [], i = ((u = t.data) == null ? void 0 : u.usage) || [], o = new Map(i.map((s) => [s.tenantId || "org", s]));
|
|
359
364
|
return /* @__PURE__ */ r("div", { className: "space-y-4 p-4", children: [
|
|
360
365
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
|
|
361
366
|
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold", children: "Alert Quotas" }),
|
|
@@ -365,13 +370,13 @@ function _e() {
|
|
|
365
370
|
variant: "outline",
|
|
366
371
|
size: "sm",
|
|
367
372
|
onClick: () => {
|
|
368
|
-
a.refetch(),
|
|
373
|
+
a.refetch(), t.refetch();
|
|
369
374
|
},
|
|
370
375
|
children: "Refresh"
|
|
371
376
|
}
|
|
372
377
|
)
|
|
373
378
|
] }),
|
|
374
|
-
a.isLoading ||
|
|
379
|
+
a.isLoading || t.isLoading ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Loading quota usage..." }) : null,
|
|
375
380
|
/* @__PURE__ */ e("div", { className: "overflow-hidden rounded-lg border", children: /* @__PURE__ */ r("table", { className: "w-full text-sm", children: [
|
|
376
381
|
/* @__PURE__ */ e("thead", { className: "bg-muted/40", children: /* @__PURE__ */ r("tr", { children: [
|
|
377
382
|
/* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Tenant" }),
|
|
@@ -380,158 +385,158 @@ function _e() {
|
|
|
380
385
|
/* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Min Cadence" }),
|
|
381
386
|
/* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Max Context Sources" })
|
|
382
387
|
] }) }),
|
|
383
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
384
|
-
const
|
|
388
|
+
/* @__PURE__ */ e("tbody", { children: n.map((s) => {
|
|
389
|
+
const l = s.tenantId || "org", m = o.get(l);
|
|
385
390
|
return /* @__PURE__ */ r("tr", { className: "border-t", children: [
|
|
386
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children:
|
|
391
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: l }),
|
|
387
392
|
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: (m == null ? void 0 : m.activeAlerts) ?? 0 }),
|
|
388
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children:
|
|
393
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: s.policy.maxActiveAlerts }),
|
|
389
394
|
/* @__PURE__ */ r("td", { className: "px-3 py-2", children: [
|
|
390
|
-
|
|
395
|
+
s.policy.minCadenceMinutes,
|
|
391
396
|
" min"
|
|
392
397
|
] }),
|
|
393
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children:
|
|
394
|
-
] },
|
|
398
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: s.policy.maxContextSources })
|
|
399
|
+
] }, l);
|
|
395
400
|
}) })
|
|
396
401
|
] }) })
|
|
397
402
|
] });
|
|
398
403
|
}
|
|
399
404
|
export {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
405
|
+
Wt as AdvancedModeToggle,
|
|
406
|
+
Pe as AlertDetailPageEmbedded,
|
|
407
|
+
Le as AlertManagementPage,
|
|
408
|
+
Ue as AlertWizardDialog,
|
|
409
|
+
ze as AlertsApiError,
|
|
410
|
+
Be as CALCULATED_FIELD_ENTITY_MARKER,
|
|
411
|
+
_t as CONTROL_CARD_DEFAULT_VALUE,
|
|
412
|
+
Lt as CalendarPreferencesDialog,
|
|
413
|
+
Oe as CardAlertIndicator,
|
|
414
|
+
je as CardSummary,
|
|
415
|
+
Re as Combobox,
|
|
416
|
+
Qe as DATE_FORMAT_VALUES,
|
|
417
|
+
Pt as DEFAULT_CALENDAR_CONTEXT,
|
|
418
|
+
kt as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
|
|
419
|
+
We as Dashboard,
|
|
415
420
|
Vt as DashboardControlsSettings,
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
421
|
+
Ve as DashboardExportDialog,
|
|
422
|
+
$t as DashboardFilterControlsButton,
|
|
423
|
+
Ut as DashboardSummarySettingsDialog,
|
|
424
|
+
$e as DashboardWC,
|
|
425
|
+
Mt as EMPTY_SELECTION,
|
|
426
|
+
fe as EmailScheduleDialog,
|
|
427
|
+
qe as ExportError,
|
|
428
|
+
qt as ExportNotificationItem,
|
|
429
|
+
Ht as ExportNotificationList,
|
|
430
|
+
Gt as NotificationBell,
|
|
431
|
+
He as PivotMarkerEnum,
|
|
432
|
+
Bt as ResourceManagementPanel,
|
|
433
|
+
Ge as ResourceType,
|
|
434
|
+
Ie as ScheduleDashboard,
|
|
430
435
|
K as SemaphorContextProvider,
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
436
|
+
Ke as SemaphorDataProvider,
|
|
437
|
+
Xe as SemaphorQueryClient,
|
|
438
|
+
Ye as ShareDialog,
|
|
439
|
+
Je as SummaryCard,
|
|
440
|
+
Ze as Surfboard,
|
|
441
|
+
ke as TenantQuotaPage,
|
|
442
|
+
Kt as UnsavedChangesAlert,
|
|
443
|
+
Te as Visual,
|
|
444
|
+
Xt as VisualEditingControls,
|
|
440
445
|
H as backtestAlert,
|
|
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
|
-
|
|
446
|
+
ea as cancelExport,
|
|
447
|
+
ae as cloneDeep,
|
|
448
|
+
aa as createAlert,
|
|
449
|
+
ta as createEmptyKpiConfig,
|
|
450
|
+
sa as createExport,
|
|
451
|
+
ra as createSqlGenConfig,
|
|
452
|
+
na as deleteAlert,
|
|
453
|
+
ia as downloadPdf,
|
|
454
|
+
oa as emitDashboardLoad,
|
|
455
|
+
la as emitDashboardUnload,
|
|
456
|
+
da as fmt,
|
|
457
|
+
ca as formatFileSize,
|
|
458
|
+
ua as getAlert,
|
|
459
|
+
ma as getAlertContextSources,
|
|
460
|
+
ha as getAlertHistory,
|
|
461
|
+
pa as getAlertQuotaUsage,
|
|
462
|
+
fa as getAlertRunDeliveries,
|
|
463
|
+
ba as getAlertRunSteps,
|
|
464
|
+
ga as getAlertRuns,
|
|
465
|
+
xa as getAlertState,
|
|
466
|
+
Na as getColumnDataType,
|
|
467
|
+
va as getDownloadUrl,
|
|
468
|
+
ya as getExportStatus,
|
|
469
|
+
Aa as getExports,
|
|
470
|
+
Ca as getFilterValueType,
|
|
471
|
+
Sa as getFormattedTableNameForQuery,
|
|
472
|
+
Da as getQualifiedTableName,
|
|
473
|
+
Ea as getSql,
|
|
474
|
+
Ta as invalidateToken,
|
|
475
|
+
wa as isBooleanDataType,
|
|
476
|
+
Ra as isCalculatedDimension,
|
|
477
|
+
Ia as isCalculatedField,
|
|
478
|
+
_a as isCalculatedMetric,
|
|
479
|
+
Pa as isColumnInSqlGen,
|
|
480
|
+
ka as isDateDataType,
|
|
481
|
+
Ma as isExportComplete,
|
|
482
|
+
Fa as isExportInProgress,
|
|
483
|
+
La as isNumberDataType,
|
|
484
|
+
Ua as isTextDataType,
|
|
485
|
+
za as listAlertQuotas,
|
|
486
|
+
Ba as listAlerts,
|
|
482
487
|
es as normalizeDashboardForDirtyCheck,
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
488
|
+
Oa as previewAlertDeliverable,
|
|
489
|
+
ja as resolveDataType,
|
|
490
|
+
Qa as resolveDatamodelName,
|
|
486
491
|
as as serializeDashboardForDirtyCheck,
|
|
487
|
-
|
|
492
|
+
Wa as triggerAlertNow,
|
|
488
493
|
Va as updateAlert,
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
494
|
+
$a as updateAlertContextSources,
|
|
495
|
+
qa as updateAlertQuota,
|
|
496
|
+
Ha as useActiveExports,
|
|
497
|
+
Ga as useAddNewFrame,
|
|
498
|
+
Ka as useAlertActions,
|
|
499
|
+
Ee as useAlertBacktest,
|
|
500
|
+
Xa as useAlertDeliveries,
|
|
501
|
+
be as useAlertDetail,
|
|
497
502
|
Ya as useAlertDraft,
|
|
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
|
-
|
|
503
|
+
Ja as useAlertFilters,
|
|
504
|
+
Za as useAlertHistory,
|
|
505
|
+
xe as useAlertQuotas,
|
|
506
|
+
et as useAlertRuns,
|
|
507
|
+
at as useAlertState,
|
|
508
|
+
tt as useAlertStore,
|
|
509
|
+
st as useAlertWizard,
|
|
510
|
+
rt as useAlerts,
|
|
511
|
+
nt as useAlertsBootstrap,
|
|
512
|
+
it as useAlertsById,
|
|
513
|
+
ot as useAlertsForCard,
|
|
514
|
+
lt as useCard,
|
|
515
|
+
dt as useCardAlertMap,
|
|
516
|
+
ct as useCardSummary,
|
|
517
|
+
ut as useCurrentActiveCard,
|
|
518
|
+
mt as useCurrentCardConfig,
|
|
519
|
+
ht as useCurrentSheetActiveCards,
|
|
520
|
+
pt as useDashboardActions,
|
|
521
|
+
ft as useDashboardById,
|
|
522
|
+
bt as useDashboardQuery,
|
|
523
|
+
L as useDashboardStore,
|
|
524
|
+
gt as useDashboardSummary,
|
|
525
|
+
xt as useDataColumns,
|
|
526
|
+
Nt as useDateFilterHook,
|
|
527
|
+
jt as useDebouncedDirtyCheck,
|
|
528
|
+
vt as useEditorActions,
|
|
529
|
+
yt as useEditorAside,
|
|
530
|
+
At as useEditorStore,
|
|
531
|
+
Ct as useExportActions,
|
|
527
532
|
Yt as useExportPolling,
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
533
|
+
Jt as useExportRecovery,
|
|
534
|
+
St as useExportStore,
|
|
535
|
+
_e as useExposePrintState,
|
|
536
|
+
Dt as useInProgressExportsCount,
|
|
537
|
+
Et as useManagementStore,
|
|
538
|
+
we as usePristineSnapshotInitializer,
|
|
539
|
+
Tt as useResourceManagement,
|
|
540
|
+
wt as useSelectedAlertId,
|
|
541
|
+
Rt as useTextFilterHook
|
|
537
542
|
};
|