Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADM-914:[backend][frontend] feat: set file name with time range when generate file #1386

Merged
merged 24 commits into from
Apr 19, 2024

Conversation

yulongcai
Copy link

Summary

set file name with time range when generate file

Before

before

After

Snipaste_2024-04-17_16-13-14

Note

Null

Copy link

codacy-production bot commented Apr 17, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6984484) 6854 6854 100.00%
Head commit (d6fa0ad) 13754 (+6900) 13754 (+6900) 100.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1386) 84 84 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

The deprecated coverage status is not being sent today as part of the scheduled brownout. Know more

Copy link

Hi @yulongcai! 👋
Thank you for submitting a pull request! We appreciate your contribution and will review your changes as soon as possible.

Copy link
Collaborator

@guzhongren guzhongren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change with the comments

Comment on lines 92 to 94
.csvTimeStamp("1720000000000")
.startTime("1710000000000")
.endTime("1712678399999")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convert 1720000000000 all those value into a readable variable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

@Nested
class GenerateReportByType {

String timeStamp = "1683734399999";

String startTimeStamp = "1710000000000";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用年月日转换,后面的测试都改

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

InputStreamResource result = reportService.exportCsv(reportType, Long.parseLong(filename));
log.info("Successfully get CSV file_reportType: {}, filename: {}, _result: {}", reportType.getValue(), filename,
result);
@PathVariable String timeStamp, @Parameter String startDate, @Parameter String endDate) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put those 2 new variables into the API path

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 13 to 16
params: {
startDate: this.parseCollectionDateToHumanDate(params.startDate),
endDate: this.parseCollectionDateToHumanDate(params.endDate),
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix with the API scheme

@@ -9,7 +9,13 @@ export class CSVClient extends HttpClient {

exportCSVData = async (params: CSVReportRequestDTO) => {
await this.axiosInstance
.get(`/reports/${params.dataType}/${params.csvTimeStamp}`, { responseType: 'blob' })
.get(`/reports/${params.dataType}/${params.csvTimeStamp}`, {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No frontend test??

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved.

@guzhongren
Copy link
Collaborator

下午两个团队一起diff一哈

Copy link

Copy link

Quality Gate Passed Quality Gate passed for 'au-heartbeat-heartbeat-frontend'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@yulongcai yulongcai merged commit bb3e0b9 into main Apr 19, 2024
51 checks passed
@yulongcai yulongcai deleted the ADM-914 branch April 19, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants