-
Notifications
You must be signed in to change notification settings - Fork 597
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
[v2] Blank names for containers in filters in report form #1438
Comments
This is most probably a backend issue @jatin-baweja. Can you confirm? |
@jatin-baweja can you outline which filter to use if I need to search container except deleted? |
@ramanan-ravi Multiple places where we may require stopped containers in the search. Since at this specific place we do not require so, we can use a filter
@manV NotContains filter:
|
Let's say we run a scan on a container, and then the container get deleted/stopped. but we still want to download report. in this case above filter will filter out deleted container and I will not be able to download report for it. My question is, shall we allow download report for deleted containers? Why we empty the name if container is stopped? |
We already have active flag in container search results, how is that different from stopped status? |
For such cases, the container has been removed from the host. There is a possibility that a new container can be spawned with the same name, but with no similar property(not even the same image). I don't think we can merge the new and old containers with the same name. One thing I can think of is using the digest as the name for deleted containers. But we wouldn't want to show such containers on the UI, as the number of deleted containers might increase over time and make it difficult for the user to select running containers with all the digests from deleted containers mixed with names of running containers. We can have a checkbox as an option to list deleted containers(for users who would want to have deleted containers in the list) and based on that, we can make the call to the containers API with or without the filter. Default for the checkbox would be to not list deleted containers
Active flag is different in as it pertains to the running status of the deepfence sensor, versus the stopped status which pertains to container state. A container may still be in running state, but will be inactive if the sensor on the host has been disconnected. I'm not sure if they can be merged, but need to look deeper into any use cases for having both |
@manV Can you fill the containers dropdown with node_name instead of docker_container_name? I am also setting container id in node_name when container name is not there.
Active flag in search containers api should work now. No need to set any additional filters. |
Action items for frontend
cc. @milan-deepfence |
|
|
Describe the bug
Container names are blank in filters dropdown on report form.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should not list checkboxes with blank names.
Screenshots
![blank_container_filter_checkboxes](https://private-user-images.githubusercontent.com/4747605/258430236-6ddb6ddb-29fe-4195-894a-6e229b35c93c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMzQ3NzUsIm5iZiI6MTczOTMzNDQ3NSwicGF0aCI6Ii80NzQ3NjA1LzI1ODQzMDIzNi02ZGRiNmRkYi0yOWZlLTQxOTUtODk0YS02ZTIyOWIzNWM5M2MucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMDQyNzU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTFhZjJlN2UwZjFiMWE4NDRiNWUzMDUxYjNlNDU5NTIyNWJiMmUyYWIxNGE4NmY0NmM3ZWNlZWY0N2U3YmIxZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.T6UWyLPKHHGIfsQPioeFgwUJ3HU75dgckNxg0lo-12k)
Components/Services affected
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: