portainer icon indicating copy to clipboard operation
portainer copied to clipboard

Container filter not possible to remove

Open trejjam opened this issue 1 year ago • 20 comments

Before you start please confirm the following.

Problem Description

In the Container list, when you set filter e.g., State[]=Exited. Then, you delete the exited container(s). Now, you can not uncheck State[]=Exited filter.

Expected Behavior

Filter resets when not applicable or visible even if not applicable.

Actual Behavior

The filter does not display applied settings when it's no longer applicable to data, so it's unable to remove such.

Steps to Reproduce

  1. Go to Containers
  2. Create and stop a container (optional)
  3. Filter State=Exited
  4. Delete exited container(s)
  5. Unable to uncheck State=Exited

Portainer logs or screenshots

Set filter. image

Delete stopped containers, unable to remove filter: image

Portainer version

2.22.0

Portainer Edition

Community Edition (CE)

Platform and Version

Docker Swarm 20.10.5

OS and Architecture

Debian 5.10

Browser

Google Chrome 129.0.6668.90

What command did you use to deploy Portainer?

portainer:
    image: portainer/portainer-ce:2.22.0
    command: -H tcp://tasks.agent:9001 --tlsskipverify
    deploy:
      labels:
        portainer: portainer
      mode: replicated
      replicas: 1
      update_config:
        delay: 10s
      restart_policy:
        delay: 30s
        max_attempts: 10
        window: 120s
      placement:
        max_replicas_per_node: 1
        constraints: [ node.role == manager ]
      resources:
        limits:
          memory: 280m
    environment:
      GOMEMLIMIT: "200MiB"
    volumes:
      - portainer_data:/data
    networks:
      - portainer
    ports:
      - target: 9000
        published: 9000
        protocol: tcp
        mode: host
      - target: 8000
        published: 8000
        protocol: tcp


### Additional Information

_No response_

trejjam avatar Oct 11 '24 10:10 trejjam

Thanks @trejjam I just tested and confirmed.

internal: BE-11301

Nick-Portainer avatar Oct 16 '24 01:10 Nick-Portainer

Hello 👋🏼

Do you have an ETQA for the fix please? as its quite a problem

mhzawadi avatar Nov 20 '24 20:11 mhzawadi

@mhzawadi, no ETA at this stage.

Nick-Portainer avatar Nov 20 '24 21:11 Nick-Portainer

Still there on Community Edition 2.27.1 LTS

jcataluna avatar Mar 14 '25 16:03 jcataluna

+1 - issue still present

jamess60 avatar Apr 23 '25 10:04 jamess60

this one is annoying ... should be a simple fix and quick fix. I know there are many other priority things in hand but a small a quick fix shouldn't take a lot of time.

anantanandgupta avatar May 12 '25 15:05 anantanandgupta

+1 Any workaround how to remove active filter?

mrhackcz avatar May 22 '25 07:05 mrhackcz

+1 Any workaround how to remove active filter?

The only thing that works for me, is to delete all cookies and reload the page

mhzawadi avatar May 22 '25 07:05 mhzawadi

+1 Any workaround how to remove active filter?

The only thing that works for me, is to delete all cookies and reload the page

Sadly, it doesn't work on 2.30.1 STS. I removed all cookies and did a hard reload with an empty cache in Chrome.

mrhackcz avatar May 22 '25 08:05 mrhackcz

I also have this issue. Please find a solution or add a way to clear all filters.

sintbert avatar Jun 25 '25 18:06 sintbert

In Firefox, if you go to DevTools, localStorage you can delete the key "portainer.datatable_settings_containers" and it will remove the filter

PoKeRGT avatar Jun 27 '25 14:06 PoKeRGT

In Firefox, if you go to DevTools, localStorage you can delete the key "portainer.datatable_settings_containers" and it will remove the filter

This worked, thank you @PoKeRGT

gokeefe avatar Jun 28 '25 19:06 gokeefe

Sadly, I can confirm that this annoying issue is still present in the recently released Portainer 2.33.0 LTS version.

@Nick-Portainer any updates on fixing this in the current LTS? Is a bit of a shame that this bug is so long standing without a fix (since October 2024!). 😢

hhromic avatar Aug 21 '25 09:08 hhromic

Sadly, I can confirm that this annoying issue is still present in the recently released Portainer 2.33.0 LTS version.

@Nick-Portainer any updates on fixing this in the current LTS? Is a bit of a shame that this bug is so long standing without a fix (since October 2024!). 😢

Just upgraded to 2.33.0 and it works for me 🤔

mrhackcz avatar Aug 21 '25 14:08 mrhackcz

Sadly, I can confirm that this annoying issue is still present in the recently released Portainer 2.33.0 LTS version.

@Nick-Portainer any updates on fixing this in the current LTS? Is a bit of a shame that this bug is so long standing without a fix (since October 2024!). 😢

Agree with @mrhackcz. This issue appears to be fixed in 2.33.0.

gokeefe avatar Aug 21 '25 15:08 gokeefe

Mmhh.. this is how I tested it. I have a local Docker Desktop instance running.

So first, launch a brand new fresh Portainer:

$ docker run --rm -it -p 19000:9000 -p 19443:9443 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce:2.33.0

After starting up, go to https://localhost:19443/ and create an admin account as instructed. Then just click on "Get started" to use the local Docker socket instance.

Start and stop a couple of containers to have something in the Containers view:

$ docker run -it alpine
/ # exit

At this point this is the view:

Image

Now, use the state filter to select the "exited" containers. Notice the filters being active:

Image

Now, select all the filtered containers (one in this example) and delete them in bulk:

Image

After removing all the "exited" containers, the filter remains active for the "exited" status but it no longer appears as a selectable option (because there are no more containers with the "exited" status), and it is impossible to deselect and clear the filter now:

Image

At this point, there is no way to clear the filter except cleaning the browser data for Portainer, or creating another container with an "exited" status so the option re-appears in the filter menu and it can be deselected.

I just did this again to write this issue, so I'm confident the issue is NOT resolved in 2.33.0.

hhromic avatar Aug 21 '25 16:08 hhromic

@hhromic try turning on the "running" filter and turning it off again. The filter should then be disabled. I think deleting all the containers for a given filter is probably a bit of an edge case. Curious if just enabling all the filters and disabling them again will disable the filter. If not, then I guess it's only partially resolved.

Edit: further testing shows you're right @hhromic. it's partially resolved, but still not fully.

gokeefe avatar Aug 21 '25 16:08 gokeefe

Hi,

Also have the issue: during maintenance, I've a few containers that I have to stop. When my host is rebooted, I sort the containers that are stopped (exited), but once they are started, it's not possible to remove the filter anymore. I have to select explicitly "healthy and running" to display them all. How convenient ! 😏

Image

EHRETic avatar Sep 14 '25 19:09 EHRETic

A year later, and this is still present as of 2.33.2 LTS, I spotted it when I added a filter of STARTING, while I had a slow startup of a container.

stuart-elliott-70 avatar Oct 02 '25 07:10 stuart-elliott-70

https://github.com/portainer/portainer/issues/12323#issuecomment-2415543815

Thanks @trejjam I just tested and confirmed.

internal: BE-11301

Today is officially the one year anniversary of the internal issue creation. 😢 I wonder how come the paying customers do not complain about such an evident bug.

hhromic avatar Oct 16 '25 09:10 hhromic