diff options
author | Dave Arter <davea@mysociety.org> | 2017-06-21 13:30:02 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-07-17 14:17:45 +0100 |
commit | 105b2fbd64f4e2482c578ad499ec220f5ee49384 (patch) | |
tree | 8249c0993e4fe5a984f82ac829b8ac881d0c085a /bin | |
parent | 104a583de563aa340ecbd8e86f14683bc46194c7 (diff) |
Include area stats in all-reports.json
This makes it possible to display stats per area on /reports
Cobrands using this functionality should use the pre-dashboard
reports/index.html template and pass --areas when calling bin/update-all-reports
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/update-all-reports | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/update-all-reports b/bin/update-all-reports index 250901312..4c0e96d31 100755 --- a/bin/update-all-reports +++ b/bin/update-all-reports @@ -22,12 +22,13 @@ use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( '%c %o', [ 'table', "Output JSON for old table-style page." ], + [ 'areas', "Include area IDs in output JSON." ], [ 'help', "print usage message and exit", { shortcircuit => 1 } ], ); print($usage->text), exit if $opt->help; if ($opt->table) { - FixMyStreet::Script::UpdateAllReports::generate(); + FixMyStreet::Script::UpdateAllReports::generate($opt->areas); } else { FixMyStreet::Script::UpdateAllReports::generate_dashboard(); } |