Skip to content

PMM-15351: Paginate state timeline panels - #5865

Open
mattiasimonato wants to merge 3 commits into
mainfrom
PMM-15351-paginate-state-timeline-panels
Open

PMM-15351: Paginate state timeline panels#5865
mattiasimonato wants to merge 3 commits into
mainfrom
PMM-15351-paginate-state-timeline-panels

Conversation

@mattiasimonato

@mattiasimonato mattiasimonato commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Ticket number: PMM-15351

Feature build: SUBMODULES-4552

A state timeline shares the panel height between all of its rows. The more rows, the thinner each one gets, until the names on the left print on top of each other and the panel is unreadable.

Seven panels grow like that, because they draw one row per user, server, endpoint, host or node:

  • Users Activity (MySQL User Details)
  • Servers in ... Section and Sessions in ... Section (HAProxy Instance Summary)
  • Endpoint Statuses (ProxySQL Instance Summary)
  • Backup agent status over time (MongoDB Backup Details)
  • Replication Members State (PostgreSQL Replication Overview)
  • Router Status (MongoDB Router Summary)

The fix

Each panel now sets Grafana's Page size, the same option PMM-15060 used on the Uptime panel. It caps how many rows one page shows, so the rows keep their height however many series show up. The caps are 20, 10, 10, 8, 8, 6 and 4, based on how tall each panel is and checked on a live server.

Router Status and Replication Members State are short panels, so even split into pages their rows stayed under 20px. Hiding the legend hands that space to the rows: 18px to 28px on Router Status, 19px to 25px on Replication Members State. Neither panel needs the legend, because both already write the state inside the bar. The other five keep theirs.

No query, layout or panel changes.

before:
state-timeline-before

after:
state-timeline-after

A state timeline splits the panel height across every series it draws,
so once the row count passes about a dozen each row is a few pixels
tall and the Y axis labels print over each other. On these seven
panels the row count follows the number of users, servers, endpoints,
hosts or nodes, so any large environment hits that wall.

Page size bounds the rows per page, which holds the row height fixed
whatever the series count. Checked with 40 HAProxy servers: page one
still draws 10 rows at the same height as it did with 12.
Router Status is 6 grid rows tall and Replication Members State is 7,
so once paginated they fit only 4 to 6 rows and each row still came
out under 20px. Giving the legend space back to the rows takes Router
Status from 18px to 28px per row, and Replication Members State from
19px to 25px.

Nothing is lost: both panels print the state inside the bar, so the
legend only repeated what every row already says. Router Status in a
healthy cluster showed a single UP chip.
@mattiasimonato
mattiasimonato requested review from a team and Nailya as code owners August 31, 2026 09:51
@mattiasimonato
mattiasimonato requested review from fabio-silva and matejkubinec and removed request for a team August 31, 2026 09:51
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.15%. Comparing base (31318c7) to head (17b3a53).
⚠️ Report is 161 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5865      +/-   ##
==========================================
- Coverage   43.59%   37.15%   -6.44%     
==========================================
  Files         415      215     -200     
  Lines       43134     7186   -35948     
  Branches        0      585     +585     
==========================================
- Hits        18804     2670   -16134     
+ Misses      22454     4321   -18133     
+ Partials     1876      195    -1681     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f6104b0-e897-43a5-9307-69abb916ec58

📥 Commits

Reviewing files that changed from the base of the PR and between 95c70a4 and e7a1634.

📒 Files selected for processing (6)
  • dashboards/dashboards/MongoDB/MongoDB_Backup_Details.json
  • dashboards/dashboards/MongoDB/MongoDB_Router_Summary.json
  • dashboards/dashboards/MySQL/HAProxy_Instance_Summary.json
  • dashboards/dashboards/MySQL/MySQL_User_Details.json
  • dashboards/dashboards/MySQL/ProxySQL_Instance_Summary.json
  • dashboards/dashboards/PostgreSQL/PostgreSQL_Replication_Overview.json
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • percona/pmm-qa (manual)
  • percona/pmm (manual)

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


Walkthrough

Updated six Grafana state-timeline panels across MongoDB, MySQL, and PostgreSQL dashboards. The changes add perPage settings with values from 4 to 20. The MongoDB Router Status and PostgreSQL Replication Members State panels also hide their legends.

Merge Risk: ⚪ Minimal · up to e7a16

The change localizes crowded state-timeline rows through pagination and selective legend removal without altering queries or layout; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies PMM-15351 and summarizes the main change: pagination for state timeline panels.
Description check ✅ Passed The description includes the ticket number, feature build, affected panels, implementation details, validation notes, and screenshots. The optional related-work section is not needed, and the API docu…
Full details: Description check

Explanation

The description includes the ticket number, feature build, affected panels, implementation details, validation notes, and screenshots. The optional related-work section is not needed, and the API documentation section does not apply because no API endpoints changed.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fabio-silva

Copy link
Copy Markdown
Contributor

@mattiasimonato seems good, can we just have some screenshots (one panel is enough)?

@mattiasimonato

Copy link
Copy Markdown
Contributor Author

@mattiasimonato seems good, can we just have some screenshots (one panel is enough)?

@fabio-silva, I added a before/after of the Users Activity panel to the PR description 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants