Open scottlamb opened 6 years ago
Regarding the final bullet point about Unix domain sockets, see: https://github.com/seanmonstar/reqwest/issues/39
There are a lot of usability problems in the existing config interface, as described in this comment. I'd love to address those in a web based-UI, where there's more screen real estate for explanation.
I'm willing to tackle the UI side of this. However there is AFAIK currently no exposed JSON API to manipulate the config data, so this would be a prerequisite. Should that be split out as a separate issue? I have no Rust experience.
Awesome. Very glad to have your help. I Filed #153 for the server-side work, and I'll start working through it soon.
@sky1e continuing our conversation from #276:
@scottlamb wrote: FYI, in case you have too many more TUI config improvements in mind, I should warn you: I'd ultimately like to switch everything to web-based config (https://github.com/scottlamb/moonfire-nvr/issues/35).
@sky1e wrote: I was presuming that even with a decent web ui, the TUI wouldn't just be removed. There are advantages to having a UI that requires nothing but terminal access to the server, as an option.
I actually am imagining having it configured only over HTTP (never having to shut down the server), and dropping the TUI/cursive
entirely. Ultimately Moonfire isn't that useful without HTTP access. I'd like to have a really nice, unified UI that has tooltips, previews of cameras as you're setting them up, etc. And just to have a super light-weight binary (I'm planning on dropping the Docker container stuff too).
Can you be more specific about the advantages you see of a terminal-based UI? I mostly see one: it can be a way of bootstrapping authentication. I've been planning to address that in a few ways:
ssh -L localhost:8080:/var/lib/moonfire-nvr/sock moonfire-nvr@nvr-host
(as mentioned in the config reference).
The TUI
moonfire-nvr config
is a decent way of configuring the system for now, but long-term I'd like all configuration to be done through the web UI:new JSON interfaces to define(split to #153)server refactoring: the(split to #153 also)Streamer
andSyncer
interfaces in the server don't have any teardown logic, aren't exposed to the web UI in any way, etc.needs to be authenticated,[edit: this is done as part of #26] and have a notion of a config permission (easy)moonfire-nvr config
. I'm thinking a simple CLI for user manipulation which authenticates to the server over a Unix domain socket protected via file permissions orSO_PEERCRED
.