Commit Graph

468 Commits (master)

Author SHA1 Message Date
Isaac Connor 6427511109 Add IN support to api 2025-07-22 16:49:23 -04:00
Isaac Connor d5e81d3c4a Fix incorrect use of eventObjas an array. 2025-07-19 18:29:22 -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 c3d4b12286 Do pagination if either page or limit is specified. Otherwise return all 2025-07-11 17:40:54 -04:00
Isaac Connor 5929ccce8d Fix the rename of configvals to zm_configvals 2025-07-09 17:24:19 -04:00
Isaac Connor 7a3a5ca58a If request includes pagination= then restore the old pagination code. 2025-07-09 17:24:02 -04:00
Isaac Connor 974e9fd0f2 When editing a monitor via api, if Capturing=None don't start zmc. Fixes #4348 2025-07-04 16:28:39 -04:00
Isaac Connor ce76f953dc Use limit if it is specified 2025-06-21 21:43:01 -04:00
Isaac Connor d97b37f83f Don't do pagination in events.This may break users of API but pagination should only happen if asked for 2025-06-11 14:57:54 -04:00
Isaac Connor 100a321cf9 Fix ISE when auth is turned off. 2024-10-01 10:13:38 -04:00
Isaac Connor 8264cd345c Spacing, remove commented out stuff 2024-04-10 07:15:09 -04:00
Isaac Connor 21183d332b Handle when auth is off, _getCredentials returns null so accessing it as an array is bad. 2024-03-27 12:57:12 -04:00
Isaac Connor dc556c0f70 Handle user being undefined when not logged in 2024-02-11 19:12:37 -05:00
Isaac Connor ad168ca23a Allow monitor creation if Monitors()==Create 2024-01-22 14:25:57 -05:00
Isaac Connor 1ab66b10b1 Don't assume findByEventidAndType actually returns a frame. If we are only recoridng, then there will be no alarm frames in the db 2024-01-16 09:50:19 -05:00
Isaac Connor 065bed894c Use empty array instead of null for allowedMonitors 2023-11-24 08:57:35 -05:00
Isaac Connor 6232cfb8b1 Remove 100 limit on response to events index. Handle there not being a next or prev neighbour. 2023-11-16 18:00:30 -05:00
Isaac Connor 46b27d9f78 Add Tags support to API 2023-11-03 13:33:28 -04:00
Isaac Connor e8a866e504 Add named parameters support to ServerStatsController. 2023-10-26 18:26:51 -04:00
Isaac Connor 8fd33b7f77 Handle case when Alarm frame or MaxScore frame don't exist. 2023-10-15 17:55:44 -04:00
Isaac Connor 38be4feeb8 Servers is a global, don't need to hit the db again 2023-10-05 11:51:33 -04:00
Isaac Connor 58ef8fe509 IF operator is LIKE and there is no %, automatically add them to front and back so that we get a match. 2023-10-05 11:50:29 -04:00
Isaac Connor f864a29eac Always return an array in getCredentialsDeprecated 2023-10-04 11:12:37 -04:00
Alejandro Criado-Pérez 6fd119157a
Text corrections 2023-08-27 02:00:59 +02:00
Joe 87f09d3b7e Fix usage of unset variable
If daemon or args are unset the preg_replace is never called which can
result in count not having a value when referenced in the if statement.
This generates a warning in error.log.
2023-08-13 17:56:55 -07:00
Isaac Connor 0afa383c38 Info to Debug for login. 2023-08-08 14:24:36 -04:00
Isaac Connor 8a00be8cc8 Load the ZM::Event using the Event Model data instead of loading by Id which goes back to db. 2023-06-09 10:53:10 -04:00
Isaac Connor c811f1bc90 Load event using find_one which does caching. 2023-06-09 10:52:39 -04:00
Isaac Connor 54373e4e85 It is not necessary to escape the field as cakephp will do it for us 2023-05-12 15:07:28 -04:00
Isaac Connor 494be9c0ef Add named parameter filtering to Storage controller 2023-05-12 14:10:53 -04:00
Isaac Connor 4472269f3c Finish roughing in UserPreference in api 2023-05-12 14:10:53 -04:00
Isaac Connor 0d561bbf73 Add StartTimeSecs and EndTimeSecs to returned data in Event 2023-05-12 14:10:53 -04:00
Isaac Connor 6e8347c693 Use viewableMonitorIds instead of deprecated MonitorIds 2023-05-12 08:59:36 -04:00
Isaac Connor 49014ac7fa replace MonitorIds with viewableMonitorIds 2023-04-24 13:53:14 -04:00
Isaac Connor e754c2093d Fix another user as array use 2023-04-24 13:09:40 -04:00
stefan 1bd9def63e [API] Fix User variable from array to object
Fix $user variable from array to object to make API work again.
2023-04-23 22:07:24 +02:00
Isaac Connor dd6cc74da7 Rough in UserPreference api 2023-03-22 13:22:08 -04:00
Isaac Connor aac9c644fb Merge branch 'master' of github.com:ZoneMinder/zoneminder 2023-02-28 14:06:16 -05:00
Isaac Connor d75364ff53 Need to always include auth.php, as it has functions like canView 2023-02-27 17:02:23 -05:00
Isaac Connor 82491b3d81 Addd server_stats route 2023-02-27 10:59:14 -05:00
Isaac Connor 8a6f0cbe1b Add ServerStats to api 2023-02-26 17:04:05 -05:00
Isaac Connor 79d19c21d1 Update validating access to Monitors, using canView due to Monitor and Groups permissions 2023-02-25 16:13:39 -05:00
iconnor@connortechnology.com 155502ee32 Must include Storage.php 2023-02-25 13:02:29 -05:00
iconnor@connortechnology.com a7743dd0ed Add DiskTotalSpace and DiskUsedSpace to returned Storage objects 2023-02-25 13:02:19 -05:00
Isaac Connor 00234fbb20 Attempt to sanitize daemon and arguments before executing commands to prevent executing other programs. 2023-02-20 11:53:32 -05:00
Isaac Connor 55041043f2 Put back to 3.0 2023-02-01 14:34:05 -05:00
Andrew Bauer 700c672cbd update ZM_TARGET_DISTRO description 2023-01-29 14:49:54 -06:00
Isaac Connor aa3bc1a28d Add TimeStampSecs to fields returned for Frames. 2023-01-18 10:07:41 -05:00
Isaac Connor 662aa9f39d Add getting frames by event id or other named filters to api 2023-01-09 16:53:27 -05:00
Isaac Connor 7fe10a4047 Fix the HABATM relationship in Snapshots 2022-12-07 15:01:08 -05:00