mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 19:00:46 +08:00
feat(ume): key alarm forward to OClaw via WSS and AI monitor UI
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
9a39ddfcc7
commit
1f1b42e8bf
18 changed files with 1079 additions and 32 deletions
|
|
@ -10,6 +10,7 @@ import type {
|
|||
ManagedNeMeta,
|
||||
UmeAlarmItem,
|
||||
UmeAlarmSubscriptionStatus,
|
||||
UmeKeyAlertMonitorResponse,
|
||||
UmeNeItem,
|
||||
UmeSyncStatusResponse,
|
||||
UmeTokenStatus,
|
||||
|
|
@ -71,6 +72,23 @@ export const cancelUmeAlarmSubscription = (opts?: { forceClearLocal?: boolean })
|
|||
export const clearLocalUmeAlarmSubscription = () =>
|
||||
apiPost<UmeAlarmSubscriptionStatus>("/v1/ume/alarm-subscription/clear-local", {});
|
||||
|
||||
export const fetchUmeKeyAlertMonitor = () => apiGet<UmeKeyAlertMonitorResponse>("/v1/ume/key-alert-monitor");
|
||||
|
||||
export const upsertUmeKeyAlertRule = (payload: {
|
||||
notification_id: string;
|
||||
label?: string;
|
||||
enabled?: boolean;
|
||||
forward_on_clear?: boolean;
|
||||
}) => apiPost<{ ok: boolean }>("/v1/ume/key-alert-rules", payload);
|
||||
|
||||
export const deleteUmeKeyAlertRule = (notificationId: string) =>
|
||||
apiDelete<{ ok: boolean }>(`/v1/ume/key-alert-rules/${encodeURIComponent(notificationId)}`);
|
||||
|
||||
export const fetchUmeNotificationIds = (limit = 200) =>
|
||||
apiGet<{ items: Array<{ notification_id: string; native_probable_cause_sample: string }> }>(
|
||||
`/v1/ume/notification-ids?limit=${encodeURIComponent(String(limit))}`,
|
||||
);
|
||||
|
||||
export const fetchUmeSyncStatus = (params: { page: number; pageSize: number }) => {
|
||||
const p = new URLSearchParams();
|
||||
p.set("page", String(Math.max(1, Number(params.page || 1))));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue