mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 13:00:44 +08:00
Add ops task overview, chart ahead window, and WebCRT lifecycle status.
Unify live runners in /audit/tasks (including UME sync and connect tests), extend port-traffic compare past now via ahead_hours, and distinguish WebCRT connecting/ready/detached. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3f0787da11
commit
3908b78dbb
28 changed files with 1083 additions and 54 deletions
|
|
@ -205,6 +205,31 @@ export const apiPut = async <T,>(path: string, body: unknown): Promise<T> => {
|
|||
|
||||
export const fetchIntegrationStatus = () => apiGet<IntegrationStatus>("/v1/integrations/status");
|
||||
|
||||
export type OpsTaskItem = {
|
||||
kind: string;
|
||||
id: string;
|
||||
title: string;
|
||||
status: string;
|
||||
trigger: string;
|
||||
actor: string;
|
||||
started_at: string | null;
|
||||
updated_at: string | null;
|
||||
progress: string;
|
||||
detail: string;
|
||||
href: string;
|
||||
};
|
||||
|
||||
export type OpsTasksResponse = {
|
||||
generated_at: string;
|
||||
total: number;
|
||||
active: number;
|
||||
by_kind: Record<string, number>;
|
||||
by_status: Record<string, number>;
|
||||
items: OpsTaskItem[];
|
||||
};
|
||||
|
||||
export const fetchOpsTasks = () => apiGet<OpsTasksResponse>("/v1/ops/tasks");
|
||||
|
||||
export const fetchUmeAlarmSubscriptionStatus = () =>
|
||||
apiGet<UmeAlarmSubscriptionStatus>("/v1/ume/alarm-subscription/status");
|
||||
|
||||
|
|
@ -1347,6 +1372,7 @@ export const fetchPortTrafficCompare = (params: {
|
|||
rangeHours: number;
|
||||
baseline: string;
|
||||
offsetHours?: number;
|
||||
aheadHours?: number;
|
||||
baselineTargetId?: string;
|
||||
to?: string;
|
||||
}) => {
|
||||
|
|
@ -1355,6 +1381,9 @@ export const fetchPortTrafficCompare = (params: {
|
|||
p.set("range_hours", String(params.rangeHours));
|
||||
p.set("baseline", params.baseline);
|
||||
if (params.offsetHours != null) p.set("offset_hours", String(params.offsetHours));
|
||||
if (params.aheadHours != null && params.aheadHours > 0) {
|
||||
p.set("ahead_hours", String(params.aheadHours));
|
||||
}
|
||||
if (params.baselineTargetId) p.set("baseline_target_id", params.baselineTargetId);
|
||||
if (params.to) p.set("to", params.to);
|
||||
return apiGet<PortTrafficCompare>(`/v1/port-traffic/compare?${p.toString()}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue