Commit Graph
28 Commits
Author SHA1 Message Date
Cédric VerstraetenandClaude Opus 5.5 58285d1141 ui: bump axios to 0.34.0
Fixes Dependabot alerts #601 (GHSA-x97p-jq2g-jp4f) and #602
(GHSA-9fr6-4gfg-395g). The dependency ranges are unchanged, so only the axios
lockfile entry moves, now resolved from registry.yarnpkg.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:08:02 +00:00
Cédric VerstraetenandClaude Opus 5.5 7e979023ae ui: migrate from Create React App to Vite (#355)
* ui: migrate from Create React App to Vite

react-scripts 5 is unmaintained and pins vulnerable versions of
webpack-dev-server, webpack-dev-middleware, postcss 7 and svgo.

- build and dev server: Vite 8 with @vitejs/plugin-react
- tests: Vitest 4 with jsdom (jest.* -> vi.*; mocked default exports
  now return { default })
- index.html moves to ui/ and loads src/index.jsx as a module
- REACT_APP_ENVIRONMENT is replaced by import.meta.env.PROD/MODE, and
  REACT_APP_AGENT_API_PORT is renamed to VITE_AGENT_API_PORT
- bundled output goes to static/ so it does not mix with public/assets
- package.json is not "type": "module": that would switch CommonJS
  interop to Node semantics and break default imports such as
  @giantmachines/redux-websocket
- sass 1.54 -> 1.108 (Vite needs the modern compiler API); sass-loader
  removed
- requires Node >= 20.19

`yarn build` still writes to machinery/www, so the Dockerfile and CI
workflow are unchanged.

Clears the remaining 9 react-scripts Dependabot alerts. Five alerts for
svgo 1 and decode-uri-component 0.2 remain; they come from build-tool
dependencies of @kerberos-io/ui and are not part of the bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ui: vendor @kerberos-io/ui 1.77.1 to clear the last Dependabot alerts

@kerberos-io/ui 1.77.1 moves its build tools (@svgr/webpack,
svg-react-loader, sass-loader, Storybook, Rollup plugins) out of its
runtime dependencies. Those pulled svgo 1 and decode-uri-component 0.2
into the agent's lockfile.

1.77.1 is tagged on GitHub but was never published to npm, so install
it from a tarball built from kerberos-io/ui@ae1faa7 (tag v1.77.1) and
committed under ui/vendor. Compared with the published 1.77.0 the
exports are identical; the only code change is the bundled uuid (8 -> 11).

The Dockerfile copies ui/vendor before `yarn --frozen-lockfile`.
ui/vendor/README.md records the checksum and how to switch back to the
registry once a fixed version is published.

Clears the remaining 5 Dependabot alerts (svgo, decode-uri-component).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ui: install @kerberos-io/ui 1.77.1 from its GitHub release

Replace the vendored tarball with the one attached to the kerberos-io/ui
v1.77.1 GitHub release, as uug-ai/factory already does. That tarball is
built by the ui repo's release workflow and ships with a .sha256 file
(e9f94f44...); yarn.lock pins it by hash.

Its JS is identical to the locally built tarball, and its CSS differs
only in selector order within @extend-generated rules.

This removes ui/vendor and the extra COPY line in the Dockerfile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ui: address lint findings in the Vite migration

- vite.config.mjs: disable import/no-unresolved; eslint-plugin-import 2.x
  cannot resolve packages that only define "exports" (vite, plugin-react)
- ui/README.md: turn the scripts table into a list to keep lines short
- README.md: wrap the edited UI paragraph

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:52:44 +01:00
Cédric VerstraetenandClaude Opus 5.5 3fc1e49e79 fix: resolve Dependabot security alerts in machinery and ui
machinery (Go):
- google.golang.org/grpc 1.72.1 -> 1.83.2 (incl. critical :path authz bypass)
- go.opentelemetry.io/otel/* 1.36.0 -> 1.47.0
- go.mongodb.org/mongo-driver 1.17.3 -> 1.17.7
- github.com/klauspost/compress 1.16.7 -> 1.20.2
- github.com/eclipse/paho.mqtt.golang 1.5.0 -> 1.5.1 (govulncheck)
- golang.org/x/net 0.57.0 -> 0.62.0 (govulncheck)

otel 1.47 and x/net 0.62 require Go 1.26, so the build image,
devcontainer and CI move from 1.25 to 1.26.

ui:
- axios 0.21.4 -> 0.33.0 (stays on the 0.x API)
- drop unused i18next-http-backend (app uses i18next-xhr-backend)
- replace uuidv4 with uuid 11
- refresh vulnerable transitive packages to the newest in-range versions
  and add resolutions for @tootallnate/once, serialize-javascript, uuid
- refresh @babel/compat-data and helper-compilation-targets so the newer
  browserslist targets are recognised by the build

Remaining alerts (webpack-dev-server 4, webpack-dev-middleware 5,
postcss 7, svgo 1, decode-uri-component 0.2) are pinned by
react-scripts 5 and only affect the dev server and build tooling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 20:07:10 +00:00
Cédric Verstraeten 730b1b2a40 Add WebRTC liveview signaling and UI fallback
Introduce structured WebRTC handshake signaling and client-side fallbacks. Changes:

- machinery: replace HandleLiveHDHandshake channel to carry LiveHDHandshake (payload + signaling callbacks) and expose active WebRTC reader count in dashboard data.
- routers: MQTT and WebSocket handlers now send/receive LiveHDHandshake structs; websocket supports stream-hd and webrtc-candidate messages and uses callback-based signaling to reply over the WS connection.
- webrtc: add helper functions to send MQTT or callback answers/candidates, adapt InitializeWebRTCConnection to the new handshake type, and expose GetActivePeerConnectionCount.
- utils: minor GetMediaFormatted filtering fix and unit test for timestamp range behavior.
- ui: Dashboard gains native WebRTC liveview with fallback to SD image stream, shows active listener count, and handles signaling/candidates; Media page adds datetime range filters, infinite-scroll append behavior, and styles; reducer/action updates to support appending events; package.json scripts disable ESLint plugin during start/build/test.

These changes enable browser-based HD liveviews with dual signaling paths (websocket callbacks or MQTT), improve media filtering, and provide graceful fallback to SD streaming when WebRTC fails.
2026-03-09 21:10:18 +01:00
Cedric Verstraeten ecadf7a4db add realtime processing endpoint 2024-06-11 22:47:01 +02:00
Cedric Verstraeten 60e8edc876 add onvif verify option + improve streaming logic + reconnect websocket 2023-06-12 20:33:41 +02:00
Cedric Verstraeten f935360fda add delay when failed uploading, send to different mqtt topic when no hub + fixes responsiveness 2023-03-23 16:19:01 +01:00
Cedric Verstraeten 71cd315142 disable MQTT message on motion + rework cloud upload (new option RemoveAfterUpload) + sidebar 2023-03-21 13:31:04 +01:00
Cedric Verstraeten fece388ae9 first release of sending live view (sd) over websockets 2022-12-29 21:16:33 +01:00
Cedric Verstraeten 38ee070598 change opacity + add first version of language selector 2022-09-03 22:00:15 +02:00
Thomas Quandalle 72fefba530 add recordings page 2022-09-01 19:54:42 +02:00
Thomas Quandalle efbf03858e fix live view + add total recordings + offline mode option 2022-08-29 22:33:55 +02:00
Thomas Quandalle 19a680cfd8 add MJPEG and live view on dashboard page (WIP)
snapshots are now stored in color instead of gray
2022-08-29 15:12:17 +02:00
Thomas Quandalle e62ae2f770 fix for API url (port might be different) 2022-08-27 13:38:47 +02:00
Thomas Quandalle 2fb6625e9a fix prod build 2022-08-26 22:03:45 +02:00
Thomas Quandalle a1c000e84f add a working settings page (Finally) 2022-08-26 18:01:18 +02:00
olokos 23b357e669 Fix build after 3debf62975
Because of missing imports and some undefined variables the latest code wouldn't compile.

I have fixed it.

The only thing I am not sure about is dispatchConfig: PropTypes.bool.isRequired
Not sure if it's truly bool or if this is valid, but it works finally again, but with proper log timezone!
2022-08-17 20:27:26 +02:00
olokos 4021c0dada No idea how those 2 got downgraded, but lets use the latest versions again 2022-08-17 11:50:02 +02:00
olokos 592e03fc3b Update most of go and javascript dependencies
There were some build issues, also eslint was preventing build because of too old react-scripts, that was in conflict with another requirement for more recent eslint, so I've updated react-scripts, so newer eslint isn't a problem anymore.
2022-08-15 18:11:40 +02:00
Thomas Quandalle 38d3f2e0d0 disable GENERATE_SOURCEMAP=false 2022-06-16 17:06:39 +02:00
Thomas Quandalle 23d4396c4d add UI baseline 2022-06-14 22:02:52 +02:00
Thomas Quandalle 1d1404a3ca aligned version with kerberos-io/ui 2022-06-10 08:45:48 +02:00
Thomas Quandalle 86bb1beb5b more fixes to get to a stable release 2022-06-08 18:46:14 +02:00
Thomas Quandalle 1f79bcfade integrate kerberos/ui 2022-06-08 16:33:21 +02:00
Thomas Quandalle 7908a4af7f update to kerberos-io/ui 1.58 + increase prettifier linting 2022-06-08 13:38:26 +02:00
Thomas Quandalle 4ec9b4f577 fix build 2022-06-05 22:49:15 +02:00
Thomas Quandalle f0890471e5 upgrade node sass 2022-06-05 22:21:56 +02:00
Thomas Quandalle 8e9c1abfd3 move to UI repo 2022-06-05 21:36:22 +02:00