-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesThe deprecated coverage status is not being sent today as part of the scheduled brownout. Know more |
Hi @yulongcai! 👋 |
There was a problem hiding this 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
.csvTimeStamp("1720000000000") | ||
.startTime("1710000000000") | ||
.endTime("1712678399999") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用年月日转换,后面的测试都改
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
params: { | ||
startDate: this.parseCollectionDateToHumanDate(params.startDate), | ||
endDate: this.parseCollectionDateToHumanDate(params.endDate), | ||
}, |
There was a problem hiding this comment.
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}`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No frontend test??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
backend/src/main/java/heartbeat/service/report/CSVFileGenerator.java
Fixed
Show resolved
Hide resolved
下午两个团队一起diff一哈 |
|
|
Summary
set file name with time range when generate file
Before
After
Note
Null