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

BUG FIX - The CSV file from the reports page is not downloaded #246

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions DSL/DMapper/hbs/array-to-object.handlebars
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
{{#each results as |item i|}}
{{#each item.response.body.[0]}}
"{{lookup @root.fields i}}": "{{this}}",
{{/each}}
{{/each}}
"eof": true
{{#each results as |item i|}}
{{#each item.response.body.[0]}}
"{{lookup @root.fields i}}": "{{this}}"{{#unless @last}},{{/unless}}
{{/each}}
{{#unless @last}},{{/unless}}
{{/each}}
}
4 changes: 2 additions & 2 deletions DSL/Resql/get-period-times.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ SELECT
WHEN (:period = cmonth) THEN date_trunc(cmonth, NOW() - oneMonth)
WHEN (:period = cquarter) THEN date_trunc(cquarter, NOW() - threeMonth)
WHEN (:period = cyear) THEN date_trunc(cyear, NOW() - oneYear)
WHEN (:period = cnever) THEN date_trunc(cnever, :start::date)
WHEN (:period = cnever) THEN date_trunc(cday, :start::date)
END AS "start",
CASE
WHEN (:period = cday) THEN date_trunc(cday, NOW()) - oneDay
WHEN (:period = cweek) THEN date_trunc(cweek, NOW()) - oneDay
WHEN (:period = cmonth) THEN date_trunc(cmonth, NOW()) - oneDay
WHEN (:period = cquarter) THEN date_trunc(cquarter, NOW()) - oneDay
WHEN (:period = cyear) THEN date_trunc(cyear, NOW()) - oneDay
WHEN (:period = cnever) THEN date_trunc(cnever, :end::date)
WHEN (:period = cnever) THEN date_trunc(cday, :end::date)
END AS "end"
FROM consts;
1 change: 1 addition & 0 deletions DSL/Ruuter/POST/odp/download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ return:
headers:
Content-disposition: "attachment;filename=metrics.csv"
return: ${metricDataCSV}
status: 200
1 change: 1 addition & 0 deletions DSL/Ruuter/POST/odp/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,4 @@ to_csv:
return:
return: ${csv}
next: end
status: 200