Commit Graph

944 Commits

Author SHA1 Message Date
Scott Lamb
c5f5bd39ee improve docs a bit
* use a more recent screenshot for selecting tag on github UI, and
  put in a `<details>` because it's annoyingly large.
* put a border around `<details>` so it's easy to see where it
  starts/ends
* add troubleshooting info for docker setup, to help with e.g. #296.
2023-12-05 08:55:38 -08:00
Scott Lamb
882596c7f6 prep v0.7.10 2023-11-28 10:37:23 -08:00
Scott Lamb
8efea4526d build docker images again 2023-11-28 10:32:10 -08:00
Scott Lamb
5b1f7807f9 changelog updates 2023-11-28 10:29:12 -08:00
Scott Lamb
1f7806108c upgrade @mui/x-date-pickers to v6 beta
Fixes #256
2023-11-28 10:26:52 -08:00
Leandro Silva
5e00217784 Fix TimeoutStartSec invalid parsing in moonfire-nvr.service Systemd config
Systemd syntax expects comment in a single line, hence the parsing failure
https://www.freedesktop.org/software/systemd/man/latest/systemd.syntax.html

Before;
```
[leandro@nuc ~]$ sudo systemd-analyze verify /etc/systemd/system/moonfire-nvr.service
/etc/systemd/system/moonfire-nvr.service:16: Failed to parse TimeoutStartSec= parameter, ignoring: 300 # large installations take a while to scan the sample file dirs
[leandro@nuc ~]$
```

After;
```
[leandro@nuc ~]$ sudo systemd-analyze verify /etc/systemd/system/moonfire-nvr.service
[leandro@nuc ~]$
```
2023-10-23 20:18:50 -07:00
Leandro Silva
5ea5d27908 Fix typo in v0.7.8 change log note 2023-10-21 20:13:49 -07:00
Scott Lamb
4a0cb6e62d fix incorrect comment
Fixes #288
2023-10-20 22:13:01 -07:00
Scott Lamb
a2d243d3a4 support systemd socket activation 2023-10-20 21:44:34 -07:00
Scott Lamb
89ee2d0269 systemd Ready/Stopping notification 2023-10-20 11:51:55 -07:00
Scott Lamb
ee98bf5236 no more Docker!
* use `termion` rather than `ncurses` to limit runtime deps
* cross-compile with `cross` instead of our own dockerfiles/scripts
* update instructions
* update release procedure and GitHub actions to match
* prep changelog for `v0.7.8`

Fixes #160
Closes #265
2023-10-18 21:55:47 -07:00
Scott Lamb
faf0201b52 clear pkg versions in subcrates too 2023-10-17 10:18:28 -07:00
Scott Lamb
a76483a912 stop using cargo pkg version
One fewer thing to manage at release time.
2023-10-17 09:44:30 -07:00
Scott Lamb
ef62ebfc6c Merge remote-tracking branch 'origin/release-0.7.7' 2023-10-16 22:05:54 -07:00
Scott Lamb
33e6a18e63 fix benches broken with 02824353 2023-10-16 15:21:51 -07:00
Scott Lamb
1944f95974 fix moonfire-nvr ts subcommand 2023-10-16 15:18:33 -07:00
Scott Lamb
b4eb573ca2 cargo fmt
...necessary to pass CI since changes to stable Rust's formatting.
2023-09-30 16:15:02 -07:00
Scott Lamb
e103a709a0 update caniuse list 2023-09-30 16:04:03 -07:00
Scott Lamb
9820bf8883 tweak ui dev server's websocket situation
* fix the automatic reload
* document that live view doesn't work with `PROXY_TARGET`;
  link to fresh issue
2023-09-30 16:02:52 -07:00
Scott Lamb
2a8c1bb632 let libtest capture logs 2023-08-08 18:24:50 -07:00
Scott Lamb
faba358925 bundle UI files into the binary
This is optional but now enabled for release builds.

Why?

* It shrinks the release docker images a bit, as the binary
  includes only the gzipped version of files and uncompressed into RAM
  at startup (which should be fast).

* It's a step toward #160.
2023-08-06 08:16:27 -05:00
Scott Lamb
cff832e646 prep v0.7.7 2023-08-03 14:03:48 -07:00
Scott Lamb
02ac1a5570 fix #289: crash on sample dir Add button press 2023-08-03 15:58:57 -05:00
Scott Lamb
0f019b6fb3 log to stderr, not stdout 2023-08-03 15:48:59 -05:00
Scott Lamb
b9db9c11cc improve some error logs
...in particular, pass the error as a tracing param rather than directly
in the main error message. The new behavior is nicer with e.g.
OpenTelemetry.
2023-08-03 15:46:36 -05:00
Scott Lamb
9d07d24bc7 camera test button: include full error chain
...otherwise this simply says `UNKNOWN`, discarding the details from
`retina`.
2023-08-03 15:29:02 -05:00
Scott Lamb
64ca096ff3 massive error overhaul
* fully stop using ancient `failure` crate in favor of own error type
* set an `ErrorKind` on everything
2023-07-09 22:04:17 -07:00
Scott Lamb
6a5b751bd6 log error messages in web paths
HTTP requests were only returning the error message to the caller, not
logging locally. In most cases the problem could be understood
client-side, but there are some exceptions. E.g. if Moonfire returns
a 403 on WebSocket update, even in the Chrome debug tools's network
tab the HTTP response body seems to be unavailable. And in general,
it's nice to have more context server-side.

Logging a `response::Body` isn't practical (it could be a stream), so
convert all the web stuff to use `base::Error` err returns.

Convert the `METHOD_NOT_ALLOWED` paths to return `Ok` for now. This is a
bit lame but punts on having some way of plumbing an explicit/overridden
status code in `base::Error`, as no gRPC error kind cleanly maps to
that.

Also convert `db::auth`, rather than making up an error kind in the web
layer.

This is also a small step toward getting rid of `failure::Error`.
2023-07-09 10:15:56 -07:00
Leandro Silva
ed7ab5dddf Add hyperink to the latest release in installation instructions 2023-07-08 17:18:59 -07:00
Scott Lamb
4ad627b997 prep 0.7.6 release 2023-07-08 10:22:04 -07:00
Scott Lamb
baa2ee6118 use bpaf 0.9.1 2023-07-08 10:01:45 -07:00
Scott Lamb
aa60bc991c test and fix #282
Sessions' last use updates weren't getting persisted to the database
because the update statement wasn't passing through the hash.

Also address a TODO of tracing in tests by using the same tracing
setup as in production.
2023-07-04 20:53:53 -07:00
Scott Lamb
028243532a upgrade to Rust 1.70, use std::sync::OnceLock
The most notable part of this is that `db::auth` no longer holds a lock
during password hashing operations. That was probably never a great
idea...
2023-07-04 20:44:21 -07:00
Scott Lamb
ebcdd76084 switch from log to tracing
I think this is a big improvement in readability.

I removed the `lnav` config, which is a little sad, but I don't think it
supports this structured logging format well. Still seems worthwhile on
balance.
2023-07-04 16:51:22 -07:00
Skye
db2e0f1d39 Bump minimum Rust version to 1.65 2023-07-04 16:37:36 -07:00
Skye
81ea7d8a87 Add "Copy config" option to "Add camera" dialog 2023-07-04 16:37:36 -07:00
Skye
1fde947f36 Tiny misc code improvements 2023-07-04 16:37:36 -07:00
Skye
c2d226d58e Add myself as an author 2023-07-04 16:06:50 -07:00
Skye
be53509325 Fix formatting 2023-07-04 16:06:50 -07:00
Skye
10b61ddc5e Use a vector instead of a boxed slice for tab completion results 2023-07-04 16:06:50 -07:00
Skye
3d40a39b93 Add tab completion to Add sample file dir dialog 2023-07-04 16:06:50 -07:00
Skye
930decc766 Make retention screen scroll on overflow 2023-07-04 15:34:45 -07:00
Scott Lamb
05562dae5b upgrade bpaf to nearly-0.9.1
* take advantage of new features to default to `--help` and to print
  the defaults
* remove blank lines from argument help docstrings to avoid truncating
  the output on single `--help` arg (as opposed to `--help --help`)

I'd use the actual released 0.9.1 but it looks like it's not quite out
yet. Will switch over when it is.
2023-07-04 13:55:16 -07:00
Scott Lamb
e4ecd0d853 compile and lint cleanly on latest nightly 2023-07-04 13:46:15 -07:00
Scott Lamb
53414ed903 upgrade to Retina 0.4.5 2023-07-04 13:46:15 -07:00
Skye
6acf9ad67f Make cameras list in TUI scrollable on overflow 2023-07-03 11:15:59 -07:00
Skye
5a567da652 Fix deleting a camera with no video duplicating dialog 2023-07-03 11:15:23 -07:00
Scott Lamb
438de38202
rework WebSocket error return protocol
This gives much better information to the UI layer, getting rid of a
whole troubleshooting guide entry. See #119 #132 #218 #219

I also restructured the code in anticipation of a new WebSocket event
stream (#40).
2023-02-15 17:26:40 -08:00
Scott Lamb
0ffda11d4b
bpaf improvements
* use latest published crate. This is a build fix: it was broken
  when the `exit_code` branch was deleted from the `bpaf` repo, even
  though the commit still exists!
  https://github.com/scottlamb/moonfire-nvr/pull/259

* clean up `db-dir` parsing redundancy, as suggested here:
  https://github.com/pacak/bpaf/discussions/165#discussioncomment-4983158
2023-02-15 08:32:48 -08:00
Tim Small
ad48cf2e10 Fix chown in build instructions.
The build instructions currently fail if the user doesn't have a group
matching their user name (not a universally adopted convention).  Update
the command to use the following functionality of the `chown` command:

"If a colon but no group name follows the user name, that user is made
the owner of the files and the group of the files is changed to that
user's login group."
2023-02-15 08:03:02 -08:00