Skip to content

(UI Bug) "Select All" checkbox in container list page selects all non visible containers. causing potential data loss #10864

Open
@johngrantdev

Description

Before you start please confirm the following.

Problem Description

On the container list page, the "select all rows" checkbox functionality currently selects all container items across all paginated pages, not just those visible on the current page. This behaviour does not align with the commonly accepted pattern for 'select all' check boxes in table interfaces (eg. gmail) in that it doesn't adhere to direct manipulation principles (where actions should only be made on items presented to the user (unless explicitly stated otherwise)). This can lead to unintended bulk actions on containers, potentially resulting in significant data loss. While the interface does state 'X item(s) selected' at the bottom of the table. The visual indication of checked items showing what is selected is more prominent therefore is the primary feedback of which items are selected.

Expected Behavior

The expected behaviour of the checkbox at the top of the rows is to select all of the items currently presented to the user. If the user wants to do a bulk action on a larger number of items or all items, It would be expected that they would use the 'Items per page' drop down to show more or all items that they can perform actions on. Alternatively if they have not discovered the 'items per page' drop down, they might repeat the bulk action per paginated page.

Actual Behavior

When the user checks the checkbox at the top left of the container list table, the feedback is that all currently shown items are selected. When an action is made on this selection such as delete and remove non persistent data, all containers on the system are deleted, not just the items that were shown to be selected.

Steps to Reproduce

Load 11 or more containers into the docker instance being managed by Portainer.
Navigate to the Containers page from the navigation menu.
Ensure the default 'items per page' drop down is set to 10.
Click the checkbox in the title row of the table that has the tooltip 'click to select all items'
Click page 2 at the bottom and notice that these items are selected.
Navigate back to page 1 and click the red Remove button.
Check 'Automatically remove non-persistent volumes' in the dialog and click Remove
Notice that all items are deleted.

Portainer logs or screenshots

No response

Portainer version

2.19.4

Portainer Edition

Community Edition (CE)

Platform and Version

Docker 20.10.17

OS and Architecture

Ubuntu 22.04

Browser

Brave 1.60

What command did you use to deploy Portainer?

portainer:
    container_name: portainer
    image: portainer/portainer:latest
    restart: unless-stopped
    command: -H unix:///var/run/docker.sock
    networks:
      - docker_network
    security_opt:
      - no-new-privileges:true
    ports:
      - "9000:9000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - $DOCKERDIR/portainer/data:/data 
    environment:
      - TZ=$TZ

Additional Information

No response

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions