Commit Graph

769 Commits

Author SHA1 Message Date
Scott Lamb
76ef6e58b8 block outline at select label
Looks like material-ui's `<Select variant="outlined">` needs a redundant
label property to make the layout correct.

https://next.material-ui.com/api/outlined-input/#main-content

"The label of the input. It is only used for layout. The actual
labelling is handled by InputLabel. If specified labelWidth is ignored."
2021-03-17 10:24:51 -07:00
Scott Lamb
83369f673a snappier default display options
*   1-hour videos are a bit faster to render server-side and don't
    require so much index data to be transferred before play starts

*   the timestamp tracks might be causing a lot of excess data transfer
    in some cases. They're currently not interleaved by ascending
    timestamp, and I wonder if they should be. Chrome might be pulling
    all the bytes between the current position in the two tracks, which
    can be excessive. I'll have to consider interleaving when I add
    audio anyway. But for now, just make the default UI display
    snappier. Chrome doesn't display the timestamp track anyway, so
    don't let it slow things down.
2021-03-16 22:28:00 -07:00
Scott Lamb
d273a99f83 use secondary colors in date pickers 2021-03-16 21:57:55 -07:00
Scott Lamb
e272075941 cleanup unnecessary logging & such 2021-03-16 21:13:12 -07:00
Scott Lamb
eb8f6f3ae1 make the video modal easier to dismiss 2021-03-16 16:43:24 -07:00
Scott Lamb
731eb8170d use menu button to show/hide selectors
Once I have more than one area of the UI (e.g., adding config, live
video, or a scrub bar prototype), I'll use this for a pull-down menu to
go between them, and maybe add a filter icon to do what this does. But
this works for now and most closely matches the old UI.

I tried to use a Collapse or Slide transition, but I had trouble getting
it to work on both desktop and mobile. In particular, the way I used the
flex wrap to display the selectors on the left/above doesn't seem
compatible with picking an orientation. If I pick the wrong orientation,
the list views won't fill the empty space.
2021-03-16 16:18:29 -07:00
Scott Lamb
4d6a8c98d9 new display options selector 2021-03-16 14:59:37 -07:00
Scott Lamb
1cb6a19a65 improve time range selector usability
* hide the end day selector away when it's not in use.
  It was confusing, especially since it seemed to have
  a purely black circle over the selected date when disabled.
* add a "Time" label to the time selectors. On desktop,
  this isn't entirely necessary because they have clock icons
  and "hh:mm:ss" annotations. But on mobile, they were entirely blank,
  so it was unclear what they were for.
2021-03-16 14:50:42 -07:00
Scott Lamb
7522b37de7 recommend installing eslint vscode plugin 2021-03-15 23:29:34 -07:00
Scott Lamb
93b0db4c28 visual improvements to list UI, tests
In particular there are fewer reflows while loading.
2021-03-15 23:26:23 -07:00
Scott Lamb
1a5e01adef display tweaks, especially for small screens 2021-03-15 11:08:02 -07:00
Scott Lamb
9d0a48ba00 clear response if range goes back to null
I don't think this ever happens, but just in case, it'd be confusing
if the list didn't clear.
2021-03-14 21:44:03 -07:00
Scott Lamb
718a9a5dc8 sort recordings in descending order by time 2021-03-14 16:27:45 -07:00
Scott Lamb
fa53a4e2ec recommended extension for vscode 2021-03-14 16:25:31 -07:00
Scott Lamb
a13733d434 trim recordings to match the requested range
This matches the default behavior of the old UI. It's not configurable.
I'm not sure anyone ever deliberately unchecked that box.
2021-03-13 22:38:21 -08:00
Scott Lamb
182ed23a06 typo fix: s/firstUncommited/firstUncommitted/
The typo prevented the "@" URL constraint from being correctly added,
so a backend restart could change the video to point somewhere
unintended.
2021-03-13 21:51:59 -08:00
Scott Lamb
56661924ae Merge branch 'master' into new-ui 2021-03-12 14:53:15 -08:00
Scott Lamb
3c057af896 update lnav config to support newer+older styles 2021-03-12 13:40:37 -08:00
Scott Lamb
6f2befec65 release script fixes 2021-03-12 13:33:08 -08:00
Scott Lamb
d5320302a3 prepare version 0.6.2 2021-03-12 12:36:20 -08:00
Scott Lamb
54aef17731 small release script fix 2021-03-12 12:29:34 -08:00
Scott Lamb
2d4e7e5878 tweak the docker release flows 2021-03-12 12:21:44 -08:00
Scott Lamb
1458d668d7 tweak color env variable options
As noted in mylog's 2b1085c:
Looks like both the GNU tools' --color argument and cargo's
CARGO_TERM_COLOR expect always/never rather than on/off. Match that.
Might as well understand off/no/false and on/yes/true also.
2021-03-12 09:24:20 -08:00
Scott Lamb
8ced3155e2 docker optimizations, doc improvements 2021-03-11 23:38:58 -08:00
Scott Lamb
ba10cc21cc use moonfire-ffmpeg that *really* builds with 1.45
(and moonfire-ffmpeg now has CI enabled to test this itself)
2021-03-11 20:10:18 -08:00
Scott Lamb
71ba9955c2 use moonfire-ffmpeg that builds with Rust 1.45
Fixes this CI failure:
https://github.com/scottlamb/moonfire-nvr/runs/2091884707
2021-03-11 19:21:17 -08:00
Scott Lamb
3c130f4fea update moonfire-ffmpeg
This picks up moonfire-ffmpeg's 4b13378:

support ffmpeg's multi-call log messages

This should fix this annoying log output:

```
W20210310 13:17:09.060 s-garage_west-main moonfire_ffmpeg::rtsp] 0xaf300950: RTP H.264 NAL unit type 29
W20210310 13:17:09.060 s-garage_west-main moonfire_ffmpeg::rtsp] 0xaf300950:  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
```

so it looks like this instead:

```
W20210310 13:17:09.060 s-garage_west-main moonfire_ffmpeg::rtsp] 0xaf300950: RTP H.264 NAL unit type 29 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
```
2021-03-11 19:04:44 -08:00
Scott Lamb
fd2d959daa update lock for 0.6.2-dev 2021-03-11 15:41:41 -08:00
Scott Lamb
10b2be3d54 changelog, including upcoming 0.6.2 2021-03-10 17:53:29 -08:00
Scott Lamb
984989dc1c small readability improvements to web.rs
I think this has a minor behavior change: permission denied replies
change to HTTP 403 where they were HTTP 401. The new behavior seems
more correct, as these errors can occur when authentication has
succeeded but the session in question is not authorized for the given
operation. The UI currently doesn't care about this distinction.
2021-03-10 16:21:34 -08:00
Scott Lamb
e66a88a591 fix invariant violation on pts jump (#112)
Looks like a refactoring in 9d7cdc09 introduced the possibility this
could fail (where before it might produce a silly i32 pts) and forgot
to restore the invariant.
2021-03-10 12:45:32 -08:00
Scott Lamb
458bda3fbb Add a bug template
Link to newly extended guide on log files (#112)
2021-03-10 11:04:55 -08:00
Scott Lamb
9099d07dfa improve panic messages and docs (#112) 2021-03-10 08:12:49 -08:00
Scott Lamb
a845ba9769 send ffmpeg's logs through log crate (#112) 2021-03-09 22:09:30 -08:00
Scott Lamb
ea8bdef7d9 support color coding logs (#112)
ffmpeg was already doing this; now do it for native logs.
2021-03-09 22:09:30 -08:00
Scott Lamb
242368aa47 more help reading logs 2021-03-09 13:15:25 -08:00
Scott Lamb
2808d5e139 help folks read logs (#112)
*   add more description to the troubleshooting guide
*   adjust the log format to match more recent glog
*   include a config for the lnav tool, which will help colorize,
    browse, and search the logs.

Next up: install an ffmpeg log callback for consistency.
2021-03-09 00:10:32 -08:00
Scott Lamb
2d45799b7d better error handling for authentication 2021-03-06 05:49:49 -08:00
Scott Lamb
08c3246982 first draft of react-based list ui (#111) 2021-03-05 16:59:57 -08:00
Scott Lamb
cb4f30b5a2 rearrange check deletes to satisfy foreign key
Otherwise `moonfire-nvr check --delete-orphan-rows` can fail with this
error:

```
I0305 113848.655 main moonfire_db::check] Deleting 2 recording rows
E0305 113848.655 main moonfire_nvr] Exiting due to error: FOREIGN KEY constraint failed
```

The new order matches the online system's `db::raw::delete_recordings`.
2021-03-05 12:02:43 -08:00
Scott Lamb
2677184c58 unbreak snackbars
I broke these with the material-ui 5 upgrade.
https://next.material-ui.com/guides/migration-v4/ says that
Snackbar's onExited was removed in favor of TransitionProps.
2021-03-04 15:01:18 -08:00
Scott Lamb
fbaf7517aa avoid ?? in setupProxy.js
It worked fine on my laptop with node.js v14.15.4, but not on my
new workstation with node.js v12.18.2 (as comes with Ubuntu 20.10).
It would print "Unexpected token '?'" without any clue what file the
error is in. I'm trying to fix that here:
https://github.com/facebook/create-react-app/pull/10652
2021-03-04 13:06:46 -08:00
Scott Lamb
9aa72fe670 small but important fix to instructions
Without quotes around the here-document word, the expansion happens
as the command is run, which isn't what I had in mind.
2021-02-28 22:13:38 -08:00
Scott Lamb
e7527af24c upgrade to @material-ui 5.0 alphas
(and various other lockfile upgrades. "npm audit" is clean.)

The date picker to use with 4.0 is unmaintained, and the new one is
apparently quite different.

Given that 5.0 is expected to be released this quarter, I prefer to
jump straight to the new one and get things working with it, even if
it means using an alpha in the short-term.
2021-02-22 16:57:49 -08:00
Scott Lamb
a4cf3be7a0 stop VSCode/Prettier from butchering markdown 2021-02-22 13:54:42 -08:00
Scott Lamb
9706dcaba1 Merge branch 'master' into new-ui 2021-02-22 13:48:20 -08:00
Scott Lamb
d7eea63829 minor api fixes
*   videoSampleEntryId should be a number, not a string
*   fix some markdown formatting
*   fix missing description of sampleFileBytes
2021-02-22 13:46:51 -08:00
Scott Lamb
c9cb5f2f01 disable hanging test for now 2021-02-18 09:10:43 -08:00
Scott Lamb
f281922359 start a new React-based UI (#111)
This doesn't do much yet but should provide a better foundation for
improvement than the jQuery UI, as described in the github issue.
2021-02-17 19:42:32 -08:00
Scott Lamb
c547a49ac8 shorten per-file copyright headers
I'm tired of all the boilerplate, so use the new
GPL-3.0-linking-exception license identifier instead in all the server
components.

I left the ui stuff alone because I'm just going to replace it (#111).

Add a checker for the header because it's easy to forget.
2021-02-17 15:39:17 -08:00