Optimize generate report
Context
Section titled ContextConsidering to fix the issue about when one of the export button can not click but export metric button can click, and change logic about polling api in backend. we have to optimize generate report flow.
Design
Section titled DesignC2 - Generate report - AS-IS
Section titled C2 - Generate report - AS-ISSequence Diagram
Section titled Sequence DiagramC2 - Generate report - TO-BE
Section titled C2 - Generate report - TO-BESequence Diagram
Section titled Sequence DiagramAPI Design
Section titled API Designthe request body of generate report api is the same as as-is, but will add one parameter in the request body.
URI: POST /reports
Request payload:
{
...
"metricTypes": [
"string"
]
}