* Implement maintenance page with task and log display * Add backfill and metadata retry functionality * Integrate grid component for project display in thoughts page * Update types for maintenance tasks and logs * Enhance sidebar and shell for new maintenance navigation
This commit is contained in:
+21
-1
@@ -111,7 +111,27 @@
|
||||
if (!response.ok) {
|
||||
throw new Error(`Status request failed with ${response.status}`);
|
||||
}
|
||||
data = (await response.json()) as StatusResponse;
|
||||
const raw = (await response.json()) as Partial<StatusResponse> | null;
|
||||
data = {
|
||||
title: raw?.title ?? 'AMCS',
|
||||
description: raw?.description ?? '',
|
||||
version: raw?.version ?? 'unknown',
|
||||
build_date: raw?.build_date ?? 'unknown',
|
||||
commit: raw?.commit ?? 'unknown',
|
||||
connected_count: raw?.connected_count ?? 0,
|
||||
total_known: raw?.total_known ?? 0,
|
||||
connected_window: raw?.connected_window ?? 'last 10 minutes',
|
||||
oauth_enabled: !!raw?.oauth_enabled,
|
||||
entries: Array.isArray(raw?.entries) ? raw.entries : [],
|
||||
metrics: {
|
||||
total_requests: raw?.metrics?.total_requests ?? 0,
|
||||
unique_principals: raw?.metrics?.unique_principals ?? 0,
|
||||
unique_ips: raw?.metrics?.unique_ips ?? 0,
|
||||
unique_agents: raw?.metrics?.unique_agents ?? 0,
|
||||
top_ips: Array.isArray(raw?.metrics?.top_ips) ? raw.metrics.top_ips : [],
|
||||
top_agents: Array.isArray(raw?.metrics?.top_agents) ? raw.metrics.top_agents : []
|
||||
}
|
||||
};
|
||||
} catch (err) {
|
||||
error = err instanceof Error ? err.message : 'Failed to load status';
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user