grafana / unused

CLI tool, Prometheus exporter, and Go module to list your unused disks in all cloud providers
Apache License 2.0
51 stars 1 forks source link

Add "select all" into UI #53

Open fedordikarev opened 11 months ago

fedordikarev commented 11 months ago

a "select all" or something similar to batch delete in unused's interface would be handy

fedordikarev commented 11 months ago

Meanwhile I think "select all" could be dangerous as it's easy to miss and delete something extra. My suggestion: we add flag or two:

  1. -batch-delete to batch delete disks
  2. either second flag like -i-want-to-delete-that-much-disks=n or add that for -batch-delete.

Idea that user provide -batch-delete flag telling that he is ok to delete all the found and filtered disks. Program will count number of disks after filter applied, and if and only if that number and number in the second flag are the same, we actually delete disks. If numbers are different, program will show message like: "You asked to delete disks, but after filter applied I will delete disks, here is the list: ..."

so user will check list one more time and verify that they are ok with number and list of disks to delete.

inkel commented 9 months ago

As we discussed in our meeting, I think that select all should work similarly as what Google Mail does, that is, selecting all that are displayed in the current page and nothing else. So if you're displaying 10 disks but that are 35 disks in total, select all will only select the 10 that are displayed and leave the remaining 25 out of it.

Another possibility is that when the user presses x to delete the disks it shows first a list of what is going to be deleted and then asks for confirmation.

@npazosmendez what do you think? Would that make it safer in your opinion?

npazosmendez commented 9 months ago

selecting all that are displayed in the current page and nothing else.

That sounds perfect.

Another possibility is that when the user presses x to delete the disks it shows first a list of what is going to be deleted and then asks for confirmation.

And that would be great too.

I think with those two things it will be safe enough.

npazosmendez commented 9 months ago

It's a bit of a separate topic, but in regards to safety, maybe a -dry-run flag would be nice. It's not like the users can't currently run it without deleting things, but it's nice to be able to run it knowing that no matter what you accidentally do, you won't delete anything.