feat(FN-2664): add dashboard updates check endpoint and settings flow
- Add GET /api/updates/check endpoint in dashboard server with coverage for success, failure, and disabled update scenarios - Extend legacy dashboard API client with check-for-updates request support - Add Settings modal update-check UI and styling for trigger, loading, and result states - Expand Settings modal tests and document the updates check endpoint in architecture docs
This commit is contained in:
@@ -192,6 +192,10 @@ export function fetchDashboardHealth(): Promise<DashboardHealthResponse> {
|
||||
return api<DashboardHealthResponse>("/health");
|
||||
}
|
||||
|
||||
export function checkForUpdates(): Promise<UpdateCheckResponse> {
|
||||
return api<UpdateCheckResponse>("/updates/check");
|
||||
}
|
||||
|
||||
export function fetchTasks(
|
||||
limit?: number,
|
||||
offset?: number,
|
||||
@@ -411,8 +415,8 @@ export function updateSettings(settings: Partial<Settings>, projectId?: string):
|
||||
}
|
||||
|
||||
export interface UpdateCheckResponse {
|
||||
currentVersion?: string;
|
||||
latestVersion?: string | null;
|
||||
currentVersion: string;
|
||||
latestVersion: string | null;
|
||||
updateAvailable: boolean;
|
||||
lastChecked?: number;
|
||||
disabled?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user