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

14731 plugins catalog #16763

Merged
merged 47 commits into from
Jul 25, 2024
Merged

14731 plugins catalog #16763

merged 47 commits into from
Jul 25, 2024

Conversation

arthanson
Copy link
Collaborator

@arthanson arthanson commented Jun 28, 2024

Fixes: #14731

Changed from the design of cards to a standard table as per comments. Held off on writing tests as it is info display only and it sounds like we want to change to cards fairly soon which would require re-writing a lot of the tests. We could mock the API and check the display based on that, but not sure what really to test beyond that.

ACLs | NetBox 2024-06-28 08-28-16
ACLs | NetBox 2024-06-28 08-27-44
ACLs | NetBox 2024-06-28 08-27-59
Plugins | NetBox 2024-07-15 21-33-43

@jeremystretch jeremystretch added this to the v4.1 milestone Jul 11, 2024
@jeffgdotorg
Copy link
Contributor

The screenshots look great, and I'm finally getting around to checking out the branch and taking it for a spin.

At the moment, the plugins catalog is bombing out for me with:

<class 'ValueError'>

Invalid isoformat string: '2024-01-10T18:11:37.268905Z'

Python version: 3.10.12
NetBox version: 4.1.0-dev
Plugins: None installed

That date expression is the value of the created_at property for the first plugin in the list returned from the API.

@jeremystretch
Copy link
Member

Seems like it would be a lot cleaner (and easier) to list the available plugins in a table rather than in the grid layout pictured above. A table provides more efficient use of space and enables easy ordering by column. It would also make it much easier to compare the installed version of each plugin to its latest release.

@jeffgdotorg
Copy link
Contributor

I'm fine with a table layout for the initial implementation. We'll revisit the card / grid design down the road, during or after the 4.1 beta period.

netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
netbox/core/plugins.py Outdated Show resolved Hide resolved
netbox/core/plugins.py Outdated Show resolved Hide resolved
netbox/core/plugins.py Outdated Show resolved Hide resolved
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

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

Could you please add some basic tests to validate the API processing and views?

netbox/core/tables/plugins.py Show resolved Hide resolved
netbox/templates/core/plugin_list.html Outdated Show resolved Hide resolved
netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
netbox/core/views.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jeffgdotorg jeffgdotorg left a comment

Choose a reason for hiding this comment

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

Nice progress here. BTW the Markdown rendering in plugin.description_short is now working as expected.

netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
netbox/core/plugins.py Show resolved Hide resolved
@arthanson
Copy link
Collaborator Author

@jeffgdotorg Detail View changed quite a bit from Jeremy's feedback - please take a re-review:
IP Fabric | NetBox 2024-07-23 15-20-23

Copy link
Contributor

@jeffgdotorg jeffgdotorg left a comment

Choose a reason for hiding this comment

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

Just a couple of small asks here. Otherwise looks good.

netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
netbox/templates/core/plugin.html Outdated Show resolved Hide resolved
Copy link
Contributor

@jeffgdotorg jeffgdotorg left a comment

Choose a reason for hiding this comment

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

A couple additional flags from talking through this PR with @natm

netbox/core/plugins.py Show resolved Hide resolved
netbox/core/plugins.py Show resolved Hide resolved
@arthanson
Copy link
Collaborator Author

Added proxy header and user-agent string to API call.

Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

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

Thanks @arthanson!

@jeremystretch jeremystretch merged commit 1d6987b into feature Jul 25, 2024
6 checks passed
@jeremystretch jeremystretch deleted the 14731-plugins-catalog branch July 25, 2024 18:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants