-
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
} |
We may merge it as is and the rpcd chamge can be made later
|
This patch resolves only lack of individual file information. Another patch for fs.list() is required to get all the information about folder contents at once like using ls -l. |
Agree. The app just works. We can improve it later on |
applications/luci-app-filemanager/root/usr/share/rpcd/acl.d/luci-app-filemanager.json
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
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
Show resolved
Hide resolved
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js
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
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
- 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 - Large files uploading/downloading - Large files editing - Storage of interface settings in config file Signed-off-by: Dmitry R <[email protected]> luci-app-filemanager: Code improvements and translations luci-app-filemanager: добавлены новые изменения
32cf670
to
5f9e1b5
Compare
Is there anything else I can do to accelerate approvals for this PR? |
Signed-off-by: <[email protected]>
row (viagit commit --signoff
) ✅<package name>: title
first line subject for packages ✅PKG_VERSION
in the Makefile ✅