feat: Add Report Viewer Dialog to Cleaner Page
Added a new "View Reports" button to the CleanerPage which opens a new ReportViewerDialog. This dialog lists all available execution reports stored in S3 for the current user, or for all users if the current user is an admin. The reports are downloaded as Markdown and rendered using react-markdown. Added three new IPC channels to fetch and download reports using the existing RustfsService and S3Client. Co-authored-by: luwamgere15-crypto <255338376+luwamgere15-crypto@users.noreply.github.com>
This commit is contained in:
@@ -168,3 +168,25 @@ export interface DatabaseAPI {
|
||||
params?: Record<string, unknown>
|
||||
) => Promise<IpcResult<SqlServerQueryResult>>
|
||||
}
|
||||
|
||||
/**
|
||||
* Report service APIs
|
||||
*/
|
||||
export interface ReportAPI {
|
||||
/**
|
||||
* List all reports across all users (Admin only typically)
|
||||
*/
|
||||
listAll: () => Promise<IpcResult<{ key: string; filename: string; username: string; lastModified?: Date; size?: number }[]>>
|
||||
|
||||
/**
|
||||
* List reports for a specific user
|
||||
* @param username - Username to list reports for
|
||||
*/
|
||||
listByUser: (username: string) => Promise<IpcResult<{ key: string; filename: string; username: string; lastModified?: Date; size?: number }[]>>
|
||||
|
||||
/**
|
||||
* Download a specific report by key
|
||||
* @param key - Report object key in RustFS
|
||||
*/
|
||||
download: (key: string) => Promise<IpcResult<string>>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user