Skip to content

fix(ui): move pagination data into script tag#3155

Closed
crivetimihai wants to merge 1 commit intomainfrom
2975-alpine-pagination-issue
Closed

fix(ui): move pagination data into script tag#3155
crivetimihai wants to merge 1 commit intomainfrom
2975-alpine-pagination-issue

Conversation

@crivetimihai
Copy link
Copy Markdown
Member

@crivetimihai crivetimihai commented Feb 24, 2026

Note: This PR was re-created from #3006 due to repository maintenance. Your code and branch are intact. @gcgoncalves please verify everything looks good.

🐛 Bug-fix PR

📌 Summary

  1. Define paginationData() once as a global function in admin.js, with all its methods.
  2. Replace the inline Jinja2 data in the template with data-* attributes;

Closes #2975
Closes #3040

🔁 Reproduction Steps

  1. Access the Admin UI
  2. Open the browser console
  3. Check there are no errors
  4. Navigate to the table tabs (mcp gateways, virtual servers, tools...)
  5. Check pagination is working correctly (change items per page, switch pages, etc.)

🐞 Root Cause

Jinja was escaping JS content inside a x-data attribute.

💡 Fix Description

Moved the JS object inside a script tag to prevent escaping, then referred to it from the x-data attribute.

🧪 Verification

Check Command Status
Lint suite make lint
Unit tests make test
Coverage ≥ 80 % make coverage
Manual regression no longer fails steps / screenshots

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

@crivetimihai crivetimihai added this to the Release 1.0.0-GA milestone Feb 24, 2026
@crivetimihai crivetimihai added bug Something isn't working ui User Interface SHOULD P2: Important but not vital; high-value items that are not crucial for the immediate release labels Feb 24, 2026
@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch from 69d4377 to 0b32b8d Compare February 25, 2026 13:58
marekdano
marekdano previously approved these changes Feb 25, 2026
Copy link
Copy Markdown
Collaborator

@marekdano marekdano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, as it was already approved by myself on #3006

LGTM 🚀

@marekdano
Copy link
Copy Markdown
Collaborator

@gcgoncalves - can you please resolve conflicts?

@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch 5 times, most recently from bb96266 to 6f6e7df Compare March 16, 2026 15:52
@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch from 6f6e7df to 91a0c14 Compare March 16, 2026 16:01
@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch from 91a0c14 to 4f9be56 Compare March 18, 2026 09:16
@gcgoncalves gcgoncalves added the release-fix Critical bugfix required for the release label Mar 18, 2026
@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch 2 times, most recently from dc4d935 to 90056e8 Compare March 19, 2026 14:03
@gcgoncalves
Copy link
Copy Markdown
Collaborator

Changing from 1.1.0 to 1.0.0, to make the plugins intractable.

@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch from 90056e8 to f1e9df0 Compare March 20, 2026 10:46
@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch from f1e9df0 to ecdec1d Compare March 23, 2026 09:12
@marekdano
Copy link
Copy Markdown
Collaborator

@gcgoncalves - I can approve this PR after eslint and pytest are fixed.

@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch 13 times, most recently from 7e427c6 to 3806131 Compare March 24, 2026 14:36
@gcgoncalves gcgoncalves requested a review from marekdano March 24, 2026 15:08
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
@gcgoncalves gcgoncalves force-pushed the 2975-alpine-pagination-issue branch from 3806131 to dda1b6a Compare March 24, 2026 15:08
@gcgoncalves gcgoncalves requested a review from vishu-bh March 24, 2026 16:36
@gcgoncalves
Copy link
Copy Markdown
Collaborator

@marekdano

Copy link
Copy Markdown
Collaborator

@marekdano marekdano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@crivetimihai crivetimihai removed the release-fix Critical bugfix required for the release label Mar 26, 2026
@marekdano marekdano added the release-fix Critical bugfix required for the release label Mar 27, 2026
@crivetimihai crivetimihai removed the release-fix Critical bugfix required for the release label Apr 3, 2026
@gcgoncalves gcgoncalves closed this Apr 7, 2026
@gcgoncalves gcgoncalves deleted the 2975-alpine-pagination-issue branch April 13, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working SHOULD P2: Important but not vital; high-value items that are not crucial for the immediate release ui User Interface

Projects

None yet

3 participants