catalyst / moodle-tool_cloudmetrics

Realtime metrics for Moodle
https://moodle.org/plugins/tool_cloudmetrics
GNU General Public License v3.0
0 stars 3 forks source link

When viewing a chart in db collector, have a date limit #39

Closed brendanheywood closed 2 years ago

brendanheywood commented 2 years ago

This needs to be a little smart, if we are collecting every minute we probably want to show a day or a week of data. If collecting every hour then every week or month. If every day then say 3 months of data. The exact map from collection schedule to time span needs some playing around and tuning. But I'd say roughly the ratio should be around 1:100 - 1:1000

So I'd like some sort of simple date chooser across the top, maybe with 1 day, 1 week, 4 weeks, 4 months, 12 months as the options. If you don't select a period it chooses one for you.

Also regardless of the date limits I think the raw sql should have some limit to it, like no more than 2000 rows