Commit Graph

61 Commits

Author SHA1 Message Date
Isaac Connor 5d826fd558 Don't try to addup/update DIskSpace used by incomplete events. 2021-02-20 17:11:20 -05:00
Isaac Connor 10c0a6617c Return Debug to a regular function to match other logging functions. Since we switched to using namespaces we no longer clash with cake_php. 2020-10-14 10:39:25 -04:00
Isaac Connor 762bea0761 Bulk load monitor/Group relationships. Instead of using DESCRIBE Monitors Function, use a new function getMonitorFUnctionTypes to get this data for dropdown purposeses. Reduces db hits a lot. 2020-08-31 18:30:05 -04:00
Isaac Connor 479768a2a4 implement disk_used_blocks in Storage. Also use Type() instead of ->{Type} to get default value. 2020-08-17 16:57:53 -04:00
Isaac Connor e5513bc7a4 Add setting Name and Path 2020-08-04 17:35:16 -04:00
Isaac Connor dda630f522 fix filter_regexp to remove trailing / 2020-07-25 14:27:09 -04:00
Isaac Connor fe9db4cfa2 add filtering to Storage->Path() 2020-07-25 13:51:13 -04:00
Isaac Connor 0b267fbdee Add Enabled to Storage 2020-03-04 10:46:16 -05:00
Isaac Connor f3a9e608db Merge branch 'master' of github.com:ZoneMinder/zoneminder 2020-01-13 16:11:19 -05:00
Isaac Connor b11815cfa9 Introduce Storage->EventCount to get the # of events per storage without actually loading all events. 2020-01-13 12:53:50 -05:00
Isaac Connor 6cd76ee2ff Clear cache after loading Events so as to free ram. 2020-01-13 12:53:05 -05:00
Isaac Connor 4632bbd124 Apply relevant changes to deal with php7,4 deprecations 2019-12-07 11:45:32 -05:00
Isaac Connor 5ebf929598 Add Event counts, event disk usage to storage tab of options. Disable checkbox selection when there are events stored on the storage area. 2019-11-26 14:36:39 -05:00
Isaac Connor 606c89962f eliminate an extra db call 2019-11-20 16:30:26 -05:00
Isaac Connor 5494fdb087 When upgrading from a version that doesn't do DiskSpace storage, there can be a lot of events to update. Can't load them all or we run out of ram. Batch them in 1000's 2019-11-20 09:31:16 -05:00
Isaac Connor d036613776 Fix Server() not returning a ServerObject if not found when ServerId is null or 0 2019-10-21 13:45:27 -04:00
Isaac Connor 91651652c7 Only report an error for not finding the server if ServerId had a value 2019-10-21 13:41:32 -04:00
Isaac Connor ee1e12b938 Be more robust about returning a Server object when instantiating the default Storage area. 2019-10-11 17:29:47 -04:00
Isaac Connor 35ec60ca03 Change Storage object to extend ZM_Object 2019-07-23 09:58:05 -04:00
Isaac Connor 5fe565b99d spacing 2019-05-06 10:49:18 -04:00
Isaac Connor 8dd8888975
Php namespace (#2537)
* experiment with namespaces on the Server class

* experiment with namespaces on the Server class

* Implement the ZM namespace on objects

* Implement the ZM namespace on objects

* Implement the ZM namespace on objects
2019-02-22 09:19:07 -05:00
Isaac Connor 8e62c93f5f add to_json function to Storage. 2019-02-06 11:44:36 -05:00
Isaac Connor bdb50567df fix disk_event_space to event_disk_space 2018-10-31 11:56:08 -04:00
Isaac Connor b0c555599c Merge updated objects from sa. Implements caching of objects and fixes logged errors when using the default storage group. Fixes #2209 2018-09-15 09:42:59 -04:00
Isaac Connor 55dcb161ae find should always return an array 2018-09-09 13:59:10 -04:00
Isaac Connor dfdac2ed70 make find and find_one functions consistent across Objects 2018-09-07 16:31:11 -04:00
Isaac Connor 0acad44b4a test for existence of Storage path before trying things like disk_total_space which will fill the html output with php errors. 2018-07-11 17:21:44 -04:00
Isaac Connor da7c953e3d adda blank line 2018-05-07 14:08:32 -07:00
Isaac Connor de149c1328 spacing 2018-04-24 08:48:35 -07:00
Isaac Connor aaa7844350 Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas 2018-04-17 14:18:01 -07:00
Isaac Connor 10a191ae5b add event_disk_space to storage to differentiate between real used space versus event used disk space. Use this in the navbar to show actual disk use and also event disk use 2018-04-17 14:14:40 -07:00
Isaac Connor c043a157ad spacing and add Server function 2018-04-17 12:37:30 -04:00
Isaac Connor 2860e067bc Fix caching when an array is passed to new 2018-04-15 10:26:57 -04:00
Isaac Connor 03ff2fcde4 add caching and find_one to Storage and Groups 2018-04-10 13:05:37 -07:00
Isaac Connor 3abd873c34 Turn off debug 2018-01-19 08:17:17 -08:00
Isaac Connor fe7c54bc26 Fix Debug 2018-01-16 17:54:37 -05:00
Isaac Connor a8dde207e1 Warning should be a debug 2018-01-16 12:33:50 -05:00
Isaac Connor 9f42871c86 Fix Zone Triggers, bump version 2018-01-16 11:49:17 -05:00
Isaac Connor 0d7fff761c upgrade find_all to take parameters 2017-12-22 11:38:42 -08:00
Isaac Connor f51259443c fix disk_used_percentage to use db calculated used size 2017-12-22 09:02:49 -08:00
Isaac Connor dd3f9492ba fix dulicate logic 2017-11-26 15:12:35 -05:00
Isaac Connor 485567349d Don't calc DiskSpace if it is already defined 2017-11-23 07:29:05 -08:00
Isaac Connor df8fbaccea Fixes 2017-10-23 11:50:45 -07:00
Isaac Connor f99e404730 update the total_disk_space function to do and sql sum on the events that already have a space assigned and only update ones that don't. This reduces ram requirements. 2017-10-23 11:02:36 -07:00
Isaac Connor ba4e5572d6 add setting of values to anonymouse member function 2017-10-17 10:09:14 -07:00
Isaac Connor b96b2636bb add the update to add Type to Storage 2017-10-12 07:50:43 -07:00
Isaac Connor 8abb8a9259 add Type to Storage 2017-10-12 07:32:48 -07:00
Isaac Connor 3f01f887aa only count event size when s3 2017-10-11 14:10:53 -04:00
Isaac Connor a286b60150 use already loaded Storage object when lading events 2017-10-10 12:39:53 -07:00
Isaac Connor 7f50a13074 add Event disk space recalc to zmaudit 2017-10-10 12:11:59 -07:00