emqx-dashboard5 icon indicating copy to clipboard operation
emqx-dashboard5 copied to clipboard

Disconnected clients. Delete all button.

Open cocoaway opened this issue 1 year ago • 1 comments

What would you like to be added or enhanced?

Hi, it would be very useful to have a button to delete all clients that are disconnected from the 'Connections' page of the dashboard.

The procedure could be : select status -> disconnected (as already is) and bring up a 'delete all' button.

Thx.

Luca

Why is this needed?

Greater readability of clients, if in the past there have been hundreds of clients that no longer exist, the dashboard continues to show them, making it difficult to read. In addition, a disconnected client today can only be deleted by clicking on its client_id and without the possibility of multiple delete selections.

cocoaway avatar Jun 18 '23 15:06 cocoaway

Hi @cocoaway

Thank you for the suggestion. As a workaround, there is a batch kick API.

curl -X 'POST' \
  'http://localhost:18083/api/v5/clients/kickout/bulk' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '[  "client1", "client2" ]'

To query the disconnected:

curl -X 'GET' \
  'http://localhost:18083/api/v5/clients?page=1&limit=5&conn_state=disconnected' \
  -H 'accept: application/json'

zmstone avatar Jun 19 '23 13:06 zmstone