-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Luci-app-filemanager #7300
base: master
Are you sure you want to change the base?
Luci-app-filemanager #7300
Conversation
Looking good. Avoid merge commits. Just rebase your work on master. |
45f713c
to
b2263ae
Compare
This way is better? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the contribution guidelines; squash both your commits together and name it something like luci-app-filemanager: add app
and put further verbose explanation into the commit body instead of the subject. And just do a rebase, right now you've included every commit again which (I guess) was newer than your HEAD.
b2263ae
to
e5afb22
Compare
Amend your commit subject |
What would you propose? |
e5afb22
to
32cf670
Compare
It solves user problems, won't affect existing functionality so let's merge. There are some styling issues, but that can be improved gradually latter. This is a first time contribution for @rdmitry0911 so I don't want to overwhelm him with minor comments but rather send a PR myself. |
Do you want to take it for a test-drive @stokito ? |
I tested and it works. My main comments are:
In general this may be confusing for users with existing plugin filebrowser. Maybe it worth to call it luci-app-filebrowser-extended or something like that. But instead I hope that one day we can merge the luci-app-filebrowser into Luci itself once it become more mature. |
@rdmitry0911 please address @stokito's comments. |
They aren't critical and we may work out them later. The app works and can be merged |
Initially there were no settings for width/height and padding, but finally I added them as different users have different environments and it is convenient to start this app with width/height, padding you like rather then adjust them right next to start.
No problem, I'll do that. Should I change a version number just for this commit or it is better to collect several changes and commit them together for version changing?
In fact initially it was done that way, however, using ls, cat and the likes makes the code more compact. And as far as those utils are required for running any system, using them is harmless. |
I would prefer to use the built-in fs lib than suffering monstrous regexp to process ls output. fs has a bunch of stable and usable properties. Then you avoid risks associated with parsing of dates, times and permissions. |
The problem of using 'fs.list()' is that I can't find a way to get information about symbolic links. They are returned as directories. I have to use 'fs.stat()' for every directory in a list to find links. It produces significant overhead in comparison with 'ls' |
That's true, the {
"type": "directory",
"inode": 1,
"ctime": 1729862220,
"atime": 1729222217,
"uid": 0,
"mtime": 1729862220,
"gid": 0,
"mode": 17407,
"name": "var",
"size": 820
}, The {
"type": "file",
"inode": 35494,
"ctime": 1708105277,
"atime": 1729222218,
"uid": 0,
"mtime": 1708088432,
"gid": 0,
"mode": 33261,
"name": "ash",
"size": 524309
}, We'll need to add fix this in the RPCD itself. The fs.js says that the
We better not to change the |
I would also return a target of a symlink in a separated property to avoid extra fs.stat() |
Makes sense. Also eventually we'll need to add a button to create a symlink. |
I think you can merge it. |
Try |
we better to fix the rpcd in the first place than use a workaround with ucode |
Ah yeah - it doesn't exist in the lib yet. Worth it to add it. |
@jow- in da house. Can we get a linkstat |
Is there anything I can do to accelerate approvals for this PR? |
OK, I have a suitable patch for rpcd, which may take a while to get added. But here's how it works: root@OpenWrt:/# ubus call file lstat '{"path":"/etc/os-release"}'
{
"path": "/etc/os-release",
"type": "symlink",
"size": 21,
"mode": 41471,
"atime": 1727094886,
"mtime": 1727094886,
"ctime": 1727094886,
"inode": 219,
"uid": 0,
"gid": 0
}
root@OpenWrt:/# ubus call file stat '{"path":"/etc/os-release"}'
{
"path": "/etc/os-release",
"type": "file",
"size": 528,
"mode": 33188,
"atime": 1727094886,
"mtime": 1727094886,
"ctime": 1727094886,
"inode": 1124,
"uid": 0,
"gid": 0
}
root@OpenWrt:/# ubus call file stat '{"path":"/var"}'
{
"path": "/var",
"type": "directory",
"size": 520,
"mode": 17407,
"atime": 1730221560,
"mtime": 1730221753,
"ctime": 1730221753,
"inode": 1,
"uid": 0,
"gid": 0
}
root@OpenWrt:/# ubus call file lstat '{"path":"/var"}'
{
"path": "/var",
"type": "symlink",
"size": 3,
"mode": 41471,
"atime": 1727094886,
"mtime": 1727094886,
"ctime": 1727094886,
"inode": 1264,
"uid": 0,
"gid": 0
}
root@OpenWrt:/# ubus call file stat '{"path":"/bin/ash"}'
{
"path": "/bin/ash",
"type": "file",
"size": 405522,
"mode": 33261,
"atime": 1727094886,
"mtime": 1727094886,
"ctime": 1727094886,
"inode": 15,
"uid": 0,
"gid": 0
}
root@OpenWrt:/# ubus call file lstat '{"path":"/bin/ash"}'
{
"path": "/bin/ash",
"type": "symlink",
"size": 7,
"mode": 41471,
"atime": 1727094886,
"mtime": 1727094886,
"ctime": 1727094886,
"inode": 13,
"uid": 0,
"gid": 0
} |
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
8de8aa9
to
77a08ff
Compare
Don't quite understand the functionality. Just invert selection? Or need extra options?
Implemented with alt-click |
77a08ff
to
88ba194
Compare
So invert selection looks good, but there's no visual indicator of its availability. Users would have to know about it already and be informed about 'click alt'. Adding a button 'Invert Selection' once a selection is made is a good signal - you can keep the alt behaviour around, though. That's good once you know it ;) |
I'm going to implement a help tab with all the explanations. The less items we have in the interface the more easy it will be to maintain. |
New update with help tab and HEX editor/viewer |
88ba194
to
77e7700
Compare
Don't quite understand what to do |
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
Just an invert selection button which arises once a selection has been made - then it's intuitive. But you're not keen on having one... |
77e7700
to
40b0106
Compare
Yea, I left that for a future contributors if there are any :) |
40b0106
to
0d07da7
Compare
Added ASCII, HEX and RegExp search to hex editor |
0d07da7
to
e06c6a0
Compare
Changed comments to English ones |
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
Outdated
Show resolved
Hide resolved
OK - no more new features as my review time is finite, and this thing could grow forever. |
Ok. No more new features :) |
- Navigation in resizable window - Scrollable and sortable list of files with name, type, creation date/time columns - Directory and files creation/renaming/removing - Directory and files attributes changing - Duplicating any object in the current directory - Selecting objects individually and everything for removing selected - Inverting selection with alt-click - Large files uploading/downloading - Drag'n'Drop multiple files from local directory to server - Large files editing - Line numbers toggle in editing window - HEX mode for editing/viewing - ASCII, HEX and RegExp search in HEX mode - Storage of interface settings in config file - Help tab with a short manual Signed-off-by: Dmitry R <[email protected]>
e06c6a0
to
68ce543
Compare
What should I do with this request? I don't quite understand |
Signed-off-by: <[email protected]>
row (viagit commit --signoff
) β<package name>: title
first line subject for packages βPKG_VERSION
in the Makefile β