Commit Graph

140 Commits

Author SHA1 Message Date
Scott Lamb 5738410bdc npx browserslist@latest --update-db 2022-10-03 08:29:11 -04:00
Scott Lamb 8d716bf4dd Stop using deprecated @mui/styles
I was struggling to upgrade the version of mui stuff (material and date
picker). I'm hoping getting rid of the deprecated stuff eases this a
bit.

I don't love that I can't just use sx on plain HTML stuff and have to
wrap it in Box, but oh well. Looks like I'm not alone, fwiw.
https://github.com/mui/material-ui/issues/23220
2022-10-03 08:29:11 -04:00
Scott Lamb 4addf3c90c npm upgrade 2022-03-16 15:46:42 -07:00
Scott Lamb 3c1171e405 link to JS equality rules 2022-03-07 13:48:47 -08:00
Scott Lamb 93792fcc57 better document TimerangeSelector
I haven't figured out how to expose its state in the URL (for #202),
but documenting how it works today seems like a good first step.
2022-03-07 13:13:32 -08:00
Scott Lamb 08109d61ce clean up App.tsx
This structure (described in
https://github.com/scottlamb/moonfire-nvr/issues/202#issue-1161741347)
has less activity-specific logic in App.tsx itself and avoids duplicate
route handling.

This fixes the `No routes matched location "/"` mentioned in #202.
2022-03-07 11:55:44 -08:00
Scott Lamb 782eb2f0d8 add some URL parameters for the list view
This is still missing the time range, which is more complex than the
others. Small steps.
2022-03-04 15:21:37 -08:00
Scott Lamb bcc59e9109 plumb more api response through to list view
This keeps a coarser-grained `toplevel` property rather than `user`
and `session`. It also synthesizes a `streams` field within it with ids.
This makes it easier to put the streams in the URL by id.
2022-03-04 12:03:47 -08:00
Scott Lamb 90c9a31ad0 upgrade almost all frontend deps
typescript isn't at the latest because eslint warns about it.
2022-03-04 08:55:06 -08:00
Scott Lamb 274dc09ec3 upgrade typescript to 4.5.5
I found one significant breaking change: caught exceptions are now
unknown rather than any. Rework the error handling a bit to match.
2022-03-03 14:49:14 -08:00
Scott Lamb a82453e73a upgrade to create-react-scripts v5
I had to disable more of the Login tests to get this to work.
Frustrating, but I just can't figure out how to fake jest timers,
msw, and the testing libraries to all get along anymore.
2022-03-03 14:39:08 -08:00
Scott Lamb 8a65a09c7f upgrade msw version 2022-03-03 12:56:46 -08:00
Scott Lamb bc29e8b23c fix eslint 8 complaints
I'm working on this upgrade now.
https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-presence-queries.md
2022-03-03 12:37:39 -08:00
Scott Lamb d40715c210 fix some type errors in VideoList.test.tsx
For whatever reason, these aren't caught in my current setup. I'm trying
to upgrade the whole frontend mess (typescript version, react-scripts
version) and they're caught then.
2022-03-03 12:28:27 -08:00
Damian Krysta e90d804f1a FIX build - add OR empty string
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 4d3d72c7b5 EDIT - remove or condition
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta f8ff07d2ad EDIT Multiview - fix none in cam selector
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 41dfae336e EDIT - Run prettier
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 28208b7bb4 CHANGE router type
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 3240c20eae FIX tests
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 56918bf5c2 Add store in url for layout and all cameras
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 552f6bf19d FIX lint
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 3988c3922d ADD set search param after selected cam
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 2d517c28dc ADD react router and reading from query params
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
dependabot[bot] c9b1e49f3d Bump url-parse from 1.5.3 to 1.5.10 in /ui
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 09:22:42 -08:00
dependabot[bot] 4d848b64cd Bump follow-redirects from 1.14.7 to 1.14.8 in /ui
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-16 11:01:22 -08:00
dependabot[bot] 6ec1848d00 Bump node-fetch from 2.6.1 to 2.6.7 in /ui
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 09:37:47 -08:00
dependabot[bot] 137f23db05 Bump nanoid from 3.1.23 to 3.2.0 in /ui
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.23...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 09:14:24 -08:00
dependabot[bot] b6a1670b92 Bump follow-redirects from 1.14.1 to 1.14.7 in /ui
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.1 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.1...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-15 00:07:39 -08:00
dependabot[bot] da1e14b8c1 Bump tmpl from 1.0.4 to 1.0.5 in /ui
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 11:01:31 -08:00
dependabot[bot] 2da81f6e24 Bump url-parse from 1.5.1 to 1.5.3 in /ui
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 10:21:11 -08:00
Scott Lamb 4a7f22723c Merge branch 'master' into new-schema 2021-10-21 12:26:31 -07:00
Scott Lamb 74b9f36a75 upgrade to @mui v5 release
This requires a bunch of package name changes. See
[https://mui.com/blog/material-ui-is-now-mui/] for their rationale.
[https://mui.com/guides/migration-v4/] lists the changes:

```
@material-ui/core -> @mui/material
@material-ui/system -> @mui/system
@material-ui/unstyled -> @mui/core
@material-ui/styles -> @mui/styles
@material-ui/icons -> @mui/icons-material
@material-ui/lab -> @mui/lab
@material-ui/types -> @mui/types
@material-ui/styled-engine -> @mui/styled-engine
@material-ui/styled-engine-sc ->@mui/styled-engine-sc
@material-ui/private-theming -> @mui/private-theming
@material-ui/codemod -> @mui/codemod
@material-ui/docs -> @mui/docs
@material-ui/envinfo -> @mui/envinfo
```

We only use a few of these.
2021-09-24 10:57:29 -07:00
Scott Lamb c42314edb5 UI preferences: #153 #155 2021-09-01 15:08:09 -07:00
Scott Lamb 7e5bc42646 improve init segment fetch error msg
Fixes #146, in combination with earlier commit 4892ed7.
2021-08-31 16:41:43 -07:00
Scott Lamb d2c7b62771 fix #157: problem with live multi-camera selection
When you select the first camera in the drop-down on a grid square
that isn't the top left, then select a camera in the top-left, it
behaves strangely.

The root cause is that I had a dumb mistake in how I assigned React
keys. I used the camera index when a camera is selected, and the
inverse of the selected index when one is. But 0 == -0!
2021-08-31 16:20:24 -07:00
dependabot[bot] 0a38044b02 Bump tar from 6.1.0 to 6.1.11 in /ui
Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.11.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.0...v6.1.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 15:17:30 -07:00
Scott Lamb b8b5038f71 better error msg on live view when misconfigured
Improves (but doesn't fix) #119 and #120.
2021-08-13 12:02:42 -07:00
Scott Lamb b388aab250 better error message for live view on iOS (#121) 2021-08-13 08:50:06 -07:00
Scott Lamb 27395ecd4e UI: improve aspect ratio handling
As written in the changelog: Live streams formerly worked around a
Firefox pixel aspect ratio bug by forcing all videos to 16:9, which
dramatically distorted 9:16 camera views. Playback didn't, so anamorphic
videos looked correct on Chrome but slightly stretched on Firefox. Now
both live streams and playback are fully correct on all browsers.
2021-08-12 13:33:19 -07:00
Scott Lamb 164c8c5b21 clarify support for node 12 and 14
* run node 12, 14, and 16 (next to be supported) on CI. This will catch
  node version-specific problems like that solved in dad9bdc.
* mention 12 and 14 in build instructions and link to instructions for
  installing that version.
* follow this in Dockerfile, installing version 14. This addresses
  a "Cannot find module 'worker_threads'" error introduced in
  39a63e0, which (inadvisedly) upgraded gzipper 4->5 in addition to
  the material-ui upgrade.
* use utf-8 encoding rather than ascii in live part parser. Those
  builds apparently don't support ascii. iThey must use "small-icu" or
  have ICU disabled, as described here:
  https://nodejs.org/api/util.html#util_encodings_supported_when_node_js_is_built_with_the_small_icu_option
2021-08-11 23:45:17 -07:00
Scott Lamb 6426745c8c link to material-ui issue about date picker sizing 2021-08-11 15:06:03 -07:00
Scott Lamb dad9bdc20f fix test error with node 14
This worked fine on my workstation with node 12. But on CI or my laptop
with node 14, it failed. Apparently there @testing-library/user-events
expects a peer @testing-library/dom dependency. At least copying the
"npm install --save-dev @testing-library/user-event @testing-library/dom" command
from the top of https://testing-library.com/docs/ecosystem-user-event/
made it work again on my laptop; fingers crossed about CI.
2021-08-10 13:07:13 -07:00
Scott Lamb 39a63e03ae upgrade material-ui to latest beta
This is a surprisingly complex upgrade. Some relevant changes from
[their CHANGELOG](https://github.com/mui-org/material-ui/blob/v5.0.0-beta.3/CHANGELOG.md):

* @material-ui/core/styles no longer re-exports some stuff from
  @material-ui/styles
* there's no more defaultTheme, so tests need to provide one
* select's onChange has a new type; match that. I haven't actually
  tried that the string form (apparently from autofill) works correctly.
* checkboxes no longer default to the secondary color; explicitly
  request this in some places.
* checkbox no longer has a checked argument; use event.target.checked
  instead.
* date pickers have switched to the new style system, so I had to
  redo how I was overridding their spacing for desktop.
* LoadingButton now has a loading property, not pending
* createMuiTheme is no createTheme
2021-08-10 12:43:10 -07:00
dependabot[bot] cf57073d6e Bump ws from 6.2.1 to 6.2.2 in /ui
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-06 09:56:16 -07:00
dependabot[bot] 568e47b843 Bump dns-packet from 1.3.1 to 1.3.4 in /ui
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-05 20:02:29 -07:00
dependabot[bot] 5da5494dfb Bump ssri from 6.0.1 to 6.0.2 in /ui
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 20:52:59 -07:00
Scott Lamb 560fe804d6 use SameSite=Lax instead of SameSite=Strict
To improve reliability of live streams (#59) on Safari.

Safari was dropping the cookie from websocket update requests.
(But it worked sometimes. I don't get why.) I saw folks on the Internet
thinking this related to HttpOnly:

*   https://developer.apple.com/forums/thread/104488
*   https://stackoverflow.com/q/47742807/23584

but I still see this behavior without HttpOnly. SameSite=Strict vs
SameSite=Lax appears to make a difference. Try that instead.
SameSite=Strict is pointless for us anyway as noted in a new comment.
Turning off HttpOnly would be more unfortunate security-wise.
2021-03-31 13:08:03 -07:00
Scott Lamb 2fe961f382 improve live camera error handling
*   don't error out on websocket error message. The close message has
    more useful info. (Unfortunately though, for security reasons it
    doesn't give too much to the script on initial connection failure.)
*   restore normal (non-error/waiting) state when switching cameras.
*   prefix all log messages with the camera name
2021-03-31 09:08:34 -07:00
Scott Lamb f34937220d minor error handling improvements
*   When the MediaSource is in error state (or busy, I think),
    endOfStream throws an exception. This prevented the error from being
    properly displayed in the UI. We don't really need to call
    endOfStream, I guess.
*   including an Event in a format string just said [Object object],
    at least on Safari. Use the type instead, which I think is the
    only useful info in the event anyway.
2021-03-30 16:31:13 -07:00
Scott Lamb d7f4b255bf when developing on Safari, strip HttpOnly
This might be necessary in the production/https case too. But try this
first.
2021-03-30 16:25:20 -07:00
Scott Lamb f92a23fd74 fix Multiview to work in Safari and Firefox
LiveCamera itself still doesn't work in Safari, but small steps.
2021-03-29 14:51:38 -07:00
Scott Lamb 1686196cfb shrink display selector controls 2021-03-26 19:43:50 -07:00
Scott Lamb 0236ab8d64 add live stream viewing to React prototype
It's a start. It can display several streams at once, which is nice.
There are lots of opportunities for improvement:

*   it doesn't keep the videos approximately in sync.
*   it accumulates extra buffering, drifting behind live. This is
    particularly noticeable when it's paused and played again; it can
    be several seconds before it jumps to after the break.
*   it always uses the sub stream rather main. I'd prefer it support
    "auto" (use main if the viewport is larger than the sub stream and
    there's sufficient bandwidth), "main", or "sub".
*   it has a kludgy heuristic where it throws away everything buffered 5
    seconds before the current timestamp. It should throw away
    everything before the current GOP instead, but I need to alter the
    API so it can easily know when that is.
*   it can't tell you when a camera connection is down. This needs an
    API change also.
*   it'd be nice to quickly double-click on a stream to view only it,
    then double-click again to go back to the multi-pane view.
*   it doesn't allow you to zoom in on part of the video. This would be
    nice particularly when viewing 4k video streams on small screens.
*   it has only four preconfigured layouts that subdivide a 16x9
    viewport. You have to choose every camera every time. It'd be nice
    to both allow more flexibility and have more memory.

React prototype: #111
live stream: #59
2021-03-26 16:45:47 -07:00
Scott Lamb 2215032a78 make time pickers full width
Now they vertically align with the max video duration.
2021-03-17 11:18:01 -07:00
Scott Lamb 85da157cf4 Revert "use secondary colors in date pickers"
This reverts commit d273a99f83.
This accidentally increased the density by making my global CSS
overrides ineffective. I'm struggling to achieve both, and I'd rather
have my desired sizing.
2021-03-17 11:10:39 -07:00
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 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 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 08c3246982 first draft of react-based list ui (#111) 2021-03-05 16:59:57 -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 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 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 44039889c5 switch from yarn to npm
This eases build setup. Where Yarn requires a separate package
repository, npm is available in the standard one.

yarn's package repository signature was recently expired, and apparently
will expire again in a year. Avoid dealing with that.

Fixes #110.
2021-02-16 12:01:51 -08:00
Scott Lamb 4c5444740b
Merge pull request #103 from scottlamb/dependabot/npm_and_yarn/ui/bl-4.0.3
Bump bl from 4.0.2 to 4.0.3 in /ui
2021-01-25 16:45:56 -08:00
Scott Lamb 14d674bc67
Merge pull request #101 from scottlamb/dependabot/npm_and_yarn/ui/http-proxy-1.18.1
Bump http-proxy from 1.18.0 to 1.18.1 in /ui
2021-01-25 16:45:45 -08:00
Scott Lamb a74824854f
Merge pull request #100 from scottlamb/dependabot/npm_and_yarn/ui/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8 in /ui
2021-01-25 16:45:34 -08:00
Scott Lamb 23a54ff8d5
Merge pull request #104 from scottlamb/dependabot/npm_and_yarn/ui/elliptic-6.5.3
Bump elliptic from 6.5.2 to 6.5.3 in /ui
2021-01-25 16:45:14 -08:00
dependabot[bot] 11c3fa7062
Bump bl from 4.0.2 to 4.0.3 in /ui
Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 22:09:15 +00:00
dependabot[bot] 876becccbb
Bump lodash from 4.17.15 to 4.17.20 in /ui
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 22:08:50 +00:00
dependabot[bot] b90495fb6f
Bump ini from 1.3.5 to 1.3.8 in /ui
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 22:08:49 +00:00
Scott Lamb b7095e9b07 upgrade favicons-webpack-plugin
Fixes #105

I still don't know why it wasn't working properly, but I'm happy that
a simple upgrade fixed it.
2021-01-25 14:06:54 -08:00
dependabot[bot] 1cb0ce6f00
Bump elliptic from 6.5.2 to 6.5.3 in /ui
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-23 06:02:56 +00:00
dependabot[bot] 9a641e7468
Bump http-proxy from 1.18.0 to 1.18.1 in /ui
Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-23 06:02:53 +00:00
Scott Lamb dd66c7b0dd restructure into "server" and "ui" subdirs
Besides being more clear about what belongs to which, this helps with
docker caching. The server and ui parts are only rebuilt when their
respective subdirectories change.

Extend this a bit further by making the webpack build not depend on
the target architecture. And adding cache dirs so parts of the server
and ui build process can be reused when layer-wide caching fails.
2021-01-22 22:01:17 -08:00
Scott Lamb 2966cf59b0 couple more js fixes
* make "yarn build" cmd work on first run.
  (it was installing a hardlinked file where the dir should go, yuck)

* remove an obsolete ui/index.html; it's ui-src/index.html now
2017-10-21 23:01:35 -07:00
Scott Lamb 315f3594c2 add a basic Javascript UI
The Javascript is pretty amateurish I'm sure but at least it's something to
iterate from. It's already much more pleasant for browsing through videos in
several ways:

* more responsive to load only a day at a time rather than 90+ days
* much easier to see the same time segment on several cameras
* more pleasant to have the videos load as a popup rather than a link
  that blows away your position in an enormous list
* exposes the fancier .mp4 generation options: splitting at lengths
  other than the default, trimming to an arbitrary start and end time,
  including a subtitle track with timestamps.

There's a slight regression in functionality: I didn't match the former
top-level page which showed how much camera used of its disk allocation and
the total duration of video. This is exposed in the JSON API, so it shouldn't
be too hard to add back.
2017-10-21 21:54:27 -07:00