Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gokulnk created an issue. See original summary.

sardbaba’s picture

I think the absence of pagination is by design; anyway here's a patch which removes the select "Limit" from the form and adds the pagination to the results.

sardbaba’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: pagination-missing-on-reports-page_node-2755075.patch, failed testing.

sardbaba’s picture

sardbaba’s picture

Status: Needs work » Needs review
lussoluca’s picture

Category: Bug report » Feature request
Priority: Normal » Minor
Status: Needs review » Needs work

Thanks for the patch!

+++ b/webprofiler/src/Profiler/DatabaseProfilerStorage.php
@@ -37,7 +37,8 @@ function __construct(Connection $database) {
+    $select = $this->database->select('webprofiler', 'wp', ['fetch' => \PDO::FETCH_ASSOC])
+      ->extend('\Drupal\Core\Database\Query\PagerSelectExtender');

We have to do that also for the file storage backend (Drupal\webprofiler\Profiler\FileProfilerStorage).

sardbaba’s picture

Ok, this patch should do the job also for the storage backend.
Maybe file reading can be improved to read only the range of lines of the current page but I can't find a way to do that.

sardbaba’s picture

Status: Needs work » Needs review

There is just a little problem when searching by IP/URL with file storage, because the pager still shows all pages even if results are less than the maximum for the page (50). I'll try to fix this later.

sardbaba’s picture

sardbaba’s picture

Here is the full patch, with pagination on both database and file storage.
As said above maybe file reading can be improved to read only the range of lines of the current page but I can't find a way to do that.