duc icon indicating copy to clipboard operation
duc copied to clipboard

[GUI] add actions on files/directory

Open yukulele opened this issue 7 years ago • 9 comments

duc GUI should have actions on files and directory (via context menu on right click for example)

Possible actions:

  • reveal in file manager
  • copy path
  • open terminal here
  • copy
  • delete
  • duc index (and refresh)

yukulele avatar Sep 12 '18 18:09 yukulele

Clément> duc GUI should have actions on files and directory (via Clément> context menu on right click for example) Possible actions:

Clément> * reveal in file manager Clément> * open terminal here Clément> * copy Clément> * delete Clément> * duc index (and refresh)

Remember, duc is not a tool for generating this data interactively. In my site, I have something like 30 DBs (and a nice index page) generated for multiple large NFS filesystems. The web and GUI servers displaying the data doesn't have to have access to the server and filesystem(s) in most cases.

I understand your wish, and maybe it could be done if the DB host and the GUI/CGI host were the exact same system. But even then, how do you get a web interface to open a terminal window?

duc is a reporting tool, not a file explorer.

John

l8gravely avatar Sep 12 '18 22:09 l8gravely

Quoting John (2018-09-13 00:10:09)

Clément> duc GUI should have actions on files and directory (via Clément> context menu on right click for example) Possible actions:

Clément> * reveal in file manager Clément> * open terminal here Clément> * copy Clément> * delete Clément> * duc index (and refresh)

Remember, duc is not a tool for generating this data interactively. In my site, I have something like 30 DBs (and a nice index page) generated for multiple large NFS filesystems. The web and GUI servers displaying the data doesn't have to have access to the server and filesystem(s) in most cases.

I believe the request was for duc-gui, not duc-cgi, so this would in theory be possible. We've had these requests before, and the concensus was that Duc should never perform any operations on the file system itself (so no delete, rename etc), and that due to the fact that the db can be inspected remote, any action that requires the fs to be available will simple not work.

As a compromise I propose the following: we add a command line options to duc-gui and and duc-ui to perform some user-configurable action on left-click for duc gui and and some keystroke for duc-ui. The user could then use this to launch any program like a file manager.

-- :wq ^X^Cy^K^X^C^C^C^C

zevv avatar Sep 13 '18 06:09 zevv

"Ico" == Ico Doornekamp [email protected] writes:

Ico> Quoting John (2018-09-13 00:10:09)

Clément> duc GUI should have actions on files and directory (via Clément> context menu on right click for example) Possible actions:

Clément> * reveal in file manager Clément> * open terminal here Clément> * copy Clément> * delete Clément> * duc index (and refresh)

Remember, duc is not a tool for generating this data interactively. In my site, I have something like 30 DBs (and a nice index page) generated for multiple large NFS filesystems. The web and GUI servers displaying the data doesn't have to have access to the server and filesystem(s) in most cases.

Ico> I believe the request was for duc-gui, not duc-cgi, so this would in Ico> theory be possible. We've had these requests before, and the concensus Ico> was that Duc should never perform any operations on the file system Ico> itself (so no delete, rename etc), and that due to the fact that the db Ico> can be inspected remote, any action that requires the fs to be available Ico> will simple not work.

Ico> As a compromise I propose the following: we add a command line Ico> options to duc-gui and and duc-ui to perform some Ico> user-configurable action on left-click for duc gui and and some Ico> keystroke for duc-ui. The user could then use this to launch any Ico> program like a file manager.

So how would this work when the user puts in these options, but they're not really local? Or when there's a name conflict (multiple systems with seperate /home volumes for example) when you browse on your system with a /home, and try to do things.

I still think this is a bad idea, and would violate the principle of least surprise.

John

l8gravely avatar Sep 13 '18 17:09 l8gravely

Quoting John (2018-09-13 19:17:30)

Ico> As a compromise I propose the following: we add a command line Ico> options to duc-gui and and duc-ui to perform some Ico> user-configurable action on left-click for duc gui and and some Ico> keystroke for duc-ui. The user could then use this to launch any Ico> program like a file manager.

So how would this work when the user puts in these options, but they're not really local?

It will not, of course. But I am confident that our user base is technically able enough to understand the usage and consequences of this functionality. We just offer the minimal hooks for people to add the required functionality (launching a file manager, deleting a file, I don't care what is on the command line).

-- :wq ^X^Cy^K^X^C^C^C^C

zevv avatar Sep 13 '18 19:09 zevv

a default action could be "copy path"

yukulele avatar Sep 13 '18 22:09 yukulele

Quoting Ico Doornekamp (2018-09-13 21:05:02)

Quoting John (2018-09-13 19:17:30)

Ico> As a compromise I propose the following: we add a command line Ico> options to duc-gui and and duc-ui to perform some Ico> user-configurable action on left-click for duc gui and and some Ico> keystroke for duc-ui. The user could then use this to launch any Ico> program like a file manager.

So how would this work when the user puts in these options, but they're not really local?

I just realized this functionality is already in duc-ui: hitting 'o' passes the selected file to xdg-open, which opens a file or URL in the user's preferred application.

-- :wq ^X^Cy^K^X^C^C^C^C

zevv avatar Sep 14 '18 09:09 zevv

I just realized this functionality is already in duc-ui: hitting 'o' passes the selected file to xdg-open, which opens a file or URL in the user's preferred application.

doesn't seem to work for me

yukulele avatar Sep 29 '18 12:09 yukulele

Thanks for duc! I second this feature request. In duc ui, the very next thing I want to do after finding disk hogs is press d to delete them (and then keep browsing for more). As in ncdu and most other disk usage analyzers.

simonmichael avatar Feb 06 '19 00:02 simonmichael

"Simon" == Simon Michael [email protected] writes:

Simon> Thanks for duc! I second this feature request. In duc ui, the Simon> very next thing I want to do after finding disk hogs is press d Simon> to delete them (and then keep browsing for more). As in ncdu Simon> and most other disk usage analyzers.

duc is not like most disk usage analyzers in that it's designed for large data sets, and so it first has to index the volume, and then you can browse and view the usage.

The actual deletion would have to be in another tool, but I think Ico was working on a plan to maybe provide a link to fire off another tool to let you do that type of cleanup.

In my case, I've got 10Tb+ file systems with 30+ million files, so doing interactive stuff isn't my goal, so much as just being able to point the users at their areas and say "please cleanup!" which never really happens...

John

l8gravely avatar Feb 10 '19 20:02 l8gravely