Skip to content

Refactor(Instance Analytics): use diff months util

What does this MR do?

This MR takes care of the first follow-up part of this ticket: #268224 (closed)

It moves to use the datetime_utility getDifferenceInMonths, which was introduced here: !45363 (merged), instead of a local computed calculation.

Screenshots

Screen_Shot_2020-10-12_at_17.24.21

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

To test this out, run bundle exec rails c and run the following to enable the feature flag:

  • Feature.enable(:instance_statistics)

To ensure you have data to display in the chart run the following to seed the DB:

  • FILTER=instance_statistics bundle exec rake db:seed_fu

After that navigate here to see the page: http://localhost:3000/admin/instance_statistics

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #268224 (closed)

Edited by Michael Lunøe

Merge request reports

Loading