Dependency map, impact preview in maintenance, and a calmer Alerts page
- Map: a Dependencies view showing what would go down with a picked box and what it relies on - Maintenance: lists what depends on a target and can silence those too (same time, audited); the recurring form and update drawer show the same note - Alerts: a headline on where things stand, held-back alerts nested under their cause, severity edge on rows; caused-by now carries the explaining alert's id Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec9c2f73f0
commit
9caa414829
19 files changed
+944
-40
No files matched your search
+33
-3
@@ -778,6 +778,34 @@ export interface BackupCoverage {
|
||||
export type AssetKind = "server" | "storage" | "network" | "power" | "client" | "other";
|
||||
|
||||
export type DependencyNodeType = "server" | "integration";
|
||||
|
||||
/** Something that would be affected if another went down (or that it needs): `distance` 1 is directly, 2 through one other, and so on. */
|
||||
export interface DependencyImpactItem {
|
||||
key: string;
|
||||
type: DependencyNodeType;
|
||||
id: number;
|
||||
name: string;
|
||||
distance: number;
|
||||
silenced: boolean;
|
||||
}
|
||||
export interface DependencyImpact {
|
||||
target: { key: string; type: DependencyNodeType; id: number; name: string };
|
||||
dependents: DependencyImpactItem[];
|
||||
needs: DependencyImpactItem[];
|
||||
}
|
||||
export interface DependencyGraphNode {
|
||||
key: string;
|
||||
type: DependencyNodeType;
|
||||
id: number;
|
||||
name: string;
|
||||
status: "ok" | "bad" | "warn" | "unknown";
|
||||
href: string;
|
||||
}
|
||||
export interface DependencyGraph {
|
||||
nodes: DependencyGraphNode[];
|
||||
/** From the thing that is needed to the thing that needs it. */
|
||||
edges: { from: string; to: string; kind: "written" | "runs-on" }[];
|
||||
}
|
||||
export interface DependencyNode {
|
||||
key: string;
|
||||
type: DependencyNodeType;
|
||||
@@ -871,7 +899,7 @@ export interface AlertItem {
|
||||
/** What a maintenance window would go on to silence it — what the Silence button acts on. Null when nothing can silence it. */
|
||||
target?: { type: MaintenanceTargetType; id: number; name: string } | null;
|
||||
/** Held back because another problem explains it (a guest down because its host is): the host's alert says so too. */
|
||||
causedBy?: { name: string };
|
||||
causedBy?: { name: string; alertId?: string };
|
||||
/** On a host's alert: the servers on it whose own alerts are folded under this one. */
|
||||
affects?: string[];
|
||||
/** The osTicket ticket opened for it, if one was. */
|
||||
@@ -1694,6 +1722,8 @@ export const api = {
|
||||
},
|
||||
dependencies: {
|
||||
list: () => request<DependenciesResponse>("/api/dependencies"),
|
||||
impact: (type: DependencyNodeType, id: number) => request<DependencyImpact>(`/api/dependencies/impact?type=${type}&id=${id}`),
|
||||
graph: () => request<DependencyGraph>("/api/dependencies/graph"),
|
||||
create: (data: { fromType: DependencyNodeType; fromId: number; toType: DependencyNodeType; toId: number }) => request<{ id: number }>("/api/dependencies", { method: "POST", body: JSON.stringify(data) }),
|
||||
remove: (id: number) => request<void>(`/api/dependencies/${id}`, { method: "DELETE" }),
|
||||
},
|
||||
@@ -1759,8 +1789,8 @@ export const api = {
|
||||
addAlias: (data: { address: string; targetType: MaintenanceTargetType; targetId: number }) =>
|
||||
request<{ alias: MaintenanceAlias }>("/api/maintenance/aliases", { method: "POST", body: JSON.stringify(data) }),
|
||||
removeAlias: (id: number) => request<void>(`/api/maintenance/aliases/${id}`, { method: "DELETE" }),
|
||||
start: (data: { targetType: MaintenanceTargetType; targetId: number; minutes: number; reason?: string }) =>
|
||||
request<{ window: MaintenanceWindow }>("/api/maintenance", { method: "POST", body: JSON.stringify(data) }),
|
||||
start: (data: { targetType: MaintenanceTargetType; targetId: number; minutes: number; reason?: string; withDependents?: boolean }) =>
|
||||
request<{ window: MaintenanceWindow; alsoSilenced: { type: DependencyNodeType; id: number; name: string }[] }>("/api/maintenance", { method: "POST", body: JSON.stringify(data) }),
|
||||
end: (id: number) => request<void>(`/api/maintenance/${id}`, { method: "DELETE" }),
|
||||
startBulk: (data: { scope: MaintenanceBulkScope; minutes: number; reason?: string }) =>
|
||||
request<{ started: number; extended: number; total: number }>("/api/maintenance/bulk", { method: "POST", body: JSON.stringify(data) }),
|
||||
|
||||
Reference in new issue
Block a user