Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulp API web interface referencing invalid jquery version #5306

Closed
chtaylo2 opened this issue Apr 24, 2024 · 3 comments · Fixed by #5308
Closed

Pulp API web interface referencing invalid jquery version #5306

chtaylo2 opened this issue Apr 24, 2024 · 3 comments · Fixed by #5308

Comments

@chtaylo2
Copy link
Contributor

Version
pulpcore v3.52.0 and prior likely

Describe the bug

pulpcore/pulpcore/app/templates/rest_framework/api.html

Line 294
<script src="{% static "rest_framework/js/jquery-3.5.1.min.js" %}"></script>

Above line is referencing jquery-3.5.1.min.js and should be referencing jquery-3.7.1.min.js.

pulpcore-manager collectstatic is already puling down the new v3.7.1 file causing multiple features of the web interface to not function.

To Reproduce
Load the API web interface and try clicking on any of the drop downs. GET, FILTER, OPTIONS

Expected behavior
Should load the proper JS files

Additional context

I'll be submitting a PR to fix

@mdellweg
Copy link
Member

Does anyone remember why we are shipping this file? It looks like it should be taken directly from drf.

@chtaylo2
Copy link
Contributor Author

chtaylo2 commented Apr 24, 2024

Looks to be come minor cosmetic customizations, but leveraging the one from drf works 100%. I think that's a better approach to this breaking every few years when they update.

Similar to files in /assets/ creating a symlink works:

ln -s /usr/local/lib/python3.9/site-packages/rest_framework/templates/rest_framework/api.html /usr/local/lib/python3.9/site-packages/pulpcore/app/templates/rest_framework/api.html

Not sure where they would go in the pulpcore codebase. I'll go ahead and fix the file for now while some long term thinking takes place.

@dkliban
Copy link
Member

dkliban commented Apr 24, 2024

We use this template for the /pulp/api/v3/docs/ page.

chtaylo2 added a commit to chtaylo2/pulpcore that referenced this issue Apr 24, 2024
As of 3.15.0 version of django-rest-framework the embeded
jquery version is now 3.7.1

fixes pulp#5306
@pulpbot pulpbot moved this to Needs review in RH Pulp Kanban board Apr 24, 2024
mdellweg pushed a commit that referenced this issue Apr 25, 2024
As of 3.15.0 version of django-rest-framework the embeded
jquery version is now 3.7.1

fixes #5306
@pulpbot pulpbot moved this from Needs review to Done in RH Pulp Kanban board Apr 25, 2024
patchback bot pushed a commit that referenced this issue Jun 27, 2024
As of 3.15.0 version of django-rest-framework the embeded
jquery version is now 3.7.1

fixes #5306

(cherry picked from commit 00b1a39)
gerrod3 pushed a commit that referenced this issue Jun 27, 2024
As of 3.15.0 version of django-rest-framework the embeded
jquery version is now 3.7.1

fixes #5306

(cherry picked from commit 00b1a39)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants