Texera / texera

Collaborative Machine-Learning-Centric Data Analytics Using Workflows
https://texera.github.io
Apache License 2.0
161 stars 68 forks source link

Enhancing Report Generation by adding Operator Results #2792

Closed xudongwu-0 closed 3 weeks ago

xudongwu-0 commented 4 weeks ago

This PR enhances the report generation functionality by integrating comprehensive operator results handling, allowing for more detailed and informative reports. This PR is a continuation and enhancement of the previous PR, which can be found at the following link: https://github.com/Texera/texera/pull/2770

The file was modified in this PR: ReportGenerationService getAllOperatorResults(operatorIds: string[]): Collects all operator results from the workflow, processes them, and generates an HTML report containing both the workflow snapshot and the results for each operator. The final report is automatically downloaded with a file name derived from the workflow name.

retrieveOperatorInfoReport(operatorId: string,allResults: { operatorId: string; html: string }[]): Fetches and processes the result for a given operator, generating an HTML snippet that is included in the final report. Handles different result types, including paginated results and snapshot results.

generateReportAsHtml(workflowSnapshot: string, allResults: string[], workflowName: string): Generates a comprehensive HTML file containing the workflow snapshot and all operator results, then triggers a download of the report. The file name is created using the workflow name, ensuring easy identification of the report.

The file was changed in this PR: MenuComponent onClickGenerateReport: Displays a notification indicating that the report generation has started, collects the operator results using getAllOperatorResults from ReportGenerationService, and then calls generateReportAsHtml to generate and download the comprehensive HTML report.

Operation Process: Click the button below to generate the report with detailed operator results and the workflow snapshot. image

Here is a part of the example report. image image