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

Customise periods enabled in the API and in calendar, new config setting #5037

Closed
mattab opened this issue Apr 24, 2014 · 5 comments
Closed
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Apr 24, 2014

It would be nice to be able to remove some periods (day, week, month, year, range) that are available to users via the calendar in Piwik and via the API.

The first use case is a practical one:

  • As a Piwik administrator, I want to disable custom date range requests to prevent slow processing requests being triggered from the browser.
    • because custom date range requests are processed in real time, they may take a few minutes on very high traffic website).

Maybe other users have other use cases to disable weeks and years for example, and only leave Days and Months.

Proposed:

  • add new config setting eg. enabled_periods = day,week,month,year,range

This setting affects:

  • the list of periods shown in the calendar in the UI
  • the public APIs where the parameter period=X will be restricted to enabled_periods

Feedback welcome!

@mattab
Copy link
Member Author

mattab commented May 2, 2014

In 4e717a0: Refs #5037 Setting [General] enabled_periods_UI can be used to specify which periods are available in the calendar.

@mattab
Copy link
Member Author

mattab commented May 2, 2014

In fdb13d2: Refs #5037 Applying enabled periods to the User Settings section "Report date to load by default"

@mattab
Copy link
Member Author

mattab commented May 2, 2014

In 02e030e: Refs #5037 Refactor the factory out of the Period class in its own Period\Factory class

@mattab
Copy link
Member Author

mattab commented May 2, 2014

In d88b13b: Refs #5037 Apply the enabled periods to API

@mattab
Copy link
Member Author

mattab commented May 2, 2014

In 77fa82f: Fixes #5037 You can now configure periods that are available in the UI and API

; The list of periods that are available in the Piwik calendar
; Example use case: custom date range requests are processed in real time,
; so they may take a few minutes on very high traffic website: you may remove "range" below to disable this period
enabled_periods_UI = "day,week,month,year,range"
enabled_periods_API = "day,week,month,year,range"

@mattab mattab added this to the 2.2.1 - Piwik 2.2.1 milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…ed to specify which periods are available in the calendar.
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…e in the UI and API

; The list of periods that are available in the Piwik calendar
; Example use case: custom date range requests are processed in real time,
; so they may take a few minutes on very high traffic website: you may remove "range" below to disable this period
enabled_periods_UI = "day,week,month,year,range"
enabled_periods_API = "day,week,month,year,range"
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

1 participant