Skip to content

Commit

Permalink
ADM-886:[docs]docs: refactor chart API docs sequence diagram (#1339)
Browse files Browse the repository at this point in the history
* ADM-886:[docs]docs: update chart API image size

* ADM-886:[docs]docs: update chart API docs content

* ADM-886:[docs]docs: refactor chart API docs

* ADM-886:[docs]docs: refactor chart API docs sequence diagram
  • Loading branch information
weiraneve authored Apr 7, 2024
1 parent 8bf7e58 commit e736ffa
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions docs/src/content/docs/en/spikes/tech-spikes-chart-api-solutions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,21 @@ dateRange: [
skin rose
title Charting API - Metrics page
participant FrontEnd
participant Backend
group call backend API
FrontEnd -> FrontEnd: separate the date list in order to send the request
loop send request and get response as usual
FrontEnd -> Backend: fetch information as usual
activate Backend
FrontEnd <-- Backend: return response as usual
deactivate Backend
end loop
FrontEnd -> FrontEnd: combined data
end
:Frontend separate the date list in order to send the request to backend;
fork
:fetch parameters as usual (dateRange[0]);
:get response as usual (dateRange[0]);
fork again
:fetch parameters as usual (dateRange[1]);
:get response as usual (dateRange[1]);
fork again
:fetch parameters as usual (dateRange[N]);
:get response as usual (dateRange[N]);
end fork
:combined all data;
stop
@enduml
```

Expand All @@ -74,38 +76,37 @@ The APIs for the metrics page that we do not need to modify are as follows:
skin rose
title Charting API - Report page
participant FrontEnd
participant Backend
group call backend API
FrontEnd -> FrontEnd: separate the date list in order to send the request
loop send request and get response as usual
FrontEnd -> Backend: fetch information as usual
activate Backend
FrontEnd <-- Backend: return response as usual
deactivate Backend
end loop
FrontEnd -> FrontEnd: combined data and chart
end
:Frontend separate the date list in order to send the request to backend;
fork
:fetch parameters as usual (dateRange[0]);
:get response as usual (dateRange[0]);
fork again
:fetch parameters as usual (dateRange[1]);
:get response as usual (dateRange[1]);
fork again
:fetch parameters as usual (dateRange[N]);
:get response as usual (dateRange[N]);
end fork
:combined data for charting;
stop
@enduml
```

As shown in the image, we want to refactor the frontend and backend solutions for report page. About `reports board`, `reports dora`,
`reports poll {reportId}` API, we can transfer date info time and time again. Due to the logic of the report page.
Then we accept all responses from the backend and combine the data for charting.

The APIs for the report page that we do not need to modify are as follows:
- POST /reports

Specific `reportId` need to be accompanied by additional identifiers in the responses sent,
such as information related to the selected time, to distinguish time periods

The APIs for the report page that we do not need to modify are as follows:
- POST /reports
- GET /reports/`{reportId}`
- GET /reports/metric/`{reportId}`
- GET /reports/board/`{reportId}`
- GET /reports/pipeline/`{reportId}`

About chart information:

Corresponding information about chart information and response:

- velocity:
```json
Expand Down

0 comments on commit e736ffa

Please sign in to comment.