Added pagination when the weekly active devices metric is fetched and if the requested period is more than 3 months.
If the requested period is less than 3 months data no pagination is applied.
if there are too much data (in that case more than 500 data (ie more than 500 version exists for the requested page)) data is down-sampled. LTTB algorithm is used to select the most meaningful points that represents the dataset for each page. This approach solved most of the "Bad Gateway" error when for example 2 years of data is tried to be fetched.
Separated the active latest devices metric endpoint from the weekly active devices end point to make pagination possible.
Done
How to QA
Testing
Issue / Card
Fixes #15262
Screenshots