aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Dashboard.pm
Commit message (Collapse)AuthorAgeLines
* Generalise heatmap code to be under /dashboard.Matthew Somerville2019-10-15-0/+101
|
* Default dashboard users to cobrand they are on.Matthew Somerville2019-10-14-7/+12
|
* Update a number of packages.Matthew Somerville2019-05-13-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update: * Catalyst * Specify Catalyst::DispatchType::Regex explicitly * Remove Catalyst::Plugin::Unicode::Encoding * Catalyst::Plugin::SmartURI * Specify URI::SmartURI explicitly * Catalyst::Plugin::Static::Simple * CGI * Class::Load * DateTime * DateTime::TimeZone * DBD::Pg * DBIx::Class * DBIx::Class::EncodedColumn. * Email::Address. * Email::MIME * ExtUtils::MakeMaker * ExtUtils::ParseXS (for Params::Classify upgrade) * File::ChangeNotify * Image::Size * IO::Socket::SSL * local::lib * Moo * Moose (and some related others due to deprecations) * namespace::autoclean * Net::Server * Net::SSLeay * Number::Phone * Plack * Starman * Template * Test::PostgreSQL * Test::WWW::Mechanize::Catalyst * Text::CSV * YAML carton install was run on a wheezy box, the oldest that is supported, to make sure the required minimal vesions of core modules weren't removed from the snapshot. Cpanel::JSON::XS, Devel::GlobalDestruction::XS, and MooseX::NonMoose were then put back in the snapshot, in case another system needs them (e.g. system Perl on Mac looks for MooseX::NonMoose).
* Merge branch 'stream-csv-output'Matthew Somerville2019-03-05-11/+25
|\
| * Stream dashboard CSV output.Matthew Somerville2019-03-05-11/+25
| | | | | | | | | | | | Rather than compile it all into on big string for output, write the output as we go. Also output headers to encourage intermediaries to stream as well.
* | Add DateRange class.Matthew Somerville2019-03-04-9/+10
|/ | | | | This simplifies the places where a date range is used; it also makes Dashboard date parsing more flexible.
* [FixaMinGata] Adds a cobrand hook (threshold for responsiveness top 5 list)Joe Siltberg2019-02-25-1/+1
| | | | Fixes #1957
* Allow user to be associated with multiple areas.Matthew Somerville2019-02-14-8/+11
| | | | | | Update database to store an array of IDs rather than only one; consequential changes to the admin and the dashboard to allow selection.
* Don't generate local coords in CSV if unasked for.Matthew Somerville2018-10-23-1/+1
|
* Add cobrand hook for dashboard viewing permission.Matthew Somerville2018-10-10-1/+13
| | | | | This allows a cobrand to e.g. as the test does, allow public access to dashboard CSV export for a body, but not otherwise.
* Speed up dashboard CSV export.Matthew Somerville2018-10-08-0/+1
| | | | | | | Without fetching bodies_str, the update export was doing a query per update to fetch the corresponding problem. [BANES] Speed up extra columns by prefetching the relevant users.
* Dashboard update CSV export.Matthew Somerville2018-10-03-16/+51
|
* Rename problems_rs to objects_rs.Matthew Somerville2018-10-03-15/+18
| | | | No functional change.
* Some minor function refactoring.Matthew Somerville2018-10-03-14/+17
|
* Add two fields to dashboard CSV export.Matthew Somerville2018-10-03-0/+7
|
* Speed up fetching lists of bodies.Matthew Somerville2018-09-25-1/+3
| | | | | | Use a HashRefInflator wherever all_sorted is used, with consequential changes to deal with it now not being an object (e.g. add some with_* functions for manual fetching of extra data).
* Fix issue displaying anonymous account email.Matthew Somerville2018-06-07-1/+1
|
* Fallback to ID ordering on dashboard export.Matthew Somerville2018-05-31-1/+1
|
* Call cobrand hook to add extra CSV columns on dashboard exportDave Arter2018-05-30-0/+1
|
* Pass columns CSV needs into Problem->as_hashref.Matthew Somerville2018-03-19-9/+4
| | | | Then it can skip working out some things as they are not needed.
* Merge branch 'issues/commercial/987-zurich-csv-updates'Matthew Somerville2018-03-14-0/+7
|\
| * [Zurich] Refactor to use same CSV generation code.Matthew Somerville2018-03-05-0/+7
| |
* | Show default start date on dashboard.Matthew Somerville2018-03-13-24/+11
|/ | | | This makes it clearer what is being shown.
* Ignore deleted/area-less bodies in dashboard list.Matthew Somerville2018-01-03-1/+2
|
* Add some new Body model helper methods.Matthew Somerville2018-01-03-5/+1
| | | | And use the existing ones more.
* Generate state_map later on, for use by bar chart.Matthew Somerville2017-12-15-10/+3
| | | | | | The summary page calls generate_grouped_data, which requires state_map in order to sort the states appropriately, so generate it there rather than earlier.
* [fixmystreet.com] CSV download from marketing pageStruan Donald2017-12-15-63/+99
| | | | | | Limited to most recent 100 rows and not full data. Factor the two CSV generations together.
* [fixmystreet.com] Council average response time.Struan Donald2017-12-15-0/+7
|
* [fixmystreet.com] Marketing page, filterable statsStruan Donald2017-12-15-3/+5
| | | | | Uses the dashboard stats code to display a rough table of stats which can be used as the basis for a chart later
* Stop using 'readable' dates in CSV export.Matthew Somerville2017-12-01-9/+9
| | | | We want machine-readable dates in a data export.
* Fix potential update issues with CSV export.Matthew Somerville2017-11-30-1/+2
| | | | | Only look at confirmed updates, and spot updates using mark_fixed and not problem_state (e.g. questionnaire responses).
* Merge branch '1919-consolidate-statistics'Matthew Somerville2017-11-29-187/+194
|\
| * Consolidate summary statistics pages.Matthew Somerville2017-11-29-187/+194
| |
* | allow dashboard CSV export access using token authStruan Donald2017-11-29-0/+4
|/
* Treat dashboard end date as that given, inclusive.Matthew Somerville2017-11-16-2/+3
| | | | | If someone selects 15-16th November, they want reports from both those dates, not just the 15th.
* add date range options to council dashboardStruan Donald2017-11-14-0/+21
|
* sort body dashboard CSV export by report confirmed timeStruan Donald2017-09-07-1/+1
| | | | | And update the tests to avoid a random failure caused by inconsistent ordering.
* include easting/northing in dashboard CSV exportStruan Donald2017-09-04-0/+6
| | | | Fixes mysociety/fixmystreetforcouncils#221
* include ward in dashboard csv exportStruan Donald2017-09-04-0/+7
| | | | | | | Adds a Ward column to the council dashboard CSV export with the name of the ward. Fixes mysociety/fixmystreetforcouncils#220
* Remove hardcoded states from templates.Matthew Somerville2017-08-31-3/+4
| | | | | | | | | | | State display names are now got from the database wherever they are displayed, including admin dropdowns, list filters, and update meta statements. This also covers the open/closed/fixed 'groups'. This also fixes a bug whereby if e.g. an update has problem_state investigating, the next update has no problem_state, and the last update has investigating again, it was previously showing a state change to investigating on that third update.
* Return 400/500 for some client/server errors.Matthew Somerville2016-12-16-2/+2
|
* Switch to JSON::MaybeXS, remove JSON::XS.Matthew Somerville2016-01-22-1/+2
| | | | | | Travis has Cpanel::JSON::XS preinstalled, which means that the build would fail there, as JSON::MaybeXS would try and upgrade JSON::XS to version 3 which the snapshot did not contain.
* Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-7/+9
| | | | | | | Make dashboard work properly in two-tier councils, showing reports sent to both. Create an index on the array of the bodies_str column to speed up performance, and use that throughout the code replacing all LIKE scans. This also enables a simplifying tidy of the restriction code.
* Factor out all uses of param()/params.Matthew Somerville2015-07-07-7/+7
| | | | | | | Use a central get_param and get_param_list functions dependent on whether we're after a scalar or a list (almost always a scalar). This prevents any possibility of confusion where param() could return a list, or params->{} an arrayref.
* Create timezone objects only once at startup.Matthew Somerville2015-02-13-1/+1
| | | | | | Cache a DateTime::TimeZone::Local object, so that in an environment where /etc/localtime is a copy of a timezone file, we don't repeatedly walk all the timezone files to find the matching one.
* Allow '\n' and other binary chars in dashboard CSVDave Arter2014-04-29-2/+2
| | | | | | | | | | | | By default, Text::CSV doesn't allow binary characters such as newline, carriage return etc., in cells. This causes issues when exporting data that contains these characters, such as problem reports with more than one line. This commit also explicitly tells Text::CSV to append a newline to each row instead of joining the rows together with this char at the end. Fixes #494.
* Use local DateTimes in dashboard and its tests.Matthew Somerville2014-04-07-8/+9
| | | | | Otherwise oddities arise due to summer time differences putting a BST now-6d23h time behind a UTC now+1s-1w.
* Export reports as CSV on /dashboardHakim Cassimally2014-03-10-6/+104
| | | | | | | | | | | | | | | Provide a button to download the details and text of reports at the second "Look up" button on /dashboard. Provides acknowledged, fixed, closed dates by parsing updates. Fixes #692 (and mysociety/FixMyStreet-Commercial#399) Email is not shown, and name honours anonymous flag: as /dashboard is accessible to people who are from_body (who still do not see anon-users name and email in the FMS web app.) A basic test is provided as per Zurich's similar report.
* Quash DBIC warnings re DateTime in dashboardHakim Cassimally2014-03-10-5/+11
|
* Merge remote branch 'origin/zurich'Matthew Somerville2013-02-04-9/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/open311-populate-service-list bin/send-comments bin/update-all-reports conf/crontab.ugly db/schema.sql perllib/FixMyStreet/App/Controller/Admin.pm perllib/FixMyStreet/App/Controller/Report/New.pm perllib/FixMyStreet/App/Controller/Reports.pm perllib/FixMyStreet/Cobrand/Default.pm perllib/FixMyStreet/Cobrand/LichfieldDC.pm perllib/FixMyStreet/DB/Result/Open311conf.pm perllib/FixMyStreet/DB/Result/Problem.pm perllib/FixMyStreet/DB/ResultSet/Problem.pm perllib/FixMyStreet/SendReport.pm perllib/FixMyStreet/SendReport/Email.pm perllib/FixMyStreet/SendReport/Open311.pm perllib/Open311/GetServiceRequestUpdates.pm perllib/Open311/PopulateServiceList.pm t/app/controller/report_new.t t/app/controller/rss.t templates/web/bromley/report/display.html templates/web/default/admin/council_contacts.html templates/web/default/common_header_tags.html templates/web/default/dashboard/index.html templates/web/default/front/stats.html templates/web/default/report/_main.html templates/web/default/report/update-form.html templates/web/emptyhomes/index.html templates/web/emptyhomes/report/display.html templates/web/emptyhomes/report/new/councils_text_all.html templates/web/emptyhomes/reports/body.html templates/web/emptyhomes/reports/index.html templates/web/fixmystreet/report/new/fill_in_details_form.html templates/web/fixmystreet/report/update-form.html web/cobrands/fixmystreet/fixmystreet.js web/js/fixmystreet.js