Commit Graph

1101 Commits

Author SHA1 Message Date
Isaac Connor
a33c9d2826 Increase ONVIF_Options column width to 255 characters
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 13:35:57 -05:00
Isaac Connor
0db328e10f db: add RTSP_User migration (renamed from Janus_RTSP_User)
Adds RTSP_User column and copies data from old Janus_RTSP_User column.
Old column kept for backwards compatibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 15:21:48 -05:00
Isaac Connor
94c94c521f db: add migration for Janus_Use_RTSP_Restream to Restream rename
Adds new Restream column and copies data from the old
Janus_Use_RTSP_Restream column. The old column is intentionally
kept to allow reverting to older ZoneMinder versions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 15:17:54 -05:00
Isaac Connor
eae89025ee refactor: rename RTSP2WebStream to StreamChannel
Rename applies to Go2RTC, Janus, and RTSP2Web streaming options.
Update enum values from Primary/Secondary to Restream/CameraDirectPrimary/CameraDirectSecondary.

- Add db migration zm_update-1.37.79.sql to rename column and migrate data
- Update C++ enum StreamChannelOption and member stream_channel
- Update PHP getStreamChannelOptions() method
- Update all JavaScript references
- Auto-select CameraDirectPrimary when Restream option becomes disabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:37:08 -05:00
Isaac Connor
d89f2e59db refactor: rename Janus_Use_RTSP_Restream to Restream
Rename Janus-specific restream fields to be more generic since they are
now used by Go2RTC and RTSP2Web as well:
- Janus_Use_RTSP_Restream → Restream
- Janus_RTSP_User → RTSP_User

Update visibility logic so the Restream checkbox appears when RTSPServer
is enabled AND any streaming service (Janus, Go2RTC, or RTSP2Web) is
selected, rather than only when Janus is enabled.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 18:47:37 -05:00
Isaac Connor
9cc34eaae1 Bump to 1.37.79 to add back the index on Monitor_Status(UpdatedOn) 2026-01-31 17:12:54 -05:00
Isaac Connor
4e60cb96a7 feat: add User Roles feature for reusable permission templates
Add a User Roles system where roles define reusable permission templates.
When a user has a role assigned, the role provides fallback permissions
(user's direct permissions take precedence; role is used when user has 'None').

Database changes:
- Add User_Roles table with same permission fields as Users
- Add Role_Groups_Permissions table for per-role group overrides
- Add Role_Monitors_Permissions table for per-role monitor overrides
- Add RoleId foreign key to Users table

Permission resolution order:
1. User's direct Monitor/Group permissions (if not 'Inherit')
2. Role's Monitor/Group permissions (if user has role)
3. Role's base permission (if user's is 'None')
4. User's base permission (fallback)

Includes:
- PHP models: User_Role, Role_Group_Permission, Role_Monitor_Permission
- Role management UI in Options > Roles tab
- Role selector in user edit form
- REST API endpoints for roles CRUD
- Translation strings for en_gb

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:34:27 -05:00
Isaac Connor
0c0ab30ba8 Reload triggers for 1.37.77 2026-01-24 11:24:56 -05:00
Isaac Connor
d64c5fa2c8 Remove events_insert_trigger 2026-01-24 11:16:07 -05:00
Isaac Connor
262da35f9c Merge branch 'master' into copilot/fix-orphaned-monitorid-field 2026-01-06 17:03:05 -05:00
Isaac Connor
763ef3c1b9 THe new index on Monitor_Status(UpdatedOn) causes deadlocks. Sigh. Remove it. 2026-01-04 17:50:49 -05:00
copilot-swe-agent[bot]
098ada5403 Add zm_update-1.37.76.sql to drop orphaned MonitorIds column from Users table
Co-authored-by: SteveGilvarry <7613276+SteveGilvarry@users.noreply.github.com>
2025-12-27 08:26:58 +00:00
Isaac Connor
d997084131 Bump to 1.37.75 for creation of Index on Monitor_Status UpdatedOn 2025-12-17 14:22:30 -05:00
Isaac Connor
23bb062ba2 Add index on UpdatedOn column of Monitor_Status table 2025-12-16 11:15:40 -05:00
Isaac Connor
a59f13b9ea Apply new triggers that only update summary tables if there is a DiskSpace change. 2025-12-11 18:31:30 -05:00
Isaac Connor
7c42215f2c Alter event_update_trigger to only update summary tables if there is a diskspace diff 2025-12-02 15:08:06 -05:00
Isaac Connor
44ca1a5d39 Bump version in order to update telemetry endpoint 2025-10-21 06:58:48 -04:00
Isaac Connor
a7c62386dd Change DefaultScale from smallint to char(6) 2025-10-10 09:54:38 -04:00
Isaac Connor
1592eaeaa7 Set DefaultPlayer to '' 2025-09-24 09:53:11 -04:00
Isaac Connor
623158330a Add DefaultPlayer to Monitors table 2025-09-24 09:45:40 -04:00
Isaac Connor
bf4e87307a Put back OutputCodec as updates require it exists 2025-09-08 14:09:34 -04:00
Isaac Connor
7bf2fb8fce Convert OutputCodec from int to varchar OutputCodecName. ffmpeg has different values for codec_id for different versions of ffmpeg. So just use the codec name instead. 2025-08-20 15:59:02 -04:00
Isaac Connor
a668086d69 Add rules to install zm_update-1.37.69.sql 2025-08-09 09:53:15 -04:00
Isaac Connor
ed57267258 Remove updating the Storage table in triggers. Do those updates manually because there is frequently too much contention around the Storage table and filters get locked on it. 2025-08-07 14:08:45 -04:00
Isaac Connor
97877335db Add MaxScoreFrameId to the events table and automatically update it during event creation so we don't have to look it up later. Finding the frame with the max score is actually a very heavy query, so lets not do it. 2025-07-15 16:17:36 -04:00
Isaac Connor
0936a340d7 Add Go2RTCEnabled to Monitors 2025-06-26 14:23:00 -04:00
Isaac Connor
b068dead5f Clear bad layouts and put back all missing divisors of 48 2025-05-13 15:01:13 -04:00
Isaac Connor
0a2e41bedd Add EncoderHWAccel fields 2025-05-13 08:05:04 -04:00
IgorA100
73a4b1d5f3 Layer name changed from "Freeform" to "Auto" (zm_create.sql.in)
To avoid confusion, because after integrating GridStack, instead of "Freeform" we use "Auto"
This will allow us to get rid of the condition
if ($l->Name() == 'Freeform') $l->Name('Auto');
in montage.php
BUT! Now this condition cannot be removed, because it will break the logic in already installed ZM!
2025-05-02 22:58:05 +03:00
IgorA100
c0c2298bb9 Added 3 Wide, 24 Wide, 48 Wide (zm_create.sql.in) 2025-05-02 22:42:49 +03:00
IgorA100
a4c440daab Replace old style layouts with new style layouts (zm_create.sql.in)
New style layouts were implemented in:
99e87a9c1c
https://github.com/ZoneMinder/zoneminder/pull/3969

I haven't tested it, but it should work.
Please check it.

Closed #4315
2025-05-01 23:48:39 +03:00
Simpler1
aca3655442 feat(tags): Filter option for No Tag 2025-03-06 12:23:01 -05:00
Isaac Connor
9a55851cb3 Add db update scripts and bump version for them 2025-02-26 12:40:52 -05:00
Isaac Connor
0cfd860856 Handle Users no longer having MOnitorIds column 2025-01-04 12:51:53 -05:00
Isaac Connor
a24fbe4574 Add EmailServer to filter to override server set in options 2024-07-10 17:14:36 -04:00
Isaac Connor
cb35a6dd90 Handle case when OLD.DiskSpace is NULL 2024-07-09 08:12:52 -04:00
Isaac Connor
7d685e96df Add db updates for WallClockTimestamps for 1.37.62 2024-07-07 09:03:31 -04:00
Isaac Connor
065d73266b Dont use t as an alias for Users 2024-06-26 18:03:21 -04:00
Isaac Connor
99e87a9c1c Bump version to 1.37.60 for new gridstack montage 2024-05-08 13:00:40 -04:00
Isaac Connor
23f5e02273 Also check for Snapshots_Events in case both exist. 2024-04-25 09:46:57 -04:00
Isaac Connor
8a157f8fc9 Correct the name of Snapshot_Events to Snapshots_Events to match the code. 2024-04-09 09:33:13 -04:00
Isaac Connor
d0217c77c1 Make Name a varchar because the unique clause fails for text 2024-04-08 20:16:33 -04:00
Isaac Connor
6744a46148 Add missing , 2024-04-08 20:02:45 -04:00
Isaac Connor
33b001aa2c Merge branch 'master' of github.com:ZoneMinder/zoneminder 2024-04-08 10:01:53 -04:00
Isaac Connor
2fa0ac3daf Remove redundant TimeKey index on logs. Add Component index. Repeat creation of Object_types table as it didn't get included in 1.37.57 2024-04-08 10:00:14 -04:00
Isaac Connor
b9b9df1386 Add missing update for 1.37.57 2024-04-08 09:57:02 -04:00
Isaac Connor
858912597a Remove incorrect comment 2024-04-08 09:50:12 -04:00
Isaac Connor
d5aa5bfa46 Add Object_Types table and perl code to use it. 2024-03-29 18:42:46 -04:00
Isaac Connor
1d7efa7088 Add StartupDelay to Monitors 2024-03-18 12:55:19 -04:00
Isaac Connor
24e38f4d9e Add missing ONVIF_Event_Path from 1.37.54 update 2024-02-29 23:32:56 -05:00