For quite some time, the "shared directories" table with luci-app-samba4 has been a pet peeve of mine. It is much too cramped because not only does it try to display everything in one unwieldly table line for each share, it also expects edits to be made there:
Not only does this table offer no meaningful overview whatsoever (it manages to display all of three characters of a share name, and one of the users if you're lucky), it is also extremely hard to make edits in, and virtually impossible to extend with further options. Which is an issue for me because I need another option, write_list (to have read-write and read-only users on the same share), which is currently only possible to edit on the command line.
I have been looking into the code, and made slight changes to achieve the following overview table:
I'm not completely done yet. I am still working on the overview summaries. I'm mulling the order of options and their distribution within these or additional tabs. And I want to have explanations with the options (if only to combat my own forgetfulness).
But I think it is generally good enough to get a first reaction from the general public. Is there something you don't agree with, is this generally something I should try to get official, or is it too much of a departure from the status quo and I should keep this to myself?
Love that! More of this would be useful across all of openwrt to be honest. Like some of those more obscure 802.11 settings (like 11r/11v related things).
Maybe something that you can expand/hover over to get more info, in case the description is long. (Though hover is problematic on touch screen devices as well as having accessability isssues.) But there should probably be a standardised way of doing this in luci.
I agree. By documenting the options I actually was made aware that some of them don't or don't exactly do what I assumed from the label.
Edit: So I believe I have sorted the options into sensible groups, added missing ones where applicable, and commented them in a hopefully understandable manner:
I'm still very much open for feedback and suggestions.
By the way, is there a deeper reason that both luci-app-samba4 and OpenWrt's samba templates themselves suggest the rather overreaching 0666/0777 masks, effectively kneecapping any sort of distinction between users by default? Is this an attempt at preventing people from getting "confused" and asking too many questions?
Here's the current state, and I believe it's a clear improvement over the old table. If someone wants to give it a whirl, backup /www/luci-static/resources/view/samba4.js
and replace it with https://gist.github.com/sqrwf/ff34d651ccac029011407338e4b7c93a
Note: At this point I'm finished modifying it for myself (and anyone who is fine with copying in the file manually), so this goes from "feature request" to "community project". To justify going through the hassle of forking the packages repository and trying to convince the packages maintainers to accept a PR I would really want some sort of feedback.
It looks good to me from the screenshots, but I don't run a file server on my router myself. I have a separate NAS for that (running plain old Debian configured over ssh). So I'm the wrong person to ask really.
I really like your design. It's definitely a very welcome change from the current design, which has all the drawbacks you mentioned at the first post. I hope packages maintainers accept the PR easily.
This seems like a very useful change that should be upstreamed. Don't get discouraged by the lack of testers because this being a niche thing, coupled with very limited exposure on the forum, tends to make it hard to find people who both use the functionality and are willing to test. Even in a much more mainstream project, such as adblock-lean, getting help with testing before release is a challenge.