diff options
author | Zarino Zappia <mail@zarino.co.uk> | 2017-05-17 17:35:43 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-06 18:39:14 +0100 |
commit | 8a6a4ccb789f5f638a5c969ffeecc0ca047095a1 (patch) | |
tree | ff55d6875d552236ff7b2383adf8423b33c4b470 /bin | |
parent | c0176254c3716e9e9915f3fd0f875f43e5e1e4ed (diff) |
[fixmystreet.com] New version of /reports page.
This is a much broader summary page, plus a body name autocomplete.
This uses a cut down version of chart.js. [1]
[1] The full version was 149Kb (41Kb gzipped) plus you needed moment
(50Kb/17Kb), for a total of 199Kb/58Kb. By stripping out unused graphs
and code and config options, and switching to category axis rather than
time, it is now a total of 39Kb/13Kb.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/update-all-reports | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/update-all-reports b/bin/update-all-reports index 4545cf1a8..02f9fda78 100755 --- a/bin/update-all-reports +++ b/bin/update-all-reports @@ -17,5 +17,17 @@ BEGIN { } use FixMyStreet::Script::UpdateAllReports; +use Getopt::Long::Descriptive; -FixMyStreet::Script::UpdateAllReports::generate(); +my ($opt, $usage) = describe_options( + '%c %o', + [ 'dashboard', "Output JSON for new dashboard-style page." ], + [ 'help', "print usage message and exit", { shortcircuit => 1 } ], +); +print($usage->text), exit if $opt->help; + +if ($opt->dashboard) { + FixMyStreet::Script::UpdateAllReports::generate_dashboard(); +} else { + FixMyStreet::Script::UpdateAllReports::generate(); +} |