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

Add filter by asset type in the assest UI page #1216

Open
Ragnar-the-mighty opened this issue Oct 19, 2024 · 1 comment
Open

Add filter by asset type in the assest UI page #1216

Ragnar-the-mighty opened this issue Oct 19, 2024 · 1 comment
Labels

Comments

@Ragnar-the-mighty
Copy link

  1. Add filter by asset type
    I have many assets that I can see from my account. Filter by name is good but a filter by asset type would help.
    I think they should be cumulative filters, only show asset that passed all filters.

I would like to be able to filter by asset type.
I am willing to try to add this to the UI but need a pointer to where to start.

  1. Show asset type at/near the top of asset page
    I also want to the individual asset page to show asset type at/near the top.
  • Names are not always descriptive
  • I should not have to open the asset edit to see this information
  • Not a big issues but I am curious on your feedback
@nhoening
Copy link
Contributor

  1. You mean the /assets view right? (code here, template here)

We have ajaxified this page recently, and here is the call to the API endpoint.

The API endpoint should show nicely how we add filters, and how we use MarshMallow to define API parameters (such as your new filter).

  1. Yes, go ahead and add that information if you think it is useful.

In the single asset view (/assets/ID), we also use the API, but from within the backend code itself. FYI: It's been leading to code that sometimes gives more trouble than it's worth, so we are slowly transitioning to the more direct JS->API way of working in the frontend. However, in this case, you get the asset type already worked out (as the asset API would only give you the asset type ID - I believe here you already get the name and it should be easy work).

@nhoening nhoening added the UI label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants