TableController with selectable rows

I realized that sometimes RowActions are not enough: you need to execute RowActions for some rows, but at the moment you can only do it for a single row or create a specific TableAction that targets all the rows.

I think it’s possible to extend the TableController to do so. Maybe we can differentiate these actions (let’s call’em SelectedRowsActions) and assign specific actions.
A good idea will be to also have a “fallback” with already existing RowActions.

These are just fresh thought, nothing done yet, but some brainstorming is welcome.

Thanks!

2 Likes

Hi @paspo, thank you for you thoughts!

Are you trying to solve a particular problem? What use cases are you thinking about? When should multiple rows be selected?

/cc @Alessia

As you know, I’m part of BgLUG’s Progetto Scuole.

We have a “factotum” module (doraemon) which is in great development/reorganization.
We rewrote the software from python to PHP, integrated with e-smith DB, added a NethServer module and so on.
This software helps managing all the clients (domain membership, settings, packages…) and I’ve added a “managed hosts” list to the module. In this table you can also power-on, power-off and reboot the hosts, but you can do it only per-row, for the limitations stated before.

This is just an example, I can see a lot of use cases for such functionality:

  • you have a list of items (say 100) and you want to delete a part of them (say 60): now it’s a lot of clicks…
  • any time you want to apply an action to a subset of rows of a table
2 Likes

It might be very powerful but I don’t have a clue how much effort it needed

Maybe add a checkbox to each row and under the table have an “Actions” drop down that will affect only selected rows ?

That’s exactly what I have in mind. It’s easy to say, but making it is not.
Especially if you want a well-engineered job like the rest of NethUI.

1 Like

To be complete, we would need also a “search by” and “select all search results” , to avoid selecting all the 60 items one by one!

I don’t have any plan for TableController developments at the moment. The most recent effort was CollectionController, which is the base class for FirewallRules. It’s more abstract and less constrained than TableController.

In the future (read after ns7 final release), I’d like to start some experiments with Cockpit and move towards ns8. The Patternfly framework looks promising!

This is the ugly truth :frowning2:

Thank you! Really :hugging: